/* =============================================================
   COMMON.CSS  –  Sai Eswar Ortho Kids Care
   Shared across index.html, about.html, treatments.html,
   opd.html, contact.html  +  all treatments/* pages
   ============================================================= */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

/* ── RESET & VARIABLES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple:   #893477;
  --purple-d: #6B2459;
  --purple-l: #F5EBF4;
  --purple-m: #DECADE;
  --green:    #6DAA29;
  --green-l:  #EAF4D8;
  --green-m:  #B8DE80;
  --red:      #D93C31;
  --red-l:    #FDEEED;
  --brown:    #5C3A1E;
  --brown-l:  #F5EDE4;
  --navy:     #2A1040;
  --text:     #1E1030;
  --muted:    #6B6080;
  --border:   #E8DFF0;
  --bg:       #FAFAFA;
  --cream:    #FDF9F0;
  --white:    #FFFFFF;
  --radius:   14px;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--white); }

/* ── TOP BAR ── */
.topbar {
  background: var(--purple-d);
  padding: 8px 48px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: rgba(255,255,255,.88); font-weight: 500;
}
.topbar a { color: #f0d4ee; text-decoration: none; transition: color .2s; }
.topbar a:hover { color: #fff; }
.topbar-left  { display: flex; align-items: center; gap: 8px; }
.topbar-right { display: flex; gap: 24px; align-items: center; }
.topbar-div,
.topbar-divider { width: 1px; height: 14px; background: rgba(255,255,255,.25); }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--purple-l);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 80px;
  box-shadow: 0 4px 24px rgba(124,49,119,.08);
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 56px; width: auto; object-fit: contain; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted);
  padding: 8px 14px; border-radius: 8px; transition: all .2s;
}
.nav-links a:hover, .nav-links .active { color: var(--purple); background: var(--purple-l); }

.nav-cta { display: flex; align-items: center; gap: 12px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 8px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: all .2s;
  border: none; font-family: 'Inter', sans-serif;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-d); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124,49,119,.35); }
.btn-outline { background: transparent; color: var(--purple); border: 2px solid var(--purple); }
.btn-outline:hover { background: var(--purple); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #3a6025; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(74,122,48,.35); }
.btn-white { background: #fff; color: var(--purple); font-weight: 800; }
.btn-white:hover { background: var(--purple-l); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn-lg { padding: 15px 32px; font-size: 16px; border-radius: 10px; }

/* ── CHIPS / BADGES ── */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 50px; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.chip-purple { background: var(--purple-l); color: var(--purple); border: 1.5px solid var(--purple-m); }
.chip-green  { background: var(--green-l);  color: var(--green);  border: 1.5px solid var(--green-m); }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, #2A1040 0%, #5A1A7A 55%, #893477 100%);
  padding: 72px 48px; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 400px; height: 400px;
  border: 80px solid rgba(255,255,255,.04); border-radius: 50%; pointer-events: none;
}
.page-hero::after {
  content: ''; position: absolute; bottom: -60px; left: -60px;
  width: 280px; height: 280px;
  border: 60px solid rgba(255,255,255,.03); border-radius: 50%; pointer-events: none;
}
.page-hero-inner { max-width: 1100px; margin: 0 auto; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.55); margin-bottom: 18px; font-weight: 500; }
.breadcrumb a { color: rgba(255,255,255,.55); text-decoration: none; }
.breadcrumb a:hover { color: #f7b3f3; }
.breadcrumb .bc-sep { color: rgba(255,255,255,.3); }
.breadcrumb .bc-current { color: #f7b3f3; font-weight: 700; }
/* Prevent the global nav selector from styling breadcrumb nav elements */
nav.breadcrumb {
  position: static !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  height: auto !important;
  z-index: auto !important;
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 8px !important;
}

/* ── TREATMENT HERO IMAGE WRAP ── */
.t-hero-wrap {
  position: relative; overflow: hidden; background: var(--navy);
  line-height: 0;
}
.t-hero-wrap::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none; z-index: 1;
}
.t-hero-wrap .t-hero-img {
  width: 100%; height: 320px;
  object-fit: cover; object-position: center 25%;
  display: block; opacity: .95;
}
@media (max-width: 768px) {
  .t-hero-wrap .t-hero-img { height: 200px; }
}
.page-hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(30px, 4vw, 50px); color: #fff; line-height: 1.2; margin-bottom: 14px; }
.page-hero p { font-size: 16px; color: rgba(255,255,255,.75); max-width: 620px; line-height: 1.75; }
.page-hero-meta { display: flex; align-items: center; gap: 20px; margin-top: 24px; flex-wrap: wrap; }
.page-hero-meta .meta-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  padding: 6px 14px; border-radius: 50px;
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,.9);
}

/* ── SECTION COMMON ── */
.section { padding: 80px 48px; max-width: 1100px; margin: 0 auto; }
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--green); margin-bottom: 14px;
}
.section-label::before { content: ''; width: 26px; height: 3px; background: var(--green); border-radius: 2px; }
h2.section-title,
h2.sec-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 3vw, 40px);
  color: var(--navy); line-height: 1.22; margin-bottom: 16px;
}

/* ── FOOTER ── */
footer { background: linear-gradient(135deg, #2A1040 0%, #4A1A68 60%, #893477 100%); color: rgba(255,255,255,.6); padding: 64px 48px 28px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; }
.footer-logo img { height: 52px; width: auto; }
.footer-brand p { font-size: 13px; line-height: 1.8; margin-top: 14px; max-width: 280px; }
.footer-tagline { font-size: 12px; color: #f7b3f3; font-weight: 700; margin-top: 6px; letter-spacing: .5px; }
.footer-socials { display: flex; gap: 10px; margin-top: 20px; }
.social-icon, .soc {
  width: 38px; height: 38px; background: rgba(255,255,255,.12); border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  color: rgba(255,255,255,.85); transition: background .2s, transform .15s;
  flex-shrink: 0;
}
.social-icon:hover, .soc:hover { background: var(--green); color: #fff; transform: translateY(-2px); }
footer h4 { color: #fff; font-size: 13px; font-weight: 800; margin-bottom: 18px; letter-spacing: .8px; text-transform: uppercase; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
footer ul a { font-size: 13px; color: rgba(255,255,255,.55); text-decoration: none; font-weight: 500; transition: color .2s; }
footer ul a:hover { color: #f7b3f3; }
.hours-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.hours-row span:last-child { color: #a8d88a; font-weight: 700; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; margin-bottom: 10px; }
.footer-contact-item .ci { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.footer-bottom {
  max-width: 1200px; margin: 44px auto 0;
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; flex-wrap: wrap; gap: 10px;
}

/* ── HAMBURGER ── */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 40px; height: 40px;
  background: none; border: none; cursor: pointer; padding: 4px;
  border-radius: 8px; transition: background .2s;
}
.hamburger:hover { background: var(--purple-l); }
.hamburger span {
  display: block; width: 24px; height: 2.5px;
  background: var(--purple); border-radius: 2px; transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ── MOBILE NAV DRAWER ── */
.mobile-nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(28,18,48,.55); z-index: 200;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.mobile-nav-overlay.open { display: block; }
.mobile-nav-drawer {
  position: absolute; top: 0; right: 0;
  width: min(300px, 85vw); height: 100%;
  background: var(--white);
  box-shadow: -8px 0 40px rgba(124,49,119,.18);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.mobile-nav-overlay.open .mobile-nav-drawer { transform: translateX(0); }
.mobile-nav-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 16px; border-bottom: 1px solid var(--border);
}
.mobile-nav-head img { height: 44px; width: auto; }
.mobile-close-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--purple-l); border: none; cursor: pointer;
  font-size: 18px; color: var(--purple);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.mobile-close-btn:hover { background: var(--purple); color: #fff; }
.mobile-nav-links { list-style: none; padding: 12px 0; flex: 1; overflow-y: auto; }
.mobile-nav-links li a {
  display: block; padding: 13px 24px;
  font-size: 15px; font-weight: 600; color: var(--text);
  text-decoration: none; transition: all .15s;
  border-left: 3px solid transparent;
}
.mobile-nav-links li a:hover, .mobile-nav-links li a.active {
  color: var(--purple); background: var(--purple-l);
  border-left-color: var(--purple);
}
.mobile-nav-foot {
  padding: 16px 20px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.mobile-nav-foot a {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px; border-radius: 8px;
  font-size: 14px; font-weight: 700; text-decoration: none;
}
.m-call { background: var(--purple-l); color: var(--purple); }
.m-book { background: var(--purple); color: #fff; }
.m-book:hover { background: var(--purple-d); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .topbar, nav { padding: 8px 20px; }
  nav { height: 68px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }
  .page-hero { padding: 52px 20px; }
  .section { padding: 56px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  footer { padding: 48px 20px 24px; }
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .topbar { display: none; }
}

/* ── Inline form field errors ── */
.field-error {
  display: block;
  color: #c0392b;
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}

/* ── Mobile: footer & social icons ── */
@media (max-width: 768px) {
  .footer-socials { gap: 12px; margin-top: 16px; flex-wrap: wrap; }
  .social-icon, .soc { width: 42px; height: 42px; }
  footer { padding: 40px 20px 20px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr !important; }
  .section { padding: 40px 16px; }
}

/* ── FOOTER LINKS COLOR FIX ── */
footer a {
  color: inherit !important;
  text-decoration: none;
  transition: color .2s;
}
footer a:hover {
  color: #f7b3f3 !important;
}

/* ── FLOATING CONTACT BUTTONS ── */
.floating-contact {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}
.floating-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.22);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  color: #fff !important;
  text-decoration: none;
}
.floating-btn svg {
  width: 24px;
  height: 24px;
}
.floating-call {
  background: var(--purple);
}
.floating-call:hover {
  background: var(--purple-d);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(137,52,119,.4);
}
.floating-whatsapp {
  background: #25D366;
}
.floating-whatsapp:hover {
  background: #20ba5a;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37,211,102,.4);
}
@media (max-width: 480px) {
  .floating-contact {
    right: 16px;
    bottom: 16px;
    gap: 10px;
  }
  .floating-btn {
    width: 46px;
    height: 46px;
  }
  .floating-btn svg {
    width: 22px;
    height: 22px;
  }
}

/* ── GLOBAL MOBILE TYPOGRAPHY OPTIMIZATIONS ── */
@media (max-width: 768px) {
  h2.section-title,
  h2.sec-title,
  .section-title,
  .sec-title {
    font-size: 22px !important;
    line-height: 1.28 !important;
    margin-bottom: 14px !important;
  }
  .page-hero h1 {
    font-size: 24px !important;
    line-height: 1.25 !important;
  }
  .page-hero p {
    font-size: 14px !important;
    line-height: 1.65 !important;
  }
  .hero h1 {
    font-size: 26px !important;
    line-height: 1.2 !important;
  }
  .hero p {
    font-size: 15px !important;
    line-height: 1.65 !important;
  }
  /* Optimization for service details cards on home page */
  .service-card-body h3 {
    font-size: 14px !important;
    font-weight: 700 !important;
  }
  .service-card-body p {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
  }
}
