/* ==========================================================================
   Santhwanam Medicity — shared stylesheet
   Calm, established, community medical centre. Green-grounded, mobile-first.
   ========================================================================== */

:root {
  /* Palette — named per brief */
  --bg:    #F6FAF7;  /* soft green-tinted off-white */
  --santh: #1F8A5B;  /* Santhwanam green — primary brand */
  --pine:  #103D2C;  /* deep forest green — headings / text depth */
  --leaf:  #4FB783;  /* fresher light-green — icons / highlights */
  --mist:  #E4EFE8;  /* soft green-grey — alt sections / cards */
  --clay:  #C75B39;  /* warm clay — rare accent only */

  --white: #ffffff;
  --ink:   #21342B;  /* body text */
  --muted: #5A6E64;  /* secondary text */
  --line:  #D8E6DE;  /* hairlines / borders */

  --wa:    #25D366;  /* WhatsApp green */
  --wa-dk: #1da851;

  --maxw: 1120px;
  --gap: clamp(1rem, 3vw, 2rem);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 61, 44, .05), 0 8px 24px rgba(16, 61, 44, .07);
  --shadow-lift: 0 6px 14px rgba(16, 61, 44, .08), 0 18px 40px rgba(16, 61, 44, .12);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mal: "Noto Sans Malayalam", system-ui, sans-serif;
}

/* ----- Reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--santh); text-decoration-thickness: .08em; text-underline-offset: .18em; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--pine);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2rem, 6vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 4.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

:focus-visible {
  outline: 3px solid var(--santh);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--pine);
  color: #fff;
  padding: .7rem 1.1rem;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ----- Layout helpers ----------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }

.section { padding-block: clamp(2.8rem, 7vw, 5rem); }
.section--mist { background: var(--mist); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--santh);
  margin: 0 0 .7rem;
  display: inline-block;
}
.eyebrow::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-top: .45rem;
  background: var(--clay);   /* rare warm accent */
  border-radius: 2px;
}
.eyebrow--center { display: block; }
.eyebrow--center::after { margin-inline: auto; }

.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

.center { text-align: center; }
.section__head { max-width: 64ch; margin-inline: auto; }

/* The structural medical "+" marker */
.plus {
  color: var(--leaf);
  font-weight: 700;
  font-family: var(--font-display);
}

/* ----- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: .95rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  min-height: 48px;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--santh); color: #fff; box-shadow: 0 6px 16px rgba(31, 138, 91, .28); }
.btn--primary:hover { background: #1a754d; }

.btn--wa { background: var(--wa); color: #08321b; }
.btn--wa:hover { background: var(--wa-dk); color: #fff; }

.btn--ghost { background: transparent; color: var(--pine); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--santh); color: var(--santh); }

.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn-row--center { justify-content: center; }

/* ----- Header / nav ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 250, 247, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand__mark {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: var(--santh);
  color: #fff;
  border-radius: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-display); font-weight: 700; color: var(--pine); font-size: 1.12rem; }
.brand__mal  { font-family: var(--font-mal); color: var(--santh); font-size: .82rem; }

.nav__links { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: inline-block;
  padding: .55rem .8rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--pine);
  font-weight: 600;
  font-size: .98rem;
}
.nav__links a:hover { background: var(--mist); }
.nav__links a[aria-current="page"] { color: var(--santh); }
.nav__links a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 3px;
  background: var(--santh); border-radius: 2px;
}

.nav__cta { display: inline-flex; }
/* The in-menu Call button is for the mobile menu only */
.nav__mobile-cta { display: none; }
.nav__toggle {
  display: none;
  background: none; border: 1px solid var(--line);
  border-radius: 8px; width: 44px; height: 44px;
  cursor: pointer; color: var(--pine);
  align-items: center; justify-content: center;
}
.nav__toggle svg { width: 22px; height: 22px; }

@media (max-width: 820px) {
  .nav__toggle { display: inline-flex; }
  .nav__cta { display: none; }
  .nav__links {
    position: absolute;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: .6rem clamp(1.1rem, 4vw, 2rem) 1.1rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .85rem .6rem; border-radius: 8px; font-size: 1.05rem; }
  .nav__links a[aria-current="page"]::after { display: none; }
  .nav__mobile-cta { display: block; margin-top: .5rem; }
}

/* ----- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(79,183,131,.18), transparent 60%),
    radial-gradient(900px 420px at 110% 0%, rgba(31,138,91,.12), transparent 55%),
    var(--bg);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: center;
  padding-block: clamp(2.4rem, 6vw, 4.5rem);
}
.hero__mal {
  font-family: var(--font-mal);
  color: var(--santh);
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 600;
  margin: 0 0 .25rem;
}
.hero h1 { margin-bottom: .4rem; }
.hero__meaning {
  display: inline-block;
  font-style: normal;
  color: var(--muted);
  font-size: .98rem;
  margin-bottom: 1rem;
}
.hero__meaning b { color: var(--pine); font-weight: 700; }
.hero__promise { font-size: 1.2rem; color: var(--ink); max-width: 52ch; }
.hero__trust { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; margin: 1.4rem 0 1.6rem; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.hero__trust li { display: inline-flex; align-items: center; gap: .45rem; }
.hero__trust .star { color: var(--clay); }

.hero__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--mist);
  aspect-ratio: 4 / 3;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 880px) {
  .hero__grid { grid-template-columns: 1.05fr .95fr; }
}

/* ----- Image slots (placeholders for real photos) ------------------------- */
.img-slot {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, rgba(31,138,91,.04) 0 14px, transparent 14px 28px),
    var(--mist);
  color: var(--muted);
  font-size: .85rem;
  padding: 1.5rem;
  min-height: 100%;
}
.img-slot__inner { max-width: 28ch; }
.img-slot .plus { font-size: 1.6rem; display: block; margin-bottom: .3rem; }

/* ----- Departments grid (signature) -------------------------------------- */
.depts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: clamp(.8rem, 2.4vw, 1.2rem);
}
.dept {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dept:hover, .dept:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--leaf);
}
.dept__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--mist);
  color: var(--santh);
  border-radius: 11px;
}
.dept__icon svg { width: 24px; height: 24px; }
.dept h3 { margin: 0; color: var(--pine); }
.dept p { margin: 0; color: var(--muted); font-size: .95rem; }
.dept__more {
  margin-top: auto;
  font-weight: 700;
  font-size: .9rem;
  color: var(--santh);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.dept:hover .dept__more { gap: .55rem; }

/* ----- Trust strip -------------------------------------------------------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
}
.trust-card { display: flex; gap: .9rem; align-items: flex-start; }
.trust-card__icon {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--santh);
  border-radius: 11px;
}
.trust-card__icon svg { width: 22px; height: 22px; }
.trust-card h3 { margin: 0 0 .25rem; font-size: 1.08rem; }
.trust-card p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ----- Testimonials ------------------------------------------------------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
}
.quote {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--leaf);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow);
}
.quote p { font-size: 1.1rem; color: var(--pine); margin: 0 0 1rem; }
.quote__by { font-weight: 700; color: var(--muted); font-size: .92rem; }
.quote__src { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); margin-top: .15rem; }

/* ----- Info / hours + location ------------------------------------------- */
.info-grid {
  display: grid;
  gap: clamp(1rem, 3vw, 1.6rem);
}
@media (min-width: 760px) { .info-grid { grid-template-columns: 1fr 1fr; } }

.info-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 3vw, 1.8rem);
  box-shadow: var(--shadow);
}
.info-card h3 { display: flex; align-items: center; gap: .55rem; }
.info-card h3 svg { width: 22px; height: 22px; color: var(--santh); flex: none; }

.badge-24 {
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(199, 91, 57, .1);
  color: var(--clay);
  border: 1px solid rgba(199, 91, 57, .3);
  font-weight: 700;
  font-size: .9rem;
  padding: .4rem .8rem;
  border-radius: 999px;
  margin-bottom: .8rem;
}
.badge-24 svg { width: 16px; height: 16px; }

.address { font-style: normal; color: var(--ink); line-height: 1.6; }
.phone-line {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--pine);
  text-decoration: none;
  margin: .2rem 0 .3rem;
}
.phone-line:hover { color: var(--santh); }
.phone-note { font-size: .85rem; color: var(--muted); margin: 0 0 1rem; }

.hours-list { list-style: none; margin: 0; padding: 0; }
.hours-list li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
}
.hours-list li:last-child { border-bottom: 0; }
.hours-list .day { color: var(--muted); }
.hours-list .time { font-weight: 700; color: var(--pine); }

.provisional {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--clay);
  background: rgba(199,91,57,.1);
  border-radius: 5px;
  padding: .1rem .4rem;
  margin-left: .4rem;
  vertical-align: middle;
}

/* ----- CTA band ----------------------------------------------------------- */
.cta-band {
  background:
    radial-gradient(700px 300px at 100% 0%, rgba(79,183,131,.25), transparent 60%),
    var(--pine);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfe6da; max-width: 50ch; margin-inline: auto; }
.cta-band .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.cta-band .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ----- Generic content prose --------------------------------------------- */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2rem; }
.prose p { color: var(--ink); }

.note {
  font-size: .9rem;
  color: var(--muted);
  background: var(--mist);
  border: 1px dashed var(--leaf);
  border-radius: var(--radius-sm);
  padding: .9rem 1.1rem;
}
.note b { color: var(--clay); }

/* ----- Services list page ------------------------------------------------- */
.service-row {
  display: grid;
  gap: 1rem 1.4rem;
  align-items: start;
  grid-template-columns: auto 1fr;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 0; }
.service-row__icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  background: var(--mist);
  color: var(--santh);
  border-radius: 13px;
}
.service-row__icon svg { width: 28px; height: 28px; }
.service-row h3 { margin: 0 0 .3rem; }
.service-row p { margin: 0; color: var(--muted); }

/* ----- Page hero (inner pages) ------------------------------------------- */
.page-hero {
  background:
    radial-gradient(900px 360px at 10% -20%, rgba(79,183,131,.16), transparent 60%),
    var(--mist);
  border-bottom: 1px solid var(--line);
}
.page-hero .wrap { padding-block: clamp(2.2rem, 5vw, 3.4rem); }
.page-hero h1 { margin-bottom: .5rem; }
.page-hero p { color: var(--muted); max-width: 60ch; margin: 0; }

/* ----- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--pine);
  color: #cfe0d6;
  padding-block: clamp(2.2rem, 5vw, 3rem);
  font-size: .95rem;
}
.footer-grid {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: 1fr;
}
@media (min-width: 680px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.site-footer h4 { font-family: var(--font-display); color: #fff; margin: 0 0 .8rem; font-size: 1.05rem; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5rem; }
.footer-brand { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.footer-brand .brand__mark { background: var(--leaf); color: var(--pine); }
.footer-brand .brand__name { color: #fff; }
.footer-brand .brand__mal { color: #9fd3ba; }
.footer-mal { font-family: var(--font-mal); color: #9fd3ba; }
.footer-bottom {
  margin-top: 2rem; padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: .85rem; color: #9fb6aa;
  display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: space-between;
}

/* ----- Reveal animations -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .dept:hover, .dept:focus-visible { transform: none; }
}
