/* ============================================================
   ABCD Daycare — styles.css
   Mobile-first, CSS custom properties, no frameworks
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Open+Sans:wght@400;500;600&display=swap');

/* ── Custom Properties ────────────────────────────────────── */
:root {
  --color-primary:      #2C6E6A;
  --color-primary-dark: #1f5250;
  --color-primary-light:#3d8f8a;
  --color-accent:       #F2A63B;
  --color-accent-dark:  #d98e28;
  --color-coral:        #FF7057;
  --color-bg:           #FFF8EF;
  --color-bg-alt:       #FFFFFF;
  --color-bg-warm:      #FFF3E4;
  --color-text:         #2D2D2D;
  --color-text-light:   #666666;
  --color-border:       #E8E0D5;
  --color-white:        #FFFFFF;
  --color-overlay:      rgba(0, 0, 0, 0.52);

  --font-heading: 'Nunito', sans-serif;
  --font-body:    'Open Sans', sans-serif;

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:  0 6px 24px rgba(0,0,0,0.11);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.15);

  --nav-height: 70px;

  --section-pad: clamp(3rem, 7vw, 6rem);
  --container-max: 1100px;
  --gap-cards: clamp(1rem, 2.5vw, 1.75rem);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

ul { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 800;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout Utilities ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section {
  padding-block: var(--section-pad);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--warm {
  background: var(--color-bg-warm);
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.6rem;
}

.section-title {
  margin-bottom: clamp(0.75rem, 2vw, 1.25rem);
}

.section-intro {
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  color: var(--color-text-light);
  max-width: 620px;
}

.section-header {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-intro {
  margin-inline: auto;
}

/* ── SVG Wave Dividers ────────────────────────────────────── */
.wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-xl);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  min-height: 48px;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(242,166,59,0.35);
  animation: pulse-cta 3s ease-in-out infinite;
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  box-shadow: 0 6px 18px rgba(242,166,59,0.45);
  animation: none;
}

@keyframes pulse-cta {
  0%, 100% { box-shadow: 0 4px 14px rgba(242,166,59,0.35); }
  50% { box-shadow: 0 4px 24px rgba(242,166,59,0.6); }
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}
.btn-outline:hover { background: var(--color-white); color: var(--color-primary); }

.btn-teal {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(44,110,106,0.3);
}
.btn-teal:hover { background: var(--color-primary-dark); }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--color-white);
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: 0 2px 16px rgba(0,0,0,0.1);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--color-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo:hover { text-decoration: none; }

.nav__logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  flex-shrink: 0;
  overflow: hidden;
}

.nav__logo-badge--img {
  background: transparent;
  width: 52px;
  height: 52px;
  border-radius: 0;
}

.nav__logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Logo image pop-in */
.nav__logo-badge--img {
  animation: logo-pop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
  animation-delay: 0.1s;
}

@keyframes logo-pop {
  from { opacity: 0; transform: scale(0.6) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

.nav__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav__logo-text span:first-child {
  font-size: 1rem;
  color: var(--color-primary);
}

.nav__logo-text span:last-child {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
}

.nav__links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav__links a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--color-primary);
  background: rgba(44,110,106,0.08);
  text-decoration: none;
}

.nav__cta {
  background: var(--color-accent) !important;
  color: var(--color-white) !important;
  padding: 0.5rem 1.1rem !important;
  border-radius: var(--radius-xl) !important;
}
.nav__cta:hover {
  background: var(--color-accent-dark) !important;
}

.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.nav__toggle:hover { background: var(--color-bg); }

.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  padding: 1rem 0 1.5rem;
  box-shadow: var(--shadow-md);
  z-index: 999;
}

.nav__mobile.open { display: block; }

.nav__mobile a {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
  padding: 0.8rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s, background 0.2s;
}

.nav__mobile a:last-child { border-bottom: none; }
.nav__mobile a:hover,
.nav__mobile a.active {
  color: var(--color-primary);
  background: rgba(44,110,106,0.06);
  text-decoration: none;
}

.nav__mobile .nav__cta {
  margin: 1rem clamp(1rem, 4vw, 2rem) 0;
  display: inline-block;
  border-radius: var(--radius-xl);
  border-bottom: none !important;
}

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

/* hero__bg is now a <picture> element — see photo rules at bottom of file */

.hero__bg--fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, #3a9e99 100%);
}

/* Floating ABCD blocks in hero */
.hero__blocks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__block {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  color: #fff;
  border-radius: var(--radius-md);
  opacity: 0.18;
  user-select: none;
}

.hero__block--a {
  width: 90px; height: 90px;
  font-size: 3rem;
  background: var(--color-accent);
  top: 15%; left: 7%;
  animation: float-a 7s ease-in-out infinite;
}

.hero__block--b {
  width: 70px; height: 70px;
  font-size: 2.2rem;
  background: var(--color-coral);
  top: 60%; left: 5%;
  animation: float-b 9s ease-in-out infinite;
}

.hero__block--c {
  width: 80px; height: 80px;
  font-size: 2.6rem;
  background: var(--color-accent);
  top: 20%; right: 8%;
  animation: float-c 8s ease-in-out infinite;
}

.hero__block--d {
  width: 100px; height: 100px;
  font-size: 3.4rem;
  background: var(--color-primary-light);
  top: 65%; right: 6%;
  animation: float-d 10s ease-in-out infinite;
}

.hero__block--sm1 {
  width: 50px; height: 50px;
  font-size: 1.5rem;
  background: #fff;
  color: var(--color-primary);
  opacity: 0.12;
  top: 40%; left: 15%;
  animation: float-a 6s ease-in-out infinite reverse;
}

.hero__block--sm2 {
  width: 55px; height: 55px;
  font-size: 1.6rem;
  background: var(--color-coral);
  top: 30%; right: 18%;
  animation: float-b 7.5s ease-in-out infinite reverse;
}

@keyframes float-a {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  33%       { transform: translateY(-22px) rotate(4deg); }
  66%       { transform: translateY(-10px) rotate(-10deg); }
}
@keyframes float-b {
  0%, 100% { transform: translateY(0) rotate(8deg); }
  50%       { transform: translateY(-28px) rotate(-5deg); }
}
@keyframes float-c {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  40%       { transform: translateY(-18px) rotate(8deg); }
  70%       { transform: translateY(-8px) rotate(2deg); }
}
@keyframes float-d {
  0%, 100% { transform: translateY(0) rotate(5deg); }
  60%       { transform: translateY(-24px) rotate(-8deg); }
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.1);
  padding: 0.35rem 0.9rem;
  border-radius: 2rem;
  backdrop-filter: blur(4px);
}

.hero h1 {
  color: var(--color-white);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero__sub {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(255,255,255,0.9);
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-heading);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  animation: bounce 2s infinite;
}

.hero__scroll::after {
  content: '';
  width: 2px;
  height: 28px;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Stats Bar ────────────────────────────────────────────── */
.stats-bar {
  background: var(--color-primary);
  padding: 1.5rem 0;
}

.stats-bar__inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat-item {
  text-align: center;
  color: var(--color-white);
  padding: 0.5rem 1rem;
}

.stat-item__number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1;
}

.stat-item__label {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 500;
}

/* ── Story Section ────────────────────────────────────────── */
.story__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.story__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-border);
  position: relative;
}

.story__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 900;
}

.story__badge {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  font-family: var(--font-heading);
}

.story__badge-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
}

.story__badge-text {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.story__generation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.gen-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(44,110,106,0.1);
  color: var(--color-primary);
  border-radius: 2rem;
  padding: 0.3rem 0.8rem;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .story__grid { grid-template-columns: 1fr 1fr; }
}

/* ── Program Cards ────────────────────────────────────────── */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap-cards);
}

.program-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  perspective: 800px;
}

.program-card:hover {
  box-shadow: var(--shadow-md);
}

.program-card__image {
  aspect-ratio: 4/3;
  background: var(--color-border);
  overflow: hidden;
  position: relative;
}

.program-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.program-card:hover .program-card__image img {
  transform: scale(1.05);
}

.program-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.program-card__age-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 2rem;
}

.program-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.program-card__title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.program-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.program-card__link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.program-card__link::after {
  content: '→';
  transition: transform 0.2s;
}

.program-card:hover .program-card__link::after {
  transform: translateX(4px);
}

/* ── Why ABCD ─────────────────────────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-cards);
}

.why-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--color-primary);
  transition: transform 0.25s;
}

.why-card:hover { transform: translateY(-4px); }

.why-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  transition: transform 0.3s;
}

.why-card:hover .why-card__icon {
  animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
  0%  { transform: rotate(0deg); }
  20% { transform: rotate(-12deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(6deg); }
  100%{ transform: rotate(0deg); }
}

.why-card h3 {
  color: var(--color-primary);
  margin-bottom: 0.6rem;
}

.why-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* ── Family Tree Section ──────────────────────────────────── */
.family-tree {
  max-width: 820px;
  margin-inline: auto;
  padding-top: 1rem;
}

.family-tree__row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
}

.family-tree__row + .family-tree__row {
  margin-top: 3rem;
}

/* connector lines */
.family-tree__row--gen2::before,
.family-tree__row--gen3::before {
  content: '';
  position: absolute;
  top: -1.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 1.75rem;
  background: var(--color-border);
}

.family-tree__connector {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: -0.5rem 0 0.5rem;
  position: relative;
}

.family-tree__connector::before {
  content: '';
  display: block;
  width: 2px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--color-primary-light), var(--color-border));
  border-radius: 2px;
}

.tree-node {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  min-width: 180px;
  max-width: 220px;
  border-top: 5px solid var(--color-primary);
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}

.tree-node:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.tree-node--gen1 { border-top-color: var(--color-primary); }
.tree-node--gen2 { border-top-color: var(--color-accent); }
.tree-node--gen3 { border-top-color: var(--color-coral); }

.tree-node__emoji {
  font-size: 2.8rem;
  margin-bottom: 0.6rem;
  display: block;
}

.tree-node__gen {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
  margin-bottom: 0.5rem;
}

.tree-node--gen1 .tree-node__gen { background: rgba(44,110,106,0.12); color: var(--color-primary); }
.tree-node--gen2 .tree-node__gen { background: rgba(242,166,59,0.15); color: var(--color-accent-dark); }
.tree-node--gen3 .tree-node__gen { background: rgba(255,112,87,0.12); color: var(--color-coral); }

.tree-node__name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.tree-node__role {
  font-size: 0.78rem;
  color: var(--color-text-light);
  line-height: 1.4;
}

.tree-node__year {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-accent);
}

/* animated SVG line draw */
.tree-line {
  display: block;
  width: 100%;
  overflow: visible;
  margin: -0.5rem 0;
}

.tree-line path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 1.2s ease 0.2s;
}

.tree-line.drawn path {
  stroke-dashoffset: 0;
}

/* ── Testimonial Carousel ─────────────────────────────────── */
.testimonial {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.testimonial::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.testimonial::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -30px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  pointer-events: none;
}

.testimonial__carousel {
  position: relative;
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
  min-height: 220px;
}

.testimonial__slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.testimonial__slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
}

.testimonial__quote-mark {
  font-size: 5rem;
  line-height: 0.8;
  color: var(--color-accent);
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
  display: block;
}

.testimonial blockquote {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.55;
  color: var(--color-white);
  margin-bottom: 1.25rem;
}

.testimonial__author {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-accent);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.testimonial__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}

.testimonial__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  padding: 0;
}

.testimonial__dot.active {
  background: var(--color-accent);
  transform: scale(1.25);
}

/* ── News Section ─────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap-cards);
}

.news-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--color-accent);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s;
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.news-card__source {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.news-card h3 {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-card p {
  font-size: 0.88rem;
  color: var(--color-text-light);
  flex: 1;
  margin-bottom: 1rem;
}

.news-card__link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Day at ABCD Timeline ─────────────────────────────────── */
.day-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0;
  position: relative;
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.day-segment {
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.25s;
  position: relative;
  border-right: 1px solid var(--color-border);
}

.day-segment:last-child { border-right: none; }

.day-segment:hover,
.day-segment.active {
  background: rgba(44,110,106,0.08);
}

.day-segment__emoji {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.4rem;
}

.day-segment__time {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-accent);
  display: block;
  margin-bottom: 0.2rem;
}

.day-segment__label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.day-segment__detail {
  display: none;
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
  font-family: var(--font-heading);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.day-segment__detail::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--color-text);
}

.day-segment:hover .day-segment__detail,
.day-segment.active .day-segment__detail {
  display: block;
}

/* ── Floating Mobile Call Button ─────────────────────────── */
.fab-call {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: 2rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(242,166,59,0.45);
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fab-bounce 2.5s ease-in-out infinite;
}

.fab-call:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 30px rgba(242,166,59,0.55);
  text-decoration: none;
  color: var(--color-white);
  animation: none;
}

@keyframes fab-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (max-width: 899px) {
  .fab-call { display: flex; }
}

/* ── Bubble cursor trail ──────────────────────────────────── */
.cursor-bubble {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  z-index: 9999;
  transform: translate(-50%, -50%) scale(0);
  animation: bubble-pop 0.6s ease-out forwards;
}

@keyframes bubble-pop {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0.9; }
  60%  { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: #1a3a38;
  color: rgba(255,255,255,0.85);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.footer__brand .nav__logo {
  color: var(--color-white);
  margin-bottom: 1rem;
}

.footer__brand .nav__logo-badge {
  background: var(--color-accent);
}

.footer__brand .nav__logo-text span:first-child {
  color: var(--color-white);
}

.footer__tagline {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.25rem;
}

.footer__social {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--color-white);
  font-size: 1.1rem;
  transition: background 0.2s;
}

.social-link:hover {
  background: var(--color-accent);
  text-decoration: none;
  color: var(--color-white);
}

.footer__heading {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.footer__links li { margin-bottom: 0.5rem; }
.footer__links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer__links a:hover {
  color: var(--color-white);
  text-decoration: none;
}

.footer__contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

.footer__contact-list .icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--color-accent);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

.footer__bottom a {
  color: rgba(255,255,255,0.6);
}

@media (min-width: 600px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; }
}

/* ── Page Hero (inner pages) ──────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  padding: calc(var(--nav-height) + 3rem) 0 3rem;
  text-align: center;
  color: var(--color-white);
}

.page-hero h1 {
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: rgba(255,255,255,0.85);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline {
  position: relative;
  max-width: 700px;
  margin-inline: auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 2rem;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-item__dot {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.2;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--color-bg);
}

.timeline-item__content {
  padding-top: 0.75rem;
}

.timeline-item__content h3 {
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.timeline-item__content p {
  font-size: 0.92rem;
  color: var(--color-text-light);
}

@media (min-width: 600px) {
  .timeline::before { left: 50%; transform: translateX(-50%); }
  .timeline-item { justify-content: flex-end; padding-right: calc(50% + 2rem); }
  .timeline-item:nth-child(even) { justify-content: flex-start; padding-right: 0; padding-left: calc(50% + 2rem); flex-direction: row-reverse; }
  .timeline-item__dot { position: absolute; right: calc(50% - 2rem); }
  .timeline-item:nth-child(even) .timeline-item__dot { right: auto; left: calc(50% - 2rem); }
}

/* ── Values / Mission Grid ────────────────────────────────── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap-cards);
}

.value-card {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.value-card__icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  background: rgba(44,110,106,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

.value-card:hover .value-card__icon {
  animation: wiggle 0.5s ease-in-out;
}

.value-card h3 { color: var(--color-primary); font-size: 1.05rem; }
.value-card p { font-size: 0.9rem; color: var(--color-text-light); margin: 0; }

/* ── Programs Detail Page ─────────────────────────────────── */
.program-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
}

.program-detail__item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.program-detail__item:nth-child(even) { direction: rtl; }
.program-detail__item:nth-child(even) > * { direction: ltr; }

.program-detail__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.program-detail__image picture {
  display: block;
  width: 100%;
  height: 100%;
}

.program-detail__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.program-detail__image--placeholder {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.program-detail__age {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 2rem;
  margin-bottom: 0.75rem;
}

.program-detail__features {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.program-detail__features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--color-text-light);
}

.program-detail__features li::before {
  content: '✓';
  color: var(--color-primary);
  font-weight: 700;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .program-detail__item { grid-template-columns: 1fr 1fr; }
}

/* ── Enrollment Steps ─────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-cards);
  counter-reset: steps;
}

.step-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  counter-increment: steps;
  border-top: 4px solid var(--color-accent);
  transition: transform 0.25s;
}

.step-card:hover { transform: translateY(-4px); }

.step-card::before {
  content: counter(steps, decimal-leading-zero);
  position: absolute;
  top: -1px;
  right: 1.25rem;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1;
}

.step-card__icon { font-size: 2rem; margin-bottom: 0.75rem; }
.step-card h3 { color: var(--color-primary); margin-bottom: 0.5rem; font-size: 1.05rem; }
.step-card p { font-size: 0.9rem; color: var(--color-text-light); margin: 0; }

/* ── Tuition Table ────────────────────────────────────────── */
.tuition-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.tuition-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg-alt);
  font-size: 0.95rem;
}

.tuition-table th {
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 0.9rem 1.25rem;
  text-align: left;
}

.tuition-table td {
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.tuition-table tr:last-child td { border-bottom: none; }
.tuition-table tr:nth-child(even) td { background: var(--color-bg); }

/* ── Contact Page ─────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
}

.contact-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}

.contact-detail-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-detail-item .icon-wrap {
  width: 44px;
  height: 44px;
  background: rgba(44,110,106,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  color: var(--color-primary);
}

.contact-detail-item__text strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.contact-detail-item__text span,
.contact-detail-item__text a {
  font-size: 0.95rem;
  color: var(--color-text-light);
}

.map-embed {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 350px;
  background: var(--color-border);
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table tr td {
  padding: 0.55rem 0;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--color-border);
}

.hours-table tr:last-child td { border-bottom: none; }
.hours-table td:first-child { font-weight: 600; color: var(--color-text); width: 45%; }
.hours-table td:last-child { color: var(--color-text-light); }

@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Assistance Cards ─────────────────────────────────────── */
.assist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-cards);
}

.assist-card {
  background: rgba(44,110,106,0.07);
  border: 1.5px solid rgba(44,110,106,0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.25s;
}

.assist-card:hover { transform: translateY(-3px); }

.assist-card__icon { font-size: 2rem; margin-bottom: 0.6rem; }
.assist-card h4 { color: var(--color-primary); margin-bottom: 0.4rem; }
.assist-card p { font-size: 0.88rem; color: var(--color-text-light); margin: 0; }

/* ── Info Banner ──────────────────────────────────────────── */
.info-banner {
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}

.info-banner .icon { font-size: 1.5rem; flex-shrink: 0; }

/* ── Scroll-reveal animation ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.75rem;
  font-family: var(--font-heading);
}

.breadcrumb a { color: rgba(255,255,255,0.8); }

/* ── Hero photo background ────────────────────────────────── */
.hero__bg {
  position: absolute;
  inset: 0;
  display: block;
}

.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* dark overlay on top of photo */
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.50) 0%,
    rgba(0,0,0,0.38) 55%,
    rgba(0,0,0,0.65) 100%
  );
}

/* ── Contact page hero with photo ────────────────────────── */
.page-hero--photo {
  position: relative;
  overflow: hidden;
  background: none;
  padding: calc(var(--nav-height) + 4rem) 0 3.5rem;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 0;
}

.page-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(31,82,80,0.82) 0%, rgba(44,110,106,0.7) 100%);
}

.page-hero__content {
  position: relative;
  z-index: 1;
}

/* ── Why-photo accent row ─────────────────────────────────── */
.why-photo-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: rgba(44,110,106,0.06);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.why-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  border: 4px solid var(--color-white);
  outline: 3px solid var(--color-primary);
}

.why-photo-caption {
  flex: 1;
  min-width: 200px;
}

.why-photo-caption p {
  font-size: 1rem;
  color: var(--color-text);
  margin: 0;
  line-height: 1.6;
}

/* ── ─────────────────────────────────────────────────────── */
/* ── MOBILE FIXES ─────────────────────────────────────────── */
/* ── ─────────────────────────────────────────────────────── */

/* Hero: tighten text floor on very small screens */
@media (max-width: 380px) {
  .hero h1 { font-size: 2rem; }
  .hero__sub { font-size: 0.95rem; }
  .hero__eyebrow { font-size: 0.72rem; letter-spacing: 0.08em; }
}

/* Nav: hide location subtitle on tiny screens */
@media (max-width: 360px) {
  .nav__logo-text span:last-child { display: none; }
}

/* Stats bar: 2×2 grid on mobile */
@media (max-width: 600px) {
  .stats-bar__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .stat-item {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 0.75rem;
  }
  .stat-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.1); }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) { border-bottom: none; }
}

/* Wave dividers: min-height so they never collapse */
.wave-divider svg {
  min-height: 30px;
}

/* Program cards: single column below 480px */
@media (max-width: 480px) {
  .programs-grid {
    grid-template-columns: 1fr;
  }
}

/* Day timeline: vertical stacked layout on mobile */
@media (max-width: 700px) {
  .day-timeline {
    grid-template-columns: repeat(3, 1fr);
    border-radius: var(--radius-lg);
  }
  .day-segment {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0.6rem;
  }
  .day-segment:nth-child(3n) { }
  /* tooltip: flip to show above on mobile, but keep inside viewport */
  .day-segment__detail {
    font-size: 0.72rem;
    white-space: normal;
    width: 140px;
    text-align: center;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 400px) {
  .day-timeline {
    grid-template-columns: 1fr 1fr;
  }
}

/* Family tree: single column on mobile */
@media (max-width: 640px) {
  .family-tree__row {
    flex-direction: column;
    align-items: center;
  }
  .tree-node {
    width: 100%;
    max-width: 280px;
  }
}

/* Why-photo: stack on mobile */
@media (max-width: 540px) {
  .why-photo-row {
    flex-direction: column;
    text-align: center;
  }
  .why-photo { width: 130px; height: 130px; }
}

/* FAB: safe-area bottom padding for phones with home bar */
.fab-call {
  bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
  right: max(1.5rem, env(safe-area-inset-right, 1.5rem));
}

/* Contact hero: reduce padding on small screens */
@media (max-width: 600px) {
  .page-hero--photo {
    padding-top: calc(var(--nav-height) + 2.5rem);
    padding-bottom: 2rem;
  }
}

/* Footer: center on very small screens */
@media (max-width: 480px) {
  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.25rem;
  }
}

/* Story image: constrain height on small screens */
@media (max-width: 767px) {
  .story__image {
    max-height: 280px;
    overflow: hidden;
  }
}

/* Testimonial min-height: prevent layout shift as slides change */
@media (max-width: 600px) {
  .testimonial__carousel {
    min-height: 280px;
  }
  .testimonial blockquote {
    font-size: 1rem;
  }
}

/* CTA section: stack buttons on small screens */
@media (max-width: 420px) {
  .hero__actions,
  .hero__actions + div {
    flex-direction: column;
    align-items: center;
  }
  .btn { width: 100%; justify-content: center; max-width: 280px; }
}
.breadcrumb span { margin: 0 0.4rem; }
