/* ============================================================
   Header, footer, buttons, floating WhatsApp, shared on every page
   ============================================================ */

/* ---------- Header ---------- */
/* Note: the frosted-glass effect is applied via ::before, not directly on
   .site-header, deliberately. backdrop-filter (like transform/filter) makes
   an element the containing block for its position:fixed descendants, and
   the mobile nav panel below needs position:fixed relative to the viewport,
   not relative to this 76px header. Putting the filter on a decorative
   pseudo-element keeps .site-header itself "plain" for that purpose. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line-dark);
  isolation: isolate;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 30, 56, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  text-decoration: none;
  flex-shrink: 0;
}
.brand img { height: 42px; width: auto; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: -0.01em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--sp-3);
  margin: 0; padding: 0;
}
.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: #D8E1EC;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.main-nav a:hover { color: #fff; }
.main-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--gold);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.header-actions .btn-gold {
  /* On narrow screens the floating WhatsApp button (always visible) and the
     mobile nav panel's own WhatsApp link cover this job; the header button
     is for desktop/tablet where there's room for it without crowding. */
  display: none;
}
@media (min-width: 640px) {
  .header-actions .btn-gold { display: inline-flex; }
}
.header-call {
  display: none;
}
@media (min-width: 1100px) {
  .header-call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
  }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  color: #fff;
}
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle-icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon-close { display: inline-flex; }

@media (max-width: 1099px) {
  .main-nav ul { display: none; }
  .header-call { display: none; }
  .nav-toggle { display: inline-flex; }

  .main-nav.is-open {
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--paper);
    padding: var(--sp-4) var(--gutter);
    overflow-y: auto;
  }
  .main-nav.is-open ul {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
  }
  .main-nav.is-open a {
    font-size: 1.15rem;
    display: block;
    padding: var(--sp-1) 0;
    color: var(--ink);
  }
  .main-nav.is-open a:hover { color: var(--navy); }
  .main-nav.is-open a[aria-current="page"] { color: var(--navy); }
  .main-nav.is-open .header-call {
    display: inline-flex;
    margin-top: var(--sp-3);
    font-size: 1.1rem;
    color: var(--navy);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 19px; height: 19px; flex-shrink: 0; }

.btn-gold {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.btn-outline-dark {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-dark:hover { background: var(--navy); color: #fff; }

.btn-whatsapp {
  background: #1F8A54;
  color: #fff;
  border-color: #1F8A54;
}
.btn-whatsapp:hover { background: #176b41; border-color: #176b41; }

/* ---------- Floating WhatsApp (persistent, primary CTA) ---------- */
.float-whatsapp {
  position: fixed;
  right: clamp(16px, 4vw, 32px);
  bottom: clamp(16px, 4vw, 32px);
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1F8A54;
  color: #fff;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: 0 12px 28px -8px rgba(10, 30, 56, 0.45);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s var(--ease);
}
.float-whatsapp:hover { transform: translateY(-2px) scale(1.02); }
.float-whatsapp svg { width: 24px; height: 24px; }
.float-whatsapp .float-label { display: none; }
@media (min-width: 640px) {
  .float-whatsapp .float-label { display: inline; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep);
  color: #fff;
}
.footer-main {
  padding: var(--sp-7) 0 var(--sp-5);
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: var(--sp-5);
}
@media (max-width: 800px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
}
@media (max-width: 480px) {
  .footer-main { grid-template-columns: 1fr; }
}
.footer-brand img { height: 46px; width: auto; margin-bottom: var(--sp-2); }
.footer-brand p { color: #B9C6D8; font-size: 0.92rem; max-width: 32ch; }

.footer-heading {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--sun);
  margin-bottom: var(--sp-2);
}
.footer-links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  opacity: 0.88;
}
.footer-links a:hover { opacity: 1; text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding: var(--sp-3) 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-1);
  font-size: 0.82rem;
  color: #9FB0C4;
}
.footer-bottom a { color: #9FB0C4; }
@media (min-width: 640px) {
  /* The floating WhatsApp button rests in the bottom-right corner, directly
     over this row's right-aligned text at the page's natural scroll-bottom
     position (not a transient mid-scroll overlap, this is where the page
     settles). Reserve room so "Branches: Tirupati & Vellore" is never
     covered. */
  .footer-bottom { padding-right: 260px; }
}

/* ---------- Section rhythm ---------- */
.section {
  padding-block: var(--sp-7);
}
.section-tight { padding-block: var(--sp-6); }

.section-head {
  max-width: 44ch;
  margin-bottom: var(--sp-5);
}
.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-top: var(--sp-2);
}
.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-deep);
  margin-bottom: var(--sp-1);
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}
