/**
 * Hero Slider Component
 * Premium banner slider with animations
 */

/* ========== Slider Container ========== */
.gx-hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--surface-secondary);
}

.gx-slider-container {
    display: flex;
    transition: transform 0.5s var(--ease-out-expo);
    will-change: transform;
}

.gx-slider-container.no-transition {
    transition: none;
}

/* ========== Individual Slides ========== */
.gx-slide {
    min-width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 400px;
    padding: var(--space-12) var(--space-8);
    overflow: hidden;
}

@media (min-width: 768px) {
    .gx-slide {
        min-height: 500px;
        padding: var(--space-16) var(--space-12);
    }
}

/* Slide backgrounds */
.gx-slide--gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gx-slide--gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gx-slide--gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gx-slide--gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.gx-slide--gradient-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Slide with image background */
.gx-slide--image {
    background-size: cover;
    background-position: center;
}

.gx-slide--image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

/* ========== Slide Content ========== */
.gx-slide-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    color: white;
}

.gx-slide-tag {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-4);
    animation: slideTagIn 0.6s var(--ease-out-expo) 0.2s both;
}

.gx-slide-title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: var(--font-extrabold);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-4);
    color: white;
    animation: slideTitleIn 0.6s var(--ease-out-expo) 0.3s both;
}

.gx-slide-description {
    font-size: var(--text-lg);
    opacity: 0.9;
    margin-bottom: var(--space-6);
    line-height: var(--leading-relaxed);
    animation: slideDescIn 0.6s var(--ease-out-expo) 0.4s both;
}

.gx-slide-cta {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    animation: slideCTAIn 0.6s var(--ease-out-expo) 0.5s both;
}

.gx-slide-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--duration-200) var(--ease-out);
    cursor: pointer;
    border: none;
}

.gx-slide-btn--primary {
    background: white;
    color: var(--color-primary-600);
}

.gx-slide-btn--primary:hover {
    background: var(--color-neutral-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.gx-slide-btn--secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.gx-slide-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ========== Slide Animations ========== */
@keyframes slideTagIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideTitleIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDescIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

@keyframes slideCTAIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reset animations when slide is not active */
.gx-slide:not(.active) .gx-slide-tag,
.gx-slide:not(.active) .gx-slide-title,
.gx-slide:not(.active) .gx-slide-description,
.gx-slide:not(.active) .gx-slide-cta {
    animation: none;
    opacity: 0;
}

.gx-slide.active .gx-slide-tag,
.gx-slide.active .gx-slide-title,
.gx-slide.active .gx-slide-description,
.gx-slide.active .gx-slide-cta {
    opacity: 1;
}

/* ========== Navigation Arrows ========== */
.gx-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.gx-slider-nav--prev {
    left: var(--space-4);
}

.gx-slider-nav--next {
    right: var(--space-4);
}

.gx-slider-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
    box-shadow: var(--shadow-md);
    color: var(--color-neutral-700);
}

.gx-slider-nav-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.gx-slider-nav-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring), var(--shadow-md);
}

.gx-slider-nav-btn svg {
    width: 24px;
    height: 24px;
}

/* Hide arrows on mobile */
@media (max-width: 768px) {
    .gx-slider-nav {
        display: none;
    }
    
    .gx-slide {
        min-height: 280px;
        padding: var(--space-6) var(--space-4);
    }
    
    .gx-slide-tag {
        padding: var(--space-1) var(--space-3);
        font-size: 0.7rem;
        margin-bottom: var(--space-2);
    }
    
    .gx-slide-title {
        font-size: 1.25rem;
        margin-bottom: var(--space-2);
    }
    
    .gx-slide-description {
        font-size: 0.85rem;
        margin-bottom: var(--space-4);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .gx-slide-btn {
        padding: var(--space-2) var(--space-4);
        font-size: 0.8rem;
    }
    
    .gx-slide-cta {
        gap: var(--space-2);
    }
}

/* ========== Pagination Dots ========== */
.gx-slider-dots {
    position: absolute;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-2);
    z-index: 10;
}

.gx-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
    padding: 0;
}

.gx-slider-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.gx-slider-dot.active {
    background: white;
    width: 30px;
}

.gx-slider-dot:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* Mobile Dots - MUST be after base styles */
@media (max-width: 768px) {
    .gx-slider-dots {
        bottom: var(--space-2);
        gap: 3px;
    }
    
    .gx-slider-dot {
        width: 5px !important;
        height: 5px !important;
    }
    
    .gx-slider-dot.active {
        width: 14px !important;
    }
}

/* ========== Progress Bar ========== */
.gx-slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.gx-slider-progress-bar {
    height: 100%;
    background: white;
    width: 0;
    transition: width 0.1s linear;
}

.gx-slider-progress-bar.animating {
    animation: progressFill 5s linear forwards;
}

@keyframes progressFill {
    from { width: 0; }
    to { width: 100%; }
}

/* Pause progress on hover */
.gx-hero-slider:hover .gx-slider-progress-bar.animating {
    animation-play-state: paused;
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
    .gx-slider-container {
        transition: none;
    }
    
    .gx-slide-tag,
    .gx-slide-title,
    .gx-slide-description,
    .gx-slide-cta {
        animation: none !important;
        opacity: 1 !important;
    }
    
    .gx-slider-progress-bar.animating {
        animation: none;
        width: 100%;
    }
}


/* ========== Dark Mode Overrides ========== */
[data-theme="dark"] .gx-hero-slider {
    background: var(--surface-tertiary, #334155);
}

[data-theme="dark"] .gx-slider-nav-btn {
    background: rgba(30, 41, 59, 0.9);
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .gx-slider-nav-btn:hover {
    background: var(--surface-secondary, #1e293b);
}
