/**
 * Hero Section Slider Styles
 *
 * @package Were_Ready
 */

/* Hero Section Base */
.hero-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 4rem 2rem;
    color: #fff;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Hero Slider Container */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Individual Slides */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

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

/* Slide transition effect */
.hero-slider[data-transition="slide"] .hero-slide {
    transform: translateX(100%);
    opacity: 1;
    transition: transform 0.8s ease-in-out;
}

.hero-slider[data-transition="slide"] .hero-slide.active {
    transform: translateX(0);
}

.hero-slider[data-transition="slide"] .hero-slide.prev {
    transform: translateX(-100%);
}

/* Dark Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 5;
}

/* Video Background */
.hero-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero-video-background video,
.hero-video-background iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
}

/* Ensure video covers container even on resize */
@media (min-aspect-ratio: 16/9) {
    .hero-video-background video {
        width: 100%;
        height: auto;
    }
}

@media (max-aspect-ratio: 16/9) {
    .hero-video-background video {
        width: auto;
        height: 100%;
    }
}

/* Navigation Arrows */
.hero-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.hero-slider-nav:hover,
.hero-slider-nav:focus {
    background: rgba(255, 255, 255, 0.5);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.hero-slider-prev {
    left: 20px;
}

.hero-slider-next {
    right: 20px;
}

/* Slider Indicators */
.hero-slider-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    gap: 10px;
}

.hero-slider-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-slider-indicator:hover,
.hero-slider-indicator:focus {
    background: rgba(255, 255, 255, 0.8);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.hero-slider-indicator.active {
    background: #fff;
    width: 30px;
    border-radius: 6px;
}

/* Screen reader text for accessibility */
.hero-slider-nav .screen-reader-text,
.hero-slider-indicator .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-slider-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .hero-slider-prev {
        left: 10px;
    }

    .hero-slider-next {
        right: 10px;
    }

    .hero-slider-indicators {
        bottom: 20px;
    }

    .hero-slider-indicator {
        width: 10px;
        height: 10px;
    }

    .hero-slider-indicator.active {
        width: 24px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 300px;
    }

    .hero-content {
        padding: 2rem 1rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }
}

/* Loading state */
.hero-slider.loading .hero-slide {
    background-color: #f0f0f0;
}

/* Pause animation on reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
    }

    .hero-slider-nav,
    .hero-slider-indicator {
        transition: none;
    }
}

/* Color background (no image/video) */
.hero-section.hero-color-bg {
    background-color: #0066cc;
}

/* Ensure text is always readable */
.hero-section.has-light-bg .hero-content {
    color: #333;
}

.hero-section.has-light-bg .hero-content h1,
.hero-section.has-light-bg .hero-content p {
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}
