/* ==========================================================================
   Gyan Bharti Publications — Design System & Styles
   Light theme only. Brand colors, type scale and spacing live in :root —
   change values there to re-skin the whole site.
   ========================================================================== */

:root {
  /* ---- Color: backgrounds ---- */
  --bg: #FFFBF4;
  --bg-alt: #FFF3E6;
  --bg-soft-blue: #EFF6FF;
  --bg-soft-purple: #F5F2FF;
  --surface: #FFFFFF;

  /* ---- Color: text ---- */
  --text: #2A2640;
  --text-muted: #665F7A;
  --text-on-brand: #FFFFFF;

  /* ---- Color: brand accents ---- */
  --coral: #FF6B5B;
  --coral-dark: #E8503F;
  --teal: #1FBAAE;
  --teal-dark: #159388;
  --purple: #8B6EF6;
  --purple-dark: #6E4FE0;
  --yellow: #FFC245;
  --pink: #FF8FB4;
  --blue: #4FA9F7;
  --green: #63C471;
  --orange: #FF9E4A;

  /* ---- Borders / shadows ---- */
  --border: rgba(42, 38, 64, 0.08);
  --shadow-sm: 0 2px 10px rgba(42, 38, 64, 0.06);
  --shadow-md: 0 10px 30px rgba(42, 38, 64, 0.09);
  --shadow-lg: 0 20px 50px rgba(42, 38, 64, 0.12);
  --shadow-coral: 0 14px 30px rgba(255, 107, 91, 0.28);
  --shadow-purple: 0 14px 30px rgba(139, 110, 246, 0.28);

  /* ---- Radii ---- */
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-full: 999px;

  /* ---- Type ---- */
  --font-heading: "Baloo 2", ui-rounded, "Segoe UI", sans-serif;
  --font-body: "Nunito", ui-sans-serif, system-ui, sans-serif;

  /* ---- Layout ---- */
  --container: 1220px;
  --nav-h: 94px;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.25s;
  --dur-med: 0.5s;
  --dur-slow: 0.9s;
}

/* ========================= Reset ========================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body, h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
svg { display: block; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; color: var(--text); line-height: 1.15; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--coral); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

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

/* ========================= Shared bits ========================= */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--coral-dark);
  background: rgba(255, 107, 91, 0.1);
  padding: 6px 16px; border-radius: var(--r-full);
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }

.section-heading { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 18px; }
.section-subtext { font-size: 1.05rem; color: var(--text-muted); max-width: 640px; }
.section-intro { text-align: center; max-width: 720px; margin-inline: auto; margin-bottom: 56px; }
.section-intro .section-subtext { margin-inline: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 600; font-size: 1rem;
  padding: 14px 28px; border-radius: var(--r-full);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--coral); color: #fff; box-shadow: var(--shadow-coral); }
.btn--primary:hover { background: var(--coral-dark); transform: translateY(-3px); box-shadow: 0 18px 34px rgba(255, 107, 91, 0.34); }
.btn--secondary { background: var(--surface); color: var(--text); border: 2px solid var(--border); }
.btn--secondary:hover { border-color: var(--coral); color: var(--coral-dark); transform: translateY(-3px); }
.btn--full { width: 100%; }
.btn svg { transition: transform var(--dur-fast) var(--ease); }
.btn:hover svg { transform: translateX(3px); }

/* ========================= Reveal-on-scroll ========================= */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-child] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
[data-reveal-child].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  [data-reveal], [data-reveal-child] { opacity: 1; transform: none; }
}

/* ========================= Navbar ========================= */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 251, 244, 0.7);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), height var(--dur-fast) var(--ease);
}
.navbar.is-scrolled {
  background: rgba(255, 251, 244, 0.92);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
  height: 82px;
}
.navbar__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.navbar__logo { display: flex; align-items: center; gap: 10px; }
.navbar__logo-mark {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 14px;
  overflow: hidden; background: #fff; border: 1px solid var(--border); flex-shrink: 0; padding: 4px;
  box-sizing: border-box;
}
.navbar__logo-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

.navbar__links { display: flex; align-items: center; gap: 4px; }
.navbar__links a {
  display: inline-block; padding: 10px 16px; border-radius: var(--r-full);
  font-weight: 600; font-size: 0.95rem; color: var(--text);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  position: relative;
}
.navbar__links a:hover { background: rgba(139, 110, 246, 0.1); color: var(--purple-dark); }
.navbar__links a.is-active { background: var(--coral); color: #fff; }

.navbar__toggle { display: none; padding: 6px; border-radius: 10px; color: var(--text); }
.navbar__toggle:hover { background: rgba(42, 38, 64, 0.06); }

/* ========================= Hero ========================= */
.hero {
  padding-top: calc(var(--nav-h) + 56px);
  padding-bottom: clamp(60px, 8vw, 100px);
  background: linear-gradient(180deg, #FFF6EC 0%, var(--bg) 60%);
  overflow: hidden;
}
.hero__decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.35; }
.hero__blob--1 { width: 420px; height: 420px; background: var(--yellow); top: -120px; right: -100px; animation: drift 14s ease-in-out infinite; }
.hero__blob--2 { width: 320px; height: 320px; background: var(--teal); bottom: -100px; left: -80px; opacity: 0.25; animation: drift 18s ease-in-out infinite reverse; }

.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }

.hero__headline { font-size: clamp(2.3rem, 4.6vw, 3.6rem); margin-bottom: 20px; }
.hero__headline::after { content: none; }
.hero__subtext { font-size: 1.12rem; color: var(--text-muted); max-width: 520px; margin-bottom: 34px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__media { position: relative; }
.hero__image-wrap { position: relative; border-radius: var(--r-lg); overflow: visible; }
.hero__image {
  width: 100%; height: auto; aspect-ratio: 4 / 3.1; object-fit: cover; border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); border: 8px solid var(--surface);
  animation: float-slow 6s ease-in-out infinite;
}
.hero__float {
  position: absolute; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 16px; background: var(--surface);
  box-shadow: var(--shadow-md); color: var(--coral);
}
.hero__float--1 { top: -18px; left: -22px; animation: float-slow 5s ease-in-out infinite; color: var(--coral); }
.hero__float--2 { bottom: 12%; right: -20px; width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); color: #7a5200; box-shadow: var(--shadow-md); animation: float-slow 6.5s ease-in-out infinite 0.4s; }
.hero__float--3 { top: 20%; right: 6%; width: 32px; height: 32px; border-radius: 50%; background: var(--purple); color: #fff; animation: spin-slow 9s linear infinite; }
.hero__float--4 { bottom: -14px; left: 22%; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #fff; animation: float-slow 7s ease-in-out infinite 0.8s; }

@keyframes float-slow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(24px, 20px); } }
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ========================= About ========================= */
.about { background: var(--surface); }
.about__inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
.about__image-wrap { position: relative; border-radius: var(--r-lg); }
.about__image-wrap img { width: 100%; height: auto; aspect-ratio: 9/10; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.about__image-accent {
  position: absolute; width: 70%; height: 70%; border-radius: var(--r-lg);
  border: 6px solid var(--yellow); top: -22px; left: -22px; z-index: -1; opacity: 0.7;
}
.about__paragraphs p { color: var(--text-muted); margin-bottom: 14px; font-size: 1.02rem; }
.teacher__paragraphs p { margin-bottom: 14px; }
.teacher__paragraphs p:last-child { margin-bottom: 0; }
.about__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.about__stat { padding: 18px 12px; background: var(--bg-alt); border-radius: var(--r-md); text-align: center; transition: transform var(--dur-fast) var(--ease); }
.about__stat:hover { transform: translateY(-4px); }
.about__stat-value { display: block; font-family: var(--font-heading); font-size: 1.7rem; font-weight: 700; color: var(--coral-dark); }
.about__stat-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }

/* ========================= Books Catalogue ========================= */
.books { background: linear-gradient(180deg, var(--bg-soft-purple), var(--bg) 70%); }
.books__carousel { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.books__viewport {
  overflow-x: auto; flex: 0 1 auto; max-width: calc(4 * 220px + 3 * 24px); scroll-behavior: smooth; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.books__viewport::-webkit-scrollbar { display: none; }
.books__track { display: flex; gap: 24px; padding-block: 6px 10px; }

.book-card {
  flex: 0 0 auto; width: 220px; scroll-snap-align: start; background: var(--surface); border-radius: var(--r-md);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  display: flex; flex-direction: column;
}
.book-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.book-card__cover {
  height: 260px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); padding: 14px;
}
.book-card__cover img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  border-radius: 10px; box-shadow: var(--shadow-sm); transition: transform var(--dur-fast) var(--ease);
}
.book-card:hover .book-card__cover img { transform: scale(1.03); }
.book-card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; text-align: center; }
.book-card__subject {
  align-self: center; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--purple-dark); background: var(--bg-soft-purple); padding: 4px 10px; border-radius: var(--r-full);
}
.book-card__name { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; line-height: 1.3; }
.book-card__class { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

.carousel-btn {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: grid; place-items: center;
  color: var(--text); transition: all var(--dur-fast) var(--ease);
}
.carousel-btn:hover { background: var(--coral); color: #fff; border-color: var(--coral); box-shadow: var(--shadow-coral); transform: scale(1.06); }
.carousel-btn:disabled { opacity: 0.35; pointer-events: none; }

.books__dots { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.books__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: all var(--dur-fast) var(--ease); }
.books__dot.is-active { background: var(--coral); width: 22px; border-radius: var(--r-full); }

.books__cta { display: flex; justify-content: center; margin-top: 40px; }

/* ========================= Teacher's Corner ========================= */
.teacher { background: var(--surface); }
.teacher__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.teacher__features { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 32px; }
.teacher-feature {
  padding: 20px; background: var(--bg-alt); border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: 10px;
}
.teacher-feature__icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); color: var(--coral-dark); box-shadow: var(--shadow-sm);
}
.teacher-feature__title { font-family: var(--font-heading); font-weight: 700; font-size: 1.02rem; }
.teacher-feature__desc { font-size: 0.88rem; color: var(--text-muted); }

.teacher__image-wrap { position: relative; }
.teacher__image-wrap img {
  width: 100%; height: auto; aspect-ratio: 6/7; object-fit: cover; border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); animation: float-slow 7s ease-in-out infinite;
}

/* ========================= Tech Learning ========================= */
.tech { background: linear-gradient(180deg, var(--bg-soft-blue), var(--bg) 75%); }
.tech__tab-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 40px; }
.tech-tab-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px;
  border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--border);
  font-weight: 700; font-family: var(--font-heading); font-size: 0.95rem; color: var(--text-muted);
  box-shadow: var(--shadow-sm); transition: all var(--dur-fast) var(--ease);
}
.tech-tab-btn svg { width: 18px; height: 18px; }
.tech-tab-btn:hover { color: var(--purple-dark); transform: translateY(-2px); }
.tech-tab-btn.is-active { background: var(--purple); color: #fff; border-color: var(--purple); box-shadow: var(--shadow-purple); }

.tech__panels { position: relative; }
.tech-panel {
  display: none;
  background: var(--surface); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.tech-panel.is-active { display: block; animation: panel-in var(--dur-med) var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.tech-panel__title { font-size: 1.6rem; margin-bottom: 22px; }

/* --- e-Book accordion panel --- */
.tech-accordion { display: flex; flex-direction: column; gap: 14px; }
.tech-accordion__item {
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-alt);
  overflow: hidden; transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.tech-accordion__item.is-open { border-color: var(--purple); box-shadow: var(--shadow-purple); background: var(--surface); }
.tech-accordion__trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; text-align: left; font-family: var(--font-heading); font-weight: 700;
  font-size: 1.02rem; color: var(--text); background: transparent;
}
.tech-accordion__item.is-open .tech-accordion__trigger { color: var(--purple-dark); }
.tech-accordion__icon { flex-shrink: 0; transition: transform var(--dur-fast) var(--ease); color: var(--purple); }
.tech-accordion__item.is-open .tech-accordion__icon { transform: rotate(90deg); }
.tech-accordion__panel-wrap {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-med) var(--ease);
}
.tech-accordion__item.is-open .tech-accordion__panel-wrap { grid-template-rows: 1fr; }
.tech-accordion__panel-inner { overflow: hidden; }
.tech-accordion__panel-inner p { padding: 0 22px 20px; color: var(--text-muted); }

/* ========================= Gyan Bharti Prakashni ========================= */
.hub { background: var(--surface); }
.hub__tab-nav { display: flex; justify-content: center; gap: 10px; margin-bottom: 44px; background: var(--bg-alt); padding: 8px; border-radius: var(--r-full); max-width: 460px; margin-inline: auto; }
.hub__tab {
  flex: 1; padding: 13px 20px; border-radius: var(--r-full); font-family: var(--font-heading);
  font-weight: 700; font-size: 0.95rem; color: var(--text-muted); transition: all var(--dur-fast) var(--ease);
}
.hub__tab[aria-selected="true"] { background: var(--coral); color: #fff; box-shadow: var(--shadow-coral); }

.hub__panels { position: relative; }
.hub__panel {
  display: none; grid-template-columns: 0.9fr 1.1fr; gap: 52px; align-items: center;
}
.hub__panel--active { display: grid; animation: panel-in var(--dur-med) var(--ease); }
.hub__panel-media img { width: 100%; height: auto; aspect-ratio: 4/3.4; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.hub__panel-content h3 { font-size: 1.7rem; margin-bottom: 14px; }
.hub__panel-content p { color: var(--text-muted); margin-bottom: 20px; }
.hub__feature-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.hub__feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.98rem; color: var(--text); font-weight: 600; }
.hub__feature-list li::before {
  content: ""; flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  background: rgba(31, 186, 174, 0.15);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23159388' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 13 10 18 19 7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 12px;
}

/* Flipbook illustration — animated page-flip using a real book cover.
   Stacking is explicit (z-index) rather than relying on DOM order: the base
   must always render behind the pages, which must render behind the cover,
   regardless of source order. */
.hub__panel-media--flipbook { display: grid; place-items: center; padding: 40px 0; }
.flipbook { position: relative; width: 220px; height: 280px; perspective: 1200px; }
/* The base sits behind everything and, because the cover and both pages
   rotate past 90° (and disappear, via backface-visibility) for most of
   each loop, it's what's on screen more often than not — so it needs a
   real cover image too, not a blank/ruled placeholder. */
.flipbook__base {
  position: absolute; inset: 0; z-index: 1; overflow: hidden; border-radius: 6px 12px 12px 6px;
  background-color: #fffdf8; border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.flipbook__base img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flipbook__page {
  position: absolute; top: 6px; bottom: 6px; right: 6px; left: 50%; z-index: 2;
  background-color: #fffdf8; overflow: hidden;
  border-radius: 0 8px 8px 0; transform-origin: left center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  backface-visibility: hidden;
}
.flipbook__page img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flipbook__page--1 { animation: page-flip 4.5s ease-in-out infinite; }
.flipbook__page--2 { animation: page-flip 4.5s ease-in-out infinite 0.15s; }
.flipbook__cover {
  position: absolute; inset: 0; z-index: 3; overflow: hidden; border-radius: 6px 12px 12px 6px;
  background: linear-gradient(135deg, var(--coral), var(--pink));
  transform-origin: left center; animation: cover-open 4.5s ease-in-out infinite;
  box-shadow: var(--shadow-md);
  backface-visibility: hidden;
}
.flipbook__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

@keyframes cover-open { 0%, 15% { transform: rotateY(0deg); } 40%, 100% { transform: rotateY(-150deg); } }
@keyframes page-flip { 0%, 25% { transform: rotateY(0deg); } 50%, 100% { transform: rotateY(-140deg); } }

/* ========================= Contact ========================= */
.contact { background: linear-gradient(180deg, var(--bg-alt), var(--bg) 70%); }
.contact__inner { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: stretch; }
.contact__map-wrap {
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--border);
  position: relative; display: flex; flex-direction: column; background: var(--surface);
}
.contact__map-frame {
  flex: 1; min-height: 340px; position: relative;
  background: linear-gradient(135deg, var(--bg-soft-blue), var(--bg-soft-purple));
}
.contact__map-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
.contact__map-note { padding: 14px 18px; font-size: 0.82rem; color: var(--text-muted); background: var(--surface); border-top: 1px solid var(--border); }

.contact__right { display: flex; flex-direction: column; gap: 24px; }

.contact__info { display: flex; flex-direction: column; gap: 16px; }
.contact__info-item {
  display: flex; align-items: flex-start; gap: 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px 24px; box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.contact__info-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.contact__info-icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: var(--r-full); display: grid; place-items: center;
  transition: transform var(--dur-fast) var(--ease);
}
.contact__info-item:hover .contact__info-icon { transform: scale(1.08) rotate(-4deg); }

.contact__info-item--email .contact__info-icon { background: var(--bg-soft-purple); color: var(--purple); }
.contact__info-item--email:hover { border-color: rgba(139, 110, 246, 0.35); }
.contact__info-item--phone .contact__info-icon { background: rgba(255, 107, 91, 0.12); color: var(--coral); }
.contact__info-item--phone:hover { border-color: rgba(255, 107, 91, 0.35); }
.contact__info-item--location .contact__info-icon { background: rgba(31, 186, 174, 0.12); color: var(--teal); }
.contact__info-item--location:hover { border-color: rgba(31, 186, 174, 0.35); }

.contact__info-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.contact__info-label {
  font-family: var(--font-heading); font-weight: 700; font-size: 0.76rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted);
}
.contact__info-value { font-weight: 700; font-size: 1.02rem; color: var(--text); word-break: break-word; line-height: 1.5; }
.contact__info-value a { color: inherit; text-decoration: none; }
.contact__info-item--email .contact__info-value a:hover { color: var(--purple-dark); text-decoration: underline; }
.contact__info-item--phone .contact__info-value {
  font-family: var(--font-heading); font-size: 1.35rem; color: var(--coral-dark); letter-spacing: 0.02em;
}
.contact__info-item--phone .contact__info-value a:hover { text-decoration: underline; }
.contact__info-item--location .contact__info-value { font-weight: 600; color: var(--text-muted); }

.contact__form { background: var(--surface); border-radius: var(--r-lg); padding: clamp(24px, 3.4vw, 40px); box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 20px; display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-weight: 700; font-size: 0.9rem; }
.form-field input, .form-field textarea {
  padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  resize: vertical;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--coral); background: var(--surface);
  box-shadow: 0 0 0 4px rgba(255, 107, 91, 0.14);
}
.form-field.has-error input, .form-field.has-error textarea { border-color: #E8503F; }
.form-error { font-size: 0.78rem; color: #E8503F; min-height: 1em; }
.contact__form-status { margin-top: 14px; font-weight: 700; font-size: 0.92rem; min-height: 1.2em; color: var(--teal-dark); }

/* ========================= Footer ========================= */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); }
.footer__inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 56px; padding-block: 64px 40px; }
.footer__desc { color: var(--text-muted); margin-top: 16px; max-width: 320px; font-size: 0.94rem; }
.footer__logo { margin-bottom: 16px; }
.footer__logo .navbar__logo-mark { width: 100px; height: 100px; }
.footer__social { display: flex; gap: 10px; margin-top: 22px; }
.footer__social-link {
  width: 38px; height: 38px; border-radius: 50%; background: var(--surface); display: grid; place-items: center;
  color: var(--text); border: 1px solid var(--border); transition: all var(--dur-fast) var(--ease);
}
.footer__social-link:hover { background: var(--coral); color: #fff; border-color: var(--coral); transform: translateY(-3px); }

.footer__columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer__col-heading { font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; margin-bottom: 16px; }
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { color: var(--text-muted); font-size: 0.92rem; transition: color var(--dur-fast) var(--ease); }
.footer__col a:hover { color: var(--coral-dark); }

.footer__bottom { border-top: 1px solid var(--border); }
.footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; padding-block: 20px; flex-wrap: wrap; gap: 12px; }
.footer__bottom-inner p { font-size: 0.85rem; color: var(--text-muted); }
.footer__legal { display: flex; gap: 20px; }
.footer__legal a { font-size: 0.85rem; color: var(--text-muted); }
.footer__legal a:hover { color: var(--coral-dark); }

/* ========================= Responsive ========================= */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; text-align: left; }
  .hero__media { order: -1; max-width: 480px; }
  .about__inner, .teacher__inner { grid-template-columns: 1fr; }
  .teacher__media { order: -1; max-width: 460px; margin-inline: auto; }
  .hub__panel { grid-template-columns: 1fr; }
  .hub__panel-media { order: -1; max-width: 420px; margin-inline: auto; width: 100%; }
  .contact__inner { grid-template-columns: 1fr; }
  .contact__map-wrap { min-height: 280px; }
  .footer__inner { grid-template-columns: 1fr; gap: 40px; }
  .footer__columns { grid-template-columns: repeat(4, 1fr); }
  .books__viewport { max-width: none; flex: 1; }
}

@media (max-width: 860px) {
  .navbar__nav {
    position: fixed; inset: 68px 0 0 0; height: calc(100dvh - 68px);
    background: var(--bg); padding: 24px; overflow-y: auto;
    transform: translateX(100%); transition: transform var(--dur-med) var(--ease);
  }
  .navbar.is-scrolled .navbar__nav, .navbar .navbar__nav { top: var(--nav-h); }
  .navbar__nav.is-open { transform: translateX(0); }
  .navbar__links { flex-direction: column; align-items: stretch; gap: 6px; }
  .navbar__links a { padding: 14px 18px; font-size: 1.05rem; }
  .navbar__toggle { display: grid; place-items: center; }

  .about__stats { grid-template-columns: repeat(2, 1fr); }
  .teacher__features { grid-template-columns: 1fr; }
  .footer__columns { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .container { padding-inline: 18px; }
  .hero { padding-top: calc(var(--nav-h) + 32px); }
  .navbar__logo-mark { width: 58px; height: 58px; }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .hero__ctas .btn { width: 100%; }
  .about__stats { grid-template-columns: repeat(2, 1fr); }
  .books__carousel { gap: 8px; padding-inline: 12px; }
  .carousel-btn { width: 40px; height: 40px; }
  .book-card { width: 220px; }
  .footer__columns { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .footer__bottom-inner { flex-direction: column; align-items: flex-start; }
}
