/* Smart Minds International - New Courses page.
   Direction: "Smart Minds Bright Signal" (Novamira active design).
   Selectors account for Elementor widget wrappers, hence the paired
   ".smi-x .elementor-heading-title, h2.smi-x" forms. */

.smi-page {
  --smi-bg: #FFFFFF;
  --smi-surface: #F0F1FD;
  --smi-ink: #131739;
  --smi-ink-deep: #05060F;
  --smi-accent: #2235DD;
  --smi-accent-hover: #1A2BC6;
  --smi-line: #E4E7FD;
  --smi-subject: #2235DD;
  --smi-r-sm: 10px;
  --smi-r-md: 18px;
  --smi-r-pill: 999px;
  --smi-gut: clamp(20px, 5vw, 48px);
  --smi-max: 1180px;
  --smi-ease: cubic-bezier(.22,.61,.36,1);
  color: var(--smi-ink);
  font-family: 'Albert Sans', sans-serif;
  overflow-x: clip;
}

.smi-page :where(h1, h2, h3, h4) {
  font-family: 'Albert Sans', sans-serif;
  font-weight: 800;
}

/* Subject colour code: one colour per family, never on a button or a link. */
.smi-page .smi-fam--children  { --smi-subject: #D9480F; }
.smi-page .smi-fam--cambridge { --smi-subject: #2235DD; }
.smi-page .smi-fam--adults    { --smi-subject: #187A5B; }
.smi-page .smi-fam--family    { --smi-subject: #C2255C; }
.smi-page .smi-fam--languages { --smi-subject: #5F3DC4; }
.smi-page .smi-fam--special   { --smi-subject: #0B7285; }

/* ---------- Section shells ---------- */

.smi-page .smi-sec {
  --sec-ground: var(--smi-bg);
  background: var(--sec-ground);
  padding: clamp(56px, 9vw, 104px) var(--smi-gut);
  scroll-margin-top: 96px;
  row-gap: 0;
  column-gap: 0;
}
.smi-page .smi-sec--tint { --sec-ground: var(--smi-surface); }

.smi-page .smi-wrap {
  width: 100%;
  max-width: var(--smi-max);
  margin-inline: auto;
  padding: 0;
  row-gap: 0;
  column-gap: 0;
}

/* A short subject-coloured rule carries the family colour, so no section
   needs a small uppercase eyebrow above its heading. */
.smi-page .smi-h2--rule .elementor-heading-title::before,
.smi-page h2.smi-h2--rule::before {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--smi-subject);
  margin-bottom: 18px;
}

.smi-page .smi-h2 .elementor-heading-title,
.smi-page h2.smi-h2 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.12;
  font-weight: 800;
  color: var(--smi-ink-deep);
  letter-spacing: -.015em;
  margin: 0;
}
.smi-page .smi-h2 { margin: 0 0 14px; }

.smi-page .smi-lede,
.smi-page .smi-lede p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--smi-ink);
}
.smi-page .smi-lede { max-width: 62ch; margin: 0 0 clamp(32px, 4vw, 48px); }
.smi-page .smi-lede p:last-child { margin-bottom: 0; }

/* ---------- Hero ---------- */

.smi-page .smi-hero {
  background: var(--smi-surface);
  padding: clamp(52px, 7vw, 92px) 0 0;
  overflow: clip;
  row-gap: 0;
  column-gap: 0;
}
.smi-page .smi-hero__wrap {
  width: 100%;
  max-width: 1420px;
  margin-inline: auto;
  padding: 0 var(--smi-gut);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.smi-page .smi-hero__text {
  padding: 0 0 clamp(52px, 7vw, 92px);
  row-gap: 0;
  column-gap: 0;
}

.smi-page .smi-h1 .elementor-heading-title,
.smi-page h1.smi-h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--smi-ink-deep);
  margin: 0;
}
.smi-page .smi-h1 { margin: 0 0 20px; }
.smi-page .smi-h1 em {
  font-style: italic;
  color: var(--smi-accent);
  /* Italic descenders need the extra room at this leading. */
  line-height: 1.14;
}

.smi-page .smi-hero__sub,
.smi-page .smi-hero__sub p {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.6;
  color: var(--smi-ink);
}
.smi-page .smi-hero__sub { max-width: 36ch; margin: 0 0 32px; }
.smi-page .smi-hero__sub p:last-child { margin-bottom: 0; }

/* The hero photograph bleeds off the right edge of the viewport. */
.smi-page .smi-hero__img { align-self: stretch; padding: 0; }
.smi-page .smi-hero__img .elementor-widget-container { height: 100%; }
.smi-page .smi-hero__img img {
  width: calc(100% + var(--smi-gut));
  max-width: none;
  margin-right: calc(var(--smi-gut) * -1);
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  border-radius: var(--smi-r-md) 0 0 var(--smi-r-md);
  display: block;
}

/* ---------- Buttons ---------- */

.smi-page .smi-btns {
  /* Elementor drives container direction through this custom property, so set
     the property as well as the longhand or the column default wins. */
  --flex-direction: row;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 0;
  width: auto;
}

.smi-page .smi-btn .elementor-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Albert Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  padding: 15px 30px;
  border-radius: var(--smi-r-pill);
  background-color: var(--smi-accent);
  color: #FFFFFF;
  border: 2px solid var(--smi-accent);
  box-shadow: none;
  fill: #FFFFFF;
  transition: background-color .22s var(--smi-ease),
              border-color .22s var(--smi-ease),
              color .22s var(--smi-ease),
              transform .22s var(--smi-ease);
}
.smi-page .smi-btn .elementor-button:hover,
.smi-page .smi-btn .elementor-button:focus-visible {
  background-color: var(--smi-accent-hover);
  border-color: var(--smi-accent-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
}
.smi-page .smi-btn--ghost .elementor-button {
  background-color: transparent;
  color: var(--smi-accent);
}
.smi-page .smi-btn--ghost .elementor-button:hover,
.smi-page .smi-btn--ghost .elementor-button:focus-visible {
  background-color: var(--smi-accent);
  color: #FFFFFF;
}
.smi-page :where(a, button):focus-visible {
  outline: 3px solid var(--smi-accent);
  outline-offset: 3px;
}

/* ---------- Jump chips ---------- */

.smi-page .smi-jump {
  padding: clamp(26px, 4vw, 38px) var(--smi-gut);
  background: var(--smi-bg);
  border-bottom: 1px solid var(--smi-line);
  row-gap: 0;
  column-gap: 0;
}
.smi-page .smi-jump__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: var(--smi-max);
  margin: 0 auto;
  list-style: none;
  padding: 0;
}
.smi-page .smi-jump__list li { margin: 0; padding: 0; list-style: none; }
.smi-page .smi-jump__list a {
  display: inline-block;
  font-size: .875rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--smi-r-pill);
  border: 2px solid var(--smi-line);
  color: var(--smi-accent);
  text-decoration: none;
  transition: background-color .2s var(--smi-ease),
              border-color .2s var(--smi-ease),
              color .2s var(--smi-ease);
}
.smi-page .smi-jump__list a:hover,
.smi-page .smi-jump__list a:focus-visible {
  background: var(--smi-accent);
  border-color: var(--smi-accent);
  color: #FFFFFF;
}

/* ---------- Card ---------- */

.smi-page .smi-card {
  position: relative;
  background: var(--smi-bg);
  border: 1px solid var(--smi-line);
  border-radius: var(--smi-r-md);
  overflow: hidden;
  padding: 0;
  row-gap: 0;
  column-gap: 0;
  width: auto;
  transition: transform .28s var(--smi-ease), box-shadow .28s var(--smi-ease);
}
.smi-page .smi-sec--tint .smi-card { border-color: transparent; }

/* The 4px subject bar is the card's only subject signal. */
.smi-page .smi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--smi-subject);
  z-index: 2;
}

.smi-page .smi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px -12px rgba(34, 53, 221, .28);
}

.smi-page .smi-card__img,
.smi-page .smi-card__img .elementor-widget-container { width: 100%; margin: 0; padding: 0; }
.smi-page .smi-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.smi-page .smi-card__body {
  padding: 22px 24px 26px;
  row-gap: 0;
  column-gap: 0;
  width: auto;
}

.smi-page .smi-card__title .elementor-heading-title,
.smi-page h3.smi-card__title {
  font-size: 1.16rem;
  line-height: 1.25;
  font-weight: 800;
  color: var(--smi-ink-deep);
  letter-spacing: -.01em;
  margin: 0;
}
.smi-page .smi-card__title { margin: 0 0 8px; }

.smi-page .smi-card__text p { margin: 0; }
.smi-page .smi-card__text .smi-meta {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--smi-subject);
  margin: 0 0 8px;
}
.smi-page .smi-card__text .smi-desc {
  font-size: .96rem;
  line-height: 1.6;
  max-width: 46ch;
  color: var(--smi-ink);
}

/* ---------- Grid variants: each family reads differently ---------- */

.smi-page .smi-grid {
  display: grid;
  gap: clamp(18px, 2.2vw, 28px);
  align-items: stretch;
  padding: 0;
  width: 100%;
}

/* Children: four generous cards, two up. */
.smi-page .smi-grid--feature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.smi-page .smi-grid--feature .smi-card img { aspect-ratio: 16 / 10; }
.smi-page .smi-grid--feature .smi-card__title .elementor-heading-title { font-size: 1.32rem; }

/* Cambridge: a level ladder, picture left and exam right. */
.smi-page .smi-grid--ladder { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.smi-page .smi-grid--ladder .smi-card { display: flex; flex-direction: row; align-items: stretch; }
.smi-page .smi-grid--ladder .smi-card::before { inset: 0 auto 0 0; height: auto; width: 4px; }
.smi-page .smi-grid--ladder .smi-card__img { flex: 0 0 clamp(150px, 24%, 280px); }
.smi-page .smi-grid--ladder .smi-card__img .elementor-widget-container { height: 100%; }
.smi-page .smi-grid--ladder .smi-card img { height: 100%; aspect-ratio: auto; min-height: 150px; }
.smi-page .smi-grid--ladder .smi-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 20px;
}

/* Teens and adults, special programmes: three up. */
.smi-page .smi-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Family and early years: one tall lead card beside two stacked. */
.smi-page .smi-grid--split { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.smi-page .smi-grid--split > .smi-card:first-child { grid-row: span 2; }
.smi-page .smi-grid--split > .smi-card:first-child img { aspect-ratio: 4 / 3; }
.smi-page .smi-grid--split > .smi-card:first-child .smi-card__title .elementor-heading-title { font-size: 1.5rem; }
.smi-page .smi-grid--split > .smi-card:not(:first-child) img { aspect-ratio: 21 / 9; }

/* Other languages: compact square tiles. */
.smi-page .smi-grid--tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.smi-page .smi-grid--tiles .smi-card img { aspect-ratio: 1 / 1; }
.smi-page .smi-grid--tiles .smi-card__body { padding: 18px 20px 22px; }
.smi-page .smi-grid--tiles .smi-card__title { margin-bottom: 6px; }
.smi-page .smi-grid--tiles .smi-card__title .elementor-heading-title { font-size: 1.24rem; }

/* ---------- Closing information band ---------- */

.smi-page .smi-close { background: var(--smi-ink-deep); }
.smi-page .smi-close .smi-h2 .elementor-heading-title { color: #FFFFFF; }
.smi-page .smi-close .smi-h2--rule .elementor-heading-title::before { background: #E4E7FD; }
.smi-page .smi-close .smi-lede,
.smi-page .smi-close .smi-lede p { color: #F0F1FD; }
.smi-page .smi-close .smi-btn .elementor-button {
  background-color: #FFFFFF;
  border-color: #FFFFFF;
  color: var(--smi-ink-deep);
}
.smi-page .smi-close .smi-btn .elementor-button:hover,
.smi-page .smi-close .smi-btn .elementor-button:focus-visible {
  background-color: #F0F1FD;
  border-color: #F0F1FD;
  color: var(--smi-ink-deep);
}
.smi-page .smi-close .smi-btn--ghost .elementor-button {
  background-color: transparent;
  border-color: #FFFFFF;
  color: #FFFFFF;
}
.smi-page .smi-close .smi-btn--ghost .elementor-button:hover,
.smi-page .smi-close .smi-btn--ghost .elementor-button:focus-visible {
  background-color: #FFFFFF;
  color: var(--smi-ink-deep);
}
.smi-page .smi-close__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding: 0;
  width: 100%;
}
.smi-page .smi-close__col { padding: 0; row-gap: 0; column-gap: 0; }
.smi-page .smi-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #F0F1FD;
}
.smi-page .smi-contact li { margin: 0 0 18px; padding: 0; list-style: none; }
.smi-page .smi-contact li:last-child { margin-bottom: 0; }
.smi-page .smi-contact strong {
  display: block;
  font-weight: 700;
  color: #FFFFFF;
  font-size: .86rem;
  margin-bottom: 2px;
}
.smi-page .smi-contact a {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.smi-page .smi-contact a:hover { color: #E4E7FD; text-decoration-thickness: 2px; }

/* ---------- Scroll reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  html.smi-smooth { scroll-behavior: smooth; }
}

.smi-js .smi-page .smi-reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity .62s var(--smi-ease) var(--smi-d, 0ms),
    transform .62s var(--smi-ease) var(--smi-d, 0ms);
}
.smi-js .smi-page .smi-reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .smi-page .smi-grid--tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smi-page .smi-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smi-page .smi-close__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 880px) {
  .smi-page .smi-hero__wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .smi-page .smi-hero__text { padding-bottom: 36px; }
  .smi-page .smi-hero__img img {
    width: calc(100% + var(--smi-gut) * 2);
    max-width: none;
    margin-inline: calc(var(--smi-gut) * -1);
    border-radius: 0;
    min-height: 0;
    aspect-ratio: 16 / 10;
    height: auto;
  }
  .smi-page .smi-hero__sub { max-width: 46ch; }
}

@media (max-width: 720px) {
  .smi-page .smi-grid--feature,
  .smi-page .smi-grid--three,
  .smi-page .smi-grid--split { grid-template-columns: minmax(0, 1fr); }
  .smi-page .smi-grid--split > .smi-card:first-child { grid-row: auto; }
  .smi-page .smi-grid--split > .smi-card img,
  .smi-page .smi-grid--feature .smi-card img { aspect-ratio: 3 / 2; }

  .smi-page .smi-grid--ladder .smi-card { flex-direction: column; }
  .smi-page .smi-grid--ladder .smi-card::before { inset: 0 0 auto 0; height: 4px; width: auto; }
  .smi-page .smi-grid--ladder .smi-card__img { flex: 0 0 auto; }
  .smi-page .smi-grid--ladder .smi-card img { aspect-ratio: 3 / 2; height: auto; min-height: 0; }

  .smi-page .smi-sec { scroll-margin-top: 72px; }
  .smi-page .smi-btns { width: 100%; }
  .smi-page .smi-btns .smi-btn { width: 100%; }
  .smi-page .smi-btns .smi-btn .elementor-button { width: 100%; }

  /* Shorter travel keeps the reveal light on phones. */
  .smi-js .smi-page .smi-reveal { transform: translate3d(0, 12px, 0); }
}

@media (max-width: 420px) {
  .smi-page .smi-grid--tiles { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .smi-js .smi-page .smi-reveal { opacity: 1; transform: none; transition: none; }
  .smi-page .smi-card:hover { transform: none; }
  .smi-page .smi-btn .elementor-button:hover { transform: none; }
}
