/**
 * Hero Slider Styles
 * Dynamic hero banner system with multiple slide types
 */

/* Hero Section Base */
#hero-section {
    position: relative;
    overflow: hidden;
}

/* Hero Slides Container */
.hero-slides-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual Hero Slides */
.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;
    z-index: 1;
}

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

/* Slide Transitions */
.hero-slide.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

.hero-slide.fade-out {
    animation: fadeOut 0.5s ease-in-out;
}

.hero-slide.slide-in-left {
    animation: slideInLeft 1s ease-out;
}

.hero-slide.slide-in-right {
    animation: slideInRight 1s ease-out;
}

.hero-slide.slide-out-left {
    animation: slideOutLeft 1s ease-out;
}

.hero-slide.slide-out-right {
    animation: slideOutRight 1s ease-out;
}

/* Navigation Dots */
.hero-nav-dot {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.hero-nav-dot:hover {
    background-color: rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.1);
}

.hero-nav-dot.active {
    background-color: white !important;
    transform: scale(1.25);
    border-color: white;
}

/* Navigation Arrows */
.hero-nav-prev,
.hero-nav-next {
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

/* Hide navigation arrows on mobile by default */
@media (max-width: 768px) {
    .hero-nav-prev,
    .hero-nav-next,
    button.hero-nav-prev,
    button.hero-nav-next,
    #hero-section .hero-nav-prev,
    #hero-section .hero-nav-next,
    #hero-section button.hero-nav-prev,
    #hero-section button.hero-nav-next {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: scale(0) !important;
    }
}

.hero-nav-prev:hover,
.hero-nav-next:hover {
    background-color: rgba(0, 0, 0, 0.7) !important;
    transform: scale(1.1);
}

.hero-nav-prev:active,
.hero-nav-next:active {
    transform: scale(0.95);
}

/* Progress Bar */
.hero-progress-bar {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

/* Blueprint to Reality Layers */
.blueprint-layer,
.reality-layer {
    transition: opacity 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.blueprint-layer {
    z-index: 1;
}

.reality-layer {
    z-index: 2;
}

/* Transformation Button */
#transformation-trigger {
    position: relative;
    z-index: 10;
}

#transformation-trigger:hover .fa-magic {
    animation: pulse 1s infinite;
}

/* Floating Elements Animation */
.floating-element {
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

@keyframes animate-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes animate-float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-3deg); }
}

@keyframes animate-float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

.animate-float {
    animation: animate-float 3s ease-in-out infinite;
}

.animate-float-delayed {
    animation: animate-float-delayed 4s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-float-slow {
    animation: animate-float-slow 5s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* Slide Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideInLeft {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideInRight {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

/* Content Animations */
.animate-fade-in-left {
    animation: fadeInLeft 1s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 1s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    #hero-section {
        min-height: 100vh;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .hero-nav-prev,
    .hero-nav-next {
        display: none !important; /* Hide arrows on mobile - users can use dots instead */
    }
    
    .hero-nav-dot {
        width: 12px;
        height: 12px;
        /* Larger touch targets for mobile */
    }
    
    .floating-element {
        display: none; /* Hide floating elements on mobile for performance */
    }
    
    /* Optimize text for mobile readability */
    .hero-slide h1 {
        line-height: 1.1;
        word-break: break-word;
    }
    
    /* Touch-friendly interactive elements */
    .touch-manipulation {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
}

@media (max-width: 640px) {
    .hero-nav-prev,
    .hero-nav-next {
        display: none !important; /* Extra mobile breakpoint to ensure arrows are hidden */
    }
    
    .hero-nav-dot {
        width: 10px;
        height: 10px;
    }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
    #hero-section {
        min-height: 80vh;
    }
    
    .hero-slide h1 {
        font-size: 3.5rem;
    }
}

/* Large screen optimizations */
@media (min-width: 1440px) {
    #hero-section {
        min-height: 70vh;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .blueprint-layer,
    .reality-layer,
    .floating-element,
    .hero-nav-dot,
    .hero-nav-prev,
    .hero-nav-next,
    .hero-progress-bar {
        animation: none !important;
        transition: none !important;
    }
    
    .hero-slide.active {
        opacity: 1;
        visibility: visible;
    }
    
    .hero-slide:not(.active) {
        opacity: 0;
        visibility: hidden;
    }
}

/* Focus States for Accessibility */
.hero-nav-dot:focus,
.hero-nav-prev:focus,
.hero-nav-next:focus,
#transformation-trigger:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Screen Reader Only */
.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;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hero-nav-dot {
        border: 3px solid white;
    }
    
    .hero-nav-prev,
    .hero-nav-next {
        background-color: black !important;
        color: white !important;
        border: 2px solid white;
    }
    
    .hero-progress-bar {
        background: white !important;
    }
}

/* Print Styles */
@media print {
    #hero-section {
        position: static;
        height: auto;
        min-height: auto;
    }
    
    .hero-slide:not(.active) {
        display: none;
    }
    
    .hero-nav-dot,
    .hero-nav-prev,
    .hero-nav-next,
    .hero-progress-bar,
    .floating-element {
        display: none !important;
    }
}

/* Cinematic homepage hero */
.fcj-cinema-hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    background: #0b1220;
    color: #fff;
}

.fcj-cinema-hero .hero-slides-container,
.fcj-cinema-hero .hero-slide {
    position: absolute;
    inset: 0;
}

.fcj-cinema-hero .cinema-media,
.fcj-cinema-hero .cinema-photo,
.fcj-cinema-hero .cinema-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.fcj-cinema-hero .cinema-photo {
    object-fit: cover;
    transform: scale(1.08);
}

.fcj-cinema-hero .hero-slide.active .cinema-photo {
    animation: fcjKenBurns 8s linear forwards;
}

@keyframes fcjKenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

.fcj-cinema-hero .cinema-shade {
    background:
        linear-gradient(to top, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.12) 42%, rgba(0, 0, 0, 0.28) 100%);
}

.fcj-cinema-hero .cinema-copy {
    position: absolute;
    z-index: 3;
    left: 6vw;
    top: 22%;
    max-width: 38rem;
    text-align: left;
    pointer-events: none;
}

.fcj-cinema-hero .cinema-copy h1 {
    margin: 0;
    font-family: Montserrat, sans-serif;
    font-weight: 900;
    font-size: clamp(2.2rem, 4.4vw, 4.4rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.fcj-cinema-hero .cinema-copy h1 span {
    display: block;
}

.fcj-cinema-hero .cinema-blurb {
    max-width: 34rem;
    margin: 1.25rem 0 0;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
}

.fcj-cinema-hero .cinema-location {
    position: absolute;
    z-index: 3;
    left: 48%;
    right: auto;
    bottom: 22%;
    margin: 0;
    max-width: none;
    font-family: Montserrat, sans-serif;
    font-weight: 900;
    font-size: clamp(0.95rem, 1.5vw, 1.35rem);
    line-height: 1.15;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(12px);
}

.fcj-cinema-hero .hero-slide.active .cinema-location {
    animation: fcjCinemaRise 0.8s ease 0.2s forwards;
}

@keyframes fcjCinemaRise {
    to { opacity: 1; transform: none; }
}

.fcj-cinema-hero .cinema-nav {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    gap: 2.5rem;
    padding: 0 4vw 2.4rem;
}

.fcj-cinema-hero .cinema-tab {
    flex: 0 1 auto;
    min-width: 9rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.fcj-cinema-hero .cinema-tab.is-active {
    flex: 1.1;
    min-width: 12rem;
}

.fcj-cinema-hero .cinema-progress {
    display: none;
    height: 2px;
    margin-bottom: 0.7rem;
    background: rgba(255, 255, 255, 0.35);
}

.fcj-cinema-hero .cinema-tab.is-active .cinema-progress {
    display: block;
}

.fcj-cinema-hero .cinema-progress-fill {
    display: block;
    height: 100%;
    width: 0;
    background: #fff;
}

.fcj-cinema-hero .cinema-num {
    margin-right: 0.45rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    opacity: 0.75;
}

.fcj-cinema-hero .cinema-label {
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .fcj-cinema-hero {
        min-height: 100vh;
    }
    .fcj-cinema-hero .cinema-copy {
        left: 1.25rem;
        right: 1.25rem;
        top: 18%;
        max-width: none;
    }
    .fcj-cinema-hero .cinema-copy h1 {
        font-size: 2rem;
    }
    .fcj-cinema-hero .cinema-location {
        left: 1.25rem;
        right: auto;
        bottom: auto;
        top: 58%;
        max-width: calc(100% - 2.5rem);
        font-size: clamp(0.72rem, 3.4vw, 1rem);
        white-space: nowrap;
    }
    .fcj-cinema-hero .cinema-nav {
        gap: 1.1rem;
        overflow-x: auto;
        padding-bottom: 1.4rem;
    }
    .fcj-cinema-hero .cinema-tab,
    .fcj-cinema-hero .cinema-tab.is-active {
        flex: 0 0 auto;
        min-width: 8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fcj-cinema-hero .hero-slide.active .cinema-photo,
    .fcj-cinema-hero .hero-slide.active .cinema-copy h1,
    .fcj-cinema-hero .hero-slide.active .cinema-more {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* CRITICAL: Force hide navigation arrows on mobile - highest priority */
@media screen and (max-width: 768px) {
    .hero-nav-prev,
    .hero-nav-next {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
}
