/* Aeris Luxury Theme - Slideshow Component with Navigation Fixes */

/* ========================================
   NAVIGATION PROTECTION FIXES
======================================== */

/* Ensure header/navigation has highest z-index */
.aeris-header,
.aeris-header-simplified,
nav,
header {
    z-index: 100 !important; /* Much higher than slideshow z-index: 30 */
}

/* ========================================
   SLIDESHOW BASE STYLES
======================================== */
.aeris-slideshow {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* Create a protected header zone */
.aeris-slideshow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px; /* Adjust to match your header height */
    pointer-events: none; /* This area won't capture clicks */
    z-index: 99; /* Just below header but above slideshow content */
    background: transparent;
}

.aeris-slide {
    position: absolute;
    inset: 0;
    transition: all 1200ms ease-out;
    pointer-events: none; /* Slide container doesn't capture clicks */
}

/* Allow specific interactive elements */
.aeris-slide a,
.aeris-slide button,
.aeris-slide .aeris-slide-btn,
.aeris-slide .aeris-slide-nav,
.aeris-slide .aeris-slide-dot {
    pointer-events: auto;
}

.aeris-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform 8000ms ease-out;
    pointer-events: none; /* Prevent capturing clicks - CRITICAL FIX */
}

.aeris-slide.active .aeris-slide-bg {
    transform: scale(1.1);
}

/* ========================================
   SLIDESHOW OVERLAYS
======================================== */
.aeris-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, transparent 50%, rgba(0,0,0,0.2) 100%);
    pointer-events: none; /* Prevent capturing clicks - CRITICAL FIX */
}

.aeris-slide-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
    pointer-events: none; /* Prevent capturing clicks - CRITICAL FIX */
}

/* ========================================
   SLIDESHOW CONTENT
======================================== */
.aeris-slide-content {
    position: relative;
    z-index: 20;
    min-height: 100vh;
    display: flex;
    align-items: center;
    pointer-events: none; /* Container doesn't capture clicks */
}

.aeris-slide-content * {
    pointer-events: auto; /* Child elements can capture clicks */
}

/* Specifically allow buttons and links to work */
.aeris-slide-content a,
.aeris-slide-content button,
.aeris-slide-btn {
    pointer-events: auto !important;
    z-index: 25;
    position: relative;
}

.aeris-slide-text {
    position: relative;
    z-index: 21;
}

.aeris-slide-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: white;
    margin-bottom: 1.5rem;
}

.aeris-slide-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 40rem;
}

.aeris-slide-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.aeris-slide-badge::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    background: white;
    border-radius: 50%;
    margin-right: 0.75rem;
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   SLIDESHOW NAVIGATION
======================================== */
.aeris-slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-normal, 300ms);
    cursor: pointer;
    pointer-events: auto; /* These elements should capture clicks */
}

.aeris-slide-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.aeris-slide-nav.prev {
    left: 1.5rem;
}

.aeris-slide-nav.next {
    right: 1.5rem;
}

/* ========================================
   SLIDESHOW DOTS NAVIGATION
======================================== */
.aeris-slide-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: auto; /* These elements should capture clicks */
}

.aeris-slide-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition-normal, 300ms);
    position: relative;
    pointer-events: auto; /* These elements should capture clicks */
}

.aeris-slide-dot.active {
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
    transform: scale(1.25);
}

.aeris-slide-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
}

/* Dot tooltip */
.aeris-slide-dot::after {
    content: attr(data-slide);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal, 300ms);
    margin-bottom: 0.5rem;
}

.aeris-slide-dot:hover::after {
    opacity: 1;
}

/* ========================================
   SLIDESHOW PROGRESS BAR
======================================== */
.aeris-slide-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 30;
    pointer-events: none; /* Progress bar should not capture clicks */
}

.aeris-slide-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, white, rgba(59, 130, 246, 0.8));
    transition: width var(--transition-normal, 300ms);
    pointer-events: none;
}

/* ========================================
   SLIDESHOW COUNTER
======================================== */
.aeris-slide-counter {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 30;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 9999px;
    padding: 0.75rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.aeris-slide-counter-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
}

.aeris-slide-counter-divider {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0.25rem;
}

/* ========================================
   SLIDESHOW BUTTONS
======================================== */
.aeris-slide-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .aeris-slide-buttons {
        flex-direction: row;
        gap: 1.5rem;
    }
}

.aeris-slide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 9999px;
    transition: all var(--transition-normal, 300ms);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    border: none;
    outline: none;
    pointer-events: auto !important;
    z-index: 25;
}

.aeris-slide-btn-primary {
    background: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.aeris-slide-btn-primary:hover {
    background: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.aeris-slide-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.aeris-slide-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px) scale(1.05);
}

.aeris-slide-btn svg {
    margin-left: 0.75rem;
    transition: transform var(--transition-normal, 300ms);
}

.aeris-slide-btn:hover svg {
    transform: translateX(0.25rem);
}

/* ========================================
   SLIDESHOW FLOATING ELEMENTS
======================================== */
.aeris-slide-float {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    filter: blur(1rem);
    animation: aeris-slide-float 8s ease-in-out infinite;
    pointer-events: none !important; /* Floating decorative elements should not capture clicks */
}

@keyframes aeris-slide-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(1deg); }
    50% { transform: translateY(-20px) rotate(0deg); }
    75% { transform: translateY(-10px) rotate(-1deg); }
}

.aeris-slide-float-1 {
    top: 25%;
    left: 25%;
    width: 8rem;
    height: 8rem;
    animation-delay: 0s;
}

.aeris-slide-float-2 {
    bottom: 33%;
    right: 25%;
    width: 6rem;
    height: 6rem;
    animation-delay: -3s;
}

.aeris-slide-float-3 {
    top: 66%;
    left: 20%;
    width: 5rem;
    height: 5rem;
    animation-delay: -1.5s;
}

/* ========================================
   SLIDESHOW SCROLL INDICATOR
======================================== */
.aeris-slide-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    animation: bounce 2s ease-in-out infinite;
    pointer-events: none;
}

.aeris-slide-scroll-text {
    font-size: 0.875rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.aeris-slide-scroll-icon {
    width: 1.5rem;
    height: 1.5rem;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-0.5rem);
    }
}

/* ========================================
   SLIDESHOW PATTERN OVERLAY
======================================== */
.aeris-slide-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    z-index: 10;
    pointer-events: none !important; /* Pattern overlay should not capture clicks */
    background-image: radial-gradient(circle at 2px 2px, white 1px, transparent 0);
    background-size: 32px 32px;
}

/* ========================================
   SLIDESHOW ACCESSIBILITY
======================================== */
.aeris-slide-nav:focus,
.aeris-slide-dot:focus,
.aeris-slide-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.aeris-slide[aria-hidden="true"] {
    visibility: hidden;
}

.aeris-slide[aria-hidden="false"] {
    visibility: visible;
}

/* Screen reader only content */
.aeris-slide-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   SLIDESHOW AUTOPLAY INDICATORS
======================================== */
.aeris-slideshow[data-autoplay="true"] .aeris-slide-progress {
    opacity: 1;
}

.aeris-slideshow[data-autoplay="false"] .aeris-slide-progress {
    opacity: 0;
}

.aeris-slideshow-paused .aeris-slide-progress-bar {
    animation-play-state: paused;
}

/* Play/Pause button */
.aeris-slide-playpause {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    z-index: 30;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all var(--transition-normal, 300ms);
    pointer-events: auto; /* Allow slideshow navigation to capture clicks */
}

.aeris-slide-playpause:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.aeris-slide-playpause svg {
    width: 1.25rem;
    height: 1.25rem;
    color: white;
}

/* ========================================
   SLIDESHOW KEYBOARD CONTROLS
======================================== */
.aeris-slideshow:focus {
    outline: none;
}

.aeris-slideshow[data-keyboard="true"]::after {
    content: 'Use arrow keys to navigate';
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity var(--transition-normal, 300ms);
    pointer-events: none;
    z-index: 31;
}

.aeris-slideshow[data-keyboard="true"]:focus::after {
    opacity: 1;
}

/* ========================================
   MOBILE SPECIFIC FIXES
======================================== */
@media (max-width: 768px) {
    /* Adjust header protection zone for mobile */
    .aeris-slideshow::before {
        height: 64px; /* Smaller header on mobile */
    }
    
    /* Ensure mobile navigation isn't blocked */
    .mobile-menu,
    .mobile-menu-toggle,
    .mobile-nav {
        z-index: 101 !important;
        pointer-events: auto !important;
    }
}

/* ========================================
   SLIDESHOW RESPONSIVE DESIGN
======================================== */
@media (max-width: 1023px) {
    .aeris-slide-nav {
        padding: 0.75rem;
    }
    
    .aeris-slide-nav.prev {
        left: 1rem;
    }
    
    .aeris-slide-nav.next {
        right: 1rem;
    }
    
    .aeris-slide-dots {
        bottom: 1.5rem;
        padding: 0.5rem 1rem;
        gap: 0.75rem;
    }
    
    .aeris-slide-counter {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .aeris-slide-title {
        margin-bottom: 1rem;
    }
    
    .aeris-slide-subtitle {
        margin-bottom: 1.5rem;
    }
    
    .aeris-slide-buttons {
        margin-top: 1.5rem;
    }
    
    .aeris-slide-scroll {
        bottom: 1rem;
    }
}

@media (max-width: 640px) {
    .aeris-slide-nav {
        padding: 0.5rem;
    }
    
    .aeris-slide-nav.prev {
        left: 0.5rem;
    }
    
    .aeris-slide-nav.next {
        right: 0.5rem;
    }
    
    .aeris-slide-dots {
        bottom: 1rem;
        padding: 0.375rem 0.75rem;
        gap: 0.5rem;
    }
    
    .aeris-slide-dot {
        width: 0.5rem;
        height: 0.5rem;
    }
    
    .aeris-slide-counter {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.375rem 0.75rem;
    }
    
    .aeris-slide-counter-text {
        font-size: 0.75rem;
    }
    
    .aeris-slide-badge {
        padding: 0.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .aeris-slide-btn {
        padding: 0.875rem 1.5rem;
    }
    
    .aeris-slide-float {
        display: none; /* Hide floating elements on mobile */
    }
    
    .aeris-slide-scroll {
        display: none; /* Hide scroll indicator on mobile */
    }
}

/* ========================================
   HIGH CONTRAST MODE SUPPORT
======================================== */
@media (prefers-contrast: high) {
    .aeris-slide-nav,
    .aeris-slide-dots,
    .aeris-slide-counter,
    .aeris-slide-playpause {
        border: 2px solid white;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .aeris-slide-btn-primary {
        background: white;
        color: #000;
        border: 2px solid #000;
    }
    
    .aeris-slide-btn-secondary {
        background: transparent;
        color: white;
        border: 2px solid white;
    }
    
    .aeris-slide-overlay {
        background: rgba(0, 0, 0, 0.6);
    }
}

/* ========================================
   REDUCED MOTION SUPPORT
======================================== */
@media (prefers-reduced-motion: reduce) {
    .aeris-slide,
    .aeris-slide-bg,
    .aeris-slide-nav,
    .aeris-slide-dot,
    .aeris-slide-btn,
    .aeris-slide-progress-bar,
    .aeris-slide-playpause {
        transition: none !important;
        animation: none !important;
    }
    
    .aeris-slide-float {
        animation: none !important;
        display: none;
    }
    
    .aeris-slide-scroll {
        animation: none !important;
    }
    
    .aeris-slide-badge::before {
        animation: none !important;
    }
    
    .aeris-slide.active .aeris-slide-bg {
        transform: scale(1) !important;
    }
    
    /* Ensure slides are still functional without animations */
    .aeris-slide {
        opacity: 0;
    }
    
    .aeris-slide.active {
        opacity: 1;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .aeris-slideshow {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        page-break-inside: avoid;
    }
    
    .aeris-slide {
        position: relative !important;
        display: none !important;
    }
    
    .aeris-slide.active {
        display: block !important;
        page-break-before: always;
    }
    
    .aeris-slide-nav,
    .aeris-slide-dots,
    .aeris-slide-counter,
    .aeris-slide-progress,
    .aeris-slide-playpause,
    .aeris-slide-scroll,
    .aeris-slide-float {
        display: none !important;
    }
    
    .aeris-slide-content {
        min-height: auto !important;
        padding: 2rem 0;
    }
    
    .aeris-slide-overlay {
        display: none !important;
    }
    
    .aeris-slide-title,
    .aeris-slide-subtitle {
        color: #000 !important;
    }
    
    .aeris-slide-btn {
        color: #000 !important;
        background: transparent !important;
        border: 2px solid #000 !important;
    }
}