/* ================================================================
   SCHOOL HISTORY — HERITAGE TIMELINE
   ================================================================ */

.ourhistory {
  --history-navy: #071d43;
  --history-pink: #e91e52;
  --history-blue: #2474b5;
  --history-ink: #16243c;
  --history-muted: #5f6978;
  position: relative;
  overflow: hidden;
  background: #fff;
  color: var(--history-ink);
}

.mpp-timeline { width: 100%; }

/* Image-led history hero */
.mpp-header-group {
  position: relative;
  isolation: isolate;
  display: flex;
  height: clamp(320px, 28vw, 430px);
  flex-direction: column;
  justify-content: center;
  padding: clamp(58px, 8vw, 125px) max(24px, calc((100% - 1400px) / 2));
  overflow: hidden;
  background-color: #17191d;
  background-image: url('assets/images/mothers-pride.jpg');
  background-position: center 45%;
  background-size: cover;
  background-repeat: no-repeat;
}

.mpp-header-group::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 10, 14, .8) 0%, rgba(8, 10, 14, .66) 38%, rgba(8, 10, 14, .32) 70%, rgba(8, 10, 14, .14) 100%);
}

.mpp-header-group::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .04), rgba(0, 0, 0, .2));
}

.mpp-header-group h1 {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-family: 'Boogaloo', cursive;
  font-size: clamp(3.2rem, 6vw, 6.2rem);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.02em;
}

.mpp-header-group .mpp-since-badge {
  order: -1;
  display: block;
  margin-bottom: 22px;
  color: var(--history-pink);
  font-size: clamp(.75rem, 1vw, .9rem);
  font-weight: 700;
  letter-spacing: 2.7px;
  text-transform: uppercase;
}

.mpp-header-group .mpp-since-badge::after {
  content: "";
  display: block;
  width: 58px;
  height: 2px;
  margin-top: 18px;
  background: var(--history-pink);
}

.mpp-hero-intro {
  max-width: 570px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, .8);
  font-size: clamp(.95rem, 1.25vw, 1.08rem);
  line-height: 1.8;
}

/* Journey title created from the existing Foundation feature */
.mpp-spotlight {
  position: relative;
  display: grid;
  width: min(100% - 40px, 1180px);
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  margin: 0 auto;
  padding: clamp(88px, 9vw, 120px) 0 clamp(68px, 7vw, 96px);
}

.mpp-spotlight::before {
  content: "OUR JOURNEY";
  position: absolute;
  top: clamp(48px, 5vw, 72px);
  left: 50%;
  color: var(--history-pink);
  font: 700 11px/1 'Poppins', sans-serif;
  letter-spacing: 3px;
  transform: translateX(-50%);
}

.mpp-spotlight-image {
  grid-column: 2;
  overflow: hidden;
  border: 1px solid rgba(7, 29, 67, .08);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(7, 29, 67, .13);
}

.mpp-spotlight-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.mpp-spotlight-content {
  grid-column: 1;
  grid-row: 1;
  padding-right: clamp(10px, 2vw, 28px);
}

.mpp-milestone-header {
  margin-bottom: 18px;
}

.mpp-year-pill {
  display: block;
  margin-bottom: 7px;
  color: var(--history-pink);
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.mpp-milestone-header h2 {
  margin: 0;
  color: var(--history-navy);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.12;
}

.mpp-spotlight-content p,
.mpp-milestone-card p {
  margin: 0;
  color: var(--history-muted);
  font-size: clamp(.94rem, 1.15vw, 1rem);
  line-height: 1.82;
}

.mpp-spotlight-content p i,
.mpp-milestone-card p i {
  display: inline-grid;
  width: 30px;
  height: 30px;
  margin: 0 8px 3px 0;
  place-items: center;
  border-radius: 50%;
  background: var(--history-navy);
  color: var(--history-pink);
  font-size: .75rem;
  vertical-align: middle;
}

/* Central heritage timeline */
.mpp-journey {
  position: relative;
  display: grid;
  width: min(100% - 40px, 1380px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0 auto;
  padding: 18px 0 clamp(85px, 9vw, 130px);
}

.mpp-journey::before { display: none; }

.mpp-milestone-card {
  position: relative;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: clamp(28px, 3vw, 38px);
  border: 1px solid rgba(7, 29, 67, .07);
  border-radius: 18px;
  background: #f8fafc;
  box-shadow: 0 15px 40px rgba(7, 29, 67, .075);
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.mpp-milestone-card:nth-child(odd),
.mpp-milestone-card:nth-child(even) { margin: 0; text-align: left; }

.mpp-milestone-card:nth-child(even) {
  background: linear-gradient(145deg, rgba(233, 30, 82, .035), #fff);
}

.mpp-milestone-card::before {
  display: none;
}

.mpp-milestone-card:nth-child(odd)::before { right: -80px; }
.mpp-milestone-card:nth-child(even)::before { left: -80px; }

.mpp-milestone-card::after { display: none; }

.mpp-milestone-card:nth-child(odd)::after { right: -57px; }
.mpp-milestone-card:nth-child(even)::after { left: -57px; }

.mpp-milestone-card:nth-child(even)::before { background: var(--history-blue); }
.mpp-milestone-card:nth-child(even)::after { background: rgba(36, 116, 181, .45); }

.mpp-milestone-card .mpp-milestone-header {
  padding-top: 16px;
  border-top: 3px solid var(--history-pink);
}

.mpp-milestone-card:nth-child(even) .mpp-milestone-header {
  border-top-color: var(--history-blue);
}

.mpp-milestone-card p i { display: none; }

.mpp-milestone-card:hover {
  box-shadow: 0 22px 52px rgba(7, 29, 67, .12);
  transform: translateY(-4px);
}

@media (prefers-reduced-motion: no-preference) {
  .mpp-header-group,
  .mpp-spotlight,
  .mpp-milestone-card { animation: historyReveal 650ms ease backwards; }
  .mpp-spotlight { animation-delay: 100ms; }
  .mpp-milestone-card:nth-child(2) { animation-delay: 140ms; }
  .mpp-milestone-card:nth-child(3) { animation-delay: 180ms; }
  .mpp-milestone-card:nth-child(4) { animation-delay: 220ms; }
  .mpp-milestone-card:nth-child(5) { animation-delay: 260ms; }
  .mpp-milestone-card:nth-child(6) { animation-delay: 300ms; }
  .mpp-milestone-card:nth-child(7) { animation-delay: 340ms; }
}

@keyframes historyReveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 850px) {
  .mpp-header-group {
    height: 360px;
    background-position: 64% center;
  }

  .mpp-header-group::before {
    background: linear-gradient(90deg, rgba(8, 10, 14, .82), rgba(8, 10, 14, .66) 58%, rgba(8, 10, 14, .24));
  }

  .mpp-spotlight {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .mpp-spotlight-image { grid-column: 1; grid-row: 1; }
  .mpp-spotlight-content { grid-column: 1; grid-row: 2; padding-right: 0; }
  .mpp-journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .mpp-header-group {
    height: 320px;
    padding: 30px 22px;
    background-position: 62% center;
  }

  .mpp-header-group::before {
    background: linear-gradient(90deg, rgba(8, 10, 14, .84), rgba(8, 10, 14, .7) 68%, rgba(8, 10, 14, .32));
  }

  .mpp-header-group h1 { max-width: none; font-size: clamp(3rem, 12vw, 3.8rem); }
  .mpp-header-group .mpp-since-badge { max-width: 280px; line-height: 1.6; }
  .mpp-hero-intro { margin-top: 14px; font-size: .88rem; line-height: 1.55; }

  .mpp-spotlight {
    width: min(100% - 28px, 560px);
    padding: 92px 0 62px;
  }

  .mpp-spotlight::before { top: 46px; }
  .mpp-spotlight-image { border-width: 6px; }

  .mpp-journey {
    width: min(100% - 28px, 560px);
    grid-template-columns: 1fr;
    gap: 16px;
    padding-bottom: 75px;
  }

  .mpp-journey::before { left: 13px; bottom: 45px; }

  .mpp-milestone-card,
  .mpp-milestone-card:nth-child(odd),
  .mpp-milestone-card:nth-child(even) {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 26px 20px;
    text-align: left;
  }

  .mpp-milestone-card:nth-child(odd)::before,
  .mpp-milestone-card:nth-child(even)::before {
    top: 31px;
    right: auto;
    left: -44px;
    width: 14px;
    height: 14px;
    border-width: 4px;
    box-shadow: 0 0 0 4px #fff;
  }

  .mpp-milestone-card:nth-child(odd)::after,
  .mpp-milestone-card:nth-child(even)::after {
    top: 38px;
    right: auto;
    left: -29px;
    width: 29px;
  }

  .mpp-milestone-header h2 { font-size: 1.55rem; }
  .mpp-spotlight-content p, .mpp-milestone-card p { font-size: .93rem; line-height: 1.72; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .mp-top-strip, .mp-main-header, .mp-mobile-menu, .mp-overlay, .apply-now, .whatsapp {
    display: none !important;
  }
}
