/* ============================================================
   Hero Section
   ============================================================ */

.hero-section {
    position: relative;
    width: 100%;
    margin-top: -20px;
}

/* Swiper container */
.heroSwiper {
    height: 600px;
}

/* Background layers */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-img,
.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    will-change: transform; /* smooth parallax */
}

/* Dark overlay */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

/* ── Content ─────────────────────────────────────────────── */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 2;
}

.hero-content h1,
.hero-content p,
.hero-content a {
    text-align: center;
}

.hero-title {
    max-width: 20ch;
    min-height: 1.2em;
    margin-bottom: 0.35em;
    line-height: 1.08;
    font-weight: 500;
    letter-spacing: 0.015em;
    text-wrap: balance;
    color: #f9d648;
    background-image: none;
    background-size: 200% 100%;
    -webkit-background-clip: initial;
    background-clip: initial;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.hero-title::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 0.08em;
    vertical-align: -0.09em;
    background: rgba(255, 255, 255, 0.95);
    opacity: 0;
}

.hero-title.is-typing::after {
    opacity: 1;
    animation: caretBlink 0.85s steps(1, end) infinite;
}

.swiper-slide-active .hero-title.animate-text {
    animation: none;
}

@keyframes caretBlink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* Entrance animation */
.animate-text {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.swiper-slide-active .animate-text {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.delay-1 { transition-delay: 0.3s; }
.delay-2 { transition-delay: 0.6s; }

/* ── Navigation buttons ──────────────────────────────────── */
.hero-nav {
    /* override Swiper's ::after pseudo element */
    --swiper-navigation-size: 0;

    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    cursor: pointer;

    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;

    /* remove default browser button styles */
    padding: 0;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
}

.hero-nav:hover,
.hero-nav:focus-visible {
    background: rgba(0, 0, 0, 0.55);
    border-color: #fff;
    outline: none;
}

.hero-nav:active {
    transform: translateY(-50%) scale(0.93);
}

.hero-nav--prev { left: 20px; }
.hero-nav--next { right: 20px; }

/* Hide default Swiper arrow pseudo-elements */
.hero-nav::after { display: none !important; }

/* Hide disabled navigation buttons */
.hero-nav.swiper-button-disabled {
    display: none !important;
}

/* ── Pagination ──────────────────────────────────────────── */
.heroSwiper .swiper-pagination {
    z-index: 10;
}

.heroSwiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
    transition: background 0.25s ease, transform 0.25s ease;
}

.heroSwiper .swiper-pagination-bullet-active {
    background: #fff;
    transform: scale(1.3);
}

.heroSwiper .swiper-pagination-bullet-active {
    background: #fff;
    transform: scale(1.3);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .heroSwiper {
        height: 420px;
    }

    .hero-title {
        max-width: 18ch;
        font-size: clamp(1.7rem, 7vw, 2.35rem);
    }

    .hero-nav {
        width: 38px;
        height: 38px;
    }

    .hero-nav--prev { left: 10px; }
    .hero-nav--next { right: 10px; }
}

@media (max-width: 480px) {
    .heroSwiper {
        height: 320px;
    }

    .hero-title {
        max-width: 16ch;
        letter-spacing: 0.01em;
    }

    .hero-nav {
        display: none;
    }
}
