/* ============================================================
   Swastya SADAN — Production fixes (audit remediation)
   ============================================================ */

/* ── Page headers: white text on green ── */
.page-header h1,
.page-header h2,
.page-header p {
  color: var(--color-white);
}

.page-header p {
  opacity: 0.92;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

/* ── Section system (missing from components) ── */
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  text-align: center;
  margin-bottom: var(--space-2);
  color: var(--color-dark);
}

.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  max-width: 640px;
  margin: 0 auto var(--space-4);
  line-height: var(--lh-body);
}

.section-alt {
  background-color: var(--color-white);
}

.section-cta {
  text-align: center;
  margin-top: var(--space-4);
}

/* ── Logo typography ── */
.nav-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  line-height: 1.15;
  text-decoration: none;
}

.nav-logo-img {
  height: 54px;
  width: auto;
  object-fit: contain;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
}

.nav-logo-main {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: inherit;
}

.nav-logo-sub {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--color-accent);
  letter-spacing: 0.02em;
}

.navbar.scrolled .nav-logo-sub {
  color: var(--color-primary);
}

.footer-logo-main {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--color-white);
}

.footer-logo-sub {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-accent);
}

.footer-desc {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  line-height: var(--lh-body);
  margin-bottom: var(--space-2);
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

.footer-sep {
  color: rgba(255, 255, 255, 0.3);
}

.footer-cta {
  margin-top: var(--space-2);
  align-self: flex-start;
}

.footer-hours-highlight {
  color: var(--color-accent);
  font-weight: var(--fw-semi);
}

.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--color-accent);
}

/* ── Trust bar ── */
.trust-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.trust-value {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: var(--fw-medium);
  color: var(--color-primary);
  line-height: 1.2;
}

.trust-label {
  font-size: var(--text-xs);
  color: var(--color-muted);
  line-height: 1.3;
  white-space: normal;
}

.trust-item a.trust-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.trust-item a.trust-link:hover .trust-value {
  color: var(--color-primary-dark);
}

/* ── Service cards (index) ── */
.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(26, 107, 74, 0.08);
  border-radius: 12px;
  margin-bottom: var(--space-3);
}

.service-title {
  font-size: var(--text-lg);
  font-weight: var(--fw-semi);
  margin-bottom: var(--space-1);
  color: var(--color-dark);
}

.service-desc {
  color: var(--color-muted);
  line-height: var(--lh-body);
  margin-bottom: var(--space-3);
  flex-grow: 1;
}

.service-link {
  font-size: var(--text-sm);
  font-weight: var(--fw-semi);
  color: var(--color-primary);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ── Doctor cards ── */
.doctor-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center top;
  background-color: rgba(26, 107, 74, 0.06);
}

.doctor-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #eef5f2;
}

.doctor-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: rgba(26, 107, 74, 0.1);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semi);
  margin-bottom: var(--space-2);
}

.doctor-badge-secondary {
  background-color: rgba(26, 107, 74, 0.08);
}

.doctor-badge-visiting {
  background-color: rgba(232, 145, 58, 0.12);
  color: var(--color-accent-dark);
}

.doctor-card .btn-book {
  margin-top: auto;
  width: 100%;
}

/* ── Hero layout ── */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
  text-align: center;
}

.hero-text-side {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-image-side {
  display: flex;
  justify-content: center;
}

.hero-image-side img {
  max-width: 100%;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-lg);
  max-height: 650px;
  height: auto;
  object-fit: contain;
}

.hero-section .scroll-reveal,
.hero-section .scroll-reveal.visible {
  opacity: 1;
  transform: none;
  transition: none;
}

.open-badge .open-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

.open-badge.closed .open-dot {
  background-color: var(--color-alert);
}

.open-badge::before {
  content: none;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Forms ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.form-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-base);
  line-height: 1.4;
}

.radio-label:has(input:checked),
.checkbox-label:has(input:checked) {
  border-color: var(--color-primary);
  background-color: rgba(26, 107, 74, 0.06);
}

.radio-label input,
.checkbox-label input {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 0.1rem;
  accent-color: var(--color-primary);
}

.form-checkbox-group .checkbox-text {
  font-size: var(--text-sm);
  line-height: 1.5;
}

.char-count {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: 0.375rem;
  text-align: right;
}

.form-status {
  margin-top: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.form-status--success {
  background-color: rgba(39, 174, 96, 0.12);
  color: var(--color-success);
}

.form-status--error {
  background-color: rgba(192, 57, 43, 0.1);
  color: var(--color-alert);
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Appointment sidebar ── */
.sidebar-card {
  background-color: var(--color-light);
  border-radius: var(--card-radius);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

.sidebar-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.sidebar-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background-color: var(--color-white);
  color: var(--color-dark);
  font-family: var(--font-mono);
  font-weight: var(--fw-medium);
  margin-bottom: 0.5rem;
  min-height: 48px;
}

.btn-whatsapp {
  background-color: #25D366;
  border-color: #25D366;
  color: var(--color-white);
}

.btn-whatsapp:hover {
  background-color: #20bd5a;
  color: var(--color-white);
}

.hours-row-highlight {
  color: var(--color-primary);
  font-weight: var(--fw-semi);
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-3);
}

.map-section iframe {
  width: 100%;
  height: 360px;
  border: 0;
  border-radius: var(--card-radius);
}

.schedule-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
  background-color: var(--color-card-bg);
}

.closed-cell {
  color: var(--color-muted);
  font-style: italic;
}

.visiting-note {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-accent);
}

.schedule-note {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-align: center;
}

.session-label {
  text-align: left;
}

.session-time {
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-weight: var(--fw-regular);
}

/* ── Checklists (services, patient info) ── */
.checklist {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}

.checklist li svg {
  flex-shrink: 0;
  margin-top: 0.2rem;
}

/* ── Inner pages: navbar on light background ── */
body.page-inner .navbar {
  position: sticky;
  top: 0;
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

body.page-inner .nav-logo-main {
  color: var(--color-primary);
}

body.page-inner .hamburger-line {
  background-color: var(--color-dark);
}

@media (min-width: 1024px) {
  body.page-inner .nav-links a {
    color: var(--color-dark);
  }

  body.page-inner .nav-links a:hover,
  body.page-inner .nav-links a.active {
    color: var(--color-primary);
    background-color: rgba(26, 107, 74, 0.06);
  }
}

/* ── Layout utilities ── */
.split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.appointment-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.panel-light {
  background: var(--color-light);
  border-radius: var(--card-radius);
  padding: var(--space-4);
}

.info-sidebar {
  position: static;
}

/* ── FAQ / scroll-top: no duplicate arrows ── */
.faq-item .faq-arrow::before {
  content: none;
}

.scroll-top-btn::before {
  content: none;
}

.faq-item.active .faq-answer {
  max-height: none;
  padding-bottom: var(--space-3);
}

.faq-answer p {
  color: var(--color-muted);
}

/* ── Blog cards ── */
.blog-thumb {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: flex-end;
  padding: var(--space-2);
  position: relative;
}

.blog-thumb .blog-category {
  position: relative;
  z-index: 1;
}

.blog-meta {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: var(--space-2);
}

/* ── Why us (index uses h3 not why-us-heading) ── */
.why-us-item h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}

.why-us-item p {
  color: var(--color-muted);
  font-size: var(--text-base);
}

.why-us-icon {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* ── Nav CTA alignment ── */
.nav-cta.btn {
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

/* ── Trust bar: seamless marquee (always running) ── */
.trust-bar {
  overflow: hidden;
  white-space: nowrap;
}

.trust-bar-track {
  display: inline-flex;
  width: max-content;
  animation: scroll-trust 35s linear infinite;
}

.trust-bar-track:hover {
  animation-play-state: paused;
}

.trust-bar-inner {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-4);
  white-space: nowrap;
  flex-wrap: nowrap;
}

.trust-bar-inner[aria-hidden="true"] {
  display: inline-flex; /* keep visible for seamless loop */
}

@keyframes scroll-trust {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Pause on reduced motion */
@media (prefers-reduced-motion: reduce) {
  .trust-bar-track {
    animation: none;
  }
}

/* ── WhatsApp: calmer motion, stays above mobile call bar ── */
.whatsapp-float {
  animation: none;
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .whatsapp-float {
    bottom: 1.5rem;
  }
}

/* ── Hero image: hidden on mobile, shown on desktop ── */
.hero-image-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .hero-image-desktop {
    display: flex;
  }
}

/* ── Mobile hero: reduce height, improve spacing ── */
@media (max-width: 767px) {
  .hero-section {
    min-height: auto;
    padding: 0;
  }

  .hero-content {
    padding: 5rem var(--space-2) 3rem !important;
    text-align: center;
  }

  .hero-title {
    font-size: 1.85rem;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
  }

  .hero-ctas {
    gap: var(--space-2);
  }

  .hero-text-side {
    align-items: center !important;
  }

  .hero-hours {
    justify-content: center !important;
    font-size: var(--text-xs);
  }
}

/* ── Mobile: improve trust item spacing on scroll ── */
@media (max-width: 767px) {
  .trust-item {
    padding: 0.375rem 0;
  }

  .trust-value {
    font-size: var(--text-base);
  }
}

.doctor-card {
  display: flex;
  flex-direction: column;
}

.doctor-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero-hours {
  color: rgba(255, 255, 255, 0.92);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (min-width: 1024px) {
  .hero-hours {
    justify-content: flex-start;
  }
}

.call-divider {
  opacity: 0.4;
}

.optional {
  color: var(--color-muted);
  font-weight: var(--fw-regular);
}

.testimonial-quote {
  padding-left: 0;
}

.testimonial-quote::before {
  display: none;
}

.form-group .form-error[hidden] {
  display: none !important;
}

@media (min-width: 1024px) {
  .hero-content {
    padding: 8rem var(--space-3) var(--space-5) !important;
  }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }

  .hero-text-side {
    align-items: flex-start;
  }

  .hero-image-side {
    justify-content: flex-end;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .radio-group {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .split-grid {
    grid-template-columns: 1fr 1fr;
  }

  .split-grid-wide {
    grid-template-columns: 1fr 2fr;
  }

  .appointment-section {
    grid-template-columns: 1.5fr 1fr;
  }

  .info-sidebar {
    position: sticky;
    top: 6rem;
  }
}

/* Responsive Grid Utilities */
.grid-1-1, .grid-1-5-1, .grid-1-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 768px) {
  .grid-1-1 { grid-template-columns: 1fr 1fr; }
  .grid-1-5-1 { grid-template-columns: 1.5fr 1fr; }
  .grid-1-2 { grid-template-columns: 1fr 2fr; }
}

/* UI Fixes for mobile overlap and squishing */
.whatsapp-float {
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)) !important;
}

@media (min-width: 768px) {
  .whatsapp-float {
    bottom: 1.5rem !important;
  }
}

@media (max-width: 767px) {
  .mobile-call-bar a {
    font-size: 13px !important;
    gap: 0.25rem !important;
  }
  .mobile-call-bar {
    padding: 0.35rem var(--space-2) !important;
    gap: 0.5rem !important;
  }
  
  .footer-hours-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
  }
  .footer-hours-row:last-child {
    border-bottom: none;
  }
  .footer-hours-row .time {
    text-align: left;
  }

  .hours-row {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .hours-time {
    text-align: left !important;
    margin-top: 0.5rem;
  }
}


/* Force a taller aspect ratio for the desktop hero image */
@media (min-width: 1024px) {
  .hero-image-side img {
    aspect-ratio: 4 / 5;
    max-height: 750px !important;
    width: 100%;
    height: auto;
    object-fit: cover !important;
  }
}
