@charset "UTF-8";
/* CSS Document */

/* ================================================
   VIDEO HERO SECTION - Fullscreen responsive video
   ================================================ */

#video-hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#heroVideo {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

/* Overlay per migliorare leggibilità del testo */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

/* Contenuto sovrapposto */
.video-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 3;
    color: white;
    text-align: center;
}

.video-title {
    font-size: 4rem;
	color: #ffffff;
    font-weight: 700;
    margin-bottom: 1rem;
    /*text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);*/
    animation: fadeInUp 1s ease-out;
}

.video-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Controlli video personalizzati */
.video-controls {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.video-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.video-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.video-btn:active {
    transform: scale(0.95);
}

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

/* ================================================
   RESPONSIVE DESIGN - Mobile optimization
   ================================================ */

/* Tablet */
@media (max-width: 768px) {
    #video-hero {
        min-height: 400px;
    }
    
    .video-title {
        font-size: 2.5rem;
    }
    
    .video-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .video-controls {
        bottom: 20px;
        right: 20px;
    }
    
    .video-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    #video-hero {
        min-height: 350px;
    }
    
    .video-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .video-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .video-controls {
        bottom: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .video-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    /* Su mobile, il video potrebbe essere meno performante */
    #heroVideo {
        /* Ottimizzazione per dispositivi mobili più lenti */
        will-change: transform;
    }
}

/* Extra small devices */
@media (max-width: 320px) {
    .video-title {
        font-size: 1.8rem;
    }
    
    .video-subtitle {
        font-size: 0.9rem;
    }
}

/* ================================================
   FALLBACK per browser senza supporto video
   ================================================ */

/* Se il video non è supportato, mostra un'immagine di fallback */
.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #116734, #1a8a4a);
    z-index: 0;
}

/* ================================================
   ACCESSIBILITA' - Prefers reduced motion
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    #heroVideo {
        animation: none;
    }
    
    .video-title,
    .video-subtitle {
        animation: none;
    }
    
    .video-btn {
        transition: none;
    }
}

/* ================================================
   LOADING STATE - Mentre il video si carica
   ================================================ */

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    color: white;
    font-size: 1.2rem;
}

.video-loading:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}