/* ========================================================================== */
/* HERO SLIDER - ACF Dynamic Version v1.2 */
/* Copertura completa media - No elementi player visibili */
/* ========================================================================== */

.hero-slider-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    margin-top: -80px; /* Riduzione spazio navbar-slider */
    padding-top: 0;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background Image - Full Cover */
.hero-slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

/* Video Background Container */
.hero-slide-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

/* Video Background - Copertura completa senza bande */
.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Tecnica di scaling per mantenere aspect ratio coprendo l'intero container */
    min-width: 100%;
    min-height: 100%;
    width: 177.77vh; /* 16:9 aspect ratio */
    height: 56.25vw; /* 16:9 aspect ratio */
    pointer-events: none;
}

/* YouTube specifico - scala maggiore per nascondere watermark */
.video-background.video-youtube {
    width: 300%;
    height: 300%;
    min-width: 300%;
    min-height: 300%;
}

/* Vimeo specifico - scala per copertura completa */
.video-background.video-vimeo {
    width: 300%;
    height: 300%;
    min-width: 300%;
    min-height: 300%;
}

/* Video Diretto - object-fit cover */
.video-background.video-direct {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
}

/* Google Drive video */
.video-background.video-gdrive {
    width: 200%;
    height: 200%;
    min-width: 200%;
    min-height: 200%;
}
.video-background.video-gdrive iframe {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    border: 0;
    pointer-events: none;
}

.video-background iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.video-background.video-direct video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    border: 0;
    pointer-events: none;
}

/* Coperture per nascondere elementi del player YouTube */
.video-cover {
    position: absolute;
    background: linear-gradient(135deg, rgba(155, 27, 48, 0.4) 0%, rgba(184, 134, 11, 0.3) 50%, rgba(85, 107, 47, 0.2) 100%);
    z-index: 2;
    pointer-events: none;
}

.video-cover-top {
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
}

.video-cover-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
}

.video-cover-left {
    top: 0;
    bottom: 0;
    left: 0;
    width: 60px;
}

.video-cover-right {
    top: 0;
    bottom: 0;
    right: 0;
    width: 60px;
}

/* Video Direct (mp4, webm) */
.video-direct video {
    object-fit: cover;
    z-index: 2;
}

/* Ensure video container is properly stacked */
.video-background.video-direct {
    z-index: 2;
}

/* Video poster should not cover playing video */
.video-direct video[poster] {
    background-size: cover;
    background-position: center;
}

/* Gradient Fallback */
.hero-slide-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--archeo-gradient-hero);
    z-index: 1;
}

/* Overlay */
.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

/* Content */
.hero-slide-content {
    position: relative;
    z-index: 5;
    max-width: 900px;
    width: 100%;
    padding: 0 40px;
    padding-top: 80px; /* Compensa il margin-top negativo della section */
}

.hero-slide-content.text-left {
    text-align: left;
    margin-right: auto;
}

.hero-slide-content.text-center {
    text-align: center;
    margin: 0 auto;
}

.hero-slide-content.text-right {
    text-align: right;
    margin-left: auto;
}

.hero-content-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-slide-content.text-center .hero-content-inner {
    align-items: center;
}

.hero-slide-content.text-left .hero-content-inner {
    align-items: flex-start;
}

.hero-slide-content.text-right .hero-content-inner {
    align-items: flex-end;
}

/* Title */
.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: white;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    margin: 0;
    opacity: 0;
    transform: translateY(30px);
}

/* Subtitle */
.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0;
    line-height: 1.6;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(30px);
}

/* CTA Button */
.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.hero-btn-primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--archeo-primary, #9B1B30);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.hero-btn-primary:hover {
    background: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    color: var(--archeo-secondary, #B8860B);
}

.hero-btn-primary svg {
    transition: transform 0.3s ease;
}

.hero-btn-primary:hover svg {
    transform: translateX(5px);
}

/* Navigation Arrows */
.hero-nav-prev,
.hero-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.hero-swiper:hover .hero-nav-prev,
.hero-swiper:hover .hero-nav-next {
    opacity: 1;
}

.hero-nav-prev:hover,
.hero-nav-next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.hero-nav-prev {
    left: 30px;
}

.hero-nav-next {
    right: 30px;
}

/* Pagination Dots */
.hero-pagination {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
}

.hero-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-pagination .swiper-pagination-bullet-active {
    background: white;
    transform: scale(1.2);
}

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
    opacity: 0.8;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    animation: scrollWheel 1.5s ease-in-out infinite;
}

.scroll-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Animations */
@keyframes heroFadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Reset animation on slide change */
.swiper-slide:not(.swiper-slide-active) .hero-title,
.swiper-slide:not(.swiper-slide-active) .hero-subtitle,
.swiper-slide:not(.swiper-slide-active) .hero-cta {
    animation: none;
    opacity: 0;
    transform: translateY(30px);
}

.swiper-slide-active .hero-title,
.swiper-slide-active .hero-subtitle,
.swiper-slide-active .hero-cta {
    animation: heroFadeInUp 0.8s ease forwards;
}

.swiper-slide-active .hero-title {
    animation-delay: 0.2s;
}

.swiper-slide-active .hero-subtitle {
    animation-delay: 0.4s;
}

.swiper-slide-active .hero-cta {
    animation-delay: 0.6s;
}

/* ========================================================================== */
/* RESPONSIVE */
/* ========================================================================== */

@media (max-width: 1024px) {
    .hero-slider-section {
        margin-top: -70px;
    }
    
    .hero-nav-prev,
    .hero-nav-next {
        width: 48px;
        height: 48px;
    }
    
    .hero-nav-prev {
        left: 20px;
    }
    
    .hero-nav-next {
        right: 20px;
    }
    
    .video-cover-top {
        height: 60px;
    }
    
    .video-cover-bottom {
        height: 80px;
    }
}

@media (max-width: 768px) {
    .hero-slider-section {
        min-height: 100vh; /* Altezza viewport completa */
        min-height: -webkit-fill-available; /* iOS Safari fix */
        margin-top: -60px;
    }
    
    /* Video DEVE coprire tutto lo schermo su mobile */
    .hero-slide {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    /* Video fullscreen mobile - NO BANDE */
    .hero-slide-video {
        position: absolute;
        inset: 0;
        overflow: hidden;
    }
    
    .video-background {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 100%;
        min-height: 100%;
        width: auto;
        height: auto;
    }
    
    .video-background.video-youtube iframe,
    .video-background.video-vimeo iframe {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 300%;
        height: 300%;
        min-width: 300%;
        min-height: 300%;
    }
    
    .video-background.video-direct,
    .video-background.video-direct video {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 100%;
        min-height: 100%;
        width: auto;
        height: auto;
        object-fit: cover !important;
    }
    
    .video-direct video,
    .hero-video {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 100%;
        min-height: 100%;
        width: auto;
        height: auto;
        object-fit: cover !important;
    }
    
    /* Rimuovi coperture che creano bande su mobile */
    .video-cover-top,
    .video-cover-bottom,
    .video-cover-left,
    .video-cover-right {
        display: none !important;
    }
    
    .hero-slide-content {
        padding: 0 24px;
        padding-top: 60px;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-btn {
        padding: 14px 32px;
        font-size: 0.9rem;
    }
    
    .hero-nav-prev,
    .hero-nav-next {
        width: 40px;
        height: 40px;
        opacity: 1;
    }
    
    .hero-nav-prev {
        left: 10px;
    }
    
    .hero-nav-next {
        right: 10px;
    }
    
    .hero-pagination {
        bottom: 20px;
    }
    
    .hero-scroll-indicator {
        display: none;
    }
    
    /* Video cover ridotta su mobile (nascosta in alto) */
    .video-background.video-youtube {
        width: 300%;
        height: 300%;
        min-width: 300%;
        min-height: 300%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================================================== */
/* DARK MODE */
/* ========================================================================== */

body.dark-mode .hero-btn-primary {
    background: rgba(255, 255, 255, 0.9);
}

body.dark-mode .hero-btn-primary:hover {
    background: var(--archeo-gradient-primary-light);
}

/* ========================================================================== */
/* VIDEO MOBILE ENHANCEMENTS */
/* ========================================================================== */

/* Video Direct - NON sovrascrivere le dimensioni del container */
/* Il container usa già le dimensioni corrette da .video-background */

/* Play Button Fallback per iOS */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 50%;
    background: rgba(155, 27, 48, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.video-play-btn:hover {
    background: rgba(155, 27, 48, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-btn svg {
    margin-left: 4px; /* Centro visivo del triangolo */
}

/* Nasconde il play button quando video è in riproduzione */
.video-background.video-direct.video-playing .video-play-btn {
    display: none !important;
}

/* Mobile specific */
@media (max-width: 768px) {
    .video-play-btn {
        width: 64px;
        height: 64px;
    }
    
    .video-play-btn svg {
        width: 36px;
        height: 36px;
    }
}
