/* ==========================================================================
   Hero slider
   ========================================================================== */

.hero-slider {
    width: 90%;
    max-width: var(--wrap);
    height: min(70vh, 620px);
    margin: 28px auto 0;
    overflow: hidden;
    position: relative;
    background-color: var(--cream-deep);
}

.slider-wrapper {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

/* Caption sits above the images and carries the primary call to action */
.hero-caption {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    background: linear-gradient(
        to bottom,
        rgba(28, 26, 22, 0.32),
        rgba(28, 26, 22, 0.16) 40%,
        rgba(28, 26, 22, 0.55)
    );
    color: #fff;
}

.hero-caption h1 {
    font-family: var(--body);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 8px;
    font-size: clamp(0.95rem, 3vw, 1.6rem);
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
    margin-bottom: 14px;
}

.hero-caption p {
    font-family: var(--body);
    font-style: italic;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    max-width: 620px;
    margin-bottom: 30px;
}

.hero-caption .btn {
    border-color: #fff;
    color: #fff;
    background: rgba(28, 26, 22, 0.28);
    backdrop-filter: blur(2px);
}

.hero-caption .btn:hover,
.hero-caption .btn:focus {
    background: #fff;
    color: var(--ink);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

/* Slider controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.slider-btn.prev { left: 18px; }
.slider-btn.next { right: 18px; }

.slider-dots {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.slider-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-dots button[aria-current="true"] {
    background: #fff;
}

@media (max-width: 780px) {
    .hero-slider {
        width: 100%;
        height: 62vh;
        max-height: 520px;
        margin-top: 16px;
    }

    .hero-caption {
        padding: 24px 18px;
        /* Darken a touch more: phone screens are often used outdoors */
        background: linear-gradient(
            to bottom,
            rgba(28, 26, 22, 0.45),
            rgba(28, 26, 22, 0.3) 40%,
            rgba(28, 26, 22, 0.62)
        );
    }

    .hero-caption h1 {
        letter-spacing: 3px;
        margin-bottom: 10px;
    }

    .hero-caption p {
        margin-bottom: 22px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        gap: 10px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .slider-dots {
        bottom: 12px;
    }

    .slider-btn {
        font-size: 1.1rem;
        padding: 9px 12px;
    }

    .slider-btn.prev { left: 8px; }
    .slider-btn.next { right: 8px; }
}
