/* ==========================================================================
   Brand tokens — Math Bondhu.
   Palette drawn directly from the logo: deep teal (trust, calm focus — for
   parents) + coral (warmth, friendliness — for students) + gold (achievement,
   exam-success moments). Replaces an earlier generic-blue placeholder palette
   that didn't match the actual logo or differentiate from typical Bangladeshi
   coaching-center red/blue visual clichés.
   Logo: assets/logo.png, styled via .logo-img.
   ========================================================================== */
:root {
  --color-primary: #0b5d63;      /* deep teal, matches logo wordmark — trust, focus */
  --color-primary-dark: #073b3f;
  --color-accent: #e9614e;       /* coral, matches logo smile — warmth, CTAs */
  --color-gold: #f2a93b;         /* achievement / exam-success accent */
  --color-spark: #c6f135;        /* vivid lime — reserved for "new/fresh" moments only, the bright saturated note that reads as current to grade-5 kids */
  --color-ink: #132a2c;          /* teal-tinted charcoal, not generic navy */
  --color-muted: #5b6d6c;
  --color-bg: #ffffff;
  --color-bg-soft: #f3faf9;      /* warm teal-tinted off-white, not cool blue-grey */
  --color-border: #dceaea;

  /* chapter-card accent colors — teal/coral/gold family, not an arbitrary rainbow */
  --color-grade-pk: #1f8a90;
  --color-grade-k: #e9614e;
  --color-grade-1: #f2a93b;
  --color-grade-2: #0b5d63;
  --color-grade-3: #f3856f;
  --color-grade-4: #145f66;
  --color-grade-5: #2fa6a0;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 40, 42, 0.08);
  --font-body: "Hind Siliguri", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Baloo Da 2", "Hind Siliguri", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.55;
}

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 12px; font-family: var(--font-display); font-weight: 700; }
p { margin: 0 0 16px; color: var(--color-muted); }

a { color: inherit; }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(233, 97, 78, 0.35);
}
.btn-ghost {
  background: transparent;
  color: inherit;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-small { padding: 10px 20px; font-size: 0.9rem; }

.header-actions .btn-ghost {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.header-actions .btn-ghost:hover {
  background: var(--color-bg-soft);
}

/* Announcement bar
   ========================================================================== */
.announcement-bar {
  background: var(--color-ink);
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  padding: 8px 16px;
}
.announcement-bar a { color: var(--color-gold); text-decoration: underline; font-weight: 600; }

/* Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-ink);
  font-weight: 700;
  font-size: 1.05rem;
  min-width: 0;
}

.logo-img {
  height: 40px;
  width: auto;
  min-width: 28px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 1;
}

.nav-menu {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  text-decoration: none;
  font-weight: 600;
  color: var(--color-ink);
  font-size: 0.92rem;
  white-space: nowrap;
}
.nav-menu a:hover { color: var(--color-primary); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
}

/* Hero carousel
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-track {
  display: flex;
  transition: none;
}

.hero-slide {
  flex: 0 0 100%;
  display: none;
  background: linear-gradient(135deg, var(--slide-bg, var(--color-primary), var(--color-primary-dark)));
  padding: 80px 0;
}
.hero-slide.is-active { display: block; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.eyebrow--new {
  background: var(--color-spark);
  color: var(--color-primary-dark);
}

.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  color: #fff;
}
.hero-copy p {
  font-size: 1.1rem;
  max-width: 46ch;
  color: rgba(255,255,255,0.85);
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.hero-actions .btn-ghost { color: #fff; }

.hero-art {
  position: relative;
  height: 320px;
}
.hero-card {
  position: absolute;
  width: 220px;
  height: 280px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: var(--color-ink);
  font-weight: 700;
  background: rgba(255,255,255,0.95);
}
.hero-card--a { top: 0; left: 10%; transform: rotate(-6deg); }
.hero-card--b { top: 40px; left: 42%; transform: rotate(5deg); }
.hero-card-grade { font-size: 2rem; }

/* Hero pictures — one shared frame style for all slides */
.hero-art.hero-art--pic {
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 18px;
}
.hero-frame {
  position: relative;
  margin: 0;
  padding: 10px;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 26px 55px rgba(4, 30, 32, 0.38);
}
.hero-frame img {
  display: block;
  height: 340px;
  width: auto;
  border-radius: 18px;
}
.hero-frame--portrait img { height: 380px; }
.hero-frame--tilt-r { transform: rotate(2.5deg); }
.hero-frame--tilt-l { transform: rotate(-2.5deg); }
.hero-sticker {
  position: absolute;
  left: -18px;
  bottom: 26px;
  padding: 9px 16px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  transform: rotate(-4deg);
}
.hero-sticker--gold  { background: var(--color-gold);   color: var(--color-primary-dark); }
.hero-sticker--coral { background: var(--color-accent); color: #fff; }
.hero-sticker--lime  { background: var(--color-spark);  color: var(--color-primary-dark); }

.hero-card-label { font-size: 0.85rem; opacity: 0.7; font-weight: 600; }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  color: var(--color-ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 5;
}
.hero-arrow--prev { left: 16px; }
.hero-arrow--next { right: 16px; }

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 5;
}
.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}
.hero-dot.is-active { background: #fff; }

/* Section heading
   ========================================================================== */
.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.section-heading--left { text-align: left; margin-left: 0; max-width: 640px; }
.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  position: relative;
  display: inline-block;
}
.section-heading h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 4px;
  margin: 14px auto 0;
}
.section-heading--left h2::after { margin: 14px 0 0; }

/* Programs / grade grid
   ========================================================================== */
.programs { padding: 96px 0; }

.grade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.grade-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: 6px solid var(--card-color, var(--color-primary));
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.grade-card:hover { transform: translateY(-4px); }

.grade-card-top { margin-bottom: 14px; }

.grade-badge {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--card-color, var(--color-primary));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

.grade-card h3 { font-size: 1.15rem; }
.grade-card p { font-size: 0.95rem; margin-bottom: 12px; }
.grade-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--card-color, var(--color-primary));
  text-decoration: none;
}

/* Resources
   ========================================================================== */
.resources { padding: 96px 0; background: var(--color-bg-soft); }

.resources-intro {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 48px;
}
.resources-intro .section-heading { margin-bottom: 0; }
.resources-photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}
@media (max-width: 860px) {
  .resources-intro { grid-template-columns: 1fr; gap: 28px; }
  .resources-photo { transform: none; }
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.resource-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.resource-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.resource-card h3 { font-size: 1.05rem; }
.resource-card p { font-size: 0.92rem; margin-bottom: 12px; }
.resource-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

/* Promo tiles
   ========================================================================== */
.promo-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.promo-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 48px 32px;
  min-height: 160px;
  color: var(--color-ink);
  text-decoration: none;
}
.promo-tile h3 { margin: 0; font-size: 1.3rem; }
.promo-tile--photo {
  color: #fff;
  background-size: cover;
  background-position: center 66%;
  background-repeat: no-repeat;
  min-height: 220px;
}
.promo-tile--photo span { color: var(--color-gold); }
.promo-tile--board { background-position: center 78%; }
.promo-tile--board span { color: var(--color-spark); }
.promo-tile span { font-weight: 700; font-size: 0.9rem; }

/* Testimonials
   ========================================================================== */
.testimonials { padding: 96px 0; }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.testimonial-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
}
.testimonial-layout .testimonial-grid { grid-template-columns: 1fr; gap: 18px; }
.class-photo {
  position: relative;
  margin: 0;
  padding: 10px;
  background: #fff;
  border-radius: 26px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  max-width: 400px;
  justify-self: center;
}
.class-photo img { width: 100%; height: auto; border-radius: 18px; }
.class-photo .hero-sticker { left: -16px; bottom: 34px; }
.testimonial-layout .testimonial-card { border-left: 6px solid var(--tc, var(--color-primary)); }
.testimonial-layout .testimonial-card:nth-child(1) { --tc: var(--color-accent); }
.testimonial-layout .testimonial-card:nth-child(2) { --tc: var(--color-gold); }
.testimonial-layout .testimonial-card:nth-child(3) { --tc: var(--color-grade-pk); }
@media (max-width: 860px) {
  .testimonial-layout { grid-template-columns: 1fr; gap: 44px; }
  .class-photo { max-width: 290px; }
  .class-photo .hero-sticker { left: 50%; bottom: -16px; transform: translateX(-50%) rotate(-3deg); }
}

.testimonial-card {
  margin: 0;
  background: var(--color-bg-soft);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.testimonial-card blockquote {
  margin: 0 0 16px;
  font-size: 1rem;
  color: var(--color-ink);
}
.testimonial-card figcaption {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-muted);
}

/* Approach / mission
   ========================================================================== */
.approach { background: var(--color-bg-soft); padding: 96px 0; }
.approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.approach-layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 56px;
  align-items: center;
}
.approach-layout .approach-grid { grid-template-columns: 1fr 1fr; }
.approach-photo {
  position: relative;
  margin: 0;
  padding: 10px;
  background: #fff;
  border-radius: 26px;
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
  max-width: 380px;
  justify-self: center;
}
.approach-photo img { width: 100%; height: auto; border-radius: 18px; }
.approach-photo .hero-sticker { left: auto; right: -14px; bottom: auto; top: 26px; transform: rotate(4deg); }
.approach-layout .approach-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
  border-left: 6px solid var(--item-color, var(--color-primary));
}
.approach-layout .approach-item:nth-child(1) { --item-color: var(--color-grade-pk); }
.approach-layout .approach-item:nth-child(2) { --item-color: var(--color-accent); }
.approach-layout .approach-item:nth-child(3) { --item-color: var(--color-gold); }
.approach-layout .approach-item:nth-child(4) { --item-color: var(--color-grade-5); }
@media (max-width: 860px) {
  .approach-layout { grid-template-columns: 1fr; gap: 40px; }
  .approach-photo { max-width: 280px; }
  .approach-photo .hero-sticker { right: 50%; top: auto; bottom: -16px; transform: translateX(50%) rotate(-3deg); }
  .approach-layout .approach-grid { grid-template-columns: 1fr; }
}

.approach-item h3 { color: var(--color-primary); font-size: 1.05rem; }
.approach-item p { font-size: 0.95rem; margin-bottom: 0; }

/* Shared picture frame for section images */
.pic-frame {
  position: relative;
  margin: 0;
  padding: 10px;
  background: #fff;
  border-radius: 26px;
  box-shadow: var(--shadow);
}
.pic-frame img { width: 100%; height: auto; border-radius: 18px; }
.pic-frame--tilt-r { transform: rotate(2deg); }
.pic-frame--tilt-l { transform: rotate(-2deg); }

.programs-intro {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 56px;
}
.programs-intro .section-heading { margin-bottom: 0; }
.programs-photo { max-width: 320px; justify-self: center; }
.programs-photo .hero-sticker { left: -18px; bottom: 34px; }

.newsletter-photo { max-width: 360px; flex: 0 1 360px; }
.newsletter-copy { flex: 1 1 380px; }
.newsletter-copy .newsletter-form { margin-top: 22px; }

@media (max-width: 860px) {
  .programs-intro { grid-template-columns: 1fr; gap: 40px; }
  .programs-photo { max-width: 260px; }
  .programs-photo .hero-sticker { left: 50%; bottom: -16px; transform: translateX(-50%) rotate(-3deg); }
  .newsletter-photo { flex: 0 0 auto; width: 100%; max-width: 300px; align-self: center; }
  .newsletter-copy { flex: 0 0 auto; width: 100%; }
}

/* Newsletter
   ========================================================================== */
.newsletter {
  background: var(--color-ink);
  color: #fff;
  padding: 64px 0;
}
.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.newsletter-inner h2 { margin-bottom: 8px; }
.newsletter-inner p { color: rgba(255,255,255,0.7); margin: 0; }
.newsletter-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.newsletter-form input {
  padding: 14px 18px;
  border-radius: 999px;
  border: none;
  min-width: 0;
  flex: 1 1 220px;
  font-size: 0.95rem;
}

/* Footer
   ========================================================================== */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { text-decoration: none; color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-col li { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-bottom { padding: 20px 0; text-align: center; }
.footer-bottom p { margin: 0; color: rgba(255,255,255,0.5); font-size: 0.85rem; }

/* Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .nav-menu { display: none; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
  }
  .nav-menu.open { display: flex; }
  .promo-tiles { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero-art.hero-art--pic { height: auto; padding-bottom: 34px; }
  .hero-frame img { height: 260px; }
  .hero-frame--portrait img { height: 300px; }
  .hero-sticker { left: 50%; bottom: -16px; transform: translateX(-50%) rotate(-3deg); font-size: 0.85rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { height: 240px; margin-top: 24px; }
  .hero-card { width: 170px; height: 220px; }
}

.nav-login-mobile { display: none; }

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-inner { flex-direction: column; align-items: flex-start; }
  .header-actions .btn-small { display: none; }
  .hero-arrow { display: none; }
  .nav-login-mobile {
    display: list-item;
    border-top: 1px solid var(--color-border);
    margin-top: 8px;
    padding-top: 16px;
  }
  .nav-login-mobile a { color: var(--color-primary); }
}
