/* ==========================================================
   _06-HERO.CSS  —  Split-layout: 2/3 bild + 1/3 text
   ========================================================== */

/* ── Hero-wrapper: flex-kolumn, full höjd ── */
.hero-section,
.hero-slideshow-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Bildyta: 2/3 ── */
.hero-image-area {
    flex: 0 0 67%;
    position: relative;
    overflow: hidden;
    background: #111;
}

/* Bildspel */
.hero-slideshow-container {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-slide.active.zoom-active { animation: zoom-pan 25s infinite alternate; }
@keyframes zoom-pan {
    0%   { transform: scale(1) translateX(0); }
    100% { transform: scale(1.1) translateX(-5%); }
}

/* Roterande logo – centrerad överst i bildytan */
.hero-content {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    pointer-events: none;
}
.hero-content > * { pointer-events: auto; }

/* ── Textyta: 1/3, vit bakgrund ── */
.hero-text-area {
    flex: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-10);
    padding: clamp(16px, 2.5vw, 40px) var(--padding-x);
    position: relative;
    overflow: hidden;
}

/* Rubrik-animation: rullgardin uppåt */
@keyframes heroTextReveal {
    from { clip-path: inset(0 0 100% 0); opacity: 0; }
    to   { clip-path: inset(0 0 0%   0); opacity: 1; }
}

.hero-text-heading {
    flex: 1;
    margin: 0;
    min-width: 0;
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    animation: heroTextReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.15s;
}

.hero-text-content {
    display: block;
    font-family: var(--font-display) !important;
    font-size: clamp(1.6rem, 3.2vw, 4.8rem);
    font-weight: 700 !important;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--color-text) !important;
    background: transparent !important;
    text-shadow: none !important;
    hyphens: none;
    word-break: normal;
}

/* ── Nedåtpil i textyta ── */
.hero-text-area .hero-down-arrow {
    position: static;
    flex-shrink: 0;
    align-self: flex-end;
    padding-bottom: 4px;
    color: var(--color-text);
    text-decoration: none;
    opacity: 0.7;
    transition: transform var(--t-base), opacity var(--t-base);
}
.hero-text-area .hero-down-arrow:hover {
    transform: translateY(5px);
    opacity: 1;
}
.hero-text-area .hero-down-arrow svg {
    width: clamp(22px, 2.5vw, 36px);
    height: auto;
    display: block;
}

/* Legacy: behåll .hero-style-text för bakåtkompatibilitet men göm det */
.hero-style-text { display: none !important; }

/* Scroll-pil (gammal) */
.hero-section .scroll-down-arrow,
.hero-slideshow-wrapper .scroll-down-arrow {
    display: none !important;
}

/* ── Responsivt ── */
@media (max-width: 900px) {
    .hero-text-content {
        font-size: clamp(1.4rem, 4vw, 2.8rem);
    }
}

@media (max-width: 767px) {
    /* Hero ska INTE vara 100vh på mobil — naturlig höjd istället */
    .hero-section,
    .hero-slideshow-wrapper {
        height: auto !important;
        min-height: 0 !important;
    }

    .hero-image-area {
        flex: 0 0 auto;
        height: 56vw;             /* ~16:9 av skärmbredden */
        min-height: 220px;
        max-height: 60vh;
    }

    /* VIKTIGT: flex: none så text-ytan inte tar resterande utrymme */
    .hero-text-area {
        flex: 0 0 auto !important;
        min-height: 0 !important;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: var(--sp-4);
        padding: var(--sp-8) var(--padding-x) var(--sp-10);
    }

    .hero-text-heading {
        margin: 0;
        clip-path: none;            /* mobil: ingen rullgardin */
        opacity: 1;
        animation: none;
    }

    .hero-text-content {
        font-size: clamp(1.4rem, 5vw, 2rem);
        line-height: 1.15;
    }

    .hero-text-area .hero-down-arrow {
        align-self: flex-start;
        margin-top: var(--sp-2);
        padding-bottom: 0;
    }
    .hero-text-area .hero-down-arrow svg {
        width: 28px;
    }
}