/**
 * CineWorld Design Enhancements
 * Phase 2: Hero, Glassmorphism, Animations, Mobile
 */

/* ========================================
   ENHANCED HERO SECTION
   ======================================== */

.hero-enhanced {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.1) 0%,
        transparent 50%,
        rgba(0, 217, 255, 0.05) 100%
    );
    z-index: 1;
}

.hero-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 50% 50%,
        rgba(10, 10, 10, 0.3) 0%,
        rgba(10, 10, 10, 0.7) 50%,
        rgba(10, 10, 10, 0.85) 75%,
        #0A0A0A 100%
    );
    z-index: 2;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenBurns 20s ease-in-out infinite;
}

@keyframes kenBurns {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: var(--space-10) var(--space-8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: var(--font-black);
    line-height: 1.1;
    margin-bottom: var(--space-6);
    color: #FFFFFF;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 4px 12px rgba(0, 0, 0, 0.8),
        0 8px 24px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: #E0E0E0;
    max-width: 700px;
    margin: 0 auto var(--space-8);
    line-height: var(--leading-relaxed);
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.9),
        0 4px 16px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-10);
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    z-index: 10;
}

.hero-scroll-indicator i {
    font-size: var(--text-3xl);
    color: var(--gold-500);
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ========================================
   GLASS MORPHISM COMPONENTS
   ======================================== */

.glass {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glass-hover {
    transition: all var(--transition-medium);
}

.glass-hover:hover {
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 30px rgba(212, 175, 55, 0.15);
    transform: translateY(-4px);
}

.glass-strong {
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Glass Card Variants */
.glass-card {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
}

.glass-card:hover {
    background: rgba(26, 26, 26, 0.85);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(212, 175, 55, 0.2);
    transform: translateY(-6px);
}

/* ========================================
   FILM STRIP EFFECTS
   ======================================== */

.film-strip {
    position: relative;
    padding: var(--space-4) 0;
}

.film-strip::before,
.film-strip::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 8px;
    background-image: repeating-linear-gradient(
        90deg,
        var(--gold-500) 0,
        var(--gold-500) 10px,
        transparent 10px,
        transparent 20px
    );
}

.film-strip::before {
    top: 0;
}

.film-strip::after {
    bottom: 0;
}

.film-strip-vertical {
    position: relative;
    padding: 0 var(--space-4);
}

.film-strip-vertical::before,
.film-strip-vertical::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    background-image: repeating-linear-gradient(
        180deg,
        var(--gold-500) 0,
        var(--gold-500) 10px,
        transparent 10px,
        transparent 20px
    );
}

.film-strip-vertical::before {
    left: 0;
}

.film-strip-vertical::after {
    right: 0;
}

/* ========================================
   SPOTLIGHT EFFECT
   ======================================== */

.spotlight {
    position: relative;
    overflow: hidden;
}

.spotlight::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(212, 175, 55, 0.15) 0%,
        transparent 60%
    );
    animation: spotlight 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes spotlight {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(20%, 20%); }
    50% { transform: translate(0, 40%); }
    75% { transform: translate(-20%, 20%); }
}

/* ========================================
   CINEMATIC LOADING ANIMATION
   ======================================== */

.loader-film-reel {
    width: 60px;
    height: 60px;
    position: relative;
    display: inline-block;
}

.loader-film-reel::before {
    content: '';
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--gold-500);
    border-right-color: var(--gold-500);
    border-radius: 50%;
    animation: filmRoll 1s linear infinite;
    position: absolute;
    top: 0;
    left: 0;
}

.loader-film-reel::after {
    content: '';
    width: 60%;
    height: 60%;
    border: 4px solid transparent;
    border-bottom-color: var(--gold-600);
    border-left-color: var(--gold-600);
    border-radius: 50%;
    animation: filmRoll 0.8s linear infinite reverse;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes filmRoll {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   ENHANCED STATS SECTION
   ======================================== */

.stat-card {
    position: relative;
    text-align: center;
    padding: var(--space-8);
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.8) 0%,
        rgba(31, 31, 31, 0.6) 100%
    );
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    transition: all var(--transition-medium);
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(212, 175, 55, 0.05) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--border-gold);
    box-shadow: 
        var(--shadow-xl),
        0 0 40px rgba(212, 175, 55, 0.2);
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: var(--font-black);
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-2);
    line-height: 1;
}

.stat-label {
    font-size: var(--text-lg);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    font-weight: var(--font-medium);
}

/* Counter Animation */
.counter-animate {
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   SECTION TRANSITIONS
   ======================================== */

.section-divider {
    position: relative;
    height: 1px;
    margin: var(--space-16) 0;
}

.section-divider::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--gold-500) 50%,
        transparent 100%
    );
    opacity: 0.3;
}

.section-diagonal {
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 95%);
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
}

/* ========================================
   IMAGE ENHANCEMENTS
   ======================================== */

.img-overlay {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.img-overlay img {
    transition: transform var(--transition-slow);
}

.img-overlay:hover img {
    transform: scale(1.1);
}

.img-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.img-overlay:hover::after {
    opacity: 1;
}

/* ========================================
   ENHANCED BUTTONS
   ======================================== */

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    border-radius: inherit;
    opacity: 0;
    filter: blur(10px);
    z-index: -1;
    transition: opacity var(--transition-medium);
}

.btn-glow:hover::before {
    opacity: 0.6;
}

.btn-3d {
    box-shadow: 
        0 4px 0 var(--gold-700),
        0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-3d:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 0 var(--gold-700),
        0 8px 16px rgba(0, 0, 0, 0.4);
}

.btn-3d:active {
    transform: translateY(2px);
    box-shadow: 
        0 2px 0 var(--gold-700),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ========================================
   MOBILE OPTIMIZATIONS
   ======================================== */

@media (max-width: 767px) {
    /* Mobile Typography */
    .hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    .hero-subtitle {
        font-size: var(--text-base);
    }
    
    /* Mobile Spacing */
    .hero-content {
        padding: var(--space-8) var(--space-4);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .section {
        padding-top: var(--space-12);
        padding-bottom: var(--space-12);
    }
    
    /* Mobile Buttons */
    .hero-cta-group {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta-group .btn {
        width: 100%;
    }
    
    /* Mobile Stats */
    .stat-card {
        padding: var(--space-6);
    }
    
    .stat-number {
        font-size: var(--text-5xl);
    }
    
    /* Mobile Touch Targets */
    .btn,
    .nav-link,
    button {
        min-height: 44px;
        padding: var(--space-3) var(--space-5);
    }
}

/* Tablet Optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: clamp(3rem, 6vw, 4rem);
    }
    
    .section {
        padding-top: var(--space-16);
        padding-bottom: var(--space-16);
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

.will-animate {
    will-change: transform;
}

.gpu-accelerate {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce animations on low-power devices */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   MICRO-INTERACTIONS
   ======================================== */

.hover-lift {
    transition: transform var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-grow {
    transition: transform var(--transition-base);
}

.hover-grow:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform var(--transition-base);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

