/* =========================================================================
   IMPERIS ACADEMY PAGE — page-specific styles only (academy.css)
   Global rules (reset, colors, fonts, .container, .btn, .card, .hero,
   .section, .section-head, navbar, footer) live in /style.css.
   Only this page's own layout belongs here. Colors/fonts come only from the
   §6/§7 variables — no new colors; --dusty-denim is the only accent.
   Scroll/load reveals are AOS (data-aos in the HTML); hovers are pure CSS;
   accordions are native <details>. This exact file is shared by EN + AR —
   RTL differences are handled by html[lang="ar"] / html[dir="rtl"] rules.
   ========================================================================= */

/* Offset in-page anchors so the sticky navbar never covers a heading */
#path,
#modules,
#formats,
#corporate {
  scroll-margin-top: calc(var(--navbar-height) + 1.5rem);
}

/* Small uppercase label with an optional leading icon (reused across sections) */
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 0.6rem;
}
.label svg { width: 16px; height: 16px; }
html[lang="ar"] .label {
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.9rem;
}

/* Shared image-zoom wrapper (hover scale on the child media) */
.img-zoom { overflow: hidden; }
.img-zoom img,
.img-zoom video { transition: transform 0.6s ease; }

/* Force the training email to read LTR even inside the RTL page */
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ------------------------------------------------------------------ 1 · HERO */
.page-hero {
  min-height: 86vh;
}
.page-hero .container {
  padding-bottom: 5rem; /* room for the overlapping stats bar */
}
.hero-actions .btn { min-width: 0; }

/* ------------------------------------------------------------- 2 · STATS BAR */
.stats-wrap {
  position: relative;
  z-index: 3;
  margin-top: -4.5rem;
}
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px; /* hairline dividers come from the background showing through */
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(36, 58, 94, 0.28);
}
@media (min-width: 1024px) {
  .stats-bar { grid-template-columns: repeat(4, 1fr); }
}
.stat-item {
  position: relative;
  background: var(--color-primary);
  padding: 2.25rem 1.25rem;
  text-align: center;
  transition: all 0.25s ease;
}
.stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.stat-item:hover::before { transform: scaleX(1); }
.stat-item:hover .stat-num small { color: var(--color-text-invert); }
.stat-num {
  display: block;
  font-family: var(--font-heading-en);
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--color-text-invert);
}
.stat-num small {
  font-size: 0.45em;
  font-weight: 500;
  color: var(--color-accent);
  vertical-align: 0.35em;
}
html[lang="ar"] .stat-num { font-family: var(--font-heading-ar); }
.stat-label {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-surface-alt);
}
html[lang="ar"] .stat-label {
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.95rem;
}

/* ------------------------------------------------------------- 3 · INTRO */
.intro-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .intro-grid { grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
}
.intro-grid .lead {
  font-size: 1.15rem;
  color: var(--color-text);
}
html[lang="ar"] .intro-grid .lead { font-size: 1.25rem; }
.intro-grid .support { color: var(--color-secondary); }

/* --------------------------------------------------- 4 · YOUR PATH (highlight) */
.path-track {
  display: grid;
  gap: 2rem;
  position: relative;
}
@media (min-width: 900px) {
  .path-track {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  /* The connector line that visually links the three stages */
  .path-track::before {
    content: "";
    position: absolute;
    top: 150px;
    inset-inline: 12%;
    height: 3px;
    background: repeating-linear-gradient(
      to right,
      var(--color-accent) 0 14px,
      transparent 14px 26px
    );
    z-index: 0;
  }
  html[dir="rtl"] .path-track::before {
    background: repeating-linear-gradient(
      to left,
      var(--color-accent) 0 14px,
      transparent 14px 26px
    );
  }
}
.path-stage {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border-top: 3px solid transparent;
  transition: all 0.25s ease;
  height: 100%;
}
.path-stage:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-top-color: var(--color-secondary);
}
.path-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--midnight-blue), var(--dusty-denim));
}
.path-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.path-stage:hover .path-media img { transform: scale(1.05); }
.path-num {
  position: absolute;
  bottom: 1rem; /* inside the frame — .path-media clips its overflow */
  inset-inline-start: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--color-text-invert);
  font-family: var(--font-heading-en);
  font-weight: 700;
  font-size: 1.25rem;
}
html[lang="ar"] .path-num { font-family: var(--font-heading-ar); }
.path-body {
  padding: 1.75rem;
}
.path-body .stage-kicker {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 0.35rem;
}
html[lang="ar"] .path-body .stage-kicker {
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.92rem;
}
.path-body h3 { margin-bottom: 0.6rem; }
.path-body p { color: var(--color-secondary); font-size: 0.96rem; }
html[lang="ar"] .path-body p { font-size: 1.05rem; }
.path-note {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--color-accent);
}

/* --------------------------------------------------- 5 · VIDEO DIVIDER BAND */
.divider-band {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 5rem;
  overflow: hidden;
  color: var(--color-text-invert);
}
.divider-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.divider-band .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(27, 44, 71, 0.7), rgba(27, 44, 71, 0.85));
}
.divider-band .container { position: relative; z-index: 2; }
.divider-quote {
  font-family: var(--font-heading-en);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  max-width: 1000px;
  margin-inline: auto;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(27, 44, 71, 0.6);
}
html[lang="ar"] .divider-quote {
  font-family: var(--font-heading-ar);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
}
.divider-caption {
  display: inline-block;
  margin-top: 1.25rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--color-surface-alt);
}
html[lang="ar"] .divider-caption {
  letter-spacing: normal;
  font-size: 1rem;
}

/* --------------------------------------------------- 6 · TECHNICAL MODULES */
.mod-clusters {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.mod-cluster {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.mod-cluster-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 150px;
  padding: 1.5rem;
  overflow: hidden;
  color: var(--color-text-invert);
}
.mod-cluster-head img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.6s ease;
}
.mod-cluster:hover .mod-cluster-head img { transform: scale(1.05); }
.mod-cluster-head::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(27, 44, 71, 0.35), rgba(27, 44, 71, 0.8));
}
.mod-cluster-head h3 {
  position: relative;
  z-index: 2;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
}
.mod-grid {
  display: grid;
  gap: 1px;
  background: rgba(36, 58, 94, 0.08);
}
@media (min-width: 560px) {
  .mod-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .mod-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .mod-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.mod-card {
  background: #fff;
  padding: 1.75rem 1.5rem;
  transition: background 0.25s ease;
}
.mod-card:hover { background: var(--color-surface); }
.mod-card .card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-primary);
  margin-bottom: 1rem;
  transition: all 0.25s ease;
}
.mod-card:hover .card-icon {
  background: var(--color-primary);
  color: var(--color-text-invert);
}
.mod-card .card-icon svg { width: 24px; height: 24px; }
.mod-card h4 { font-size: 1.05rem; margin-bottom: 0.4rem; }
html[lang="ar"] .mod-card h4 { font-size: 1.25rem; }
.mod-card p { color: var(--color-secondary); font-size: 0.9rem; }
html[lang="ar"] .mod-card p { font-size: 1rem; }

.catalog-note {
  margin-top: 2.5rem;
  text-align: center;
}

/* --------------------------------------------------- 7 · TRAINING FORMATS */
.format-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .format-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .format-grid { grid-template-columns: repeat(4, 1fr); } }
.format-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.75rem 1.5rem;
  border-top: 3px solid transparent;
  transition: all 0.25s ease;
  height: 100%;
}
.format-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-top-color: var(--color-secondary);
}
.format-card .card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-primary);
  margin-bottom: 1.1rem;
  transition: all 0.25s ease;
}
.format-card:hover .card-icon {
  background: var(--color-primary);
  color: var(--color-text-invert);
}
.format-card .card-icon svg { width: 24px; height: 24px; }
.format-card h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
html[lang="ar"] .format-card h4 { font-size: 1.3rem; }
.format-dur {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--color-surface-alt);
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 600;
}
.format-card p { color: var(--color-secondary); font-size: 0.9rem; }
html[lang="ar"] .format-card p { font-size: 1rem; }

/* --------------------------------------------------- 8 · WHAT A COURSE INCLUDES */
.includes-wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .includes-wrap { grid-template-columns: 0.9fr 1.1fr; gap: 3.5rem; }
}
.includes-copy h2 { margin-bottom: 1rem; }
.includes-copy > p { color: var(--color-secondary); }
.includes-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2rem 1.75rem;
}
@media (min-width: 768px) { .includes-card { padding: 2.5rem; } }
.includes-list {
  display: grid;
  gap: 0.85rem 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .includes-list { grid-template-columns: 1fr 1fr; } }
.includes-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
}
html[lang="ar"] .includes-list li { font-size: 1.05rem; }
.includes-list svg {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  flex: 0 0 auto;
  color: var(--color-secondary);
}

/* --------------------------------------------------- 9 · CORPORATE TRAINING */
.corp-box {
  display: grid;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-primary);
  color: var(--color-text-invert);
  box-shadow: 0 24px 50px rgba(36, 58, 94, 0.22);
}
@media (min-width: 900px) { .corp-box { grid-template-columns: 1.1fr 0.9fr; } }
.corp-media { position: relative; overflow: hidden; min-height: 300px; }
.corp-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.corp-box:hover .corp-media img { transform: scale(1.05); }
.corp-body { padding: 2.5rem 1.75rem; }
@media (min-width: 768px) { .corp-body { padding: 3.5rem 3rem; } }
.corp-body .label { color: var(--color-accent); }
.corp-body h2 { margin-bottom: 1rem; }
.corp-body > p { color: var(--color-surface-alt); }
.corp-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.75rem 0;
}
.corp-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--color-surface-alt);
  font-size: 0.96rem;
}
html[lang="ar"] .corp-list li { font-size: 1.05rem; }
.corp-list svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 0.2rem;
  color: var(--color-accent);
}
.corp-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.5rem; }
.corp-body .btn-primary { background: #fff; color: var(--color-primary); }
.corp-body .btn-primary:hover { background: var(--color-surface-alt); transform: translateY(-2px); }

/* --------------------------------------------------- 10 · TRAINEE VOICES */
.voices-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .voices-grid { grid-template-columns: repeat(3, 1fr); } }
.voice-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2rem 1.75rem;
}
.voice-quote-icon { color: var(--color-accent); margin-bottom: 1rem; }
.voice-quote-icon svg { width: 32px; height: 32px; }
.voice-quote { color: var(--color-text); font-style: italic; min-height: 4.5rem; }
.voice-person { display: flex; align-items: center; gap: 0.85rem; margin-top: 1.5rem; }
.voice-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex: 0 0 auto;
}
.voice-photo svg { width: 26px; height: 26px; }
.voice-name { font-weight: 600; }
.voice-programme { font-size: 0.85rem; color: var(--color-secondary); }

/* --------------------------------------------------- 11 · WHY TRAIN WITH US */
.feature-card {
  position: relative;
  height: 100%;
  border-top: 3px solid transparent;
  padding: 2.25rem 1.75rem;
}
.feature-card:hover { border-top-color: var(--color-secondary); }
.feature-card .card-icon { transition: all 0.25s ease; }
.feature-card:hover .card-icon {
  background: var(--color-primary);
  color: var(--color-text-invert);
}
.feature-card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }

/* --------------------------------------------------- 12 · FAQ (native <details>) */
.faq-list {
  max-width: 820px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.faq-item {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border-inline-start: 3px solid transparent;
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.faq-item[open] { border-inline-start-color: var(--color-secondary); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--color-primary);
  transition: color 0.25s ease;
}
html[lang="ar"] .faq-item summary { font-size: 1.15rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--color-secondary); }
.faq-item summary:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: -4px;
  border-radius: 4px;
}
.faq-item summary .chev {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  transition: transform 0.25s ease;
}
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-answer { padding: 0 1.5rem 1.4rem; }
.faq-answer p { color: var(--color-secondary); }
.faq-item[open] .faq-answer { animation: faq-in 0.25s ease; }
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------- 13 · CLOSING CTA */
.cta-band {
  position: relative;
  padding-block: 6rem;
  text-align: center;
  color: var(--color-text-invert);
  overflow: hidden;
}
.cta-band .cta-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 1.2s ease;
}
.cta-band:hover .cta-media { transform: scale(1.04); }
.cta-band .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(27, 44, 71, 0.68), rgba(27, 44, 71, 0.85));
}
.cta-band .container { position: relative; z-index: 2; }
.cta-band h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.cta-band p {
  max-width: 620px;
  margin: 1rem auto 2rem;
  color: rgba(255, 255, 255, 0.9);
}
.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-band .btn-primary { background: #fff; color: var(--color-primary); }
.cta-band .btn-primary:hover {
  background: var(--color-surface-alt);
  color: var(--color-primary);
  transform: translateY(-2px);
}
.cta-band .btn-outline-light:hover { transform: translateY(-2px); }
.cta-email {
  margin-top: 2rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}
.cta-email a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .img-zoom img,
  .img-zoom video,
  .cta-band .cta-media,
  .path-stage,
  .path-media img,
  .mod-cluster-head img,
  .corp-media img,
  .format-card,
  .feature-card { transition: none; }
  .path-stage:hover,
  .format-card:hover { transform: none; }
  .path-stage:hover .path-media img,
  .mod-cluster:hover .mod-cluster-head img,
  .corp-box:hover .corp-media img { transform: none; }
  .cta-band:hover .cta-media { transform: none; }
  .faq-item[open] .faq-answer { animation: none; }
}

/* ------------------------------- 2B · ACCREDITATION & PRACTICE (client content)
   Media + narrative split, sitting directly under the hero. Mirrors for RTL on
   its own because CSS Grid column order follows the document's `dir`. */
#accreditation {
  scroll-margin-top: calc(var(--navbar-height) + 1.5rem);
}
.accred-box {
  display: grid;
  gap: 2.5rem;
  align-items: stretch;
}
@media (min-width: 900px) {
  .accred-box { grid-template-columns: 0.85fr 1.15fr; gap: 3.5rem; }
}
.accred-media {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  background: linear-gradient(135deg, var(--midnight-blue), var(--dusty-denim));
}
.accred-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.25s ease;
}
.accred-media:hover img { transform: scale(1.05); }
.accred-body h2 { margin-bottom: 1.25rem; }
.accred-body p { color: var(--color-secondary); }
.accred-body p + p { margin-top: 1.1rem; }
.accred-body p:first-of-type {
  font-size: 1.15rem;
  color: var(--color-text);
}
html[lang="ar"] .accred-body p:first-of-type { font-size: 1.25rem; }

/* The three supporting points — same card treatment as the rest of the page */
.accred-points {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
  margin-top: 3rem;
}
@media (min-width: 768px) {
  .accred-points { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------------------------------- Reduced motion (2B section only) */
@media (prefers-reduced-motion: reduce) {
  .accred-media img { transition: none; }
  .accred-media:hover img { transform: none; }
}
