/**
 * Fair Share Sport Club Hero Slider - Public Styles
 * Frontend styles for the hero slider plugin
 */

/* Hero Slider Base Styles */
.hero-slider-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    max-height: 800px;
    overflow: hidden;
}

.hero-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(46, 79, 122, 0.8), rgba(0, 184, 212, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: #ffffff;
    padding: 0 2rem;
    animation: slideInUp 1s ease-out;
}

.hero-slide.active .hero-content {
    animation: slideInUp 1s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 160px;
    justify-content: center;
    border: 2px solid transparent;
}

.hero-btn-primary {
    background: linear-gradient(135deg, #00b8d4, #0091a7);
    color: #ffffff;
}

.hero-btn-primary:hover {
    background: linear-gradient(135deg, #0091a7, #2e4f7a);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 184, 212, 0.4);
    color: #ffffff;
}

.hero-btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.hero-btn-secondary:hover {
    background: #ffffff;
    color: #2e4f7a;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

/* Slider Navigation */
.hero-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
}

.slider-nav-btn {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: none !important;
    pointer-events: auto;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.slider-nav-btn:hover,
.slider-nav-btn:focus {
    background: none !important;
    color: #ffffff !important;
    transform: none !important;
    outline: none !important;
    opacity: 1 !important;
    box-shadow: none !important;
    border: none !important;
}

.slider-nav-btn:active {
    background: none !important;
    transform: none !important;
    opacity: 1 !important;
    box-shadow: none !important;
    border: none !important;
}

.slider-nav-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
    box-shadow: none;
}

/* Slider Indicators */
.hero-slider-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
}

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

.slider-indicator.active,
.slider-indicator:hover,
.slider-indicator:focus {
    background: #ffffff;
    border-color: #ffffff;
    transform: scale(1.2);
    outline: none;
}

/* Empty State */
.fssc-hero-slider-empty {
    padding: 4rem 2rem;
    text-align: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Container Utility */
.hero-content .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-slider-section {
        height: 80vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        gap: 1rem;
    }
    
    .hero-btn {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
        min-width: 140px;
    }
    
    .slider-nav-btn {
        width: auto;
        height: auto;
        padding: 0;
    }
    
    .hero-slider-nav {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .hero-slider-section {
        height: 70vh;
        min-height: 450px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .slider-nav-btn {
        width: auto;
        height: auto;
        padding: 0;
    }

    .slider-nav-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .hero-slider-section {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .hero-slider-indicators {
        bottom: 1rem;
        gap: 0.75rem;
    }
    
    .slider-indicator {
        width: 10px;
        height: 10px;
    }
    
    .hero-slider-nav {
        display: none;
    }
}

/* Accessibility & High Contrast */
@media (prefers-contrast: high) {
    .hero-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .slider-nav-btn {
        background: none;
        color: #ffffff;
    }
    
    .slider-indicator {
        border-color: #ffffff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .hero-content,
    .hero-btn,
    .slider-nav-btn,
    .slider-indicator {
        transition: none;
    }
    
    @keyframes slideInUp {
        from, to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Focus Styles for Accessibility */
.slider-nav-btn:focus,
.slider-indicator:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.hero-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

/* RTL Support */
html[dir="rtl"] .hero-slider-nav {
    flex-direction: row-reverse;
}

html[dir="rtl"] .hero-buttons {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    html[dir="rtl"] .hero-buttons {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .hero-slider-section {
        height: auto;
        min-height: auto;
        max-height: none;
    }
    
    .hero-slide {
        position: static;
        opacity: 1;
        page-break-inside: avoid;
    }
    
    .hero-slider-nav,
    .hero-slider-indicators {
        display: none;
    }
    
    .hero-overlay {
        background: rgba(0, 0, 0, 0.3);
    }
}

/* Loading State */
.hero-slider.loading .hero-slide {
    opacity: 0;
}

.hero-slider.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Custom Height Support */
.hero-slider-section[style*="height"] {
    min-height: 400px;
}

.hero-slider-section[style*="height"]:not([style*="100vh"]) {
    max-height: none;
}

/* Full Width Block Alignment */
.wp-block-fairsharesportclub-hero-slider.alignfull,
.wp-block-fairsharesportclub-hero-slider.alignfull .hero-slider-section {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Ensure the slider container takes full width */
.wp-block-fairsharesportclub-hero-slider.alignfull .hero-slider-container,
.wp-block-fairsharesportclub-hero-slider.alignfull .hero-slider {
    width: 100%;
}

/* Wide alignment */
.wp-block-fairsharesportclub-hero-slider.alignwide {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Default block wrapper */
.wp-block-fairsharesportclub-hero-slider {
    margin: 0;
    padding: 0;
}

/* Slides without content (no overlay) */
.hero-slide-no-content {
    /* Remove any default overlay styles for content-less slides */
}

.hero-slide-no-content .hero-overlay {
    display: none !important;
}