/* =========================================================
   Klinik Harapan — External Stylesheet
   All custom CSS lives here. Tailwind utility classes handle
   the rest in the HTML (via the Play CDN).
   ========================================================= */

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

body {
  background-color: #f5efe6;
  color: #1a2e2c;
  /* Subtle paper-grain texture for warmth */
  background-image:
    radial-gradient(circle at 20% 0%, rgba(45, 79, 63, 0.04), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(201, 152, 107, 0.05), transparent 50%);
}

::selection {
  background-color: #2d4f3f;
  color: #f5efe6;
}

/* ---------- Top utility bar ---------- */
.topbar {
  background-color: #1a2e2c;
  color: #f5efe6;
}

.topbar-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(245, 239, 230, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(26, 46, 44, 0.08);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2d4f3f 0%, #1a2e2c 100%);
  color: #f5efe6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 4px 12px rgba(45, 79, 63, 0.25);
}

.logo-mark-light {
  background: linear-gradient(135deg, #c9986b 0%, #b96b3f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 12px rgba(201, 152, 107, 0.3);
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #2d4f3f;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background-color: #2d4f3f;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #f5efe6;
  border-top: 1px solid rgba(26, 46, 44, 0.08);
}

.mobile-menu.is-open {
  max-height: 320px;
}

.mobile-link {
  display: block;
  padding: 14px 24px;
  font-size: 0.95rem;
  color: #1a2e2c;
  border-bottom: 1px solid rgba(26, 46, 44, 0.06);
}

.mobile-link:last-child {
  border-bottom: none;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background-color: #1a2e2c;
  color: #f5efe6;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px -8px rgba(26, 46, 44, 0.4);
}

.btn-primary:hover {
  background-color: #2d4f3f;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(26, 46, 44, 0.5);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(26, 46, 44, 0.2);
  color: #1a2e2c;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s ease;
  background-color: transparent;
}

.btn-ghost:hover {
  border-color: #1a2e2c;
  background-color: rgba(26, 46, 44, 0.04);
}

.btn-ghost-light {
  margin-top: 8px;
  align-self: flex-start;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  background-color: #c9986b;
  color: #1a2e2c;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.25s ease;
  box-shadow: 0 10px 24px -8px rgba(201, 152, 107, 0.6);
  border: none;
  cursor: pointer;
  margin-top: 8px;
}

.btn-submit:hover {
  background-color: #d4a575;
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Eyebrow label ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #2d4f3f;
}

.eyebrow-light {
  color: #c9986b;
}

.eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  animation: pulse-dot 2.4s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    radial-gradient(ellipse at top right, rgba(122, 155, 136, 0.18), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(201, 152, 107, 0.12), transparent 50%);
}

.hero-visual {
  position: relative;
  border-radius: 24px;
  overflow: visible;
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: 24px;
  display: block;
  box-shadow:
    0 30px 60px -20px rgba(26, 46, 44, 0.3),
    0 18px 36px -18px rgba(26, 46, 44, 0.2);
}

.hero-badge {
  position: absolute;
  bottom: 20px;
  left: -20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 16px;
  background-color: #f5efe6;
  box-shadow: 0 14px 30px -10px rgba(26, 46, 44, 0.25);
  border: 1px solid rgba(26, 46, 44, 0.06);
}

.hero-tag {
  position: absolute;
  top: 20px;
  right: -16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background-color: #1a2e2c;
  color: #f5efe6;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 20px -8px rgba(26, 46, 44, 0.35);
}

.hero-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #7a9b88;
  box-shadow: 0 0 0 0 rgba(122, 155, 136, 0.7);
  animation: live-pulse 1.8s infinite;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(122, 155, 136, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(122, 155, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(122, 155, 136, 0); }
}

/* Trust stats */
.trust-stat {
  border-left: 1px solid rgba(26, 46, 44, 0.12);
  padding-left: 14px;
}

.trust-stat:first-child {
  border-left: none;
  padding-left: 0;
}

/* ---------- Marquee section ---------- */
.marquee-section {
  border-top: 1px solid rgba(26, 46, 44, 0.08);
  border-bottom: 1px solid rgba(26, 46, 44, 0.08);
  background-color: rgba(232, 223, 208, 0.3);
}

/* ---------- Section base ---------- */
.section {
  padding-top: 96px;
  padding-bottom: 96px;
}

.section-bone {
  background-color: #e8dfd0;
  position: relative;
}

.section-bone::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 30% 20%, rgba(45, 79, 63, 0.08), transparent 40%);
}

.section-moss {
  background-color: #1a2e2c;
  background-image:
    radial-gradient(ellipse at top left, rgba(45, 79, 63, 0.6), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(201, 152, 107, 0.15), transparent 50%);
  color: #f5efe6;
  position: relative;
  overflow: hidden;
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 18px;
}

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  position: relative;
  padding: 32px 28px 28px;
  background-color: #f5efe6;
  border: 1px solid rgba(26, 46, 44, 0.08);
  border-radius: 20px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #2d4f3f, #c9986b);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 79, 63, 0.2);
  box-shadow: 0 20px 40px -20px rgba(26, 46, 44, 0.2);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background-color: rgba(45, 79, 63, 0.08);
  color: #2d4f3f;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.service-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.6;
}

.service-card:hover .service-icon {
  background-color: #2d4f3f;
  color: #f5efe6;
}

.service-title {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #1a2e2c;
  margin-bottom: 8px;
}

.service-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(26, 46, 44, 0.65);
  margin-bottom: 16px;
}

.service-price {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c9986b;
  font-weight: 600;
  padding-top: 12px;
  border-top: 1px dashed rgba(26, 46, 44, 0.15);
  width: 100%;
}

/* ---------- Doctors ---------- */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .doctors-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .doctors-grid { grid-template-columns: repeat(4, 1fr); }
}

.doctor-card {
  background-color: #f5efe6;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.35s ease;
  border: 1px solid rgba(26, 46, 44, 0.06);
}

.doctor-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -20px rgba(26, 46, 44, 0.25);
}

.doctor-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: #e8dfd0;
}

.doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.doctor-card:hover .doctor-photo img {
  transform: scale(1.04);
}

.doctor-info {
  padding: 22px 22px 26px;
}

.doctor-spec {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9986b;
  font-weight: 600;
  margin-bottom: 8px;
}

.doctor-name {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #1a2e2c;
  line-height: 1.2;
  margin-bottom: 6px;
}

.doctor-cred {
  font-size: 0.85rem;
  color: rgba(26, 46, 44, 0.65);
  margin-bottom: 4px;
}

.doctor-langs {
  font-size: 0.78rem;
  color: rgba(26, 46, 44, 0.5);
}

/* ---------- Booking form ---------- */
.booking-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

@media (min-width: 900px) {
  .booking-wrap {
    grid-template-columns: 1fr 1.3fr;
    gap: 64px;
  }
}

.booking-points {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.booking-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: rgba(245, 239, 230, 0.7);
}

.booking-points i {
  color: #c9986b;
}

.booking-form {
  background-color: rgba(245, 239, 230, 0.04);
  border: 1px solid rgba(245, 239, 230, 0.12);
  border-radius: 24px;
  padding: 32px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.form-row {
  margin-bottom: 18px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.55);
  font-weight: 500;
}

.form-optional {
  text-transform: none;
  letter-spacing: 0;
  color: rgba(245, 239, 230, 0.35);
  font-weight: 400;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  background-color: rgba(245, 239, 230, 0.06);
  border: 1px solid rgba(245, 239, 230, 0.15);
  border-radius: 10px;
  color: #f5efe6;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(245, 239, 230, 0.35);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #c9986b;
  background-color: rgba(245, 239, 230, 0.1);
  box-shadow: 0 0 0 3px rgba(201, 152, 107, 0.15);
}

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c9986b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
}

/* Date input native styling fix */
.form-field input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7) sepia(1) saturate(2) hue-rotate(-10deg);
  cursor: pointer;
}

.form-status {
  margin-top: 16px;
  font-size: 0.9rem;
  color: #c9986b;
  min-height: 20px;
}

.form-status.is-success {
  color: #7a9b88;
}

/* ---------- Location ---------- */
.location-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 900px) {
  .location-grid {
    grid-template-columns: 1fr 1.3fr;
    gap: 48px;
  }
}

.location-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.info-card {
  display: flex;
  gap: 16px;
  padding: 22px;
  background-color: #f5efe6;
  border: 1px solid rgba(26, 46, 44, 0.08);
  border-radius: 16px;
  transition: border-color 0.2s ease;
}

.info-card:hover {
  border-color: rgba(45, 79, 63, 0.25);
}

.info-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #2d4f3f;
  margin-top: 2px;
}

.info-title {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(26, 46, 44, 0.5);
  font-weight: 600;
  margin-bottom: 6px;
}

.info-text {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #1a2e2c;
}

.info-link {
  color: #2d4f3f;
  text-decoration: none;
  border-bottom: 1px dotted rgba(45, 79, 63, 0.4);
  transition: border-color 0.2s ease;
}

.info-link:hover {
  border-bottom-color: #2d4f3f;
}

.map-frame {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(26, 46, 44, 0.08);
  box-shadow: 0 24px 50px -24px rgba(26, 46, 44, 0.3);
  background-color: #e8dfd0;
  height: 100%;
  min-height: 460px;
}

.map-iframe {
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 0;
  display: block;
  filter: saturate(0.9) contrast(0.95);
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: #1a2e2c;
  color: #f5efe6;
  background-image:
    radial-gradient(ellipse at top right, rgba(201, 152, 107, 0.1), transparent 50%);
}

.footer-title {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.5);
  font-weight: 600;
  margin-bottom: 18px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.92rem;
  color: rgba(245, 239, 230, 0.75);
}

.footer-list a {
  color: inherit;
  transition: color 0.2s ease;
}

.footer-list a:hover {
  color: #c9986b;
}

.footer-bottom {
  border-top: 1px solid rgba(245, 239, 230, 0.08);
}

/* ---------- WhatsApp floating button ---------- */
.whatsapp-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  box-shadow:
    0 12px 28px -8px rgba(37, 211, 102, 0.5),
    0 4px 12px -4px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease;
}

.whatsapp-fab:hover {
  transform: translateY(-3px) scale(1.05);
}

.whatsapp-icon {
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 2;
}

.whatsapp-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #25d366;
  opacity: 0.6;
  animation: whatsapp-ping 2s infinite cubic-bezier(0, 0, 0.2, 1);
  z-index: 1;
}

@keyframes whatsapp-ping {
  0% { transform: scale(1); opacity: 0.5; }
  80%, 100% { transform: scale(1.6); opacity: 0; }
}

@media (min-width: 768px) {
  .whatsapp-fab {
    bottom: 28px;
    right: 28px;
  }
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: reveal-up 0.8s ease 0.1s forwards;
}

.reveal-delay-1 {
  animation-delay: 0.3s;
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
