/* ==========================================================================
   Hijafera — Home hero slider (editorial full-bleed)
   Full-height photo, frosted centered panel, condensed uppercase headline.
   Plain CSS on purpose: the Tailwind bundle in public/build is precompiled,
   so new utility classes would not exist on the server without a rebuild.
   ========================================================================== */

.hjf-hero {
    --hjf-ink: #111111;
    --hjf-purple: #54239b;
    --hjf-panel: rgba(255, 255, 255, 0.78);
    --hjf-slide-ms: 7000ms;

    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #1a1a1a;
    height: clamp(560px, calc(100svh - 110px), 760px);
    touch-action: pan-y;
}

/* ---------- Photos ---------- */
.hjf-hero__media {
    position: absolute;
    inset: 0;
}
.hjf-hero__pic {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
}
.hjf-hero__pic.is-active {
    opacity: 1;
    z-index: 1;
}
.hjf-hero__pic picture {
    position: absolute;
    inset: 0;
    display: block;
}
.hjf-hero__blur {
    display: none;
}
.hjf-hero__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    transform: scale(1.08);
}
.hjf-hero__pic.is-active .hjf-hero__img {
    animation: hjfHeroZoom 9s ease-out forwards;
}
.hjf-hero__shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.22) 100%);
    pointer-events: none;
}

/* ---------- Frosted panel ---------- */
.hjf-hero__panel {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px 20px 14px;
    background: var(--hjf-panel);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--hjf-ink);
    text-align: center;
}
.hjf-hero__stack {
    display: grid;
}
.hjf-hero__slide {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
    pointer-events: none;
}
.hjf-hero__slide.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition-delay: 0.15s;
}
.hjf-hero__badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--hjf-ink);
    color: #fff;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.hjf-hero__title {
    margin: 12px 0 8px;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: clamp(1.75rem, 7.5vw, 3.5rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-wrap: balance;
}
.hjf-hero__subtitle {
    max-width: 36rem;
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 12.5px;
    line-height: 1.7;
    letter-spacing: 0.06em;
    color: #2b2b2b;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hjf-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 18px;
    padding: 0 30px;
    border: 1px solid var(--hjf-ink);
    background: var(--hjf-ink);
    color: #fff;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.hjf-hero__btn:hover {
    background: var(--hjf-purple);
    border-color: var(--hjf-purple);
    color: #fff;
}

/* ---------- Indicators (inside the panel) ---------- */
.hjf-hero__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}
.hjf-hero__dot {
    width: 34px;
    padding: 14px 0; /* ~30px tall hit area; panel padding adds the rest */
    border: 0;
    background: none;
    cursor: pointer;
}
.hjf-hero__dot-track {
    position: relative;
    display: block;
    height: 2px;
    overflow: hidden;
    background: rgba(17, 17, 17, 0.2);
}
.hjf-hero__dot-fill {
    position: absolute;
    inset: 0;
    background: var(--hjf-ink);
    transform: scaleX(0);
    transform-origin: left center;
}
.hjf-hero__dot.is-active .hjf-hero__dot-fill {
    animation: hjfHeroProgress var(--hjf-slide-ms) linear forwards;
}
.hjf-hero.is-paused .hjf-hero__dot.is-active .hjf-hero__dot-fill,
.hjf-hero.is-paused .hjf-hero__pic.is-active .hjf-hero__img {
    animation-play-state: paused;
}

/* ---------- Side arrows (desktop) ---------- */
.hjf-hero .hjf-hero__arrow {
    position: absolute;
    z-index: 4;
    top: 42%;
    display: none;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    opacity: 0.8;
    transform: translateY(-50%);
    transition: opacity 0.2s;
}
.hjf-hero .hjf-hero__arrow:hover {
    opacity: 1;
}
.hjf-hero .hjf-hero__arrow--prev { left: 20px; }
.hjf-hero .hjf-hero__arrow--next { right: 20px; }

.hjf-hero__btn:focus-visible,
.hjf-hero__dot:focus-visible,
.hjf-hero .hjf-hero__arrow:focus-visible {
    outline: 2px solid var(--hjf-purple);
    outline-offset: 3px;
}

@keyframes hjfHeroProgress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}
@keyframes hjfHeroZoom {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

/* ---------- Tablet / desktop ---------- */
@media (min-width: 768px) {
    .hjf-hero {
        height: clamp(560px, calc(100svh - 150px), 860px);
    }
    .hjf-hero__panel {
        left: 50%;
        right: auto;
        bottom: 48px;
        width: min(720px, calc(100% - 160px));
        padding: 30px 48px 16px;
        transform: translateX(-50%);
    }
    .hjf-hero__title {
        font-size: clamp(2.25rem, 4.2vw, 3.6rem);
    }
    .hjf-hero__subtitle {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    .hjf-hero__btn {
        background: transparent;
        color: var(--hjf-ink);
    }
    .hjf-hero__btn:hover {
        background: var(--hjf-ink);
        border-color: var(--hjf-ink);
        color: #fff;
    }
    .hjf-hero .hjf-hero__arrow {
        display: inline-flex;
    }

    /* Portrait desktop image: whole photo over a blurred copy of itself */
    .hjf-hero__pic.is-portrait .hjf-hero__blur {
        display: block;
        position: absolute;
        inset: -40px;
        width: calc(100% + 80px);
        height: calc(100% + 80px);
        object-fit: cover;
        filter: blur(28px) brightness(0.72) saturate(1.1);
    }
    .hjf-hero__pic.is-portrait .hjf-hero__img,
    .hjf-hero__pic.is-portrait.is-active .hjf-hero__img {
        object-fit: contain;
        object-position: center top;
        animation: none;
        transform: none;
    }
}

/* ---------- Reduced motion: no autoplay, no zoom ---------- */
@media (prefers-reduced-motion: reduce) {
    .hjf-hero__pic,
    .hjf-hero__slide {
        transition: opacity 0.2s linear;
    }
    .hjf-hero__slide {
        transform: none !important;
    }
    .hjf-hero__pic.is-active .hjf-hero__img {
        animation: none;
        transform: none;
    }
    .hjf-hero__dot.is-active .hjf-hero__dot-fill {
        animation: none;
        transform: scaleX(1);
    }
}
