/* ============================================================
   Vitalis — Health & Medical Clinic Template
   Structured corporate house style: one brand color, sharp
   corners, no gradients, no decorative icon sets, numbered
   indices instead of icons.
   ============================================================ */

:root {
  --c-primary: #0e7c86;
  --c-primary-dark: #0a5e66;
  --c-ink: #10201f;
  --c-ink-soft: #45605e;
  --c-bg: #ffffff;
  --c-bg-alt: #f4f8f7;
  --c-border: #dbe6e4;
  --c-block-bg: var(--c-primary);
  --c-block-text: #ffffff;
  --c-block-text-muted: #cfe9e6;
  --radius: 5px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1200px;
}

:root[data-theme="dark"] {
  --c-primary: #29b4ae;
  --c-primary-dark: #1c8e89;
  --c-ink: #eaf5f4;
  --c-ink-soft: #a9c4c1;
  --c-bg: #0d1615;
  --c-bg-alt: #12211f;
  --c-border: #22403c;
  --c-block-bg: #123230;
  --c-block-text: #eafaf8;
  --c-block-text-muted: #9fcfca;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; line-height: 1.15; }
p { margin: 0; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-primary); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius);
  font-weight: 700; font-size: 0.92rem; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: opacity 0.15s ease;
  font-family: var(--font-body);
}
.btn:hover { opacity: 0.88; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-outline { background: transparent; color: var(--c-ink); border-color: var(--c-border); }
:root[data-theme="dark"] .btn-outline { color: var(--c-ink); }
.section { padding: 88px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-top: 10px; }
.section-head p { margin-top: 14px; color: var(--c-ink-soft); font-size: 1.02rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-bg); border-bottom: 1px solid var(--c-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; position: relative; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; text-decoration: none; color: var(--c-ink); }
.logo span { color: var(--c-primary); }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: 0.92rem; font-weight: 600; color: var(--c-ink-soft); }
.nav-links a:hover { color: var(--c-primary); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--radius); border: 1px solid var(--c-border);
  background: none; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--c-ink);
}
.theme-toggle svg { width: 17px; height: 17px; }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
.nav-toggle {
  display: none; width: 38px; height: 38px; border: 1px solid var(--c-border); border-radius: var(--radius);
  background: none; cursor: pointer; flex-direction: column; gap: 4px; align-items: center; justify-content: center;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--c-ink); display: block; }
.mobile-nav {
  visibility: hidden; opacity: 0; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--c-bg); border-bottom: 1px solid var(--c-border);
  padding: 6px 24px 18px; transition: opacity 0.15s ease;
}
.mobile-nav.is-open { visibility: visible; opacity: 1; }
.mobile-nav a { display: block; padding: 11px 0; text-decoration: none; color: var(--c-ink); font-weight: 600; border-bottom: 1px solid var(--c-border); }

/* Hero */
.hero { padding: 76px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.4rem); margin-top: 14px; }
.hero-sub { margin-top: 20px; font-size: 1.08rem; color: var(--c-ink-soft); max-width: 520px; }
.hero-actions { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges { margin-top: 40px; display: flex; gap: 32px; flex-wrap: wrap; }
.hero-badge strong { display: block; font-family: var(--font-display); font-size: 1.5rem; }
.hero-badge span { font-size: 0.82rem; color: var(--c-ink-soft); }
.hero-media { position: relative; }
.hero-media img { width: 100%; aspect-ratio: 4/3.1; object-fit: cover; border-radius: var(--radius); }
.hero-float-badge {
  position: absolute; left: -28px; bottom: -24px; background: var(--c-block-bg); color: var(--c-block-text);
  border-radius: var(--radius); padding: 20px 24px; max-width: 230px;
}
.hero-float-badge .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #6ee7c8; display: inline-block; margin-right: 7px; }
.hero-float-badge strong { font-family: var(--font-display); font-size: 1.3rem; display: block; margin-top: 6px; }
.hero-float-badge span { font-size: 0.8rem; color: var(--c-block-text-muted); }

/* Trust strip */
.trust-strip { padding: 30px 0; border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.trust-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; }
.trust-item { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; color: var(--c-ink-soft); text-transform: uppercase; }

/* Services (tabbed by department) */
.dept-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.dept-tab-btn {
  padding: 10px 20px; border-radius: var(--radius); border: 1.5px solid var(--c-border);
  background: none; font-weight: 700; font-size: 0.88rem; cursor: pointer; color: var(--c-ink-soft); font-family: var(--font-body);
}
.dept-tab-btn.is-active { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-bg-alt); }
.dept-panel { display: none; }
.dept-panel.is-active { display: block; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--c-border); border: 1px solid var(--c-border); }
.service-card { background: var(--c-bg); padding: 32px; }
.service-index { font-family: var(--font-display); font-size: 1.6rem; color: var(--c-primary); }
.service-card h3 { font-size: 1.12rem; margin-top: 14px; }
.service-card p { margin-top: 10px; color: var(--c-ink-soft); font-size: 0.94rem; }

/* Stats band */
.stats-band { background: var(--c-block-bg); color: var(--c-block-text); padding: 56px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 2.4rem; }
.stat-label { margin-top: 6px; font-size: 0.85rem; color: var(--c-block-text-muted); }

/* Doctors */
.doctor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.doctor-card { text-align: left; }
.doctor-avatar {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--c-border);
}
.doctor-avatar img { width: 100%; height: 100%; object-fit: cover; }
.doctor-card h3 { margin-top: 16px; font-size: 1.05rem; }
.doctor-card .role { font-size: 0.86rem; color: var(--c-primary); font-weight: 700; margin-top: 3px; }
.doctor-card .bio { font-size: 0.88rem; color: var(--c-ink-soft); margin-top: 8px; }

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card { border: 1px solid var(--c-border); border-radius: var(--radius); padding: 28px; background: var(--c-bg); }
.stars { color: var(--c-primary); font-size: 0.85rem; letter-spacing: 2px; }
.testimonial-card p { margin-top: 14px; font-size: 0.95rem; color: var(--c-ink-soft); }
.testimonial-name { margin-top: 18px; font-weight: 700; font-size: 0.9rem; }
.testimonial-role { font-size: 0.8rem; color: var(--c-ink-soft); }

/* Appointment form */
.appt-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.appt-info-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--c-border); }
.appt-info-index { font-family: var(--font-display); color: var(--c-primary); font-size: 1.1rem; }
.appt-info-item h4 { font-size: 0.98rem; }
.appt-info-item p { margin-top: 4px; font-size: 0.88rem; color: var(--c-ink-soft); }
.appt-form { border: 1px solid var(--c-border); border-radius: var(--radius); padding: 32px; background: var(--c-bg-alt); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--c-border); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.92rem; background: var(--c-bg); color: var(--c-ink);
}
.field textarea { resize: vertical; min-height: 90px; }

/* FAQ */
.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--c-border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 0; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700; color: var(--c-ink);
}
.faq-plus { font-family: var(--font-display); font-size: 1.3rem; color: var(--c-primary); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.2s ease; }
.faq-a p { padding-bottom: 20px; color: var(--c-ink-soft); font-size: 0.94rem; }
.faq-item.is-open .faq-a { max-height: 240px; }
.faq-item.is-open .faq-plus { transform: rotate(45deg); }

/* Hours/location */
.hours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.hours-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--c-border); font-size: 0.94rem; }
.hours-row span:last-child { font-weight: 700; }
.location-panel { background: var(--c-block-bg); color: var(--c-block-text); border-radius: var(--radius); padding: 32px; }
.location-panel h3 { font-size: 1.1rem; }
.location-panel p { margin-top: 10px; color: var(--c-block-text-muted); font-size: 0.92rem; }

/* Footer */
.site-footer { background: var(--c-bg-alt); border-top: 1px solid var(--c-border); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { text-decoration: none; color: var(--c-ink-soft); font-size: 0.92rem; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--c-border); font-size: 0.82rem; color: var(--c-ink-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .nav-links, .header-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .hero-grid, .appt-grid, .hours-grid { grid-template-columns: 1fr; }
  .service-grid, .doctor-grid, .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .service-grid, .doctor-grid, .testimonial-grid, .stats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .trust-row { justify-content: center; text-align: center; }
}

/* Footer credit logo (added) */
.template-credit { display: flex; align-items: center; gap: 6px; }
.template-credit .credit-logo { height: 16px; width: auto; }
.template-credit a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Sticky book/contact bar (added) ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  background: var(--c-primary-dark); border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(100%); transition: transform 0.3s ease;
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta-inner {
  max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 24px;
}
.sticky-cta-text { color: #fff; font-size: 0.92rem; }
.sticky-cta-text strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.sticky-cta-text span { color: rgba(255, 255, 255, 0.68); }
.sticky-cta-btn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: #fff; color: var(--c-primary-dark); font-weight: 600; font-size: 0.9rem;
  padding: 10px 20px; border-radius: 4px; white-space: nowrap; transition: background-color 0.15s ease;
}
.sticky-cta-btn:hover { background: rgba(255, 255, 255, 0.88); }
@media (max-width: 640px) {
  .sticky-cta-text span { display: none; }
}
