/**
 * Glassmorphic Hero Slideshow Styles
 * Modern slider with glassmorphism design and smooth animations
 */

/* ========================================
   1. MAIN CONTAINER
   ======================================== */
.hero-slideshow-container {
    position: relative;
    width: 100%;
    height: 85vh;
    max-height: 85vh;
    overflow: hidden;
    background: #000;
}

/* ========================================
   2. TIMEOUT/PROGRESS INDICATOR
   Loading line on top of the slide
   ======================================== */
.hero-progress-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    z-index: 50;
    background: rgba(0, 0, 0, 0.6);
    overflow: hidden;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}


.hero-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        #e63946 0%, 
        #ff4757 50%, 
        #e63946 100%);
    box-shadow: 0 0 30px rgba(230, 57, 70, 0.8),
                0 0 60px rgba(230, 57, 70, 0.5),
                0 4px 12px rgba(230, 57, 70, 0.6);
    transition: none;
    position: relative;
    will-change: width;
    pointer-events: auto;
}

/* Animated shimmer effect on progress bar */
.hero-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========================================
   3. SLIDES WRAPPER & SLIDES
   ======================================== */
.hero-slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, 
                visibility 0.8s ease-in-out,
                transform 0.8s ease-in-out;
    transform: scale(1.05);
}

/* First slide visible by default (before JS loads) */
.hero-slide:first-child {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 1;
}

.hero-slide-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 2;
}

/* Slide entering animation */
.hero-slide-entering {
    animation: slideEnter 0.8s ease-in-out forwards;
}

/* Slide exiting animation */
.hero-slide-exiting {
    animation: slideExit 0.8s ease-in-out forwards;
}

@keyframes slideEnter {
    from {
        opacity: 0;
        transform: scale(1.1) translateX(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

@keyframes slideExit {
    from {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateX(-20px);
    }
}

/* ========================================
   4. BACKGROUND & OVERLAY
   ======================================== */
.hero-slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Smooth image rendering */
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Initial state for animation */
    transform: scale(1.15);
    opacity: 0;
    transition: opacity 1.2s ease-out, transform 8s ease-out;
}

/* Active slide background animation */
.hero-slide-active .hero-slide-background {
    opacity: 1;
    transform: scale(1);
}

.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.3) 70%,
        rgba(0, 0, 0, 0.2) 100%
    );
    z-index: 1;
}

/* Bottom gradient overlay */
.hero-slide-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    z-index: 0;
}

/* ========================================
   5. SLIDE CONTENT
   ======================================== */
.hero-slide-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content-wrapper {
    max-width: 1024px; /* Reduced from 1280px (20% reduction) */
    margin: 0 auto;
    padding: 0 1.2rem; /* Reduced from 1.5rem (20% reduction) */
    width: 100%;
}

.hero-content-inner {
    max-width: 38.4rem; /* Reduced from 48rem (20% reduction) */
    position: relative;
}

/* Blurred backdrop behind content for better readability */
.hero-content-inner::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: -2rem;
    right: -2rem;
    bottom: -2rem;
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    border: 0.2px solid rgba(255, 255, 255, 0.329);
    border-radius: 1.5rem;
    z-index: -1;
    box-shadow: 
        0 40px 120px rgba(0, 0, 0, 0.6),
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.15),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3),
        inset 1px 0 0 rgba(255, 255, 255, 0.08),
        inset -1px 0 0 rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
}

.hero-slide-active .hero-content-inner::before {
    opacity: 1;
    transform: scale(1);
}

/* Badge */
.hero-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem; /* Reduced from 0.5rem 1rem (20% reduction) */
    border-radius: 9999px;
    font-size: 0.7rem; /* Reduced from 0.875rem (20% reduction) */
    font-weight: 500;
    color: white;
    margin-bottom: 1.2rem; /* Reduced from 1.5rem (20% reduction) */
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: opacity 0.8s ease-out 0.4s, transform 0.8s ease-out 0.4s;
}

.hero-slide-active .hero-badge {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Title */
.hero-title {
    font-size: 2.4rem; /* Reduced from 3rem (20% reduction) */
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 0.8rem; /* Reduced from 1rem (20% reduction) */
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out 0.6s, transform 0.8s ease-out 0.6s;
}

.hero-slide-active .hero-title {
    opacity: 1;
    transform: translateX(0);
}

/* Description */
.hero-description {
    font-size: 1rem; /* Reduced from 1.25rem (20% reduction) */
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6; /* Reduced from 1.75 (slightly tighter) */
    margin-bottom: 1.6rem; /* Reduced from 2rem (20% reduction) */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out 0.8s, transform 0.8s ease-out 0.8s;
}

.hero-slide-active .hero-description {
    opacity: 1;
    transform: translateY(0);
}

/* Actions */
.hero-actions {
    display: flex;
    flex-direction: row;
    gap: 0.8rem; /* Reduced from 1rem (20% reduction) */
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s ease-out 1s, transform 0.8s ease-out 1s;
}

.hero-slide-active .hero-actions {
    opacity: 1;
    transform: translateY(0);
}

.hero-cta-primary,
.hero-cta-secondary {
    display: inline-block;
    padding: 0.8rem 1.6rem; /* Reduced from 1rem 2rem (20% reduction) */
    border-radius: 0.4rem; /* Reduced from 0.5rem (20% reduction) */
    font-weight: 600;
    font-size: 0.9rem; /* Added smaller font size */
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.hero-cta-primary {
    background: #e63946;
    color: white;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.hero-cta-primary:hover {
    background: #d62839;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.5);
}

.hero-cta-secondary {
    border: 2px solid white;
    color: white;
}

.hero-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ========================================
   6. GLASSMORPHISM BASE
   ======================================== */
.glass-morph {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ========================================
   7. NAVIGATION BUTTONS - GLASSMORPHIC
   ======================================== */
.hero-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
    overflow: hidden;
    white-space: nowrap;
}

.hero-nav-btn:hover {
    opacity: 1;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: auto;
    padding: 0 1.5rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.hero-nav-prev {
    left: 2rem;
}

.hero-nav-next {
    right: 2rem;
}

.hero-nav-icon {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: scale(1);
}

.hero-nav-btn:hover .hero-nav-icon {
    opacity: 0;
    transform: scale(0);
    width: 0;
}

.hero-nav-text {
    position: absolute;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.hero-nav-btn:hover .hero-nav-text {
    opacity: 1;
    transform: scale(1);
    position: relative;
}

/* ========================================
   8. SLIDER INDICATORS - GLASSMORPHIC
   ======================================== */
.hero-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
}

.hero-indicator {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

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

.hero-indicator:hover .hero-indicator-preview,
.hero-indicator-preview:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-15px) scale(1);
}

.hero-indicator-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-indicator-active {
    background: rgba(230, 57, 70, 0.9);
    border-color: rgba(230, 57, 70, 1);
    box-shadow: 0 0 15px rgba(230, 57, 70, 0.4);
    transform: scale(1.1);
}

.hero-indicator-active .hero-indicator-fill {
    transform: scale(1);
    border-radius: 50%;
    background: rgba(230, 57, 70, 1);
}

/* Indicator Preview Box */
.hero-indicator-preview {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-15px) scale(0.9);
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 0;
    min-width: 240px;
    max-width: 320px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    pointer-events: auto;
    white-space: normal;
    overflow: hidden;
    cursor: pointer;
}

.hero-indicator-preview::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.1);
}

.hero-indicator-preview-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.hero-indicator-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.hero-indicator-preview:hover .hero-indicator-preview-img {
    transform: scale(1.05);
}

.hero-indicator-preview-content {
    padding: 12px 16px;
}

.hero-indicator-preview-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    margin-bottom: 6px;
    line-height: 1.2;
}

.hero-indicator-preview-description {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    margin: 0;
}

.hero-indicator-preview:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateX(-50%) translateY(-15px) scale(1.02);
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.7),
        0 12px 35px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ========================================
   9. RESPONSIVE DESIGN
   ======================================== */
@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem; /* Reduced from 3.75rem (20% reduction) */
    }
}

@media (max-width: 768px) {
    .hero-slideshow-container {
        height: 70vh;
        max-height: 70vh;
    }
    
    /* Mobile layout: Content at bottom with gradient overlay */
    .hero-slide-content {
        align-items: flex-end; /* Position content at bottom */
        padding-bottom: 1rem;
    }
    
    .hero-content-wrapper {
        max-width: 100%;
        padding: 0 1rem;
        padding-bottom: 4rem; /* Reduced space for indicators */
        width: 100%;
    }
    
    .hero-content-inner {
        max-width: 100%;
        text-align: center;
        position: relative;
        z-index: 10;
    }
    
    /* Remove glass effect and add gradient overlay */
    .hero-content-inner::before {
        display: none; /* Remove glass effect */
    }
    
    /* Add gradient overlay to slide overlay */
    .hero-slide-overlay {
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.85) 20%,
            rgba(0, 0, 0, 0.7) 40%,
            rgba(0, 0, 0, 0.6) 60%,
            rgba(0, 0, 0, 0.5) 80%,
            rgba(0, 0, 0, 0.4) 100%
        );
        height: 50%; /* Increased to better cover content area */
        top: auto; /* Position from bottom */
        bottom: 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.75rem; /* Reduced margin */
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.25rem; /* Reduced margin */
    }
    
    .hero-nav-btn {
        width: 44px;
        height: 44px;
    }
    
    .hero-nav-btn:hover {
        padding: 0 1rem;
        border-radius: 6px;
    }
    
    .hero-nav-prev {
        left: 1rem;
    }
    
    .hero-nav-next {
        right: 1rem;
    }
    
    .hero-nav-icon {
        width: 20px;
        height: 20px;
    }
    
    .hero-nav-text {
        font-size: 0.75rem;
    }
    
    /* Hide navigation buttons on mobile */
    .hero-nav-btn {
        display: none;
    }
    
    .hero-indicators {
        bottom: 1rem;
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
    
    .hero-indicator {
        width: 10px;
        height: 10px;
        border-radius: 50%;
    }
    
    .hero-indicator-active {
        width: 12px;
        height: 12px;
        border-radius: 50%;
    }
    
    .hero-indicator-preview {
        min-width: 180px;
        max-width: 240px;
    }
    
    .hero-indicator-preview-image {
        height: 80px;
    }
    
    .hero-indicator-preview-content {
        padding: 8px 12px;
    }
    
    .hero-indicator-preview-title {
        font-size: 0.75rem;
    }
    
    .hero-indicator-preview-description {
        font-size: 0.6875rem;
    }
}

@media (max-width: 480px) {
    /* Small mobile: Maintain bottom positioning and gradient */
    .hero-content-wrapper {
        padding: 0 0.75rem;
        padding-bottom: 3.5rem; /* Reduced space for indicators on small mobile */
    }
    
    .hero-slide-content {
        padding-bottom: 1rem;
    }
    
    .hero-actions {
        flex-direction: row;
        gap: 0.75rem;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem; /* Further reduced margin */
    }
    
    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 1rem; /* Reduced margin */
    }
    
    .hero-cta-primary,
    .hero-cta-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ========================================
   10. ACCESSIBILITY
   ======================================== */
.hero-nav-btn:focus-visible,
.hero-indicator:focus-visible {
    outline: 2px solid white;
    outline-offset: 4px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .hero-slide-background,
    .hero-content-inner,
    .hero-badge,
    .hero-title,
    .hero-description,
    .hero-actions,
    .hero-nav-btn,
    .hero-indicator {
        animation: none !important;
        transition: opacity 0.3s ease !important;
    }
    
    .hero-progress-bar::after {
        animation: none !important;
    }
}

/* ========================================
   11. PERFORMANCE OPTIMIZATIONS
   ======================================== */
.hero-slide {
    will-change: opacity, transform;
}
