/**
 * Hero Carousel — Pure CSS + Animations
 */

/* ── Section ── */
.sh-hero {
    position: relative;
    height: 70dvh;
    min-height: 450px;
    overflow: hidden;
    background: #000;
}

@media (min-width: 768px) { .sh-hero { height: 800px; } }

/* ── Slider Container ── */
.sh-hero__slider {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    --sh-ken-burns-duration: 6s;
    --sh-ken-burns-scale-start: 1;
    --sh-ken-burns-scale-end: 1.12;
}

.sh-hero__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ── Slide ── */
.carousel-slide {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
    will-change: opacity;
}

.carousel-slide.active { display: block; z-index: 20; opacity: 1; }
.carousel-slide.incoming { display: block; z-index: 30; opacity: 0; transition: opacity 1.2s ease-in-out; }

/* ── Background Image ── */
.sh-hero__bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    z-index: 0;
    transform: scale(var(--sh-ken-burns-scale-start));
    transform-origin: center;
    will-change: transform;
}

.sh-hero__slider.is-hero-ready .carousel-slide.active .sh-hero__bg-img,
.sh-hero__slider.is-hero-ready .carousel-slide.incoming .sh-hero__bg-img {
    animation: shKenBurnsZoom var(--sh-ken-burns-duration) linear forwards;
}

/* Also support old class name for JS compat */
.carousel-slide .slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    transform: scale(var(--sh-ken-burns-scale-start));
    transform-origin: center;
    will-change: transform;
}

#sh-hero-slider.is-hero-ready .carousel-slide.active .slide-bg,
#sh-hero-slider.is-hero-ready .carousel-slide.incoming .slide-bg {
    animation: shKenBurnsZoom var(--sh-ken-burns-duration) linear forwards;
}

@keyframes shKenBurnsZoom {
    from { transform: scale(var(--sh-ken-burns-scale-start)); }
    to { transform: scale(var(--sh-ken-burns-scale-end)); }
}

/* ── Overlay ── */
.sh-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8), rgba(0,0,0,0.5), rgba(0,0,0,0.3));
    z-index: 1;
}

/* ── Content ── */
.sh-hero__content-wrap {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    padding-top: 140px;
}

@media (min-width: 768px) { .sh-hero__content-wrap { padding-top: 0; } }

.sh-hero__content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

@media (min-width: 768px) { .sh-hero__content-container { padding: 0 2rem; } }

.sh-hero__content-inner {
    max-width: 72rem;
}

/* ── Badge ── */
.sh-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #fff;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
    .sh-hero__badge { gap: 0.5rem; padding: 0.375rem 1rem; margin-bottom: 1.5rem; }
}

.sh-hero__badge-dot {
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 50%;
    background: var(--pi-secondary, #ffb703);
    animation: pulse 2s infinite;
}

@media (min-width: 768px) { .sh-hero__badge-dot { width: 0.5rem; height: 0.5rem; } }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.sh-hero__badge-text {
    color: var(--pi-primary, #007d3d);
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (min-width: 768px) { .sh-hero__badge-text { font-size: 0.875rem; } }

/* ── Title ── */
.sh-hero__title {
    font-size: 1.875rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin: 0 0 0.75rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 0 40px rgba(0,0,0,0.3);
}

@media (min-width: 640px) { .sh-hero__title { font-size: 2.25rem; } }
@media (min-width: 768px) { .sh-hero__title { font-size: 3.75rem; margin-bottom: 1.5rem; } }
@media (min-width: 1024px) { .sh-hero__title { font-size: 4.5rem; } }

/* ── Description ── */
.sh-hero__desc {
    font-size: 0.75rem;
    color: var(--pi-text-2, #e5e7eb);
    margin: 0 0 1rem;
    max-width: 48rem;
    font-weight: 300;
    line-height: 1.625;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 640px) { .sh-hero__desc { font-size: 0.875rem; } }
@media (min-width: 768px) { .sh-hero__desc { font-size: 1.25rem; margin-bottom: 2rem; -webkit-line-clamp: unset; max-width: 56rem; } }

/* ── Buttons ── */
.sh-hero__buttons {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

@media (min-width: 768px) { .sh-hero__buttons { gap: 1rem; } }

.sh-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-weight: 700;
    padding: 0.625rem 1rem;
    border-radius: 9999px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.625rem;
    transition: all 0.2s;
    text-align: center;
}

@media (min-width: 768px) { .sh-hero__btn { padding: 1rem 2rem; font-size: 0.875rem; gap: 0.5rem; } }

.sh-hero__btn--primary {
    background: var(--pi-primary, #007d3d);
    color: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.sh-hero__btn--primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 12px 28px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.sh-hero__btn--outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sh-hero__btn--outline:hover {
    background: #fff;
    color: var(--pi-primary, #007d3d);
    transform: translateY(-2px);
}

.sh-hero__btn-icon {
    width: 0.75rem;
    height: 0.75rem;
    transition: transform 0.3s;
}

@media (min-width: 768px) { .sh-hero__btn-icon { width: 1rem; height: 1rem; } }

.sh-hero__btn--primary:hover .sh-hero__btn-icon { transform: translateX(0.25rem); }

/* ── Navigation Arrows ── */
.sh-hero__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 20;
    opacity: 0.8;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

@media (min-width: 768px) { .sh-hero__nav { width: 3.5rem; height: 3.5rem; } }

.sh-hero__nav:hover {
    background: var(--pi-primary, #007d3d);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.sh-hero__nav--prev { left: 1rem; }
.sh-hero__nav--next { right: 1rem; }

@media (min-width: 768px) {
    .sh-hero__nav--prev { left: 2rem; }
    .sh-hero__nav--next { right: 2rem; }
}

.sh-hero__nav-icon { width: 1.25rem; height: 1.25rem; }
@media (min-width: 768px) { .sh-hero__nav-icon { width: 1.5rem; height: 1.5rem; } }

/* ── Pagination Dots ── */
.sh-hero__dots {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    z-index: 20;
    display: flex;
    gap: 0.5rem;
}

.sh-hero__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.sh-hero__dot:hover { background: #fff; }

.carousel-dot.active, .sh-hero__dot.active {
    width: 2rem;
    background: var(--pi-primary, #007d3d);
    opacity: 1;
}

/* ── Content Animations (from original) ── */
.hero-content { opacity: 1; transform: translateY(0); }

#sh-hero-slider.is-hero-ready .carousel-slide.incoming .hero-content,
.sh-hero__slider.is-hero-ready .carousel-slide.incoming .hero-content {
    opacity: 0;
    transform: translateY(18px);
}

#sh-hero-slider.is-hero-ready .carousel-slide.active .hero-content,
.sh-hero__slider.is-hero-ready .carousel-slide.active .hero-content {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: 0.15s;
}

#sh-hero-slider.is-hero-ready .carousel-slide.active .hero-content:nth-of-type(1) { animation-delay: 0.20s; }
#sh-hero-slider.is-hero-ready .carousel-slide.active .hero-content:nth-of-type(2) { animation-delay: 0.35s; }
#sh-hero-slider.is-hero-ready .carousel-slide.active .hero-content:nth-of-type(3) { animation-delay: 0.50s; }
#sh-hero-slider.is-hero-ready .carousel-slide.active .hero-content:nth-of-type(4) { animation-delay: 0.65s; }

@keyframes fadeInUp {
    from { opacity: 0.01; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    #sh-hero-slider.is-hero-ready .carousel-slide.active .hero-content,
    #sh-hero-slider.is-hero-ready .carousel-slide.incoming .hero-content {
        animation: none !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

@media (max-width: 480px) {
    #sh-hero-slider.is-hero-ready .carousel-slide.active .hero-content {
        animation: fadeInUp 0.45s ease-out both;
    }
}
