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

/* ── Wrapper: samme bredde som sidens øvrige indhold ─────────────── */
.elf-hero-wrap {
    max-width: 1240px;
    margin: 0 auto 32px;
    padding: 32px 24px 0;
}

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

/* ── 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 — ingen farvetoning ────────────────────── */
.elf-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to right,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 0, 0, 0.65) 52%,
            rgba(0, 0, 0, 0.15) 72%,
            rgba(0, 0, 0, 0.45) 100%
        ),
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.08) 0%,
            rgba(0, 0, 0, 0.50) 100%
        );
    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 48px;
    padding-right: calc(300px + 64px);
}

.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 ───────────────────────────────────────────────── */
.elf-hero__cat {
    display: inline-block;
    font-family: 'Geist', -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #4a7fd4;
    border: 1px solid rgba(0, 74, 173, 0.45);
    border-radius: 3px;
    padding: 2px 8px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Nyheder — grøn */
.elf-hero__cat--nyheder,
.elf-hero__item-cat--nyheder {
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.45);
}
/* Kampagne — gul/amber */
.elf-hero__cat--kampagne,
.elf-hero__item-cat--kampagne {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.45);
}
/* Guide — blå (accent) */
.elf-hero__cat--guide,
.elf-hero__item-cat--guide {
    color: #4a7fd4;
    border-color: rgba(0, 74, 173, 0.45);
}

/* ── 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(22px, 2.8vw, 36px);
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

/* ── Excerpt ──────────────────────────────────────────────────────── */
.elf-hero__excerpt {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(13px, 1.2vw, 15px);
    font-style: italic;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.6;
    margin: 0 0 16px;
    max-width: 500px;
}

/* ── 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 ─────────────────────────────────────────────── */
.elf-hero__nav {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    background: rgba(5, 12, 5, 0.75);
    backdrop-filter: blur(14px) saturate(110%);
    -webkit-backdrop-filter: blur(14px) saturate(110%);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0 12px 12px 0;
    padding: 6px 0;
    cursor: default;
}

/* ── Nav-knapper ──────────────────────────────────────────────────── */
.elf-hero__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 18px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
    flex: 1;
}

.elf-hero__item:last-child { border-bottom: none; }
.elf-hero__item:hover      { background: rgba(255, 255, 255, 0.04); }
.elf-hero__item.is-active  { background: rgba(0, 74, 173, 0.06); }

/* ── Nummer ───────────────────────────────────────────────────────── */
.elf-hero__item-num {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.20);
    min-width: 24px;
    line-height: 1.2;
    transition: color 0.2s;
    padding-top: 1px;
    flex-shrink: 0;
}

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

/* ── 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.12em;
    color: rgba(74, 127, 212, 0.55);
    text-transform: uppercase;
    line-height: 1;
}

.elf-hero__item.is-active .elf-hero__item-cat { color: #4a7fd4; }

/* ── Item titel ───────────────────────────────────────────────────── */
.elf-hero__item-title {
    font-family: 'Geist', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.42);
    line-height: 1.35;
    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: rgba(255, 255, 255, 0.90); }

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

.elf-hero__progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, #4a7fd4, #003a8c);
}

.elf-hero__progress-bar.is-animating {
    width: 100%;
    transition: width 6s 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);
}
