/* ==========================================================================
   Dr. Jayalekha – Pregnancy Coach in Kerala
   Theme: soft-pink editorial (blush backgrounds, hot-pink accent,
   light serif headings with italic pink highlights, pill buttons & badges)
   ========================================================================== */

:root {
  --pink: #FE0176;          /* primary accent */
  --pink-hover: #0061B8;    /* button hover */
  --pink-soft: #E97195;     /* nav hover / secondary */
  --pink-light: #FDF2F6;    /* icon circles, soft fills */
  --pink-bg: #FEF0F5;       /* tinted sections */
  --page-bg: #FFF9FA;       /* hero / page background */
  --card-border: #F9E8EF;
  --ink: #222222;
  --ink-2: #2A2A2A;
  --muted: #666666;
  --line: #F1E1E8;
  --white: #FFFFFF;

  --font-head: "Cormorant Garamond", "Noto Serif Malayalam", Georgia, serif;
  --font-body: "Poppins", "Noto Sans Malayalam", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-deco: "Great Vibes", cursive;
  --font-ml: "Noto Sans Malayalam", "Poppins", sans-serif;

  --radius: 16px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .05);
  --shadow-pink: 0 15px 35px rgba(236, 28, 130, .10);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, .08);
  --container: 1200px;
  --header-h: 90px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.7;
  color: var(--ink); background: #fff; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--pink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pink-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--pink-soft); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--pink); color: #fff; padding: 10px 16px; border-radius: 50px; z-index: 200; }
.skip-link:focus { left: 12px; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; line-height: 1.15; color: var(--ink-2); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); line-height: 1.12; letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1rem, 1.3vw, 1.1rem); color: var(--muted); line-height: 1.7; }
.ml { font-family: var(--font-ml); }
.accent { color: var(--pink); font-style: italic; }
.center { text-align: center; }

/* Pill badge (section labels) */
.pill-badge, .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border: 1.5px solid var(--pink);
  border-radius: 50px; color: var(--pink); background: #fff; font-size: .8rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 20px; line-height: 1.3;
}
.pill-badge svg, .eyebrow svg { width: 15px; height: 15px; }

/* ---------- Layout ---------- */
.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.section { padding: clamp(60px, 8vw, 100px) 0; }
.section--tint { background: var(--page-bg); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 50px; font-weight: 500; font-size: .98rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: all .3s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary, .btn-light, .btn-teal { background: var(--pink); color: #fff; }
.btn-primary:hover, .btn-light:hover, .btn-teal:hover { background: var(--pink-hover); color: #fff; box-shadow: 0 10px 20px rgba(0, 97, 184, .2); }
.btn-outline { border-color: var(--pink); color: var(--pink); background: transparent; }
.btn-outline:hover { background: var(--pink-light); color: var(--pink); }
.btn-sm { padding: 10px 20px; font-size: .88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: #fff; transition: box-shadow .3s, height .3s;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.nav > nav { flex: 1; display: flex; justify-content: center; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-2); flex: none; }
.brand-mark { width: 46px; height: 46px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; }
.brand-tag { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--pink); font-weight: 600; }
.nav-menu { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  display: block; padding: 10px 14px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .95rem; position: relative;
}
.nav-menu a:not(.btn):hover, .nav-menu a[aria-current="page"] { color: var(--pink-soft); }
.nav-menu a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--pink-soft); border-radius: 2px; }
.nav-cta { display: none; }
.nav-menu a.btn-primary { color: #fff; }
.header-cta { padding: 12px 24px; font-size: .92rem; }
.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--card-border);
  background: var(--pink-light); cursor: pointer; align-items: center; justify-content: center; order: 3;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--pink); position: relative; transition: .3s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { background: var(--page-bg); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; right: -10%; top: -20%; width: 55vw; height: 55vw; max-width: 720px; max-height: 720px; border-radius: 50%; background: radial-gradient(circle, rgba(254,1,118,.08), transparent 65%); }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: center;
  min-height: calc(100vh - var(--header-h)); padding: 4rem 0 5rem; position: relative; z-index: 1;
}
.hero-content { max-width: 650px; }
.hero h1 { margin-bottom: 18px; }
.hero .ml-line { font-family: var(--font-ml); color: var(--pink-soft); font-weight: 600; font-size: 1rem; margin-bottom: 14px; }
.hero .lead { max-width: 92%; margin-bottom: 36px; }
.hero .btn-row { margin-bottom: 44px; }
.hero-features { display: flex; align-items: center; gap: 22px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.hero-features li { display: flex; align-items: center; gap: 12px; font-size: .9rem; font-weight: 500; line-height: 1.3; color: var(--ink-2); }
.feat-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--pink-light); color: var(--pink); display: grid; place-items: center; flex: none; }
.feat-icon svg { width: 22px; height: 22px; }
.feat-text { max-width: 120px; }
.hero-features .feat-div { width: 1px; height: 40px; background: rgba(0,0,0,.1); }
.hero-media { position: relative; display: flex; justify-content: center; }
.hero-img { width: 100%; max-width: 500px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--pink-light); }
.hero-img img { width: 100%; height: auto; }
.float-card {
  position: absolute; bottom: -20px; right: -10px; background: #fff; padding: 18px 22px; border-radius: 16px;
  display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-pink); max-width: 290px; font-size: .85rem; color: var(--muted); line-height: 1.4;
}
.float-card strong { display: block; color: var(--pink); font-size: 1.15rem; font-weight: 700; margin-bottom: 2px; }
.float-card .dot { width: 56px; height: 56px; border-radius: 50%; background: var(--pink); color: #fff; display: grid; place-items: center; flex: none; }
.float-card .dot svg { width: 26px; height: 26px; }

/* Arch / portrait frame (about page) */
.arch { width: 100%; max-width: 500px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 4px solid var(--card-border); background: var(--pink-light); }
.arch img { width: 100%; height: auto; }

/* ---------- Marquee strip ---------- */
.marquee { background: var(--pink); color: #fff; overflow: hidden; padding: 16px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee span { font-family: var(--font-head); font-size: 1.45rem; font-style: italic; white-space: nowrap; padding: 0 28px; display: inline-flex; align-items: center; gap: 56px; }
.marquee span::after { content: "✦"; font-style: normal; font-size: .9rem; opacity: .8; margin-left: 28px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(50px, 7vw, 90px) 0 clamp(40px, 6vw, 70px); background: var(--page-bg); text-align: center; }
.page-hero .lead { max-width: 720px; margin-inline: auto; }
.page-hero .breadcrumbs ol, .page-hero .meta { justify-content: center; }
.page-hero .split { text-align: left; }
.page-hero .split .breadcrumbs ol { justify-content: flex-start; }
.page-hero .split .lead { margin-inline: 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 20px; font-size: .85rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--pink-soft); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--pink); }

/* ---------- Quick answer (AEO) ---------- */
.answer-box { background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-pink); position: relative; }
.answer-box::before { content: ""; position: absolute; left: 0; top: 28px; bottom: 28px; width: 4px; border-radius: 0 4px 4px 0; background: var(--pink); }
.answer-box h2, .answer-box h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: .4em; }
.answer-box p:last-child { margin-bottom: 0; }
.answer-label { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--pink); margin-bottom: 8px; display: block; }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 30px 26px; transition: transform .3s ease, box-shadow .3s ease; height: 100%; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-pink); }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); font-size: .94rem; }
.card p:last-child { margin-bottom: 0; }
.icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 20px; background: var(--pink-light); color: var(--pink); transition: .3s; }
.icon svg { width: 26px; height: 26px; }
.card:hover .icon { background: var(--pink); color: #fff; }
.card-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; }
.card-link::after { content: "→"; transition: transform .2s; }
.card-link:hover::after { transform: translateX(4px); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding: 70px 24px 26px; background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-lg); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 22px; left: 24px;
  width: 40px; height: 40px; border-radius: 50%; background: var(--pink); color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 600;
}
.step p { color: var(--muted); font-size: .94rem; margin: 0; }

/* ---------- Studio gallery ("A Caring Space") ---------- */
.studio-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 36px; }
.studio-right { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.studio-card { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; border: 4px solid var(--card-border); background: #fff; box-shadow: var(--shadow); }
.studio-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; aspect-ratio: 4 / 3; }
.studio-card--featured img { aspect-ratio: auto; min-height: 100%; }
.studio-card:hover img { transform: scale(1.05); }
.pill-label {
  position: absolute; left: 16px; bottom: 16px; background: #fff; padding: 6px 18px 6px 6px; border-radius: 50px;
  display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: .85rem; color: var(--ink); box-shadow: 0 4px 15px rgba(0,0,0,.08);
}
.label-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--pink); color: #fff; display: grid; place-items: center; }
.label-icon svg { width: 17px; height: 17px; }
.studio-cta { background: var(--pink-bg); border-radius: var(--radius-lg); padding: 30px 40px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.studio-cta h3 { font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 500; margin-bottom: 4px; }
.studio-cta p { margin: 0; color: var(--muted); }
.cta-left { display: flex; align-items: center; gap: 24px; flex: 1; }
.cta-icon { width: 84px; height: 84px; border-radius: 50%; background: #fff; color: var(--pink); display: grid; place-items: center; flex: none; }
.cta-icon svg { width: 38px; height: 38px; }
.cta-right { display: flex; align-items: center; gap: 30px; }
.deco-text { font-family: var(--font-deco); color: var(--pink); font-size: 1.9rem; line-height: 1; transform: rotate(-5deg); white-space: nowrap; }

/* ---------- Trimester tabs ---------- */
.tabs { max-width: 1000px; margin: 0 auto; }
.tab-list { display: flex; justify-content: center; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.tab-list button { border: 1px solid var(--pink); background: #fff; color: var(--pink); padding: 12px 26px; border-radius: 50px; font-weight: 500; cursor: pointer; transition: .3s; }
.tab-list button[aria-selected="true"], .tab-list button:hover { background: var(--pink); color: #fff; }
.tab-panel { background: var(--page-bg); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 44px); }
.tri-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.tri-grid p { color: var(--muted); margin: 0; }
.weeks { display: inline-block; font-weight: 600; color: var(--pink); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.tri { background: #fff; border-radius: var(--radius-lg); padding: 30px; border: 1px solid var(--card-border); }
.tri ul { padding-left: 18px; color: var(--muted); }

/* ---------- Checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 1.4em; }
.checklist li { position: relative; padding-left: 34px; margin-bottom: 12px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--pink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stat { text-align: center; padding: 30px 16px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--card-border); box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--font-head); font-size: clamp(2.2rem, 4vw, 3rem); color: var(--pink); line-height: 1.1; font-weight: 600; }
.stat span { font-size: .9rem; color: var(--muted); }

/* ---------- Testimonials ---------- */
.quote { margin: 0; background: #fff; border-radius: var(--radius-lg); padding: 30px; border: 1px solid var(--card-border); height: 100%; display: flex; flex-direction: column; transition: .3s; }
.quote:hover { box-shadow: var(--shadow-pink); }
.quote::before { content: "\201C"; font-family: var(--font-head); font-size: 5rem; color: var(--pink); line-height: .6; display: block; margin-bottom: 6px; }
.quote p { flex: 1; color: var(--muted); }
.quote footer { font-weight: 600; color: var(--ink-2); }
.quote footer span { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
.placeholder-note { font-size: .75rem; color: var(--pink); background: var(--pink-light); border-radius: 50px; padding: 4px 12px; display: inline-block; margin-top: 12px; align-self: flex-start; }

/* ---------- FAQ ---------- */
.faq { max-width: 880px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; transition: box-shadow .3s; }
.faq details[open] { box-shadow: var(--shadow-pink); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 60px 20px 24px; font-weight: 500; color: var(--ink-2); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px;
  border-radius: 50%; background: var(--pink-light); color: var(--pink); display: grid; place-items: center; font-size: 1.2rem;
}
.faq details[open] summary::after { content: "–"; background: var(--pink); color: #fff; }
.faq .faq-body { padding: 0 24px 20px; color: var(--muted); }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--pink-bg); border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 56px);
  display: grid; grid-template-columns: 1.4fr auto; gap: 30px; align-items: center; position: relative; overflow: hidden;
}
.cta-band::after { content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: rgba(254, 1, 118, .06); }
.cta-band h2 { margin-bottom: .25em; }
.cta-band p { margin: 0; color: var(--muted); }
.cta-band .btn-row { position: relative; z-index: 1; }

/* ---------- Blog ---------- */
.post-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--card-border); display: flex; flex-direction: column; height: 100%; transition: .3s; }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-pink); }
.post-card .thumb { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--pink-light); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card .body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.4rem; }
.post-card h3 a { color: var(--ink-2); text-decoration: none; }
.post-card h3 a:hover { color: var(--pink); }
.post-card p { color: var(--muted); font-size: .92rem; flex: 1; }
.meta { font-size: .8rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.tag { display: inline-block; background: var(--pink-light); color: var(--pink); font-weight: 600; font-size: .72rem; padding: 4px 12px; border-radius: 50px; letter-spacing: .04em; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.filter-btn { border: 1px solid var(--pink); color: var(--pink); background: #fff; padding: 9px 20px; border-radius: 50px; cursor: pointer; font-weight: 500; font-size: .9rem; transition: .3s; }
.filter-btn[aria-pressed="true"], .filter-btn:hover { background: var(--pink); color: #fff; }
.search-box { max-width: 520px; margin: 0 auto 24px; }
.search-box input { width: 100%; padding: 14px 22px; border-radius: 50px; border: 1px solid var(--card-border); background: var(--page-bg); }
.search-box input:focus { outline: none; border-color: var(--pink); }
.is-hidden { display: none !important; }

/* Article */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.article { font-size: 1.02rem; }
.article h2 { font-size: clamp(1.7rem, 2.8vw, 2.2rem); margin-top: 1.6em; }
.article h3 { margin-top: 1.3em; }
.article ul, .article ol { padding-left: 22px; }
.article ol li::marker { color: var(--pink); font-weight: 600; }
.article li { margin-bottom: 8px; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--card-border); margin: 1em 0 1.6em; }
.article table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .92rem; background: #fff; }
.article th, .article td { padding: 12px 14px; border-bottom: 1px solid var(--card-border); text-align: left; vertical-align: top; }
.article th { background: var(--pink); color: #fff; font-weight: 600; }
.article tbody tr:nth-child(even) { background: var(--page-bg); }
.tldr { background: var(--pink-bg); border-radius: var(--radius-lg); padding: 24px 28px; margin: 0 0 32px; }
.tldr > strong { display: block; font-family: var(--font-head); color: var(--pink); font-size: 1.5rem; font-weight: 600; margin-bottom: 6px; }
.tldr ul { margin: 0; }
.callout { background: var(--page-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 18px 22px; margin: 1.4em 0; font-size: .95rem; }
.callout--warn { background: #FFF1F1; border-color: #F8D2D2; }
.aside-sticky { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 20px; }
.toc { background: var(--page-bg); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 22px; }
.toc h2 { font-size: 1.4rem; margin-bottom: 10px; }
.toc ol { padding-left: 18px; margin: 0; font-size: .9rem; }
.toc li { margin-bottom: 6px; }
.toc a { text-decoration: none; color: var(--ink); }
.toc a:hover { color: var(--pink); }
.author-box { display: flex; gap: 18px; align-items: center; background: var(--page-bg); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 22px; margin-top: 40px; }
.author-box img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid #fff; box-shadow: var(--shadow); }
.sources { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--card-border); margin-top: 40px; padding-top: 20px; }

/* ---------- Webinar ---------- */
.countdown { display: flex; gap: 12px; margin: 22px 0 28px; flex-wrap: wrap; }
.countdown div { background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius); padding: 12px 16px; min-width: 80px; text-align: center; box-shadow: var(--shadow); }
.countdown b { display: block; font-family: var(--font-head); font-size: 2.2rem; color: var(--pink); line-height: 1.1; font-weight: 600; }
.countdown span { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.event-meta { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0 0 24px; }
.event-meta li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.event-meta svg { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--pink-light); color: var(--pink); flex: none; }
.agenda { list-style: none; padding: 0; margin: 0; border-left: 2px dashed var(--pink-soft); }
.agenda li { position: relative; padding: 0 0 22px 28px; }
.agenda li::before { content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--pink); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--pink); }
.agenda time { font-weight: 600; color: var(--pink); font-size: .85rem; display: block; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-pink); border: 1px solid var(--card-border); text-align: left; }
.form-card h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 500; font-size: .88rem; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 18px; border-radius: 12px; border: 1px solid var(--card-border); background: var(--page-bg); transition: .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(254, 1, 118, .1); background: #fff; }
.field .error { color: #C0142D; font-size: .8rem; min-height: 1em; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #C0142D; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--muted); }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--pink); }
.form-status { margin-top: 14px; font-weight: 500; color: var(--pink); min-height: 1.2em; }
.contact-cards { display: grid; gap: 16px; }
.contact-card { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 18px 20px; text-decoration: none; color: var(--ink); transition: .3s; }
.contact-card:hover { box-shadow: var(--shadow-pink); transform: translateY(-3px); color: var(--ink); }
.contact-card .icon { margin: 0; width: 52px; height: 52px; }
.contact-card small { display: block; color: var(--muted); }
.map-wrap { border-radius: var(--radius-lg); overflow: hidden; border: 4px solid var(--card-border); aspect-ratio: 16 / 7; background: var(--pink-light); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Gallery page ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-item { margin: 0; border-radius: var(--radius); overflow: hidden; position: relative; cursor: zoom-in; background: #fff; border: 4px solid var(--card-border); padding: 0; text-align: left; box-shadow: var(--shadow); }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute; left: 14px; bottom: 14px; background: #fff; padding: 7px 16px; border-radius: 50px;
  font-weight: 500; font-size: .82rem; color: var(--ink); box-shadow: 0 4px 15px rgba(0,0,0,.08);
  display: flex; align-items: center; gap: 8px;
}
.gallery-item figcaption::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); }
.lightbox { position: fixed; inset: 0; background: rgba(34, 10, 22, .92); display: none; align-items: center; justify-content: center; z-index: 300; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: min(1000px, 100%); }
.lightbox img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: 16px; }
.lightbox figcaption { color: #fff; text-align: center; margin-top: 14px; }
.lb-btn { position: absolute; background: var(--pink); color: #fff; border: 0; width: 50px; height: 50px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: var(--pink-hover); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- Areas ---------- */
.areas { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; list-style: none; padding: 0; margin: 0; }
.areas li { background: #fff; border: 1px solid var(--pink); color: var(--pink); padding: 8px 18px; border-radius: 50px; font-size: .88rem; font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pink-bg); color: var(--muted); padding: 72px 0 0; font-size: .92rem; border-top: 1px solid var(--card-border); }
.site-footer h2 { color: var(--ink-2); font-size: 1.5rem; font-weight: 600; margin-bottom: 16px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--pink); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-brand .brand { margin-bottom: 16px; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { width: 40px; height: 40px; border-radius: 50%; background: var(--pink); color: #fff; display: grid; place-items: center; transition: .3s; }
.social a:hover { background: var(--pink-hover); color: #fff; }
.social svg { width: 18px; height: 18px; }
.disclaimer { font-size: .8rem; border-top: 1px solid rgba(254, 1, 118, .15); margin-top: 48px; padding: 22px 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(254, 1, 118, .15); padding: 20px 0 28px; font-size: .84rem; }

/* ---------- WhatsApp float ---------- */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 150; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px -8px rgba(37,211,102,.7); transition: transform .2s; }
.wa-float:hover { transform: scale(1.08); color: #fff; }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease-out, transform .8s ease-out; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .header-cta { display: none; }
  .nav-cta { display: block; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-wrap { grid-template-columns: minmax(0, 1fr); }
  .aside-sticky { position: static; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 4rem; min-height: auto; }
  .hero-content { margin: 0 auto; }
  .hero .lead { margin-inline: auto; }
  .hero .btn-row, .hero-features { justify-content: center; }
  .float-card { right: 5%; }
  .studio-cta { flex-direction: column; text-align: center; }
  .cta-left, .cta-right { flex-direction: column; }
}
@media (max-width: 960px) {
  :root { --header-h: 70px; }
  .nav-toggle { display: inline-flex; }
  .nav > nav { flex: 0; }
  .nav-menu {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 16px; gap: 2px; border-bottom: 1px solid var(--card-border);
    transform: translateY(-120%); visibility: hidden; transition: transform .35s ease; box-shadow: 0 20px 30px -20px rgba(0,0,0,.25);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto; z-index: -1;
  }
  .nav-open .nav-menu { transform: none; visibility: visible; }
  .nav-menu a { padding: 14px 16px; border-radius: 12px; }
  .nav-menu a[aria-current="page"] { background: var(--pink-light); }
  .nav-menu a[aria-current="page"]::after { display: none; }
  .nav-cta { margin-top: 8px; }
  .nav-cta .btn { width: 100%; }
  .split, .tri-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cta-band { grid-template-columns: 1fr; text-align: center; }
  .cta-band .btn-row { justify-content: center; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .studio-gallery { grid-template-columns: 1fr; }
  .hero-media { max-width: 460px; margin: 0 auto; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .grid-2, .grid-3, .grid-4, .form-grid, .footer-grid, .gallery-grid { grid-template-columns: 1fr; }
  .brand-tag { font-size: .6rem; }
  .brand-name { font-size: 1.3rem; }
  .hero .btn-row { flex-direction: column; }
  .hero .btn-row .btn { width: 100%; }
  .hero-features { flex-direction: column; align-items: flex-start; width: max-content; max-width: 100%; margin: 0 auto; gap: 16px; text-align: left; }
  .feat-text { max-width: 120px; }
.hero-features .feat-div { display: none; }
  .feat-text { max-width: none; }
  .float-card { right: 50%; transform: translateX(50%); bottom: -30px; width: 90%; }
  .studio-right { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pill-label { font-size: .75rem; padding: 4px 12px 4px 4px; left: 8px; bottom: 8px; }
  .label-icon { width: 26px; height: 26px; }
  .studio-cta { padding: 28px 22px; }
  .deco-text { white-space: normal; }
  .map-wrap { aspect-ratio: 4 / 3; }
  .marquee span { font-size: 1.15rem; }
  .tab-list button { padding: 10px 18px; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print { .site-header, .site-footer, .wa-float, .cta-band, .marquee { display: none; } }

/* ==========================================================================
   Malayalam-content layer (v3) — typography + new sections
   ========================================================================== */
html[lang="ml"] h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.35; letter-spacing: 0; }
html[lang="ml"] h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.4; letter-spacing: 0; }
html[lang="ml"] h3 { font-size: clamp(1.15rem, 1.7vw, 1.35rem); line-height: 1.45; }
html[lang="ml"] body { line-height: 1.85; }
.lead p { margin-bottom: .6em; }
.hero-sub { font-weight: 600; color: var(--pink); letter-spacing: .02em; margin: 6px 0 22px; }
.narrow { max-width: 860px; }
.big-text { font-family: var(--font-head); font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.6; color: var(--ink-2); }
.big-text strong { color: var(--pink); font-weight: 600; }

/* Questions list */
.question-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.question-list li { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius); padding: 16px 20px; font-weight: 500; box-shadow: var(--shadow); transition: .3s; }
.question-list li:hover { transform: translateX(6px); box-shadow: var(--shadow-pink); }
.q-mark { width: 38px; height: 38px; border-radius: 50%; background: var(--pink); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; font-family: var(--font-head); font-size: 1.3rem; }

/* Emoji icons */
.icon.emoji { font-size: 1.7rem; }
.card:hover .icon.emoji { background: var(--pink-bg); }

/* 5-col grid */
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* Program cards (home) */
.program-card { position: relative; background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 34px 30px 30px; transition: .3s; display: flex; flex-direction: column; }
.program-card:hover { box-shadow: var(--shadow-pink); transform: translateY(-4px); }
.program-card p { color: var(--muted); }
.program-card .btn { align-self: flex-start; margin-top: auto; }
.program-card--free { background: var(--pink-bg); }
.prog-num { display: inline-block; font-family: var(--font-head); font-size: 2.2rem; color: var(--pink); font-weight: 600; line-height: 1; margin-bottom: 10px; }
.prog-meta { display: inline-flex; align-self: flex-start; background: var(--pink-light); color: var(--pink) !important; font-weight: 600; font-size: .85rem; padding: 6px 14px; border-radius: 50px; margin-bottom: 16px; }

/* Why grid */
.why-grid .checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }

/* Program detail (programs page) */
.program-list { display: grid; gap: 32px; }
.program-detail { display: grid; grid-template-columns: 1.2fr .8fr; gap: 0; border: 1px solid var(--card-border); border-radius: var(--radius-lg); overflow: hidden; background: #fff; scroll-margin-top: calc(var(--header-h) + 20px); }
.program-detail.flip { grid-template-columns: .8fr 1.2fr; }
.program-detail.flip .pd-main { order: 2; }
.pd-main { padding: clamp(28px, 4vw, 48px); }
.pd-main p { color: var(--muted); }
.pd-side { background: var(--page-bg); padding: clamp(28px, 4vw, 40px); border-left: 1px solid var(--card-border); }
.program-detail.flip .pd-side { border-left: 0; border-right: 1px solid var(--card-border); }
.pd-side h3 { font-size: 1.2rem; margin-top: 4px; }
.program-detail.coming { grid-template-columns: 1fr; background: repeating-linear-gradient(135deg, #fff, #fff 14px, var(--page-bg) 14px, var(--page-bg) 28px); }
.soon { background: var(--pink); color: #fff; padding: 2px 10px; border-radius: 50px; }
.note { font-size: .88rem; color: var(--muted); background: var(--page-bg); border-left: 3px solid var(--pink-soft); padding: 10px 14px; border-radius: 0 10px 10px 0; }

/* Chooser cards */
.chooser { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.chooser-q { font-weight: 600; color: var(--pink) !important; font-size: .95rem; }
.chooser h3 { font-size: 1.2rem; }
.chooser:hover { color: inherit; }

/* Formula + flow */
.formula, .flow { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin: 18px 0 24px; }
.formula span, .flow span { background: #fff; border: 1.5px solid var(--pink); color: var(--ink-2); padding: 10px 20px; border-radius: 50px; font-weight: 500; box-shadow: var(--shadow); }
.formula b, .flow i { color: var(--pink); font-style: normal; font-size: 1.4rem; font-weight: 700; }
.flow--wide { justify-content: flex-start; }
.page-hero .flow--wide { justify-content: center; }

/* Mission */
.mission-band { background: linear-gradient(135deg, var(--pink-bg), #fff); }
.mission-num { font-family: var(--font-head); font-size: clamp(3.4rem, 8vw, 6rem); color: var(--pink); font-weight: 600; line-height: 1; display: block; margin: 0 0 6px; }
.mission-card { background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow-pink); text-align: center; }
.mission-card p { color: var(--muted); }

/* Timeline (journey) */
.timeline { list-style: none; padding: 0; margin: 0 auto; max-width: 900px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 31px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--pink), var(--pink-soft)); }
.timeline li { position: relative; padding: 0 0 28px 90px; }
.t-dot { position: absolute; left: 0; top: 0; width: 64px; height: 64px; border-radius: 50%; background: #fff; border: 2px solid var(--pink); display: grid; place-items: center; font-size: 1.7rem; box-shadow: var(--shadow-pink); }
.t-card { background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 24px 28px; transition: .3s; }
.t-card:hover { box-shadow: var(--shadow-pink); }
.t-card h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: .3em; }
.t-card p { color: var(--muted); }

/* Big quote */
.big-quote { font-family: var(--font-head); font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.6; color: var(--ink-2); margin: 10px 0 32px; font-style: italic; position: relative; padding: 0 10px; }
.big-quote::before { content: "\201C"; display: block; color: var(--pink); font-size: 5rem; line-height: .5; margin-bottom: 20px; font-style: normal; }
.learn-card .prog-num { font-size: 1.8rem; }

@media (max-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .program-detail, .program-detail.flip { grid-template-columns: 1fr; }
  .program-detail.flip .pd-main { order: 0; }
  .pd-side, .program-detail.flip .pd-side { border: 0; border-top: 1px solid var(--card-border); }
}
@media (max-width: 640px) {
  .grid-5 { grid-template-columns: 1fr; }
  .why-grid .checklist { grid-template-columns: 1fr; }
  .timeline li { padding-left: 70px; }
  .t-dot { width: 50px; height: 50px; font-size: 1.3rem; }
  .timeline::before { left: 24px; }
  .flow i { transform: rotate(90deg); }
  .flow, .formula { flex-direction: column; }
}
/* v3 fixes: 8-item nav, stacked CTA band */
.nav-menu a { white-space: nowrap; padding: 10px 11px; font-size: .92rem; }
@media (max-width: 1280px) { .header-cta { display: none; } .nav-cta { display: block; } .nav-cta .btn { padding: 10px 18px; } }
@media (min-width: 961px) and (max-width: 1100px) { .nav-menu a { padding: 8px 7px; font-size: .85rem; } .brand-tag { display: none; } }
.cta-band--stack { grid-template-columns: 1fr; text-align: center; }
.cta-band--stack .btn-row { justify-content: center; }
/* v4: consultation-first conversion elements */
.kerala-line { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 500; color: var(--ink-2); background: #fff; border: 1px solid var(--card-border); padding: 7px 14px; border-radius: 50px; margin: -6px 0 22px; }
.kerala-line svg { width: 16px; height: 16px; color: var(--pink); }
.hero-alt { font-size: .92rem; color: var(--muted); margin-top: 16px; }
.hero-alt a { font-weight: 600; }
.consult-box { display: grid; grid-template-columns: 1.5fr auto; gap: 32px; align-items: center; background: linear-gradient(135deg, #fff, var(--pink-bg)); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 52px); box-shadow: var(--shadow-pink); }
.consult-box .btn-row { flex-direction: column; }
.consult-points, .consult-facts { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.consult-points li { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--card-border); border-radius: 50px; padding: 7px 14px; font-size: .88rem; font-weight: 500; }
.consult-points svg { width: 16px; height: 16px; color: var(--pink); }
.consult-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.consult-facts li { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius); padding: 14px 16px; }
.consult-facts svg { width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: var(--pink-light); color: var(--pink); flex: none; }
.consult-facts b { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--pink); }
.consult-facts span { font-size: .92rem; line-height: 1.4; }
.ml-sub { font-weight: 600; color: var(--pink) !important; font-size: .9rem !important; flex: 0 !important; margin-bottom: 6px; }
.article-cta { margin: 36px 0; }
.support-group { max-width: 880px; margin: 0 auto 40px; }
.support-group h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
@media (max-width: 960px) { .consult-box { grid-template-columns: 1fr; } .consult-box .btn-row { flex-direction: row; } }
@media (max-width: 640px) { .consult-facts { grid-template-columns: 1fr; } .consult-box .btn-row .btn { width: 100%; } }

/* ==========================================================================
   v6 — Fit every screen: never let a wide image (or table) stretch the layout
   ========================================================================== */
/* Grid & flex children may shrink below their content's intrinsic width */
.grid > *, .split > *, .hero-grid > *, .article-wrap > *, .consult-box > *,
.program-detail > *, .tri-grid > *, .studio-gallery > *, .footer-grid > *,
.timeline li > *, .btn-row > *, .contact-card > * { min-width: 0; }

/* Column tracks capped at the container width */
.hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.article-wrap { grid-template-columns: minmax(0, 1fr) 300px; }
.consult-box { grid-template-columns: minmax(0, 1.5fr) auto; }
.cta-band { grid-template-columns: minmax(0, 1.4fr) auto; }
.program-detail { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.program-detail.flip { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.tri-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.studio-gallery, .studio-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Any photo scales to its frame, whatever its pixel size */
.hero-img img, .arch img, .studio-card img, .gallery-item img, .post-card .thumb img { width: 100%; height: auto; }
.hero-img, .arch { width: 100%; }
.hero-media { width: 100%; }

/* Long words / links can't push the page sideways */
h1, h2, h3, h4, p, li, td, th, .lead, .big-text, .big-quote { overflow-wrap: break-word; }

@media (max-width: 1024px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .consult-box, .cta-band { grid-template-columns: minmax(0, 1fr); }
  .program-detail, .program-detail.flip { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .split, .tri-grid, .studio-gallery { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .form-grid, .footer-grid, .gallery-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-media { max-width: min(420px, 100%); }
  .btn-row .btn { max-width: 100%; white-space: normal; }
  .pill-badge { font-size: .72rem; padding: 6px 12px; }
}
/* Small phones (≤400px): header fits without pushing the page sideways */
@media (max-width: 400px) {
  .container { width: min(100% - 24px, var(--container)); }
  .nav { gap: 10px; }
  .brand, .brand-text { min-width: 0; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-name { font-size: 1.15rem; white-space: nowrap; }
  .brand-tag { font-size: .55rem; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-toggle { width: 42px; height: 42px; flex: none; }
  .wa-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  .wa-float svg { width: 26px; height: 26px; }
}
/* Buttons wrap instead of overflowing on narrow phones */
@media (max-width: 640px) {
  .btn { white-space: normal; max-width: 100%; }
  .program-card .btn, .card .btn, .consult-box .btn, .cta-band .btn { align-self: stretch; text-align: center; }
}
