/* =========================================================================
   MAIAM – common.css
   Design tokens, base typography, layout primitives and shared components
   (header, navigation, footer, page hero, buttons, cards, CTA band, lightbox,
   video embeds, forms). Page-specific styles live in their own files.
   ========================================================================= */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
    font-family: "Sora";
    src: url("../assets/fonts/sora-latin-var.woff2") format("woff2");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../assets/fonts/inter-latin-var.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
    /* Brand palette – navy / charcoal base, automotive blue, selective orange.
       Gold and red echo the MAIAM logo and are used only for small details. */
    --primary-navy: #14283F;
    --primary-navy-deep: #0D1C2E;
    --industrial-charcoal: #1F2933;
    --automotive-blue: #1769AA;
    --automotive-blue-light: #5AA9E6;
    --accent-orange: #F28C28;
    --accent-orange-hover: #E07A14;
    --accent-orange-text: #A9560A; /* orange that passes AA on white */
    --brand-gold: #F7BF12;
    --brand-red: #E1251B;

    --background-white: #FFFFFF;
    --background-light: #F5F7FA;
    --background-blue: #EDF4FA;

    --text-primary: #1D2935;
    --text-secondary: #56636F; /* darkened from #647481 for AA contrast on light greys */
    --text-on-dark: #E6EDF4;
    --text-on-dark-muted: #A9B8C8;

    --border-light: #DFE5EB;
    --border-dark: rgba(255, 255, 255, 0.14);
    --success-green: #15805D;
    --error-red: #B42318;

    /* Typography */
    --font-heading: "Sora", "Segoe UI", system-ui, sans-serif;
    --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --fs-h1: clamp(2.1rem, 1.45rem + 2.8vw, 3.75rem);
    --fs-h2: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem);
    --fs-h3: clamp(1.15rem, 1.07rem + 0.4vw, 1.4rem);
    --fs-lead: clamp(1.05rem, 1rem + 0.3vw, 1.22rem);
    --fs-small: 0.875rem;
    --fs-xs: 0.78rem;

    /* Layout */
    --container: 1240px;
    --gutter: clamp(16px, 4vw, 32px);
    --section-space: clamp(64px, 8vw, 112px);
    --header-height: 76px;

    /* Shape & depth */
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(20, 40, 63, 0.06), 0 1px 3px rgba(20, 40, 63, 0.08);
    --shadow: 0 10px 30px -12px rgba(20, 40, 63, 0.22);
    --shadow-lg: 0 24px 60px -24px rgba(13, 28, 46, 0.45);
    --cut: 28px; /* angled-corner size for the industrial image frames */

    /* Motion */
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --duration: 220ms;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--background-white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

body.nav-open,
body.scroll-locked {
    overflow: hidden;
}

img,
svg,
video,
iframe {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

h1, h2, h3, h4 {
    margin: 0 0 0.6em;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--primary-navy);
    text-wrap: balance;
}

h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }

p {
    margin: 0 0 1em;
}

a {
    color: var(--automotive-blue);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--primary-navy);
}

ul, ol {
    margin: 0;
    padding: 0;
}

address {
    font-style: normal;
}

button {
    font: inherit;
}

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

main:focus {
    outline: none;
}

.icon {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 1000;
    padding: 10px 18px;
    background: var(--accent-orange);
    color: var(--primary-navy);
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

/* ---------- Layout primitives ---------- */
.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    padding-block: var(--section-space);
}

.section--light { background: var(--background-light); }
.section--blue { background: var(--background-blue); }

.section--dark {
    position: relative;
    background-color: var(--primary-navy);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    color: var(--text-on-dark);
}

.section--dark h2,
.section--dark h3 {
    color: #fff;
}

.section--tight { padding-block: clamp(40px, 5vw, 64px); }

/* Below-the-fold sections: the browser skips their rendering work until they
   approach the viewport, which keeps long pages fast to start on phones. */
.defer-render {
    content-visibility: auto;
    contain-intrinsic-size: auto 900px;
}

.grid {
    display: grid;
    gap: clamp(20px, 2.5vw, 32px);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.split {
    display: grid;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

@media (min-width: 960px) {
    .split { grid-template-columns: 1fr 1fr; }
    .split--wide-text { grid-template-columns: 1.15fr 0.85fr; }
    .split--wide-media { grid-template-columns: 0.9fr 1.1fr; }
    .split--reverse > :first-child { order: 2; }
}

.stack > * + * { margin-top: 1rem; }

/* ---------- Typography components ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-orange-text);
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent-orange);
}

.eyebrow--light { color: var(--accent-orange); }

.lead {
    font-size: var(--fs-lead);
    line-height: 1.65;
    color: var(--text-secondary);
}

.section--dark .lead { color: var(--text-on-dark-muted); }

.section-head {
    max-width: 760px;
    margin-bottom: clamp(32px, 4vw, 52px);
}

.section-head > :last-child { margin-bottom: 0; }

.section-head--center {
    margin-inline: auto;
    text-align: center;
}

.section-head--center .eyebrow { justify-content: center; }

.section-head--row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px 40px;
    max-width: none;
}

.section-head--row > div { max-width: 720px; }

.text-muted { color: var(--text-secondary); }

.prose p,
.prose li { color: var(--text-secondary); }

.prose p:last-child { margin-bottom: 0; }

/* Highlighted statement – draws the eye to a closing or defining sentence.
   Used as <p class="statement">…</p>, inside .prose or on its own. */
.statement {
    position: relative;
    margin-top: 28px;
    padding: 20px 24px;
    border-left: 4px solid var(--accent-orange);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: linear-gradient(90deg, rgba(242, 140, 40, 0.12), rgba(242, 140, 40, 0.02));
    font-family: var(--font-heading);
    font-size: clamp(1rem, 0.96rem + 0.28vw, 1.15rem);
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: -0.005em;
}

/* Beats the muted colour that .prose p sets. */
.prose .statement,
.statement { color: var(--primary-navy); }

.section--dark .statement {
    background: linear-gradient(90deg, rgba(242, 140, 40, 0.18), rgba(255, 255, 255, 0.02));
    color: #fff;
}

.check-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.check-list li {
    position: relative;
    padding-left: 34px;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--background-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231769AA' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.section--dark .check-list li::before { background-color: rgba(255, 255, 255, 0.1); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 22px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease),
        border-color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.btn .icon { transition: transform var(--duration) var(--ease); }
.btn:hover .icon-arrow,
.btn:hover use[href="#i-arrow-right"] { transform: translateX(3px); }

.btn--accent {
    background: var(--accent-orange);
    color: var(--primary-navy);
    box-shadow: 0 8px 20px -10px rgba(242, 140, 40, 0.8);
}

.btn--accent:hover {
    background: var(--accent-orange-hover);
    color: var(--primary-navy-deep);
    transform: translateY(-1px);
}

.btn--primary {
    background: var(--primary-navy);
    color: #fff;
}

.btn--primary:hover {
    background: var(--automotive-blue);
    color: #fff;
}

.btn--outline {
    border-color: var(--primary-navy);
    color: var(--primary-navy);
    background: transparent;
}

.btn--outline:hover {
    background: var(--primary-navy);
    color: #fff;
}

.btn--ghost-light {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.btn--ghost-light:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.btn--lg {
    min-height: 54px;
    padding: 14px 26px;
    font-size: 1rem;
}

.btn--block { width: 100%; }

/* Short labels that must stay on one line */
.navbar__cta,
.cta-band .btn,
.home-hero .btn {
    white-space: nowrap;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--automotive-blue);
    text-decoration: none;
}

.link-arrow .icon { transition: transform var(--duration) var(--ease); }
.link-arrow:hover { color: var(--primary-navy); }
.link-arrow:hover .icon { transform: translateX(4px); }

.section--dark .link-arrow { color: var(--automotive-blue-light); }
.section--dark .link-arrow:hover { color: #fff; }

/* ---------- Cards ---------- */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: clamp(22px, 2.4vw, 32px);
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.card > :last-child { margin-bottom: 0; }

.card--hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: #C9D5E1;
}

.card h3 { margin-bottom: 0.45em; }
.card p { color: var(--text-secondary); }

.icon-badge {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--background-blue);
    color: var(--automotive-blue);
}

.icon-badge .icon { width: 26px; height: 26px; }

.icon-badge--accent {
    background: rgba(242, 140, 40, 0.14);
    color: var(--accent-orange-text);
}

.section--dark .icon-badge {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-orange);
}

/* Angled industrial image frame */
.media-frame {
    position: relative;
    isolation: isolate;
}

.media-frame img {
    width: 100%;
    border-radius: var(--radius);
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
    object-fit: cover;
}

.media-frame::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -14px;
    bottom: -14px;
    width: 46%;
    height: 46%;
    border-right: 3px solid var(--accent-orange);
    border-bottom: 3px solid var(--accent-orange);
    border-radius: 0 0 var(--radius) 0;
}

@media (max-width: 640px) {
    .media-frame::after { right: -8px; bottom: -8px; }
}

.media-frame--cover img {
    aspect-ratio: 4 / 3;
    height: 100%;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--background-blue);
    color: var(--primary-navy);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.notice {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-left: 4px solid var(--accent-orange);
    border-radius: var(--radius-sm);
    background: #FFF7EE;
    color: var(--text-primary);
    font-size: var(--fs-small);
}

.notice .icon {
    margin-top: 3px;
    color: var(--accent-orange-text);
}

.notice p { margin: 0; }

/* ---------- Course facts (shared by course pages and course cards) ---------- */
.fact-grid {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--border-light);
}

/* Markup: <div class="fact"><dt><svg class="icon">…</svg>Label</dt><dd>Value</dd></div> */
.fact {
    position: relative;
    padding: 20px 22px 20px 62px;
    background: #fff;
}

.fact .icon {
    position: absolute;
    left: 22px;
    top: 21px;
    width: 26px;
    height: 26px;
    color: var(--automotive-blue);
}

.fact dt {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.fact dd {
    margin: 4px 0 0;
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.35;
    color: var(--primary-navy);
}

/* Course facts strip overlapping the course page hero */
.course-facts {
    position: relative;
    z-index: 2;
    margin-top: -36px;
}

.course-facts .fact-grid {
    box-shadow: var(--shadow);
}

/* Related courses: fixed-width tracks so a single card does not stretch */
.related-courses {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
}

/* Course practical-training photo grid */
.course-gallery {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, 1fr);
}

.course-gallery .image-tile { aspect-ratio: 4 / 3; }

@media (min-width: 960px) {
    .course-gallery { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

/* Numbered module list (course curriculum) */
.module-list {
    list-style: none;
    display: grid;
    gap: 18px;
    counter-reset: module;
}

.module {
    position: relative;
    display: grid;
    gap: 6px 24px;
    padding: clamp(22px, 2.6vw, 32px);
    padding-left: clamp(78px, 8vw, 104px);
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    counter-increment: module;
}

.module::before {
    content: counter(module, decimal-leading-zero);
    position: absolute;
    left: clamp(22px, 2.6vw, 32px);
    top: clamp(20px, 2.4vw, 30px);
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--automotive-blue);
}

.module h3 { margin: 0; }
.module p { margin: 0; color: var(--text-secondary); }

/* Course card (home, related courses) */
.course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.course-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.course-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms var(--ease);
}

.course-card:hover .course-card__media img { transform: scale(1.04); }

.course-card__tag {
    position: absolute;
    left: 16px;
    top: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(13, 28, 46, 0.82);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.course-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 16px;
    padding: clamp(22px, 2.6vw, 30px);
}

.course-card__body h3 { margin: 0; }
.course-card__body h3 a { color: inherit; text-decoration: none; }
.course-card__body h3 a::after { content: ""; position: absolute; inset: 0; }
.course-card { position: relative; }
.course-card__body > p { margin: 0; color: var(--text-secondary); }

.course-card__facts {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--border-light);
    font-size: var(--fs-small);
}

.course-card__facts div {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.course-card__facts dt {
    display: flex;
    color: var(--automotive-blue);
}

.course-card__facts dd {
    margin: 0;
    color: var(--text-primary);
}

.course-card__facts strong { font-weight: 600; }

.course-card .link-arrow { margin-top: auto; }

/* ---------- Header & navigation ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar {
    background: var(--primary-navy-deep);
    color: var(--text-on-dark-muted);
    font-size: var(--fs-xs);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 38px;
}

.topbar__note { margin: 0; }
.topbar__note strong { color: #fff; font-weight: 600; }

.topbar__contact {
    display: flex;
    gap: 24px;
    list-style: none;
}

.topbar a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    color: var(--text-on-dark);
    text-decoration: none;
}

.topbar a:hover { color: var(--accent-orange); }
.topbar .icon { color: var(--accent-orange); }

@media (max-width: 899px) {
    .topbar { display: none; }
}

/* No backdrop-filter or transform here: either would become the containing
   block of the fixed mobile drawer and break its positioning. */
.navbar {
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    transition: box-shadow var(--duration) var(--ease);
}

.site-header.is-scrolled .navbar { box-shadow: 0 8px 24px -16px rgba(13, 28, 46, 0.45); }

.navbar__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: var(--header-height);
}

.brand {
    flex: none;
    margin-right: auto;
}

.brand img {
    width: clamp(168px, 14vw, 200px);
}

.navbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-burger,
.nav-close {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--primary-navy);
    cursor: pointer;
}

.nav-burger .icon,
.nav-close .icon { width: 24px; height: 24px; }

.nav-list { list-style: none; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: var(--primary-navy);
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.nav-toggle__icon { width: 16px; height: 16px; transition: transform var(--duration) var(--ease); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon { transform: rotate(180deg); }

.dropdown { list-style: none; }

/* Mobile / tablet: off-canvas drawer */
@media (max-width: 1199px) {
    .navbar__cta { display: none; }

    .primary-nav {
        position: fixed;
        inset: 0 0 0 auto;
        z-index: 120;
        display: flex;
        flex-direction: column;
        width: min(380px, 88vw);
        padding: 18px 22px 28px;
        overflow-y: auto;
        background: #fff;
        box-shadow: var(--shadow-lg);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 300ms var(--ease), visibility 0s linear 300ms;
    }

    .nav-open .primary-nav {
        transform: none;
        visibility: visible;
        transition: transform 300ms var(--ease);
    }

    .primary-nav__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }

    .primary-nav__title {
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 0.8rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--text-secondary);
    }

    .nav-list > .nav-item { border-bottom: 1px solid var(--border-light); }

    .nav-link {
        justify-content: space-between;
        min-height: 52px;
        font-size: 1rem;
    }

    .nav-item.is-active > .nav-link { color: var(--automotive-blue); }

    .dropdown {
        display: none;
        padding: 0 0 12px 14px;
        border-left: 2px solid var(--background-blue);
        margin-left: 4px;
    }

    .nav-toggle[aria-expanded="true"] + .dropdown { display: block; }

    .dropdown .nav-link {
        min-height: 44px;
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--text-primary);
    }

    .dropdown .nav-item.is-active > .nav-link { color: var(--automotive-blue); font-weight: 600; }

    .dropdown--nested .nav-toggle__icon,
    .nav-item--nested .nav-toggle__icon { transform: rotate(90deg); }
    .nav-item--nested .nav-toggle[aria-expanded="true"] .nav-toggle__icon { transform: rotate(270deg); }

    .primary-nav__extra {
        display: grid;
        gap: 14px;
        margin-top: 24px;
    }

    .primary-nav__contact {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 40px;
        color: var(--text-primary);
        text-decoration: none;
        font-size: 0.88rem;
        overflow-wrap: anywhere;
    }

    .primary-nav__contact .icon { color: var(--automotive-blue); }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 110;
        background: rgba(13, 28, 46, 0.55);
    }
}

/* Desktop: horizontal menu with dropdowns */
@media (min-width: 1200px) {
    .nav-burger,
    .primary-nav__head,
    .primary-nav__extra,
    .nav-backdrop { display: none !important; }

    .primary-nav { margin-right: 8px; }

    .nav-list {
        display: flex;
        align-items: center;
        gap: 2px;
    }

    .nav-list > .nav-item { position: relative; }

    .nav-list > .nav-item > .nav-link {
        position: relative;
        min-height: var(--header-height);
        padding: 0 12px;
        white-space: nowrap;
    }

    .nav-list > .nav-item > .nav-link::after {
        content: "";
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 18px;
        height: 2px;
        background: var(--accent-orange);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform var(--duration) var(--ease);
    }

    .nav-list > .nav-item:hover > .nav-link::after,
    .nav-list > .nav-item.is-active > .nav-link::after { transform: scaleX(1); }

    .nav-list > .nav-item.is-active > .nav-link { color: var(--automotive-blue); }

    .dropdown {
        position: absolute;
        top: calc(100% - 10px);
        left: 0;
        z-index: 10;
        min-width: 260px;
        padding: 10px;
        background: #fff;
        border: 1px solid var(--border-light);
        border-top: 3px solid var(--accent-orange);
        border-radius: 0 0 var(--radius) var(--radius);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), visibility 0s linear var(--duration);
    }

    .dropdown--nested {
        top: -10px;
        left: 100%;
        border-top-width: 1px;
        border-left: 3px solid var(--accent-orange);
        border-radius: 0 var(--radius) var(--radius) 0;
    }

    .has-dropdown:hover > .dropdown,
    .has-dropdown:focus-within > .dropdown,
    .nav-toggle[aria-expanded="true"] + .dropdown {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
    }

    .dropdown .nav-item { position: relative; }

    .dropdown .nav-link {
        justify-content: space-between;
        padding: 10px 14px;
        border-radius: var(--radius-sm);
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--text-primary);
    }

    .dropdown .nav-link:hover,
    .dropdown .nav-item.is-active > .nav-link {
        background: var(--background-blue);
        color: var(--automotive-blue);
    }

    .nav-item--nested .nav-toggle[aria-expanded="true"] .nav-toggle__icon { transform: none; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
    position: relative;
    overflow: hidden;
    background-color: var(--primary-navy);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    color: var(--text-on-dark);
}

.page-hero::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-orange) 0 18%, transparent 18%);
}

.page-hero__inner {
    display: grid;
    gap: 32px;
    align-items: center;
    padding-block: clamp(40px, 6vw, 80px);
}

.page-hero__title {
    margin-bottom: 0.4em;
    color: #fff;
    font-size: clamp(2rem, 1.4rem + 2.5vw, 3.4rem);
}

.page-hero__lead {
    max-width: 640px;
    margin: 0;
    font-size: var(--fs-lead);
    color: var(--text-on-dark-muted);
}

/* Text-only banners have no photo beside the text, so the description can use the full width */
.page-hero--plain .page-hero__lead { max-width: none; }

.page-hero__media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
    box-shadow: var(--shadow-lg);
}

@media (min-width: 1024px) {
    .page-hero__inner { grid-template-columns: 1.05fr 0.95fr; gap: 64px; }
    .page-hero--plain .page-hero__inner { grid-template-columns: 1fr; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { margin-bottom: 22px; font-size: var(--fs-small); }

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-on-dark-muted);
}

.breadcrumb li + li::before {
    content: "/";
    color: rgba(255, 255, 255, 0.35);
}

.breadcrumb a {
    display: inline-block;
    padding-block: 4px;
    color: var(--text-on-dark);
    text-decoration: none;
}

.breadcrumb a:hover { color: var(--accent-orange); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--accent-orange); font-weight: 600; }

/* ---------- CTA band ---------- */
.cta-band {
    position: relative;
    overflow: hidden;
    background: var(--industrial-charcoal);
    color: var(--text-on-dark);
}

.cta-band::before {
    content: "";
    position: absolute;
    inset: 0 0 0 auto;
    width: min(46%, 560px);
    background: repeating-linear-gradient(-45deg, rgba(242, 140, 40, 0.09) 0 2px, transparent 2px 18px);
    clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
}

.cta-band__inner {
    position: relative;
    display: grid;
    gap: 28px;
    align-items: center;
    padding-block: clamp(48px, 6vw, 80px);
}

.cta-band__title { color: #fff; margin-bottom: 0.35em; }
.cta-band__text p:last-child { margin: 0; color: var(--text-on-dark-muted); }

.cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (min-width: 1024px) {
    .cta-band__inner { grid-template-columns: minmax(0, 1fr) auto; gap: 48px; }
    .cta-band__actions { justify-content: flex-end; }
}

@media (min-width: 1200px) {
    .cta-band__actions { flex-wrap: nowrap; }
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--primary-navy-deep);
    color: var(--text-on-dark-muted);
    font-size: 0.94rem;
}

.site-footer__grid {
    display: grid;
    gap: 40px;
    padding-block: clamp(56px, 7vw, 88px);
}

@media (min-width: 720px) {
    .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
    .site-footer__grid { grid-template-columns: 1.1fr 1.2fr 1.1fr 0.8fr; gap: 48px; }
}

.footer-brand__logo {
    display: inline-block;
    margin-bottom: 18px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
}

.footer-brand__logo img { width: 200px; }

.footer-brand p { max-width: 340px; }

.footer-title {
    margin-bottom: 18px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fff;
}

.footer-title--spaced { margin-top: 32px; }

.site-footer a {
    color: var(--text-on-dark);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent-orange);
    text-decoration: underline;
}

.footer-contact p {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-contact .icon {
    margin-top: 4px;
    color: var(--accent-orange);
}

.footer-contact a { overflow-wrap: anywhere; }

.footer-managed img {
    width: 170px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
}

.footer-links {
    list-style: none;
    display: grid;
    gap: 10px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin-top: 22px;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-dark);
    border-radius: 50%;
    color: var(--text-on-dark);
    transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.social-links a:hover {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    color: var(--primary-navy);
    text-decoration: none;
}

.social-links--small { margin-top: 14px; }
.social-links--small a { width: 36px; height: 36px; }

.site-footer__bottom { border-top: 1px solid var(--border-dark); }

.site-footer__bottom-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-block: 20px;
    font-size: var(--fs-small);
}

.site-footer__bottom p { margin: 0; }

/* ---------- Testimonials ---------- */
.testimonial-card {
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100%;
    margin: 0;
    padding: clamp(24px, 2.8vw, 34px);
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.testimonial-card__quote-icon {
    width: 34px;
    height: 34px;
    color: var(--accent-orange);
}

.testimonial-card blockquote {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.02rem;
    line-height: 1.7;
}

.testimonial-card blockquote p { margin: 0; }

.testimonial-card figcaption {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}

.testimonial-card figcaption img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-orange);
}

.testimonial-card__name {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-navy);
}

.testimonial-card__role {
    display: block;
    font-size: var(--fs-small);
    color: var(--text-secondary);
}

/* ---------- Video embeds ---------- */
.video-embed { margin: 0; }

.video-embed__trigger,
.video-embed__frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--primary-navy-deep);
}

.video-embed__trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity var(--duration) var(--ease), transform 600ms var(--ease);
}

.video-embed__trigger:hover img { opacity: 1; transform: scale(1.03); }

.video-embed__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.video-embed__play .icon {
    width: 68px;
    height: 68px;
    padding: 20px 18px 20px 22px;
    border-radius: 50%;
    background: var(--accent-orange);
    color: var(--primary-navy);
    box-shadow: 0 0 0 10px rgba(242, 140, 40, 0.25);
    transition: transform var(--duration) var(--ease);
}

.video-embed__trigger:hover .video-embed__play .icon { transform: scale(1.08); }

.video-embed__frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.video-embed__caption {
    margin-top: 12px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-navy);
}

.section--dark .video-embed__caption { color: #fff; }

.video-embed--compact .video-embed__play .icon {
    width: 54px;
    height: 54px;
    padding: 15px 13px 15px 17px;
}

/* Native video (self-hosted MAIAM films) */
.native-video {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--primary-navy-deep);
}

.native-video video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
}

/* ---------- Image tiles & lightbox ---------- */
.image-tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--background-light);
}

.image-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms var(--ease);
}

.image-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(13, 28, 46, 0.55));
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}

.image-tile__zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary-navy);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.image-tile:hover img,
.image-tile:focus-visible img { transform: scale(1.05); }

.image-tile:hover::after,
.image-tile:focus-visible::after,
.image-tile:hover .image-tile__zoom,
.image-tile:focus-visible .image-tile__zoom {
    opacity: 1;
    transform: none;
}

.lightbox {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(8, 17, 28, 0.94);
    color: #fff;
}

.lightbox::backdrop { background: rgba(8, 17, 28, 0.94); }

.lightbox__stage {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    padding: 12px clamp(12px, 3vw, 32px) 20px;
}

.lightbox__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: var(--fs-small);
    color: var(--text-on-dark-muted);
}

.lightbox__figure {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    margin: 0;
}

.lightbox__figure img {
    max-width: 100%;
    max-height: calc(100vh - 170px);
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}

.lightbox__caption {
    max-width: 900px;
    margin: 14px auto 0;
    text-align: center;
    color: var(--text-on-dark);
}

.lightbox__btn {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
}

.lightbox__btn:hover { background: var(--accent-orange); color: var(--primary-navy); border-color: var(--accent-orange); }
.lightbox__btn .icon { width: 24px; height: 24px; }

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__nav--prev { left: 0; }
.lightbox__nav--next { right: 0; }

@media (max-width: 640px) {
    .lightbox__nav { top: auto; bottom: -64px; transform: none; }
    .lightbox__nav--prev { left: calc(50% - 60px); }
    .lightbox__nav--next { right: calc(50% - 60px); }
    .lightbox__figure img { max-height: calc(100vh - 240px); }
    .lightbox__caption { margin-top: 80px; }
}

/* ---------- Certificates (shared by NSDC / ASDC pages) ---------- */
.certificate-figure {
    margin: 0;
    padding: clamp(14px, 2vw, 22px);
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.certificate-figure > a { display: block; cursor: zoom-in; }
.certificate-figure figcaption .link-arrow { white-space: nowrap; }
.certificate-figure img { width: 100%; border-radius: var(--radius-sm); }

.certificate-figure figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    font-size: var(--fs-small);
    color: var(--text-secondary);
}

.certificate-layout {
    display: grid;
    gap: 40px;
}

@media (min-width: 1024px) {
    .certificate-layout {
        grid-template-columns: 1.35fr 1fr;
        gap: 56px;
        align-items: start;
    }

    .certificate-layout--portrait { grid-template-columns: 1fr 1.1fr; }
}

.certificate-details h2 { margin-bottom: 0.3em; }

.certificate-number {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.copy-btn {
    min-height: 32px;
    padding: 4px 12px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    background: #fff;
    color: var(--automotive-blue);
    font-size: var(--fs-xs);
    font-weight: 700;
    cursor: pointer;
}

.copy-btn:hover { border-color: var(--automotive-blue); }

.certificate-notice { margin-top: 24px; }

.certificate-course {
    color: inherit;
    text-decoration: none;
}

.detail-list {
    display: grid;
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--border-light);
}

.detail-list div {
    display: grid;
    gap: 4px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

@media (min-width: 560px) {
    .detail-list div { grid-template-columns: 200px 1fr; gap: 20px; }
}

.detail-list dt {
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--text-secondary);
}

.detail-list dd {
    margin: 0;
    font-weight: 600;
    color: var(--primary-navy);
}

/* ---------- Forms (Register Now / Contact) ---------- */
.form-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 640px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .form-field--full { grid-column: 1 / -1; }
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--primary-navy);
}

.form-field .required { color: var(--error-red); }

.form-control {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1.5px solid #C5D0DB;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-primary);
    font: inherit;
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

textarea.form-control { min-height: 120px; resize: vertical; }

.form-control:hover { border-color: #9FB0C1; }

.form-control:focus {
    outline: none;
    border-color: var(--automotive-blue);
    box-shadow: 0 0 0 4px rgba(23, 105, 170, 0.15);
}

.form-control.input-validation-error,
.form-control[aria-invalid="true"] { border-color: var(--error-red); }

.field-validation-error,
.validation-summary-errors {
    display: block;
    margin-top: 6px;
    font-size: var(--fs-small);
    color: var(--error-red);
}

.validation-summary-errors ul { padding-left: 18px; }
.validation-summary-valid { display: none; }

.form-hint {
    margin-top: 6px;
    font-size: var(--fs-small);
    color: var(--text-secondary);
}

.form-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Result message above a form (success or send failure) */
.form-status:empty { display: none; }
.form-status { margin-bottom: 24px; }
.form-status:focus { outline: none; }
.form-status .alert + .alert { margin-top: 12px; }

.form-optional {
    font-weight: 400;
    color: var(--text-secondary);
}

/* Submit button plus the note that sits beside it */
.form-actions {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

@media (min-width: 640px) {
    .form-actions { grid-template-columns: auto 1fr; align-items: center; gap: 20px; }
    .form-actions .form-hint { margin: 0; }
}

form button[disabled] {
    opacity: 0.7;
    cursor: progress;
}

/* Card wrapper shared by the Register Now and Contact Us forms */
.form-card {
    padding: clamp(22px, 4vw, 44px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
}

.alert {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.alert .icon { margin-top: 3px; }
.alert p { margin: 0; }
.alert--success { background: #E8F6EF; color: #0E5A41; border-left: 4px solid var(--success-green); }
.alert--error { background: #FDECEA; color: #8A1C12; border-left: 4px solid var(--error-red); }

/* ---------- Scroll reveal (progressive enhancement) ---------- */
.reveal-pending {
    opacity: 0;
    transform: translateY(18px);
}

.reveal-in {
    opacity: 1;
    transform: none;
    transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal-pending { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
    .site-header,
    .site-footer,
    .cta-band,
    .skip-link { display: none !important; }

    .page-hero { background: none; color: #000; }
    .page-hero__title { color: #000; }
}
