/**
 * Page sections: hero band, numbered levels, details panel.
 *
 * Same language as the services cards — ink navy, brass, parchment, Petrona
 * over Manrope, and the arch borrowed from the centre's certificate frame.
 *
 * Every text rule is scoped and class-doubled: buddyboss-theme styles headings
 * and paragraphs at .bb-custom-typo h1..h6 (0,2,0), which beats a single class.
 */

/* The theme's content wrapper can run a few pixels wider than the viewport on
   a phone; clamp our own sections so they never add a sideways scroll. */
.elementor-widget-ilm-page-hero > .elementor-widget-container,
.elementor-widget-ilm-levels > .elementor-widget-container,
.elementor-widget-ilm-details > .elementor-widget-container {
    max-width: 100vw;
    overflow-x: clip;
}

.ilm-hero,
.ilm-levels,
.ilm-details {
    max-width: 100vw;
    --ilm-ink: #152C46;
    --ilm-accent: #A9814B;
    --ilm-ground: #F7F4EE;
    --ilm-card: #FFFFFF;
    --ilm-body: #5A6B7C;
    --ilm-hairline: #E4DDD0;

    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    color: var(--ilm-ink);
    position: relative;
    isolation: isolate;
}

/* ─────────────────────────── Hero ─────────────────────────── */

.ilm-hero {
    background: var(--ilm-ink);
    color: #fff;
    padding: clamp(52px, 6.5vw, 96px) 20px;
    overflow: hidden;
}

.ilm-hero__inner {
    max-width: 1140px;
    margin: 0 auto;
}

.ilm-hero--split .ilm-hero__inner {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: clamp(28px, 4vw, 64px);
    align-items: center;
}

.ilm-hero .ilm-hero__eyebrow.ilm-hero__eyebrow {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #D9BC8C;
}

.ilm-hero .ilm-hero__title.ilm-hero__title {
    margin: 0;
    font-family: 'Petrona', Georgia, serif;
    font-weight: 500;
    font-size: clamp(34px, 5.4vw, 60px);
    line-height: 1.06;
    letter-spacing: -.015em;
    color: #fff;
}

.ilm-hero .ilm-hero__lede.ilm-hero__lede {
    margin: 18px 0 0;
    max-width: 46ch;
    font-size: clamp(15.5px, 1.5vw, 18px);
    line-height: 1.65;
    color: rgba(255, 255, 255, .82);
}

/* Key facts: a brass-ruled strip, the certificate's meta row. */
.ilm-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px clamp(20px, 3vw, 44px);
    margin: clamp(24px, 3vw, 34px) 0 0;
    padding: 20px 0 0;
    border-top: 1px solid rgba(217, 188, 140, .32);
}

.ilm-hero__fact dt {
    margin: 0 0 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #D9BC8C;
}

.ilm-hero__fact dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.ilm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(26px, 3vw, 36px);
}

.ilm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 28px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .3s ease, background-color .3s ease, color .3s ease;
}

.ilm-hero .ilm-btn--solid {
    background: #D9BC8C;
    color: var(--ilm-ink);
    border: 1px solid #D9BC8C;
}

.ilm-hero .ilm-btn--solid:hover,
.ilm-hero .ilm-btn--solid:focus-visible {
    background: #EBD5B0;
    border-color: #EBD5B0;
    color: var(--ilm-ink);
    transform: translateY(-2px);
}

.ilm-hero .ilm-btn--ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .38);
}

.ilm-hero .ilm-btn--ghost:hover,
.ilm-hero .ilm-btn--ghost:focus-visible {
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

.ilm-btn:focus-visible {
    outline: 2px solid #D9BC8C;
    outline-offset: 3px;
}

/* The arch again, this time holding the hero photograph. */
.ilm-hero__figure {
    margin: 0;
}

/* Elementor ships `.elementor img { border-radius: 0 }` (0,1,1), which beats a
   single class — scope and double it so the arch survives. */
.ilm-hero .ilm-hero__img.ilm-hero__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 40%;
    border-radius: 999px 999px 16px 16px;
}

/* ────────────────────────── Levels ────────────────────────── */

.ilm-levels {
    background: var(--ilm-card);
    padding: clamp(56px, 7vw, 100px) 20px;
}

.ilm-levels__inner {
    max-width: 1000px;
    margin: 0 auto;
}

.ilm-levels__head {
    max-width: 640px;
    margin-bottom: clamp(32px, 4vw, 52px);
}

.ilm-levels .ilm-levels__eyebrow.ilm-levels__eyebrow {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ilm-accent);
}

.ilm-levels .ilm-levels__title.ilm-levels__title {
    margin: 0;
    font-family: 'Petrona', Georgia, serif;
    font-weight: 500;
    font-size: clamp(28px, 3.8vw, 42px);
    line-height: 1.14;
    color: var(--ilm-ink);
}

.ilm-levels .ilm-levels__lede.ilm-levels__lede {
    margin: 14px 0 0;
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.65;
    color: var(--ilm-body);
}

.ilm-levels__list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.ilm-level {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: clamp(16px, 2.4vw, 30px);
    padding: clamp(22px, 2.6vw, 30px) 0;
    border-top: 1px solid var(--ilm-hairline);
}

.ilm-level:last-child {
    border-bottom: 1px solid var(--ilm-hairline);
}

/* The numeral carries real information here: a child moves 1 → 4. */
.ilm-level__num {
    font-family: 'Petrona', Georgia, serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 1;
    color: var(--ilm-accent);
    opacity: .85;
    font-variant-numeric: lining-nums;
}

.ilm-levels .ilm-level__name.ilm-level__name {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    margin: 0;
    font-family: 'Petrona', Georgia, serif;
    font-size: clamp(19px, 1.9vw, 23px);
    font-weight: 600;
    line-height: 1.25;
    color: var(--ilm-ink);
}

.ilm-level__ages {
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ilm-accent);
    padding: 4px 10px;
    border: 1px solid var(--ilm-hairline);
    border-radius: 999px;
}

.ilm-levels .ilm-level__text.ilm-level__text {
    margin: 10px 0 0;
    font-size: 15px;
    line-height: 1.68;
    color: var(--ilm-body);
}

/* ────────────────────────── Details ───────────────────────── */

.ilm-details {
    background: var(--ilm-ground);
    padding: clamp(52px, 6.5vw, 92px) 20px;
}

.ilm-details__inner {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: clamp(26px, 4vw, 60px);
    align-items: center;
}

.ilm-details .ilm-details__title.ilm-details__title {
    margin: 0 0 8px;
    font-family: 'Petrona', Georgia, serif;
    font-weight: 500;
    font-size: clamp(26px, 3.4vw, 38px);
    line-height: 1.16;
    color: var(--ilm-ink);
}

.ilm-details__list {
    margin: 0;
}

.ilm-details__row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 8px 20px;
    padding: 16px 0;
    border-bottom: 1px solid var(--ilm-hairline);
}

.ilm-details__row dt {
    margin: 0;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ilm-accent);
    padding-top: 2px;
}

.ilm-details__row dd {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--ilm-ink);
}

.ilm-details .ilm-details__note.ilm-details__note {
    margin: 18px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ilm-body);
}

.ilm-details__figure {
    margin: 0;
}

.ilm-details .ilm-details__img.ilm-details__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 24px 50px -32px rgba(21, 44, 70, .5);
}

/* ───────────────────────── Responsive ─────────────────────── */

@media (max-width: 900px) {
    .ilm-hero--split .ilm-hero__inner,
    .ilm-details__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Photo first on a phone reads as decoration; keep it after the words. */
    .ilm-hero__figure {
        order: 2;
        max-width: 340px;
    }

    .ilm-hero .ilm-hero__img.ilm-hero__img {
        aspect-ratio: 5 / 4;
        border-radius: 200px 200px 14px 14px;
    }

    .ilm-level {
        grid-template-columns: 42px 1fr;
    }

    .ilm-level__num {
        font-size: 30px;
    }

    .ilm-details__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ilm-btn {
        transition: none;
    }

    .ilm-hero .ilm-btn:hover,
    .ilm-hero .ilm-btn:focus-visible {
        transform: none;
    }
}
