/*
 * IRClass Academy homepage — header + hero (Phase 2).
 *
 * Loaded ONLY on the frontpage (see theme/edash/layout/frontpage_irclass.php).
 * Every rule is scoped under body.irclass-home so nothing here can affect
 * login, dashboard, course, or any other eDash page.
 *
 * Ported from the approved static prototype's styles.css. Font: the
 * prototype specifies "Inter", loaded there via Google Fonts CDN. No local
 * copy of Inter exists as a reusable theme asset in this installation (the
 * only local Inter files found belong to H5P's bundled library, an
 * unrelated subsystem, and are not a safe/stable thing for the theme to
 * depend on), and no external CDN dependency was introduced here per
 * instructions. Falling back to the prototype's own fallback stack
 * (Arial/sans-serif) until Inter is sourced and self-hosted properly.
 */

body.irclass-home {
    --irclass-navy: #10213b;
    --irclass-blue: #197da0;
    --irclass-cyan: #64cedb;
    --irclass-ink: #172841;
    --irclass-muted: #738195;
    --irclass-line: #e3eaf0;
}

/* Hide the standard eDash top navbar and in-content page header on the
   homepage only, so the IRClass header is the single, coherent header.
   These files are NOT modified — only hidden via CSS on this one page. */
body.irclass-home .navbar-area,
body.irclass-home .edash-full-header {
    display: none !important;
}

body.irclass-home .irclass-header,
body.irclass-home .irclass-hero,
body.irclass-home .irclass-hero * {
    box-sizing: border-box;
}

body.irclass-home .irclass-header {
    font-family: Arial, Helvetica, sans-serif;
    height: 78px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid #e8eef2;
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 0 clamp(20px, 5vw, 80px);
}

body.irclass-home .irclass-brand {
    width: 185px;
    flex: none;
    display: block;
}

body.irclass-home .irclass-brand img {
    width: 100%;
    max-height: 48px;
    object-fit: contain;
    object-position: left;
    display: block;
}

body.irclass-home .irclass-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(14px, 2.2vw, 32px);
    flex: 1;
}

body.irclass-home .irclass-nav a,
body.irclass-home .irclass-login {
    font-size: 14px;
    color: #526176;
    white-space: nowrap;
    text-decoration: none;
}

body.irclass-home .irclass-nav a:hover,
body.irclass-home .irclass-nav a.active {
    color: var(--irclass-blue);
}

body.irclass-home .irclass-header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    white-space: nowrap;
}

body.irclass-home .irclass-btn {
    display: inline-flex;
    align-items: center;
    gap: 17px;
    background: var(--irclass-cyan);
    color: #102b40;
    padding: 13px 19px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: .2s;
}

body.irclass-home .irclass-btn:hover {
    transform: translateY(-2px);
    background: #82dce5;
}

body.irclass-home .irclass-btn b {
    font-size: 17px;
}

body.irclass-home .irclass-btn-small {
    padding: 9px 13px;
}

body.irclass-home .irclass-menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 23px;
    color: var(--irclass-navy);
    cursor: pointer;
}

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

body.irclass-home .irclass-hero {
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
    height: min(58vw, 620px);
    min-height: 520px;
    max-height: 640px;
    overflow: hidden;
    background: #101d33;
    color: #fff;
    padding: 0;
    display: block;
}

body.irclass-home .irclass-hero-slides,
body.irclass-home .irclass-hero-slide {
    position: absolute;
    inset: 0;
}

body.irclass-home .irclass-hero-slide {
    display: flex;
    align-items: center;
    padding: 60px clamp(25px, 9vw, 140px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s ease, visibility .45s;
}

body.irclass-home .irclass-hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

body.irclass-home .irclass-hero-slide .irclass-hero-bg {
    position: absolute;
    inset: 0;
    background-position: center 47%;
    background-size: cover;
    background-repeat: no-repeat;
}

body.irclass-home .irclass-hero-slide .irclass-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 35, 57, .82) 0%, rgba(12, 35, 57, .64) 42%, rgba(12, 35, 57, .16) 100%),
        linear-gradient(0deg, rgba(12, 35, 57, .22), transparent 58%);
}

body.irclass-home .irclass-hero-slide[aria-hidden="true"] .irclass-hero-copy a {
    pointer-events: none;
}

body.irclass-home .irclass-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 670px;
}

body.irclass-home .irclass-eyebrow {
    font-size: 12px;
    letter-spacing: .17em;
    font-weight: 700;
    color: #a7dfe7;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.irclass-home .irclass-eyebrow i {
    width: 26px;
    height: 2px;
    background: var(--irclass-cyan);
    display: inline-block;
}

body.irclass-home .irclass-kicker {
    margin: 23px 0 7px;
    color: #d0e0e9;
    font-size: 16px;
}

body.irclass-home .irclass-hero h1 {
    font-size: clamp(42px, 4.8vw, 64px);
    line-height: 1.06;
    letter-spacing: -.045em;
    font-weight: 600;
    margin: 0;
}

body.irclass-home .irclass-hero h1 em {
    font-style: normal;
    color: #76d4df;
}

body.irclass-home .irclass-intro {
    max-width: 520px;
    font-size: 17px;
    color: #d0dbe5;
    line-height: 1.8;
    margin: 20px 0 26px;
}

body.irclass-home .irclass-hero-buttons {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}

body.irclass-home .irclass-text-btn {
    font-size: 14px;
    color: #fff;
    text-decoration: none;
}

body.irclass-home .irclass-text-btn:hover {
    color: var(--irclass-cyan);
}

body.irclass-home .irclass-meta {
    margin-top: 37px;
    font-size: 12px;
    letter-spacing: .06em;
    color: #c3d0dc;
}

body.irclass-home .irclass-hero-controls {
    position: absolute;
    z-index: 3;
    right: clamp(22px, 6vw, 90px);
    bottom: 26px;
    display: flex;
    align-items: center;
    gap: 12px;
}

body.irclass-home .irclass-hero-controls > button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .65);
    background: rgba(255, 255, 255, .94);
    color: var(--irclass-navy);
    font-size: 17px;
    cursor: pointer;
}

body.irclass-home .irclass-hero-controls > button:hover,
body.irclass-home .irclass-hero-controls > button:focus-visible {
    background: var(--irclass-cyan);
}

body.irclass-home .irclass-hero-count {
    color: #eef5f8;
    font-size: 14px;
    min-width: 56px;
    text-align: center;
}

body.irclass-home .irclass-hero-count b {
    font-size: 19px;
}

body.irclass-home .irclass-hero-count span {
    color: #e0e9ee;
    font-size: 14px;
}

body.irclass-home .irclass-hero-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

body.irclass-home .irclass-hero-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #c2d1dc;
    cursor: pointer;
}

body.irclass-home .irclass-hero-dots button.active {
    width: 22px;
    background: var(--irclass-cyan);
}

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

@media (max-width: 980px) {
    body.irclass-home .irclass-header {
        gap: 16px;
    }
    body.irclass-home .irclass-brand {
        width: 150px;
    }
    body.irclass-home .irclass-nav {
        gap: 13px;
    }
    body.irclass-home .irclass-login {
        display: none;
    }
    body.irclass-home .irclass-hero-slide {
        padding-left: clamp(25px, 6vw, 70px);
        padding-right: clamp(25px, 6vw, 70px);
    }
}

@media (max-width: 760px) {
    body.irclass-home .irclass-header {
        height: 70px;
        padding: 0 17px;
        gap: 12px;
    }
    body.irclass-home .irclass-brand {
        width: 150px;
        margin-right: auto;
    }
    body.irclass-home .irclass-menu-toggle {
        display: block;
        order: 3;
    }
    body.irclass-home .irclass-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--irclass-line);
        padding: 18px 23px;
        flex-direction: column;
        align-items: flex-start;
        z-index: 20;
    }
    body.irclass-home .irclass-nav.open {
        display: flex;
    }
    body.irclass-home .irclass-header-actions {
        margin-left: auto;
    }
    body.irclass-home .irclass-header-actions .irclass-btn {
        padding: 9px 12px;
    }

    body.irclass-home .irclass-hero {
        height: 590px;
        min-height: 0;
    }
    body.irclass-home .irclass-hero-slide {
        padding: 45px 24px 80px;
    }
    body.irclass-home .irclass-hero-slide .irclass-hero-copy {
        max-width: 100%;
    }
    body.irclass-home .irclass-hero h1 {
        font-size: clamp(38px, 9vw, 52px);
    }
    body.irclass-home .irclass-intro {
        font-size: 16px;
    }
    body.irclass-home .irclass-hero-controls {
        right: 18px;
        bottom: 16px;
        gap: 7px;
    }
    body.irclass-home .irclass-hero-controls > button {
        width: 30px;
        height: 30px;
    }
    body.irclass-home .irclass-hero-count b {
        font-size: 17px;
    }
    body.irclass-home .irclass-hero-dots {
        gap: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.irclass-home .irclass-hero-slide {
        transition: none;
    }
}

/* No horizontal overflow on narrow phones (e.g. 390px). */
body.irclass-home,
body.irclass-home .irclass-header,
body.irclass-home .irclass-hero {
    max-width: 100%;
    overflow-x: hidden;
}
