/**
 * css/template-hero-slideshow.css - Reusable Hero Slideshow Component
 * Uses main.css centralized styles and variables - NO hardcoded colors/fonts
 */

/* =============================================
 * HERO SLIDESHOW MAIN STYLES
 * ============================================= */

.hero-slideshow {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white-color);
    padding: 120px 0 80px;
    margin-bottom: 30px;
    overflow: hidden;
    min-height: 60vh;
    transition: background-image var(--transition-smooth);
}

.hero-slideshow h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    text-shadow: var(--text-shadow-strong);
    animation: fadeInUp 1s ease-out;
}

.hero-slideshow h1::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-color);
    animation: slideIn 1.5s ease-out;
}

.hero-slideshow p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: var(--text-shadow-medium);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-glow {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: radial-gradient(ellipse at center, rgba(var(--accent-color-rgb), 0.3) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-badges .badge {
    font-size: 0.85rem;
    padding: 8px 20px;
    margin: 0 5px;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-fast);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-badges .badge:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-large);
    background: rgba(255, 255, 255, 0.3);
}

/* =============================================
 * HERO SLIDESHOW INDICATORS
 * ============================================= */

.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.hero-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.hero-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.hero-indicator.active {
    background: var(--accent-color);
    border-color: rgba(var(--accent-color-rgb), 0.8);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(var(--accent-color-rgb), 0.5);
}

/* =============================================
 * ANIMATIONS
 * ============================================= */

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

@keyframes slideIn {
    from {
        width: 0;
    }
    to {
        width: 80px;
    }
}

/* =============================================
 * PAGE-SPECIFIC HERO VARIATIONS
 * ============================================= */

/* Gallery Page Hero */
.hero-slideshow[data-hero-type="gallery"] {
    min-height: 65vh;
}

.hero-slideshow[data-hero-type="gallery"] h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

/* About Page Hero */
.hero-slideshow[data-hero-type="about"] {
    min-height: 55vh;
    padding: 100px 0 60px;
}

.hero-slideshow[data-hero-type="about"] .hero-badges .badge {
    background: rgba(var(--primary-color-rgb), 0.2);
    border-color: rgba(var(--primary-color-rgb), 0.3);
}

/* Services Page Hero */
.hero-slideshow[data-hero-type="services"] {
    min-height: 50vh;
}

.hero-slideshow[data-hero-type="services"] .hero-glow {
    background: radial-gradient(ellipse at center, rgba(var(--primary-color-rgb), 0.3) 0%, rgba(0, 0, 0, 0) 70%);
}

/* Contact Page Hero */
.hero-slideshow[data-hero-type="contact"] {
    min-height: 45vh;
    padding: 80px 0 60px;
}

.hero-slideshow[data-hero-type="contact"] h1 {
    color: var(--white-color);
    text-shadow: var(--text-shadow-strong);
}

/* Packages Page Hero */
.hero-slideshow[data-hero-type="packages"] {
    min-height: 60vh;
}

.hero-slideshow[data-hero-type="packages"] .hero-badges {
    margin-top: 30px;
}

/* Booking Page Hero */
.hero-slideshow[data-hero-type="booking"] {
    min-height: 55vh;
    padding: 100px 0 60px;
}

.hero-slideshow[data-hero-type="booking"] .hero-glow {
    background: radial-gradient(ellipse at center, rgba(var(--primary-color-rgb), 0.4) 0%, rgba(var(--accent-color-rgb), 0.2) 50%, rgba(0, 0, 0, 0) 80%);
}

/* =============================================
 * RESPONSIVE DESIGN
 * ============================================= */

@media (max-width: 768px) {
    .hero-slideshow {
        padding: 80px 0 60px;
        background-attachment: scroll;
        min-height: 50vh;
    }
    
    .hero-slideshow h1 {
        font-size: 2.2rem;
    }
    
    .hero-slideshow[data-hero-type="gallery"] h1 {
        font-size: 2.5rem;
    }
    
    .hero-slideshow p {
        font-size: 1rem;
    }
    
    .hero-badges .badge {
        font-size: 0.75rem;
        padding: 6px 15px;
    }
    
    .hero-indicators {
        bottom: 20px;
        gap: 8px;
    }
    
    .hero-indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 576px) {
    .hero-slideshow {
        padding: 60px 0 40px;
        min-height: 40vh;
    }
    
    .hero-slideshow h1 {
        font-size: 1.8rem;
    }
    
    .hero-slideshow[data-hero-type="gallery"] h1 {
        font-size: 2rem;
    }
    
    .hero-slideshow p {
        font-size: 0.9rem;
    }
    
    .hero-badges {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .hero-badges .badge {
        font-size: 0.7rem;
        padding: 5px 12px;
    }
    
    .hero-indicators {
        bottom: 15px;
        gap: 6px;
    }
    
    .hero-indicator {
        width: 8px;
        height: 8px;
    }
}

/* =============================================
 * ACCESSIBILITY & PERFORMANCE
 * ============================================= */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .hero-slideshow {
        transition: none;
    }
    
    .hero-badges .badge,
    .hero-indicator {
        transition: none;
    }
    
    .hero-slideshow h1,
    .hero-slideshow p,
    .hero-badges,
    .hero-indicators {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-indicator {
        border: 3px solid var(--white-color);
    }
    
    .hero-indicator.active {
        background: var(--white-color);
        border-color: var(--dark-color);
    }
    
    .hero-badges .badge {
        background: rgba(255, 255, 255, 0.9);
        color: var(--dark-color);
        border: 1px solid var(--dark-color);
    }
}

/* Focus styles for keyboard navigation */
.hero-indicator:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* =============================================
 * LOADING STATES
 * ============================================= */

.hero-slideshow.loading {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)), 
                      url('../images/slider/heritage-srilanka-main-sliderjpg.jpg');
}

.hero-slideshow.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 var(--white-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

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

/* =============================================
 * THEME VARIATIONS
 * ============================================= */

/* Dark theme */
.theme-dark .hero-slideshow {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
}

/* Light theme */
.theme-light .hero-slideshow {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
}

.theme-light .hero-badges .badge {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Premium theme */
.theme-premium .hero-slideshow {
    background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(var(--primary-color-rgb), 0.3) 100%);
}

.theme-premium .hero-glow {
    background: radial-gradient(ellipse at center, rgba(var(--primary-color-rgb), 0.4) 0%, rgba(var(--accent-color-rgb), 0.2) 50%, rgba(0, 0, 0, 0) 80%);
}

/* =============================================
 * PRINT STYLES
 * ============================================= */

@media print {
    .hero-slideshow {
        background-image: none !important;
        background-color: var(--dark-color);
        color: var(--white-color);
        padding: 40px 0;
        min-height: auto;
        page-break-inside: avoid;
    }
    
    .hero-indicators,
    .hero-glow {
        display: none;
    }
    
    .hero-badges .badge {
        background: var(--white-color);
        color: var(--dark-color);
        border: 1px solid var(--dark-color);
    }
    
    .hero-slideshow h1::after {
        background: var(--dark-color);
    }
}