/* ==========================================================================
   Doctors EMS — site styles
   Header, footer, home page sections, course / gallery / reviews pages and
   shared components. Light throughout: white and soft-grey sections, the
   logo's red for accents, red heartbeat lines.

   Contents
     1. Tokens
     2. Base
     3. Layout helpers
     4. Components (buttons, badges, headings, ecg, photo slot)
     5. Header
     6. Home sections
     7. Inner pages (page banner, course, courses list, gallery, reviews)
     8. Contact Form 7
     9. Footer + floating actions
    10. Motion
    11. Responsive
   ========================================================================== */


/* 1. Tokens ---------------------------------------------------------------- */
:root {
    --ems-bg: #fff;
    --ems-bg-2: #f6f7fa;
    --ems-bg-3: #eceff4;
    --ems-glass: rgba(255, 255, 255, .8);
    --ems-glass-strong: rgba(255, 255, 255, .95);
    --ems-tint: rgba(17, 21, 31, .03);
    --ems-tint-2: rgba(17, 21, 31, .06);
    --ems-border: rgba(17, 21, 31, .09);
    --ems-border-strong: rgba(17, 21, 31, .16);

    /* The logo's red. */
    --ems-red: #d71920;
    --ems-red-deep: #b3121a;
    --ems-red-soft: #c8161d;
    --ems-red-tint: rgba(215, 25, 32, .08);
    --ems-mint: #0f9f68;
    --ems-whatsapp: #25d366;

    --ems-white: #fff;
    --ems-text: #11151f;
    --ems-muted: #5d6475;
    --ems-dim: #8a91a1;

    /* Dark ink, for buttons and the scrims laid over photos. */
    --ems-ink: #0b0f19;
    --ems-scrim: 10, 15, 28;
    --ems-text-dark: #11151f;
    --ems-muted-dark: #5d6475;

    --ems-font-display: "Figtree", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --ems-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --ems-radius: 20px;
    --ems-radius-sm: 14px;
    --ems-shadow: 0 30px 60px -30px rgba(17, 21, 31, .28);
    --ems-shadow-sm: 0 14px 34px -22px rgba(17, 21, 31, .3);
    --ems-ease: cubic-bezier(.22, 1, .36, 1);
    --ems-gutter: 32px;
    --ems-section-pad: clamp(40px, 4.5vw, 64px);
    --ems-header-h: 68px;
    --ems-header-top: 14px;
    --ems-header-space: calc(var(--wp-admin--admin-bar--height, 0px) + var(--ems-header-top) + var(--ems-header-h));
}


/* 2. Base ------------------------------------------------------------------ */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body.dems {
    margin: 0;
    overflow-x: clip;
    font-family: var(--ems-font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ems-text);
    background: var(--ems-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.dems--inner { background: var(--ems-bg-2); }

:where(.dems) *,
:where(.dems) *::before,
:where(.dems) *::after {
    box-sizing: border-box;
}

:where(.dems) img,
:where(.dems) svg {
    max-width: 100%;
    vertical-align: middle;
}

:where(.dems) img { height: auto; }

:where(.dems) a {
    color: inherit;
    text-decoration: none;
}

:where(.dems) a:hover { text-decoration: none; }

:where(.dems) :focus-visible {
    outline: 2px solid var(--ems-red);
    outline-offset: 3px;
    border-radius: 6px;
}

:where(.dems) :where(h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
:where(.dems) :where(ul, ol) { padding: 0; list-style: none; }

::selection { color: #fff; background: var(--ems-red); }

[id] { scroll-margin-top: calc(var(--ems-header-space) + 24px); }

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10001;
    padding: 10px 18px;
    font-weight: 600;
    color: #fff;
    background: var(--ems-red);
    border-radius: 999px;
    transform: translateY(-200%);
    transition: transform .2s;
}

.skip-link:focus { transform: none; color: #fff; }

/* Lenis smooth scrolling (desktop only, see doctorsems.js) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }


/* 3. Layout helpers -------------------------------------------------------- */
.wrap {
    width: 100%;
    max-width: calc(1240px + var(--ems-gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--ems-gutter);
}

.section {
    position: relative;
    padding: var(--ems-section-pad) 0;
}

.section--flush-top { padding-top: 0; }

.section-head { margin-bottom: clamp(28px, 3.5vw, 44px); }

.section-head--split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px 48px;
}

.section-head--split > :first-child { max-width: 720px; }

.section-lead {
    max-width: 560px;
    margin-top: 14px;
    font-size: 1.0625rem;
    color: var(--ems-muted);
}

.section-aside {
    max-width: 380px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ems-muted);
}

.prose {
    font-size: 16px;
    line-height: 1.8;
    color: var(--ems-muted);
}

.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { margin-top: 1.6em; font-family: var(--ems-font-display); font-weight: 700; letter-spacing: -.02em; color: var(--ems-text); }
.prose h3 { font-size: 20px; }
.prose strong { color: var(--ems-text); }
.prose ul { padding-left: 0; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li + li { margin-top: 6px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--ems-red); }
.prose a { color: var(--ems-red); text-decoration: underline; text-underline-offset: 3px; }

.empty-note {
    display: grid;
    justify-items: center;
    gap: 14px;
    max-width: 620px;
    margin: 0 auto;
    padding: 40px 32px;
    text-align: center;
    color: var(--ems-muted);
    background: var(--ems-bg-2);
    border: 1px dashed var(--ems-border-strong);
    border-radius: var(--ems-radius);
}

.empty-note strong { font-family: var(--ems-font-display); font-size: 20px; color: var(--ems-text); }


/* 4. Components ------------------------------------------------------------ */

/* Eyebrow: "01 — Courses" */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ems-red);
}

.eyebrow__dash { width: 22px; height: 1px; background: currentColor; opacity: .6; }

/* Headings */
.section-title,
.stats__title {
    font-family: var(--ems-font-display);
    font-size: clamp(2rem, 1.3rem + 2.6vw, 3.3rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -.035em;
    color: var(--ems-text);
    text-wrap: balance;
}

.accent {
    font-style: normal;
    color: inherit;
}

/* Outlined words, as in the hero: "Train for the moment a life depends on you." */
.outline,
.footer__cta-title .accent {
    font-style: normal;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--ems-red);
    paint-order: stroke fill;
}

/* Buttons */
.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 24px;
    font-family: var(--ems-font-body);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .25s, color .25s, border-color .25s, transform .3s var(--ems-ease), box-shadow .3s;
}

.button .icon { width: 18px; height: 18px; flex: none; transition: transform .3s var(--ems-ease); }
.button:hover { transform: translateY(-2px); }
.button:hover .icon--arrow { transform: translateX(3px); }
.button:active { transform: translateY(0); }

.button--sm { min-height: 42px; padding: 0 18px; font-size: 13.5px; }
.button--sm .icon { width: 16px; height: 16px; }
.button--block { display: flex; width: 100%; }

.button--primary { color: #fff; background: var(--ems-red); box-shadow: 0 14px 30px -14px rgba(215, 25, 32, .7); }
.button--primary:hover { color: #fff; background: var(--ems-red-deep); box-shadow: 0 18px 36px -14px rgba(215, 25, 32, .8); }

.button--glass,
.button--outline-light {
    color: var(--ems-text);
    background: #fff;
    border-color: var(--ems-border-strong);
}

.button--glass:hover,
.button--outline-light:hover { color: var(--ems-red); border-color: var(--ems-red); box-shadow: var(--ems-shadow-sm); }
.button--glass .icon--whatsapp { color: var(--ems-whatsapp); }

.button--dark { color: #fff; background: var(--ems-ink); }
.button--dark:hover { color: #fff; background: #222a3b; }
.button--light { color: var(--ems-ink); background: #fff; }
.button--outline { color: var(--ems-ink); border-color: rgba(11, 15, 25, .2); background: transparent; }
.button--whatsapp { color: #fff; background: var(--ems-whatsapp); }
.button--whatsapp:hover { color: #fff; background: #1eb858; }

/* Icons */
.icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Badges, tags, live dot */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ems-text);
    background: rgba(255, 255, 255, .85);
    border: 1px solid var(--ems-border-strong);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    border-radius: 999px;
}

.tag--mint { color: #fff; background: var(--ems-mint); }

.live-dot {
    position: relative;
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--ems-red);
}

.live-dot--mint { background: var(--ems-mint); }

.live-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    animation: dems-ping 1.8s ease-out infinite;
}

/* Heartbeat line */
.ecg {
    display: block;
    width: 100%;
    height: 40px;
    overflow: visible;
}

.ecg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.ecg--red { color: var(--ems-red); }
.ecg--mint { color: var(--ems-mint); }
.ecg__run { display: none; }

/* The monitor trace: a faint full line, with a bright pulse running along it. */
.ecg--glow { color: var(--ems-red); }
.ecg--glow .ecg__base { opacity: .2; }
.ecg--glow .ecg__run {
    display: block;
    stroke-width: 2.4;
    stroke-dasharray: .14 1;
    filter: drop-shadow(0 0 4px rgba(215, 25, 32, .45));
    animation: dems-trace 4.2s linear infinite;
}

/* Photo slot: shown when an image hasn't been uploaded yet */
.photo-slot {
    position: relative;
    display: flex;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    min-height: 180px;
    padding: 18px;
    background:
        linear-gradient(160deg, rgba(215, 25, 32, .14), transparent 55%),
        linear-gradient(200deg, var(--ems-bg-3), var(--ems-bg-2));
}

.photo-slot__label {
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ems-dim);
}

/* Person (avatar + name), used by the "why us" quote */
.person { display: flex; align-items: center; gap: 12px; }

.person__avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: none;
    overflow: hidden;
    font-family: var(--ems-font-display);
    font-weight: 800;
    color: #fff;
    background: var(--ems-red);
    border-radius: 50%;
}

.person__avatar img { width: 100%; height: 100%; object-fit: cover; }
.person__name { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.person__role { display: block; font-size: 13px; color: var(--ems-muted); }

/* Glass card base */
.glass {
    background: var(--ems-glass);
    border: 1px solid var(--ems-border);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
}


/* 5. Header ---------------------------------------------------------------- */
.dems-header {
    position: fixed;
    top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--ems-header-top));
    left: 0;
    right: 0;
    z-index: 900;
    color: var(--ems-text);
    pointer-events: none;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 28px;
    height: var(--ems-header-h);
    padding: 0 12px 0 20px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid var(--ems-border);
    border-radius: 18px;
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    backdrop-filter: blur(18px) saturate(1.3);
    box-shadow: 0 20px 40px -30px rgba(17, 21, 31, .35);
    pointer-events: auto;
    transition: background-color .35s, box-shadow .35s, border-color .35s;
}

.is-scrolled .navbar {
    background: rgba(255, 255, 255, .94);
    border-color: var(--ems-border-strong);
    box-shadow: 0 24px 50px -26px rgba(17, 21, 31, .35);
}

/* Brand: the client's original red logo, shown as supplied. */
.brand {
    display: inline-flex;
    align-items: center;
    flex: none;
    line-height: 0;
}

.brand__img {
    display: block;
    width: auto;
    height: 48px;
    transition: transform .3s var(--ems-ease);
}

.brand:hover .brand__img { transform: translateY(-1px); }
.brand--footer .brand__img { height: 56px; }

/* Nav */
.nav { margin-left: auto; }

.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__item { position: relative; display: flex; align-items: center; }

.nav__link {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    color: rgba(17, 21, 31, .78);
    border-radius: 999px;
    transition: color .2s, background-color .2s;
}

.nav__link:hover,
.nav__item.is-current-item > .nav__link,
.nav__item.is-current-ancestor > .nav__link { color: var(--ems-red); background: var(--ems-red-tint); }

.nav__toggle {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-left: -8px;
    padding: 0;
    color: rgba(17, 21, 31, .55);
    background: none;
    border: 0;
    cursor: pointer;
}

.nav__toggle .icon { width: 14px; height: 14px; transition: transform .25s; }

.nav__sub {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    min-width: 280px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--ems-border);
    border-radius: 16px;
    box-shadow: var(--ems-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s, transform .3s var(--ems-ease), visibility .25s;
}

.nav__sub::before { content: ""; position: absolute; inset: -16px 0 auto; height: 16px; }

.nav__item:hover > .nav__sub,
.nav__item:focus-within > .nav__sub,
.nav__item.is-open > .nav__sub { opacity: 1; visibility: visible; transform: none; }

.nav__item:hover > .nav__toggle .icon,
.nav__item.is-open > .nav__toggle .icon { transform: rotate(180deg); }

.nav__sub .nav__item { display: block; }

.nav__sublink {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(17, 21, 31, .8);
    border-radius: 10px;
    transition: background-color .2s, color .2s;
}

.nav__sublink:hover { color: var(--ems-red); background: var(--ems-red-tint); }

.nav__mobile-extra { display: none; }

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

.navbar__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--ems-text);
    transition: color .2s;
}

.navbar__phone .icon { width: 16px; height: 16px; color: var(--ems-red); }
.navbar__phone:hover { color: var(--ems-red); }

/* Burger */
.burger {
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--ems-text);
    background: var(--ems-bg-2);
    border: 1px solid var(--ems-border);
    border-radius: 12px;
    cursor: pointer;
}

.burger__lines { display: grid; gap: 5px; width: 20px; }
.burger__lines span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ems-ease), opacity .2s; }
.burger__lines span:nth-child(3) { width: 65%; }
.nav-open .burger__lines span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .burger__lines span:nth-child(2) { opacity: 0; }
.nav-open .burger__lines span:nth-child(3) { width: 100%; transform: translateY(-7px) rotate(-45deg); }


/* 6. Home sections --------------------------------------------------------- */

/* Shared: photo backgrounds washed with white (hero, call-back, page banners) */
.hero__bg,
.callback__bg,
.page-hero__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero__bg-media,
.callback__bg-media,
.page-hero__bg-media {
    position: absolute;
    inset: -10% 0;
    will-change: transform;
}

.hero__bg-img,
.callback__bg-img,
.page-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__glow {
    position: absolute;
    left: 50%;
    bottom: -30%;
    width: 120vw;
    height: 70%;
    background: radial-gradient(closest-side, rgba(215, 25, 32, .09), transparent);
    transform: translateX(-50%);
    pointer-events: none;
}

/* Hero */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: min(100svh, 860px);
    padding: calc(var(--ems-header-space) + 40px) 0 120px;
    overflow: hidden;
    isolation: isolate;
    background: var(--ems-bg-2);
}

.hero__bg { z-index: -1; }
.hero__bg-img { opacity: .9; filter: saturate(.9); }

.hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, #fff 10%, rgba(255, 255, 255, .9) 46%, rgba(255, 255, 255, .55) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 35%, #fff 97%);
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}

.hero__badge { margin-bottom: 22px; }

.hero__title {
    font-family: var(--ems-font-display);
    font-size: clamp(2.5rem, 1.4rem + 4.4vw, 5.2rem);
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -.04em;
    color: var(--ems-text);
    text-wrap: balance;
}

.hero__title .outline { -webkit-text-stroke-width: 2px; }

.hero__lead {
    max-width: 540px;
    margin-top: 22px;
    font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
    line-height: 1.7;
    color: var(--ems-muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

/* Floating cards */
.hero__cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        ".     photo"
        "pulse note";
    gap: 16px;
    max-width: 520px;
    margin-left: auto;
}

.hcard {
    position: relative;
    padding: 16px;
    background: var(--ems-glass-strong);
    border: 1px solid var(--ems-border);
    border-radius: 18px;
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    backdrop-filter: blur(18px) saturate(1.25);
    box-shadow: 0 30px 60px -30px rgba(17, 21, 31, .3);
    animation: dems-float 7s ease-in-out infinite;
}

.hcard--photo { grid-area: photo; padding: 10px 10px 14px; animation-delay: -1s; }
.hcard--pulse { grid-area: pulse; align-self: end; margin: 34px -24px 0 0; animation-delay: -3.5s; z-index: 1; }
.hcard--note { grid-area: note; animation-delay: -5.5s; }

.hcard__media { overflow: hidden; aspect-ratio: 4 / 3.1; border-radius: 12px; background: var(--ems-bg-3); }
.hcard__img,
.hcard__media .photo-slot { width: 100%; height: 100%; object-fit: cover; }

.hcard__caption {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 4px 0;
}

.hcard__title { display: block; font-family: var(--ems-font-display); font-size: 15px; font-weight: 700; }
.hcard__text { display: block; margin-top: 2px; font-size: 12px; line-height: 1.5; color: var(--ems-muted); }
.hcard__label { font-size: 11px; color: var(--ems-muted); }
.hcard__big { margin-top: 4px; font-family: var(--ems-font-display); font-size: clamp(1.05rem, .9rem + .5vw, 1.45rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.hcard--note .hcard__big { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); }
.hcard__ecg { height: 34px; margin-top: 12px; color: var(--ems-mint); }

.hero__pulse {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 36px;
    pointer-events: none;
}

.hero__pulse .ecg { height: 80px; }

/* Courses */
.courses__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.courses__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.courses__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.courses__grid--1 { grid-template-columns: minmax(0, 420px); }

/* Photo cards: a dark scrim over the photo keeps the white text readable. */
.course-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 460px;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background: #141c2f;
    border: 1px solid var(--ems-border);
    border-radius: var(--ems-radius);
    box-shadow: var(--ems-shadow-sm);
    transition: transform .5s var(--ems-ease), box-shadow .5s var(--ems-ease);
}

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

.course-card__media { position: absolute; inset: 0; z-index: -2; }

.course-card__img,
.course-card__media .photo-slot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ems-ease);
}

.course-card:hover .course-card__img { transform: scale(1.07); }

.course-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(var(--ems-scrim), .3) 0%, rgba(var(--ems-scrim), .4) 30%, rgba(var(--ems-scrim), .9) 64%, rgb(var(--ems-scrim)) 100%);
}

.course-card--featured { border-color: rgba(215, 25, 32, .45); }

.course-card--featured::before {
    background: linear-gradient(180deg, rgba(215, 25, 32, .35) 0%, rgba(140, 14, 22, .6) 34%, rgba(70, 8, 14, .95) 64%, #3a070c 100%);
}

.course-card__abbr {
    position: absolute;
    top: 18px;
    left: 20px;
    right: 20px;
    font-family: var(--ems-font-display);
    font-size: clamp(3.2rem, 2.2rem + 2.4vw, 4.8rem);
    font-weight: 800;
    line-height: .9;
    letter-spacing: -.04em;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, .85);
    white-space: nowrap;
}

.course-card--featured .course-card__abbr { -webkit-text-stroke-color: #ff9aa2; }

.course-card__body { padding: 22px; }

.course-card__label {
    margin-bottom: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: #ff9aa2;
}

.course-card__name {
    font-family: var(--ems-font-display);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
}

/* The whole card is clickable through the name link. */
.course-card__name a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
}

.course-card__summary {
    margin-top: 10px;
    font-size: 13.5px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .72);
}

.course-card__cta { margin-top: 18px; }

.course-card .button--glass {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .25);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.course-card:hover .button--glass { color: #fff; background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .35); }

.courses__more { margin-top: 32px; text-align: center; }

/* About */
.about-section::before {
    content: "";
    position: absolute;
    top: 10%;
    left: -10%;
    width: 50%;
    height: 80%;
    background: radial-gradient(closest-side, rgba(215, 25, 32, .06), transparent);
    pointer-events: none;
}

.about__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(36px, 6vw, 88px);
}

.about__media {
    position: relative;
    padding: 0 14% 20% 0;
}

.about__photo {
    position: relative;
    overflow: hidden;
    background: var(--ems-bg-3);
    border-radius: var(--ems-radius);
}

.about__photo--main { aspect-ratio: 4 / 3.2; }

.about__photo--small {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 56%;
    aspect-ratio: 4 / 3;
    border: 5px solid var(--ems-bg);
    border-radius: 18px;
    box-shadow: var(--ems-shadow);
}

.about__img,
.about__photo .photo-slot { width: 100%; height: 100%; object-fit: cover; }

.about__callout {
    position: absolute;
    top: 22px;
    left: 22px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 78%;
    padding: 12px 16px;
    background: var(--ems-glass-strong);
    border: 1px solid var(--ems-border);
    border-radius: 14px;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: var(--ems-shadow);
    transition: transform .3s var(--ems-ease);
}

.about__callout:hover { transform: translateY(-3px); }
.about__callout strong { display: block; font-size: 14px; color: var(--ems-text); }
.about__callout span span { display: block; font-size: 12px; color: var(--ems-muted); }

.about__text { margin-top: 18px; font-size: 16px; line-height: 1.75; color: var(--ems-muted); }
.about__text p + p { margin-top: 12px; }

.about__points { display: grid; gap: 10px; margin-top: 24px; }

.about__point {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    font-size: 14.5px;
    color: var(--ems-text);
    background: var(--ems-bg-2);
    border: 1px solid var(--ems-border);
    border-radius: 14px;
    transition: border-color .3s, background-color .3s, transform .4s var(--ems-ease);
}

.about__point:hover { background: #fff; border-color: var(--ems-border-strong); transform: translateX(4px); }

.about__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    color: var(--ems-mint);
    background: rgba(15, 159, 104, .1);
    border-radius: 10px;
}

.about__icon .icon { width: 18px; height: 18px; }

.about__stats {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 16px clamp(28px, 4vw, 56px);
    margin-top: 28px;
}

.about__stats dt { font-family: var(--ems-font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--ems-red); }
.about__stats dd { margin-top: 4px; font-size: 12.5px; color: var(--ems-muted); }

.about__link { margin-top: 28px; }

/* About page: who we are */
.story { background: var(--ems-bg); }

.story__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(40px, 5vw, 80px);
}

.story__media { position: relative; padding: 0 0 22px 22px; }

/* Red outline offset behind the photo. */
.story__media::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 70%;
    height: 70%;
    border: 2px solid var(--ems-red);
    border-radius: calc(var(--ems-radius) + 4px);
    opacity: .35;
}

.story__photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3; /* the classroom photos are 4:3, so nothing is cropped or upscaled */
    margin: 0;
    background: var(--ems-bg-3);
    border-radius: var(--ems-radius);
    box-shadow: 0 40px 80px -40px rgba(17, 21, 31, .45);
}

/* A soft shade at the foot keeps the badge readable and gives the photo depth. */
.story__photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(var(--ems-scrim), .35) 100%);
    pointer-events: none;
}

.story__img,
.story__photo .photo-slot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.06) saturate(1.1) brightness(1.02);
    transition: transform 1.2s var(--ems-ease);
}

.story__media:hover .story__img { transform: scale(1.03); }

.story__badge {
    position: absolute;
    right: 22px;
    bottom: 44px;
    z-index: 2;
    padding: 14px 20px;
    background: #fff;
    border-left: 4px solid var(--ems-red);
    border-radius: 12px;
    box-shadow: var(--ems-shadow);
}

.story__badge .icon { width: 18px; height: 18px; margin-top: -3px; color: #fbbc04; }
.story__badge strong { display: block; font-family: var(--ems-font-display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--ems-text); }
.story__badge span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ems-muted); }

.story__text { margin-top: 18px; font-size: 16.5px; line-height: 1.75; color: var(--ems-muted); }
.story__text p + p { margin-top: 12px; }

.story__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 30px;
    border-top: 1px solid var(--ems-border);
    border-bottom: 1px solid var(--ems-border);
}

.story__stats > div { padding: 18px 16px; }
.story__stats > div:first-child { padding-left: 0; }
.story__stats > div + div { border-left: 1px solid var(--ems-border); }
.story__stats dt { font-family: var(--ems-font-display); font-size: clamp(1.4rem, 1.1rem + .9vw, 1.9rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--ems-red); }
.story__stats dd { margin-top: 4px; font-size: 13px; color: var(--ems-muted); }

.story__points { display: grid; gap: 12px; margin-top: 26px; }

.story__points li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15.5px;
    font-weight: 500;
    color: var(--ems-text);
}

.story__points .icon {
    width: 22px;
    height: 22px;
    flex: none;
    padding: 4px;
    color: #fff;
    background: var(--ems-red);
    border-radius: 50%;
    stroke-width: 3;
}

.story__link { margin-top: 32px; }

/* Numbers strip */
.stats__panel {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 2fr);
    align-items: center;
    gap: 36px;
    padding: clamp(24px, 3.5vw, 44px);
    background: linear-gradient(135deg, rgba(215, 25, 32, .08), var(--ems-bg-2) 45%);
    border: 1px solid var(--ems-border);
    border-radius: 26px;
}

.stats__title { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); }
.stats__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stats__item { padding-left: 20px; border-left: 2px solid var(--ems-red); }

.stats__value {
    font-family: var(--ems-font-display);
    font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.stats__label { margin-top: 8px; font-size: 13.5px; color: var(--ems-muted); }

/* Steps */
.steps { position: relative; }

.steps__rail {
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    height: 56px;
    pointer-events: none;
}

.steps__rail .ecg { height: 56px; opacity: .5; }

.steps__list {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.step__num {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ems-text);
    background: #fff;
    border: 6px solid var(--ems-bg);
    border-radius: 50%;
    box-sizing: content-box;
    transform: translateX(-6px);
    box-shadow: 0 0 0 1px var(--ems-border-strong);
}

.step--last .step__num { color: #fff; background: var(--ems-red); box-shadow: 0 0 26px -6px rgba(215, 25, 32, .7); animation: dems-heartbeat 2.2s ease-in-out infinite; }

.step__title { font-family: var(--ems-font-display); font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.step__text { margin-top: 8px; max-width: 260px; font-size: 15px; color: var(--ems-muted); }

/* Why us */
.why-section { background: var(--ems-bg-2); }

.why__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(36px, 5vw, 80px);
    align-items: start;
}

.why__quote blockquote p {
    font-family: var(--ems-font-display);
    font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.03em;
    color: var(--ems-text);
}

.why__quote .person { margin-top: 28px; }

.why__points { border-top: 1px solid var(--ems-border); }

.why__point {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 12px;
    padding: 20px 0;
    border-bottom: 1px solid var(--ems-border);
    transition: padding-left .4s var(--ems-ease);
}

.why__point:hover { padding-left: 10px; }
.why__num { padding-top: 5px; font-size: 12px; font-weight: 600; color: var(--ems-red); }
.why__title { font-family: var(--ems-font-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.why__text { margin-top: 4px; font-size: 15px; color: var(--ems-muted); }

/* Gallery mosaic: one tall, two small, one wide */
.mosaic {
    display: grid;
    grid-template-columns: 1.55fr 1fr 1fr;
    grid-template-rows: repeat(2, clamp(200px, 20vw, 260px));
    gap: 16px;
}

.mosaic__item--1 { grid-row: span 2; }
.mosaic__item--4 { grid-column: 2 / 4; }
.mosaic--1 { grid-template-columns: 1fr; }
.mosaic--2 { grid-template-columns: 1fr 1fr; grid-template-rows: clamp(260px, 30vw, 420px); }
.mosaic--2 .mosaic__item--1 { grid-row: auto; }
.mosaic--3 .mosaic__item--3 { grid-column: 2 / 4; }

.gallery-item {
    position: relative;
    overflow: hidden;
    margin: 0;
    background: var(--ems-bg-3);
    border-radius: 18px;
}

.gallery-item__link,
.gallery-item__img { display: block; width: 100%; height: 100%; }
.gallery-item__img { object-fit: cover; transition: transform 1.2s var(--ems-ease), filter .5s; }

.gallery-item::after {
    content: "";
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(180deg, transparent, rgba(var(--ems-scrim), .75));
    pointer-events: none;
}

.gallery-item__link:hover .gallery-item__img { transform: scale(1.06); filter: brightness(.9); }

.gallery-item__caption {
    position: absolute;
    left: 16px;
    right: 60px;
    bottom: 14px;
    z-index: 1;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    pointer-events: none;
}

.gallery-item__zoom {
    position: absolute;
    right: 12px;
    bottom: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--ems-text);
    background: rgba(255, 255, 255, .9);
    border-radius: 50%;
    opacity: 0;
    transform: scale(.8);
    transition: opacity .3s, transform .3s var(--ems-ease);
}

.gallery-item__zoom .icon { width: 18px; height: 18px; }
.gallery-item__link:hover .gallery-item__zoom,
.gallery-item__link:focus-visible .gallery-item__zoom { opacity: 1; transform: none; }

/* Lightbox: photos are viewed on a dark backdrop. */
.lightbox {
    width: min(1100px, 94vw);
    max-width: none;
    max-height: 92vh;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
}

.lightbox::backdrop {
    background: rgba(8, 11, 18, .9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.lightbox[open] { animation: dems-zoom-in .4s var(--ems-ease); }
.lightbox__figure { margin: 0; }

.lightbox__img {
    display: block;
    width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 14px;
}

.lightbox__caption { margin-top: 12px; font-size: 14px; color: rgba(255, 255, 255, .8); text-align: center; }
.lightbox__caption:empty { display: none; }

.lightbox__close,
.lightbox__nav {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    cursor: pointer;
    transition: transform .2s, background-color .2s;
}

.lightbox__close:hover,
.lightbox__nav:hover { background: var(--ems-red); transform: scale(1.06); }
.lightbox__close { top: -60px; right: 0; }
.lightbox__nav { top: 50%; margin-top: -24px; }
.lightbox__nav--prev { left: -64px; }
.lightbox__nav--prev .icon { transform: rotate(180deg); }
.lightbox__nav--next { right: -64px; }

/* FAQ */
.faq__inner {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(36px, 5vw, 80px);
    align-items: start;
}

.faq__intro { position: sticky; top: calc(var(--ems-header-space) + 32px); }
.faq__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.faq-item { border-bottom: 1px solid var(--ems-border); interpolate-size: allow-keywords; }
.faq-item:first-child { border-top: 1px solid var(--ems-border); }

.faq-item::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size .45s var(--ems-ease), content-visibility .45s allow-discrete;
}

.faq-item[open]::details-content { block-size: auto; }

.faq-item__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    font-family: var(--ems-font-display);
    font-size: clamp(1.05rem, .95rem + .4vw, 1.22rem);
    font-weight: 700;
    letter-spacing: -.02em;
    cursor: pointer;
    list-style: none;
    transition: color .2s;
}

.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q:hover { color: var(--ems-red); }

.faq-item__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    border: 1px solid var(--ems-border-strong);
    border-radius: 50%;
    transition: transform .4s var(--ems-ease), background-color .3s, border-color .3s, color .3s;
}

.faq-item__icon .icon { width: 16px; height: 16px; }
.faq-item[open] .faq-item__icon { color: #fff; background: var(--ems-red); border-color: var(--ems-red); transform: rotate(45deg); }
.faq-item__a { padding: 0 56px 22px 0; font-size: 15.5px; color: var(--ems-muted); }
.faq__more { margin-top: 14px; }

/* FAQ page */
.faq-page__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}

.faq-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid var(--ems-border-strong);
    border-radius: 14px;
    transition: border-color .2s, box-shadow .2s;
}

.faq-search:focus-within { border-color: var(--ems-red); box-shadow: 0 0 0 4px var(--ems-red-tint); }
.faq-search .icon { width: 20px; height: 20px; flex: none; color: var(--ems-dim); }

.faq-search input {
    flex: 1;
    min-width: 0;
    height: 56px;
    font: inherit;
    font-size: 16px;
    color: var(--ems-text);
    background: none;
    border: 0;
    outline: 0;
}

.faq-cards { display: grid; gap: 12px; }

.faq-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ems-border);
    border-radius: 16px;
    interpolate-size: allow-keywords;
    transition: border-color .3s, box-shadow .3s;
}

.faq-card:hover { border-color: var(--ems-border-strong); }
.faq-card[open] { border-color: rgba(215, 25, 32, .3); box-shadow: var(--ems-shadow-sm); }

.faq-card::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size .45s var(--ems-ease), content-visibility .45s allow-discrete;
}

.faq-card[open]::details-content { block-size: auto; }

.faq-card__q {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    cursor: pointer;
    list-style: none;
}

.faq-card__q::-webkit-details-marker { display: none; }

.faq-card__num {
    flex: none;
    width: 34px;
    font-family: var(--ems-font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--ems-dim);
    transition: color .3s;
}

.faq-card[open] .faq-card__num { color: var(--ems-red); }

.faq-card__title {
    flex: 1;
    font-family: var(--ems-font-display);
    font-size: clamp(1rem, .95rem + .3vw, 1.15rem);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.4;
    color: var(--ems-text);
}

.faq-card__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    color: var(--ems-text);
    background: var(--ems-bg-2);
    border-radius: 50%;
    transition: transform .4s var(--ems-ease), background-color .3s, color .3s;
}

.faq-card__icon .icon { width: 16px; height: 16px; }
.faq-card[open] .faq-card__icon { color: #fff; background: var(--ems-red); transform: rotate(45deg); }

.faq-card__a { padding: 0 72px 22px 72px; font-size: 15.5px; line-height: 1.75; color: var(--ems-muted); }
.faq-card__a p + p { margin-top: 10px; }

.faq-empty { padding: 28px; text-align: center; color: var(--ems-muted); background: #fff; border: 1px dashed var(--ems-border-strong); border-radius: 16px; }
.faq-page__content { margin-top: 40px; }

.faq-help {
    position: sticky;
    top: calc(var(--ems-header-space) + 24px);
    padding: 30px 28px;
    color: rgba(255, 255, 255, .78);
    background: var(--ems-ink);
    border-radius: var(--ems-radius);
    box-shadow: var(--ems-shadow);
}

.faq-help__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff;
    background: var(--ems-red);
    border-radius: 14px;
}

.faq-help__icon .icon { width: 22px; height: 22px; }
.faq-help__title { margin-top: 20px; font-family: var(--ems-font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.faq-help__text { margin-top: 10px; font-size: 15px; line-height: 1.7; }
.faq-help__actions { display: grid; gap: 10px; margin-top: 22px; }
.faq-help__actions .button { justify-content: center; }

.faq-help__list { display: grid; gap: 12px; margin-top: 24px; padding-top: 22px; font-size: 14px; border-top: 1px solid rgba(255, 255, 255, .14); }
.faq-help__list li { display: flex; align-items: flex-start; gap: 10px; }
.faq-help__list .icon { width: 16px; height: 16px; margin-top: 3px; flex: none; color: var(--ems-red); }
.faq-help__list a { color: #fff; transition: color .2s; }
.faq-help__list a:hover { color: var(--ems-red); }

/* Google rating summary (reviews section and page) */
.rating-summary {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 10px 18px;
    font-size: 14px;
    color: var(--ems-muted);
    background: #fff;
    border: 1px solid var(--ems-border);
    border-radius: 999px;
}

.rating-summary .icon--google { width: 20px; height: 20px; color: #4285f4; }
.rating-summary strong { font-family: var(--ems-font-display); font-size: 18px; font-weight: 800; color: var(--ems-text); }
.rating-summary__stars { display: inline-flex; gap: 2px; color: #fbbc04; }
.rating-summary__stars .icon { width: 16px; height: 16px; }
.reviews-section .rating-summary,
.reviews-page .rating-summary { margin-bottom: 24px; }

/* Blog */
.news__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.news-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ems-border);
    border-radius: var(--ems-radius);
    transition: transform .5s var(--ems-ease), box-shadow .5s var(--ems-ease);
}

.news-card:hover { transform: translateY(-6px); box-shadow: var(--ems-shadow); }
.news-card__media { display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ems-bg-3); }
.news-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ems-ease); }
.news-card:hover .news-card__img { transform: scale(1.05); }
.news-card__ecg { width: 70%; height: 60px; }
.news-card__body { padding: 22px; }
.news-card__date { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ems-dim); }
.news-card__title { margin-top: 8px; font-family: var(--ems-font-display); font-size: 19px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
.news-card__title a:hover { color: var(--ems-red); }
.news-card__excerpt { margin-top: 8px; font-size: 14.5px; color: var(--ems-muted); }

/* Call-back */
.callback-section {
    overflow: hidden;
    isolation: isolate;
    background: var(--ems-bg-2);
    border-top: 1px solid var(--ems-border);
}

.callback__bg { z-index: -1; }
.callback__bg-img { opacity: .8; filter: saturate(.85); transform: scale(1.04); }

.callback__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 70% at 85% 55%, rgba(215, 25, 32, .08), transparent 70%),
        linear-gradient(90deg, var(--ems-bg-2) 5%, rgba(246, 247, 250, .9) 50%, rgba(246, 247, 250, .7) 100%),
        linear-gradient(180deg, var(--ems-bg-2) 0%, transparent 25%, transparent 75%, var(--ems-bg-2) 100%);
}

.callback__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    align-items: center;
    gap: clamp(36px, 5vw, 80px);
}

.callback__title { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.8rem); }

.contact-rows { display: grid; gap: 18px; margin-top: 32px; }

.contact-row { display: flex; align-items: flex-start; gap: 14px; }

.contact-row__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    color: var(--ems-red);
    background: var(--ems-red-tint);
    border: 1px solid rgba(215, 25, 32, .2);
    border-radius: 12px;
}

.contact-row__icon .icon { width: 18px; height: 18px; }
.contact-row__label { display: block; font-size: 12px; color: var(--ems-muted); }
.contact-row__value { display: block; margin-top: 2px; font-size: 15px; font-weight: 500; color: var(--ems-text); overflow-wrap: anywhere; }
.contact-row__value a,
a.contact-row__value { transition: color .2s; }
.contact-row__value a:hover,
a.contact-row__value:hover { color: var(--ems-red); }
.contact-row__sep { margin: 0 8px; color: var(--ems-dim); }

/* Form card (call-back, course booking) */
.form-card {
    padding: clamp(22px, 3vw, 32px);
    color: var(--ems-text);
    background: #fff;
    border: 1px solid var(--ems-border);
    border-radius: 24px;
    box-shadow: 0 40px 80px -40px rgba(17, 21, 31, .3);
}

.form-card__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ems-mint);
}

.form-card__title { font-family: var(--ems-font-display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.form-card__text { margin: 6px 0 20px; font-size: 13.5px; color: var(--ems-muted); }

.form-card__alt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 13.5px;
    color: var(--ems-muted);
    transition: color .2s;
}

.form-card__alt .icon { width: 18px; height: 18px; color: var(--ems-whatsapp); }
.form-card__alt .icon--phone { color: var(--ems-red); }
.form-card__alt:hover { color: var(--ems-text); }


/* 7. Inner pages ----------------------------------------------------------- */

/* Page banner */
.page-hero {
    position: relative;
    padding: calc(var(--ems-header-space) + 48px) 0 clamp(44px, 6vw, 80px);
    overflow: hidden;
    isolation: isolate;
    background: var(--ems-bg-2);
    border-bottom: 1px solid var(--ems-border);
}

.page-hero__bg { z-index: -1; }
.page-hero__img { opacity: .85; filter: saturate(.85); }

.page-hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, var(--ems-bg-2) 10%, rgba(246, 247, 250, .9) 55%, rgba(246, 247, 250, .6)),
        linear-gradient(180deg, rgba(246, 247, 250, .4), var(--ems-bg-2) 98%);
}

.page-hero .hero__glow { bottom: -45%; opacity: .8; }
.page-hero__inner { position: relative; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--ems-muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--ems-dim); }
.crumbs a { transition: color .2s; }
.crumbs a:hover { color: var(--ems-red); }
.crumbs [aria-current] { color: var(--ems-text); }

.page-hero__abbr {
    position: absolute;
    top: -10px;
    right: 0;
    z-index: -1;
    font-family: var(--ems-font-display);
    font-size: clamp(6rem, 2rem + 13vw, 15rem);
    font-weight: 800;
    line-height: .85;
    letter-spacing: -.05em;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(215, 25, 32, .16);
    pointer-events: none;
    user-select: none;
}

.page-hero__title {
    max-width: 880px;
    margin-top: 18px;
    font-family: var(--ems-font-display);
    font-size: clamp(2.2rem, 1.4rem + 3.2vw, 4.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.04em;
    color: var(--ems-text);
    text-wrap: balance;
}

.page-hero__text { max-width: 620px; margin-top: 18px; font-size: 17px; line-height: 1.7; color: var(--ems-muted); }
.page-hero__after { margin-top: 28px; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.page-hero__after > .page-hero__actions:first-child { margin-top: 0; }

.course-facts {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(130px, auto);
    background: #fff;
    border: 1px solid var(--ems-border);
    border-radius: 16px;
    box-shadow: var(--ems-shadow-sm);
}

.course-facts > div { padding: 16px 22px; }
.course-facts > div + div { border-left: 1px solid var(--ems-border); }
.course-facts dt { font-family: var(--ems-font-display); font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.course-facts dd { margin-top: 2px; font-size: 12px; color: var(--ems-muted); }

/* Single course */
.course__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
    gap: clamp(36px, 5vw, 64px);
    align-items: start;
}

.course__aside { position: sticky; top: calc(var(--ems-header-space) + 24px); }

.course-block + .course-block,
.course-block + .course-cards { margin-top: 44px; }

.course-block__title {
    margin-bottom: 18px;
    font-family: var(--ems-font-display);
    font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -.03em;
}

.modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; counter-reset: none; }

.module {
    display: flex;
    gap: 16px;
    padding: 18px;
    background: var(--ems-bg-2);
    border: 1px solid var(--ems-border);
    border-radius: 16px;
    transition: border-color .3s, background-color .3s;
}

.module:hover { background: #fff; border-color: var(--ems-border-strong); }
.module__num { font-family: var(--ems-font-display); font-size: 14px; font-weight: 800; color: var(--ems-red); }
.module__text { font-size: 15px; line-height: 1.55; color: var(--ems-text); }

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

.info-card {
    padding: 22px;
    background: var(--ems-bg-2);
    border: 1px solid var(--ems-border);
    border-radius: 18px;
}

.info-card--accent { background: linear-gradient(160deg, rgba(215, 25, 32, .09), #fff); border-color: rgba(215, 25, 32, .25); }

.info-card__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    color: var(--ems-red);
    background: var(--ems-red-tint);
    border-radius: 12px;
}

.info-card__icon .icon { width: 20px; height: 20px; }
.info-card__title { font-family: var(--ems-font-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.info-card p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--ems-muted); }

.courses-section--related { background: var(--ems-bg-2); border-top: 1px solid var(--ems-border); }

/* Courses list: skill workshops */
.workshop-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

.workshop {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--ems-border);
    border-radius: 18px;
    transition: border-color .3s, box-shadow .4s, transform .5s var(--ems-ease);
}

.workshop:hover { border-color: rgba(215, 25, 32, .35); box-shadow: var(--ems-shadow-sm); transform: translateY(-4px); }

.workshop__abbr {
    font-family: var(--ems-font-display);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    color: transparent;
    -webkit-text-stroke: 1.2px var(--ems-red);
}

.workshop__name { margin-top: auto; padding-top: 22px; font-family: var(--ems-font-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.workshop__name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.workshop__text { margin-top: 6px; font-size: 13.5px; color: var(--ems-muted); }
.workshop__arrow { position: absolute; top: 22px; right: 22px; color: var(--ems-red); transition: transform .3s var(--ems-ease); }
.workshop:hover .workshop__arrow { transform: translateX(4px); }

/* Gallery page */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: clamp(200px, 19vw, 250px);
    grid-auto-flow: dense;
    gap: 16px;
}

.gallery-grid__item--wide { grid-column: span 2; grid-row: span 2; }

/* Visual Portfolio gallery (the "Gallery" saved layout), in the theme's look. */
.vp-gallery .vp-portfolio__item-img-wrap,
.vp-gallery .vp-portfolio__item-img { overflow: hidden; border-radius: 18px; }
.vp-gallery .vp-portfolio__item-img img { transition: transform 1.2s var(--ems-ease); }
.vp-gallery .vp-portfolio__item:hover .vp-portfolio__item-img img { transform: scale(1.06); }

.vp-gallery .vp-portfolio__item-overlay {
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(var(--ems-scrim), 0) 40%, rgba(var(--ems-scrim), .82)) !important;
}

.vp-gallery .vp-portfolio__item-meta {
    justify-content: flex-end !important;
    align-items: flex-start !important;
    padding: 18px 20px !important;
    text-align: left !important;
}

.vp-gallery .vp-portfolio__item-meta-title {
    margin: 0;
    font-family: var(--ems-font-display);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.01em;
    color: #fff;
}

.vp-gallery .vp-portfolio__item-meta-icon { color: #fff; }

/* Blog: list, pagination, article */
.news-card { display: flex; flex-direction: column; }
.news-card__body { display: flex; flex: 1; flex-direction: column; }

.news-card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ems-red);
}

.news-card__more .icon { width: 16px; height: 16px; transition: transform .3s var(--ems-ease); }
.news-card:hover .news-card__more .icon { transform: translateX(4px); }

.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: clamp(32px, 4vw, 48px);
}

.pager .page-numbers {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ems-text);
    background: #fff;
    border: 1px solid var(--ems-border);
    border-radius: 999px;
    transition: color .2s, background-color .2s, border-color .2s;
}

.pager a.page-numbers:hover { color: var(--ems-red); border-color: var(--ems-red); }
.pager .page-numbers.current { color: #fff; background: var(--ems-red); border-color: var(--ems-red); }
.pager .page-numbers.dots { background: none; border: 0; }
.pager .page-numbers .icon { width: 18px; height: 18px; }
.pager .prev .icon { transform: rotate(180deg); }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 13.5px;
    color: var(--ems-muted);
}

.post-meta > * + *::before { content: "·"; margin-right: 18px; color: var(--ems-dim); }

.page-hero--post .page-hero__title { max-width: 920px; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); }

.post__layout,
.page-body .prose--article { max-width: 860px; }
.post__layout { margin: 0 auto; }

.post__cover {
    margin: 0 0 clamp(28px, 4vw, 44px);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--ems-bg-3);
    border-radius: var(--ems-radius);
}

.post__cover-img { width: 100%; height: 100%; object-fit: cover; }

/* Long-form text: articles and standard pages. */
.prose--article { margin: 0 auto; font-size: 17px; line-height: 1.8; color: #3d4352; }
.prose--article > * + * { margin-top: 1.1em; }
.prose--article h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.2; letter-spacing: -.025em; }
.prose--article h3 { font-size: clamp(1.2rem, 1.1rem + .5vw, 1.4rem); line-height: 1.3; }
.prose--article h4 { font-family: var(--ems-font-display); font-size: 1.1rem; font-weight: 700; color: var(--ems-text); }
.prose--article ol { padding-left: 1.3em; list-style: decimal; }
.prose--article ol li + li { margin-top: 6px; }
.prose--article ol li::marker { font-weight: 700; color: var(--ems-red); }
.prose--article img,
.prose--article figure img { display: block; height: auto; border-radius: var(--ems-radius-sm); }
.prose--article figure { margin: 1.6em 0; }
.prose--article figcaption { margin-top: 8px; font-size: 13.5px; color: var(--ems-dim); text-align: center; }

.prose--article blockquote {
    padding: 18px 22px;
    font-family: var(--ems-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ems-text);
    background: var(--ems-red-tint);
    border-left: 3px solid var(--ems-red);
    border-radius: 0 var(--ems-radius-sm) var(--ems-radius-sm) 0;
}

.prose--article table { width: 100%; font-size: 15px; border-collapse: collapse; }
.prose--article th,
.prose--article td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--ems-border); }
.prose--article th { font-weight: 700; color: var(--ems-text); background: var(--ems-bg-2); }
.prose--article hr { margin: 2em 0; border: 0; border-top: 1px solid var(--ems-border); }

.post__share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: clamp(32px, 4vw, 48px);
    padding-top: 22px;
    font-size: 14px;
    font-weight: 600;
    border-top: 1px solid var(--ems-border);
}

.post__share span { margin-right: 6px; }

.post__share-link {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--ems-text);
    background: #fff;
    border: 1px solid var(--ems-border-strong);
    border-radius: 50%;
    transition: color .2s, background-color .2s, border-color .2s, transform .3s var(--ems-ease);
}

.post__share-link:hover { color: #fff; background: var(--ems-red); border-color: var(--ems-red); transform: translateY(-2px); }
.post__share-link .icon { width: 18px; height: 18px; }

.news-section--related { background: var(--ems-bg-2); border-top: 1px solid var(--ems-border); }

/* Contact page */
.contact__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    align-items: start;
    gap: clamp(28px, 4vw, 56px);
}

.contact__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.contact-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--ems-border);
    border-radius: 18px;
    transition: border-color .3s, box-shadow .4s, transform .5s var(--ems-ease);
}

.contact-card:hover { border-color: rgba(215, 25, 32, .3); box-shadow: var(--ems-shadow-sm); transform: translateY(-3px); }

.contact-card__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    color: var(--ems-red);
    background: var(--ems-red-tint);
    border-radius: 12px;
}

.contact-card--whatsapp .contact-card__icon { color: #128c4a; background: rgba(37, 211, 102, .12); }
.contact-card__icon .icon { width: 20px; height: 20px; }
.contact-card__title { font-family: var(--ems-font-display); font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.contact-card__text { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--ems-muted); overflow-wrap: anywhere; }
.contact-card__text a { font-weight: 600; color: var(--ems-text); }
.contact-card__text a:hover { color: var(--ems-red); }
.contact-card__note { margin-top: 6px; font-size: 13px; color: var(--ems-dim); }

.contact-card__list { display: grid; gap: 8px; margin-top: 10px; }
.contact-card__list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.contact-card__list a { font-size: 16px; font-weight: 600; color: var(--ems-text); }
.contact-card__list a:hover { color: var(--ems-red); }
.contact-card__list span { font-size: 12px; color: var(--ems-dim); }

.contact-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ems-red);
}

.contact-card__link .icon { width: 16px; height: 16px; transition: transform .3s var(--ems-ease); }
.contact-card__link:hover .icon { transform: translateX(4px); }

.contact__note { grid-column: 1 / -1; }
.contact__form { position: sticky; top: calc(var(--ems-header-space) + 24px); }

.contact-map {
    overflow: hidden;
    height: clamp(300px, 36vw, 440px);
    background: var(--ems-bg-3);
    border: 1px solid var(--ems-border);
    border-radius: var(--ems-radius);
}

.contact-map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Reviews page */
.reviews-widget { min-height: 200px; }
.reviews-page__content { max-width: 760px; margin: 40px auto 0; }

/* Bootstrap inner pages (About, blog): clear the floating header */
.dems--inner .page-container { padding-top: calc(var(--ems-header-space) + 40px); padding-bottom: 56px; }

:root {
    --bt-ink: var(--ems-text-dark);
    --bt-ink-soft: var(--ems-muted-dark);
    --bt-accent: var(--ems-red);
    --bt-accent-soft: #fde8e9;
    --bt-hero-bg: radial-gradient(1200px 400px at 10% -10%, #fde3e4 0%, transparent 60%), #fff;
}

.dems--inner .bt-btn--primary:hover { background: var(--ems-red-deep); }
.dems--inner .bt-hero__title,
.dems--inner .bt-404__code { font-family: var(--ems-font-display); font-weight: 800; letter-spacing: -.03em; }


/* 8. Contact Form 7 -------------------------------------------------------- */
.form-card .wpcf7 form { margin: 0; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.form-field { display: grid; gap: 6px; margin: 0; }
.form-field--full { grid-column: 1 / -1; }
.form-field > span:first-child { font-size: 12px; font-weight: 500; color: var(--ems-muted); }

.form-card .wpcf7-form-control-wrap { display: block; }

.form-card input[type="text"],
.form-card input[type="tel"],
.form-card input[type="email"],
.form-card textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 15px;
    font: inherit;
    font-size: 14.5px;
    color: var(--ems-text);
    background: var(--ems-bg-2);
    border: 1px solid var(--ems-border-strong);
    border-radius: 12px;
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}

.form-card input::placeholder,
.form-card textarea::placeholder { color: var(--ems-dim); }

.form-card input:focus,
.form-card textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--ems-red);
    box-shadow: 0 0 0 4px rgba(215, 25, 32, .12);
}

/* Course checkboxes as toggle pills */
.form-card .wpcf7-checkbox { display: flex; flex-wrap: wrap; gap: 8px; }
.form-card .wpcf7-list-item { margin: 0; }
.form-card .wpcf7-list-item label { position: relative; display: inline-flex; cursor: pointer; }
.form-card .wpcf7-list-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.form-card .wpcf7-list-item-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ems-text);
    border: 1px solid var(--ems-border-strong);
    border-radius: 999px;
    transition: background-color .2s, color .2s, border-color .2s;
}

.form-card .wpcf7-list-item label:hover .wpcf7-list-item-label { border-color: var(--ems-red); }

.form-card .wpcf7-list-item input:checked + .wpcf7-list-item-label {
    color: #fff;
    background: var(--ems-red);
    border-color: var(--ems-red);
}

.form-card .wpcf7-list-item input:checked + .wpcf7-list-item-label::before { content: "✓"; }
.form-card .wpcf7-list-item input:focus-visible + .wpcf7-list-item-label { outline: 2px solid var(--ems-red); outline-offset: 2px; }

.form-card .wpcf7-submit {
    width: 100%;
    min-height: 52px;
    font-family: var(--ems-font-body);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--ems-red);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 14px 30px -14px rgba(215, 25, 32, .7);
    cursor: pointer;
    transition: background-color .25s, transform .3s var(--ems-ease);
}

.form-card .wpcf7-submit:hover { background: var(--ems-red-deep); transform: translateY(-2px); }
.form-card .wpcf7-spinner { display: block; margin: 10px auto 0; }
.form-card .wpcf7-not-valid-tip { margin-top: 4px; font-size: 12.5px; color: var(--ems-red); }

.form-card .wpcf7 form .wpcf7-response-output {
    margin: 14px 0 0;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--ems-text);
    border-radius: 12px;
}


/* 9. Footer + floating actions --------------------------------------------- */
.dems-footer {
    position: relative;
    padding: clamp(52px, 7vw, 88px) 0 24px;
    overflow: hidden;
    isolation: isolate;
    color: var(--ems-muted);
    background: var(--ems-bg-2);
    border-top: 1px solid var(--ems-border);
}

.footer__glow {
    position: absolute;
    left: 50%;
    bottom: -35%;
    z-index: -1;
    width: 110vw;
    height: 70%;
    background: radial-gradient(closest-side, rgba(215, 25, 32, .07), transparent);
    transform: translateX(-50%);
    pointer-events: none;
}

.footer__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px 48px;
    padding-bottom: clamp(36px, 4.5vw, 56px);
    margin-bottom: clamp(36px, 4.5vw, 56px);
    border-bottom: 1px solid var(--ems-border);
}

.footer__cta-title {
    max-width: 760px;
    font-family: var(--ems-font-display);
    font-size: clamp(2rem, 1.2rem + 3vw, 3.8rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.04em;
    color: var(--ems-text);
}

.footer__cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 36px;
}

.footer__about { max-width: 320px; margin-top: 16px; font-size: 14px; line-height: 1.7; }

.footer__title {
    margin: 0 0 16px;
    font-family: var(--ems-font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ems-dim);
}

.footer__list li + li { margin-top: 10px; }

.footer__list a {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14.5px;
    color: var(--ems-text);
    overflow-wrap: anywhere;
    transition: color .2s, transform .3s var(--ems-ease);
}

.footer__list a:hover { color: var(--ems-red); transform: translateX(3px); }
.footer__list .icon { width: 16px; height: 16px; margin-top: 3px; flex: none; color: var(--ems-red); }
.footer__col--contact .footer__list a:hover { transform: none; }

.footer__social { display: flex; gap: 10px; margin-top: 22px; }

.footer__social a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--ems-text);
    background: #fff;
    border: 1px solid var(--ems-border-strong);
    border-radius: 50%;
    transition: background-color .25s, border-color .25s, color .25s, transform .3s var(--ems-ease);
}

.footer__social a:hover { color: #fff; background: var(--ems-red); border-color: var(--ems-red); transform: translateY(-3px); }
.footer__social .icon { width: 18px; height: 18px; }

.footer__mark {
    position: relative;
    margin: clamp(40px, 6vw, 72px) 0 clamp(20px, 3vw, 36px);
    pointer-events: none;
    user-select: none;
}

.footer__wordmark {
    font-family: var(--ems-font-display);
    font-size: clamp(3rem, 15.5vw, 14.5rem);
    font-weight: 800;
    line-height: .82;
    letter-spacing: -.055em;
    white-space: nowrap;
    text-align: center;
    color: var(--ems-text);
    background: linear-gradient(180deg, var(--ems-text) 35%, var(--ems-red-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer__ecg {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: clamp(60px, 8vw, 120px);
    margin-top: calc(clamp(60px, 8vw, 120px) / -2);
}

.footer__ecg .ecg { height: 100%; }

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-top: 20px;
    font-size: 13px;
    border-top: 1px solid var(--ems-border);
}

.footer__dev { margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--ems-border-strong); }
.footer__dev a { font-weight: 600; color: var(--ems-text); transition: color .2s; }
.footer__dev a:hover { color: var(--ems-red); }

.footer__legal { display: flex; flex-wrap: wrap; gap: 20px; }
.footer__legal a:hover { color: var(--ems-red); }

.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 800;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    color: #fff;
    background: var(--ems-whatsapp);
    border-radius: 50%;
    box-shadow: 0 14px 30px -10px rgba(37, 211, 102, .7);
    transition: transform .3s var(--ems-ease);
}

.whatsapp-float:hover { color: #fff; transform: scale(1.08); }
.whatsapp-float .icon { width: 30px; height: 30px; }

.whatsapp-float::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: inherit;
    animation: dems-ping 2.4s ease-out infinite;
}

.to-top {
    position: fixed;
    right: 31px;
    bottom: 94px;
    z-index: 800;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--ems-text);
    background: #fff;
    border: 1px solid var(--ems-border-strong);
    border-radius: 50%;
    box-shadow: var(--ems-shadow-sm);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .3s, transform .3s var(--ems-ease), visibility .3s, background-color .2s, color .2s;
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: #fff; background: var(--ems-red); border-color: var(--ems-red); }
.to-top .icon { width: 18px; height: 18px; }

.mobile-bar { display: none; }


/* 10. Motion --------------------------------------------------------------- */
@keyframes dems-ping {
    0% { transform: scale(1); opacity: .6; }
    100% { transform: scale(2.6); opacity: 0; }
}

/* Uses `translate`, so it never fights the entrance animations on `transform`. */
@keyframes dems-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -9px; }
}

@keyframes dems-heartbeat {
    0%, 40%, 100% { transform: translateX(-6px) scale(1); }
    10%, 30% { transform: translateX(-6px) scale(1.12); }
    20% { transform: translateX(-6px) scale(.96); }
}

@keyframes dems-trace {
    from { stroke-dashoffset: 1.14; }
    to { stroke-dashoffset: 0; }
}

@keyframes dems-zoom-in {
    from { opacity: 0; transform: scale(.94); }
}

@keyframes dems-failsafe {
    to { opacity: 1; }
}

/* Split headings: each word sits in a mask it rises out of. */
.w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    margin: 0 -.05em -.14em;
    padding: 0 .05em .14em;
}

.w > span,
.w .c { display: inline-block; }
.w--open { overflow: visible; }

/* The curtain that drops off photos (data-anim="curtain"), with a red lip on its edge. */
.anim-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: var(--ems-bg-3);
    border-bottom: 3px solid var(--ems-red);
    pointer-events: none;
}

/* Until doctorsems.js has prepared an animated element it stays hidden. If the script never
   runs (blocked, crashed), a CSS timer shows everything anyway. */
.js [data-anim]:not(.anim-ready) {
    opacity: 0;
    animation: dems-failsafe .01s 3.5s forwards;
}

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

    .dems *,
    .dems *::before,
    .dems *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }

    .js [data-anim] { opacity: 1; }
    .ecg path { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
    .ecg--glow .ecg__run { display: none; }
}


/* 11. Responsive ----------------------------------------------------------- */
@media (max-width: 1180px) {
    .nav__link { padding: 9px 10px; font-size: 13.5px; }
    .navbar { gap: 18px; }
    .navbar__phone span { display: none; }
    .courses__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workshop-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    :root { --ems-gutter: 24px; }

    .hero__inner,
    .about__inner,
    .why__inner,
    .faq__inner,
    .callback__inner,
    .course__layout { grid-template-columns: 1fr; }

    .hero { min-height: 0; padding-bottom: 110px; }
    .hero__cards { margin: 4px 0 0; max-width: 560px; }
    .about__media { max-width: 620px; }
    .story__inner { grid-template-columns: 1fr; }
    .story__media { max-width: 560px; }
    .course__aside { position: static; max-width: 560px; }

    .courses__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats__panel { grid-template-columns: 1fr; gap: 24px; }
    .steps__list { grid-template-columns: 1fr 1fr; gap: 32px 28px; }
    .steps__rail { display: none; }
    .news__grid { grid-template-columns: 1fr 1fr; }
    .faq__intro { position: static; }
    .faq-page__inner { grid-template-columns: 1fr; }
    .faq-help { position: static; max-width: 560px; }
    .callback__inner { max-width: 640px; }
    .contact__layout { grid-template-columns: 1fr; }
    .contact__form { position: static; max-width: 560px; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .lightbox__nav--prev { left: 8px; }
    .lightbox__nav--next { right: 8px; }
    .page-hero__abbr { opacity: .6; }
    .course-facts { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
    .course-facts > div:nth-child(3) { border-left: 0; }
    .course-facts > div:nth-child(n + 3) { border-top: 1px solid var(--ems-border); }
}

/* Mobile navigation drawer */
@media (max-width: 1100px) {
    .burger { display: grid; }
    .navbar__actions { margin-left: auto; }

    /* A backdrop-filter would trap the fixed drawer inside the navbar box. */
    .navbar,
    .is-scrolled .navbar {
        background: rgba(255, 255, 255, .97);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .nav {
        position: fixed;
        top: calc(var(--ems-header-space) + 10px);
        right: var(--ems-gutter);
        bottom: auto;
        z-index: 899;
        display: flex;
        flex-direction: column;
        width: min(380px, calc(100vw - var(--ems-gutter) * 2));
        max-height: calc(100svh - var(--ems-header-space) - 30px);
        margin: 0;
        padding: 12px 22px 24px;
        overflow-y: auto;
        background: #fff;
        border: 1px solid var(--ems-border);
        border-radius: 20px;
        box-shadow: var(--ems-shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(.98);
        transform-origin: top right;
        transition: opacity .3s, transform .4s var(--ems-ease), visibility .3s;
    }

    .nav-open .nav { opacity: 1; visibility: visible; transform: none; }

    .nav-open body::after { /* page dimmer */
        content: "";
        position: fixed;
        inset: 0;
        z-index: 850;
        background: rgba(17, 21, 31, .35);
    }

    .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav__item { flex-wrap: wrap; border-bottom: 1px solid var(--ems-border); }
    .nav__link { flex: 1; padding: 15px 0; font-size: 17px; font-weight: 600; color: var(--ems-text); border-radius: 0; }
    .nav__link:hover,
    .nav__item.is-current-item > .nav__link,
    .nav__item.is-current-ancestor > .nav__link { background: none; color: var(--ems-red); }
    .nav__toggle { width: 44px; height: 44px; margin: 0; }

    .nav__sub {
        position: static;
        flex-basis: 100%;
        min-width: 0;
        max-height: 0;
        padding: 0;
        overflow: hidden;
        background: transparent;
        border: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height .35s var(--ems-ease);
    }

    .nav__item:hover > .nav__sub,
    .nav__item:focus-within > .nav__sub { max-height: 0; }
    .nav__item.is-open > .nav__sub { max-height: 420px; padding-bottom: 12px; }
    .nav__item:hover > .nav__toggle .icon { transform: none; }
    .nav__item.is-open > .nav__toggle .icon { transform: rotate(180deg); }
    .nav__sublink { padding: 10px 12px; color: var(--ems-muted); }

    .nav__mobile-extra { display: grid; gap: 10px; margin-top: 22px; }
    .navbar__phone { display: none; }
}

@media (max-width: 768px) {
    :root { --ems-header-h: 62px; --ems-header-top: 10px; }

    .navbar { padding: 0 8px 0 14px; border-radius: 16px; }
    .brand__img { height: 42px; }
    .navbar__cta { display: none; }

    .section-head--split { flex-direction: column; align-items: flex-start; }

    .hero { padding-top: calc(var(--ems-header-space) + 28px); padding-bottom: 96px; }
    .hero__bg::after {
        background: linear-gradient(180deg, rgba(255, 255, 255, .82) 0%, rgba(255, 255, 255, .92) 45%, #fff 97%);
    }
    .hero__cards { grid-template-areas: "photo photo" "pulse note"; }
    .hcard--pulse { margin: 0; }
    .hcard--photo .hcard__media { aspect-ratio: 16 / 9; }
    .hero__pulse { bottom: 28px; }
    .hero__pulse .ecg { height: 60px; }

    .courses__grid,
    .courses__grid--4,
    .courses__grid--2,
    .news__grid,
    .modules,
    .workshop-list { grid-template-columns: 1fr; }
    .course-card { min-height: 400px; }

    .about__stats { grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .story__media { padding: 0 0 14px 14px; }
    .story__badge { right: 12px; bottom: 30px; padding: 10px 14px; }
    .story__stats > div { padding: 14px 10px; }
    .stats__list { grid-template-columns: 1fr 1fr; }

    .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 160px 160px; gap: 12px; }
    .mosaic__item--1 { grid-column: 1 / -1; grid-row: auto; }
    .mosaic__item--4 { grid-column: 1 / -1; }
    .mosaic--3 .mosaic__item--3 { grid-column: auto; }

    .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; gap: 12px; }

    .footer__cta { flex-direction: column; align-items: flex-start; }

    .whatsapp-float { display: none; }
    .to-top { right: 16px; bottom: 88px; }

    .mobile-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 800;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--ems-border);
        box-shadow: 0 -10px 30px -20px rgba(17, 21, 31, .35);
    }

    .mobile-bar__item {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 46px;
        font-size: 14px;
        font-weight: 600;
        color: var(--ems-text);
        background: var(--ems-bg-2);
        border: 1px solid var(--ems-border);
        border-radius: 12px;
    }

    .mobile-bar__item:hover { color: var(--ems-text); }
    .mobile-bar__item .icon { width: 18px; height: 18px; }
    .mobile-bar__item--whatsapp,
    .mobile-bar__item--primary,
    .mobile-bar__item--whatsapp:hover,
    .mobile-bar__item--primary:hover { color: #fff; border-color: transparent; }
    .mobile-bar__item--whatsapp { background: var(--ems-whatsapp); }
    .mobile-bar__item--primary { background: var(--ems-red); }

    body.dems { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }

    /* Lighter motion on phones: blur behind layers, endless floats and glowing filters
       are repainted every frame and drop frames on mobile GPUs. */
    .hcard,
    .badge,
    .glass,
    .about__callout,
    .mobile-bar,
    .course-card .button--glass {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .hcard { animation: none; }
    .ecg--glow .ecg__run { filter: none; }
    .hero__bg-media,
    .callback__bg-media,
    .page-hero__bg-media { inset: 0; will-change: auto; }
    .course-card:hover,
    .news-card:hover,
    .contact-card:hover,
    .workshop:hover { transform: none; }
}

@media (max-width: 640px) {
    :root { --ems-gutter: 16px; --ems-section-pad: 36px; }

    .hero__actions .button { flex: 1 1 auto; }
    .hero__title .outline { -webkit-text-stroke-width: 1.5px; }
    .hcard { padding: 12px; }
    .hcard--photo { padding: 8px 8px 12px; }

    .about__media { padding: 0 8% 22% 0; }
    .about__callout { left: 12px; top: 12px; }
    .about__stats { grid-template-columns: 1fr 1fr; }

    .steps__list { grid-template-columns: 1fr; gap: 24px; }
    .form-grid { grid-template-columns: 1fr; }
    .contact__cards { grid-template-columns: 1fr; }
    .prose--article { font-size: 16px; }
    .post__cover { aspect-ratio: 4 / 3; }
    .faq-item__a { padding-right: 0; }
    .faq-card__q { gap: 12px; padding: 16px; }
    .faq-card__num { display: none; }
    .faq-card__a { padding: 0 16px 18px; }
    .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
    .gallery-grid__item--wide { grid-column: auto; grid-row: auto; }

    .footer__grid { grid-template-columns: 1fr; gap: 28px; }
    .footer__bottom { flex-direction: column; }
    .contact-row__value a { display: inline-block; }
    .course-facts { display: grid; }
    .course-facts > div { padding: 14px 16px; }
}

@media (max-width: 400px) {
    .brand__img { height: 36px; }
    .hero__cards { grid-template-areas: "photo" "pulse" "note"; grid-template-columns: 1fr; }
    .stats__list { gap: 18px; }
    .stats__item { padding-left: 14px; }
    .mobile-bar__item { font-size: 13px; }
}
