/* ============================================================
   EloForside — Hero Slider
   ============================================================ */

/* ── Wrapper: samme bredde som sidens øvrige indhold ───────────────
   Følger temaets --eo-max, så slideren også trækker sig sammen når
   der er skyscrapers i siderne (body.eo-har-skyscraper). */
.elf-hero-wrap {
    max-width: var(--eo-max, 1240px);
    margin: 0 auto 32px;
    padding: 32px 24px 0;
}

/* ── Container ────────────────────────────────────────────────────── */
.elf-hero {
    position: relative;
    width: 100%;
    height: clamp(380px, 42vw, 470px);
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: #0d1218;
}

/* ── Baggrundsbillede pr. slide ───────────────────────────────────── */
.elf-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.6s ease;
    opacity: 0;
}

.elf-hero__slide.is-active .elf-hero__bg {
    opacity: 1;
    transform: scale(1);
}

/* ── Overlay: neutral mørk, bund-op (som standalone) ──────────────── */
.elf-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(8, 12, 16, 0.86) 0%,
        rgba(8, 12, 16, 0.35) 42%,
        rgba(8, 12, 16, 0.05) 70%
    );
    z-index: 1;
}

/* ── Slides ───────────────────────────────────────────────────────── */
.elf-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
    z-index: 0;
}

.elf-hero__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* ── Layout: indhold ──────────────────────────────────────────────── */
.elf-hero__content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    padding: 40px 44px 38px;
    padding-right: calc(332px + 44px);
}

.elf-hero__left {
    max-width: 620px;
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
                opacity   0.55s ease 0.15s;
}

.elf-hero__slide.is-active .elf-hero__left {
    transform: translateY(0);
    opacity: 1;
}

/* ── Kategori-badge ───────────────────────────────────────────────── */
/* ── Kategori + dato på samme linje ───────────────────────────────── */
.elf-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* ── Kategori-badge (indhold) — fyldt pille som standalone ────────── */
.elf-hero__cat {
    display: inline-block;
    font-family: 'Geist', -apple-system, sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #fff;
    background: #004aad;
    border: none;
    border-radius: 4px;
    padding: 5px 11px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Fyldt badge pr. kategori (indhold) */
.elf-hero__cat--nyheder  { background: #16a34a; }
.elf-hero__cat--kampagne { background: #f59e0b; }
.elf-hero__cat--guide    { background: #004aad; }

/* ── Meta ─────────────────────────────────────────────────────────── */
.elf-hero__meta {
    font-family: 'Geist', -apple-system, sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0;
}

/* ── Titel ────────────────────────────────────────────────────────── */
.elf-hero__title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(28px, 3.2vw, 46px);
    font-weight: 400;
    color: #fff;
    line-height: 1.04;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

/* ── Excerpt ──────────────────────────────────────────────────────── */
.elf-hero__excerpt {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(14px, 1.3vw, 17px);
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0 0 16px;
    max-width: 560px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Forfatter ────────────────────────────────────────────────────── */
.elf-hero__author {
    font-family: 'Geist', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
}

/* ── Højre navigation — solidt sidepanel (som standalone) ─────────── */
.elf-hero__nav {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 332px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    background: #0e141a;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    padding: 0;
    cursor: default;
}

/* ── Nav-knapper ──────────────────────────────────────────────────── */
.elf-hero__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    flex: 1;
}

.elf-hero__item:first-child { border-top: none; }
.elf-hero__item:hover       { background: rgba(255, 255, 255, 0.05); }
.elf-hero__item.is-active   {
    background: rgba(255, 255, 255, 0.07);
    border-left-color: #16a34a;
}

/* ── Nummer ───────────────────────────────────────────────────────── */
.elf-hero__item-num {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.4);
    min-width: 30px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s;
    flex-shrink: 0;
}

.elf-hero__item.is-active .elf-hero__item-num { color: #fff; }

/* ── Item body ────────────────────────────────────────────────────── */
.elf-hero__item-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

/* ── Item kategori ────────────────────────────────────────────────── */
.elf-hero__item-cat {
    font-family: 'Geist', -apple-system, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.13em;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    line-height: 1;
    transition: color 0.2s;
}

.elf-hero__item.is-active .elf-hero__item-cat { color: #16a34a; }

/* ── Item titel ───────────────────────────────────────────────────── */
.elf-hero__item-title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.elf-hero__item.is-active .elf-hero__item-title,
.elf-hero__item:hover .elf-hero__item-title { color: #fff; }

/* ── Progress bar ─────────────────────────────────────────────────── */
.elf-hero__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 332px;
    height: 3px;
    background: rgba(255, 255, 255, 0.14);
    z-index: 20;
}

.elf-hero__progress-bar {
    height: 100%;
    width: 0;
    background: #16a34a;
}

.elf-hero__progress-bar.is-animating {
    width: 100%;
    transition: width 6.5s linear;
}

/* ── Responsiv ────────────────────────────────────────────────────── */
@media (max-width: 1288px) {
    .elf-hero-wrap { padding: 0 16px; }
}

/* ── Tablet (900px) ───────────────────────────────────────────────── */
@media (max-width: 900px) {
    .elf-hero        { height: clamp(280px, 60vw, 420px); }
    .elf-hero__nav   { width: 200px; }
    .elf-hero__content {
        padding: 24px 28px;
        padding-right: calc(200px + 28px);
    }
    .elf-hero__progress { right: 200px; }
    .elf-hero__title { font-size: clamp(18px, 3vw, 28px); }
}

/* ── Mobil (640px) — helt nyt layout ─────────────────────────────── */
@media (max-width: 640px) {

    /* Wrapper */
    .elf-hero-wrap { padding: 0; margin-bottom: 24px; }

    /* Hero-container: fast højde, ingen flex-tricks */
    .elf-hero {
        height: 72vw;
        min-height: 280px;
        max-height: 400px;
        border-radius: 0;
        cursor: default;
        overflow: hidden; /* eksplicit gentaget — sikrer klipning */
    }

    /* Side-nav forsvinder helt */
    .elf-hero__nav { display: none; }

    /* Slides: absolut positionering – sikrer at de ikke stacker */
    .elf-hero__slide {
        position: absolute;
        inset: 0;
        overflow: hidden;
    }

    /* Overlay: lidt mere dækning nederst på mobil */
    .elf-hero__overlay {
        background:
            linear-gradient(
                to bottom,
                rgba(0,0,0,0.05) 0%,
                rgba(0,0,0,0.30) 40%,
                rgba(0,0,0,0.82) 100%
            );
    }

    /* Indhold: bund-justeret, ingen højre padding */
    .elf-hero__content {
        position: absolute;
        inset: 0;
        padding: 0 20px 48px;
        align-items: flex-end;
        overflow: hidden;
    }

    /* Venstre panel: fylder bredden men må ikke overskride containeren */
    .elf-hero__left {
        max-width: 100%;
        width: 100%;
        overflow: hidden;
    }

    /* Kategori + dato */
    .elf-hero__eyebrow { margin-bottom: 8px; gap: 8px; }
    .elf-hero__cat { font-size: 9px; }
    .elf-hero__meta { font-size: 11px; }

    /* Titel: stor og læsbar, max 3 linjer */
    .elf-hero__title {
        font-size: clamp(18px, 5vw, 26px);
        margin-bottom: 8px;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Excerpt: skjul på mobil */
    .elf-hero__excerpt { display: none; }

    /* Forfatter */
    .elf-hero__author { font-size: 11px; margin-bottom: 10px; }

    /* Mobil "Læs artikel"-knap — vises kun her */
    .elf-hero__mobile-cta {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(255,255,255,0.12);
        border: 1px solid rgba(255,255,255,0.22);
        border-radius: 6px;
        color: #fff;
        font-family: 'Geist', -apple-system, sans-serif;
        font-size: 13px;
        font-weight: 600;
        padding: 8px 14px;
        text-decoration: none;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        margin-top: 4px;
        transition: background .2s;
    }
    .elf-hero__mobile-cta:active { background: rgba(255,255,255,0.20); }

    /* Progress: fuld bredde */
    .elf-hero__progress {
        right: 0;
        height: 2px;
    }

    /* Dot-indikatorer */
    .elf-hero__dots {
        display: flex !important;
        bottom: 14px;
    }
}

/* ── Dot-container: skjult på desktop, synlig på mobil */
.elf-hero__dots {
    display: none;
    position: absolute;
    bottom: 16px;
    left: 20px;
    gap: 6px;
    z-index: 20;
}

/* Mobil CTA-knap: skjult som standard, vises kun på mobil */
.elf-hero__mobile-cta {
    display: none;
}

.elf-hero__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.30);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background .25s, transform .25s;
    flex-shrink: 0;
}

.elf-hero__dot.is-active {
    background: #fff;
    transform: scale(1.35);
}
