/* Carica questo file in /public_html/assets/css/ */

:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --accent-color: #F4A460;
    --text-dark: #2C1810;
    --text-light: #6B4E3D;
    --bg-light: #FDF9F0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

html {
    scroll-behavior: smooth;
}

/* Custom Bootstrap overrides */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 15px 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.navbar-brand {
    font-size: 1.8rem;
    color: var(--primary-color) !important;
    font-weight: 700;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section con Video */
.hero-section-video {
    min-height: 100vh;
    padding: 120px 0 80px;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)),
        url('/assets/img/albero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

/* Hero Content - Testo leggibile su sfondo scuro */
.hero-content {
    padding: 2rem 0;
    animation: fadeInLeft 1s ease-out;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #FFFFFF !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

.hero-content h2 {
    font-weight: 300;
    color: #F5F5DC !important;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-content .lead {
    color: #FFFFFF !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-size: 1.2rem;
    line-height: 1.6;
}

.hero-buttons {
    margin-top: 2rem;
}

.hero-buttons .btn-primary {
    background-color: #DAA520;
    border-color: #DAA520;
    color: #2C1810;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.4);
    text-shadow: none;
}

.hero-buttons .btn-primary:hover {
    background-color: #B8860B;
    border-color: #B8860B;
    color: #2C1810;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.6);
}

.hero-buttons .btn-outline-primary {
    color: #FFFFFF;
    border-color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.1);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.hero-buttons .btn-outline-primary:hover {
    background-color: #FFFFFF;
    border-color: #FFFFFF;
    color: #2C1810;
    text-shadow: none;
}

/* Video Container */
.hero-video-container {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeInRight 1s ease-out;
}

.hero-video {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Video Overlay */
.video-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border-radius: 15px;
    background: linear-gradient(45deg, 
        rgba(139, 69, 19, 0.1) 0%, 
        transparent 50%, 
        rgba(139, 69, 19, 0.1) 100%);
    pointer-events: none;
}

/* Controllo Audio */
.audio-toggle {
    position: absolute;
    bottom: 35px;
    right: 35px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(139, 69, 19, 0.9);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.audio-toggle:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    color: var(--primary-color);
    font-size: 2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.scroll-arrow:hover {
    color: var(--secondary-color);
    transform: translateY(5px);
}

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

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(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);
    }
}

/* Sections */
section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light) !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

.card-body {
    padding: 2rem;
}

/* Images */
.img-fluid {
    border-radius: 15px;
    transition: all 0.3s ease;
}

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

/* Form */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25);
}

/* Footer */
footer {
    background: linear-gradient(45deg, var(--text-dark), var(--primary-color)) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section-video {
        padding: 100px 0 60px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-video {
        height: 400px;
        margin-top: 2rem;
    }
    
    .hero-buttons {
        margin-top: 1.5rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-video {
        height: 300px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
}

/* Smooth scrolling for anchor links */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Additional utility classes */
.shadow-soft {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1) !important;
}

.rounded-lg {
    border-radius: 1rem !important;
}

.text-muted {
    color: var(--text-light) !important;
}

// PATCH AUDIO VIDEO - Aggiungi questo alla fine del file scripts.js

// Controllo Audio Video Hero - Patch Minimale
document.addEventListener('DOMContentLoaded', function() {
    const video = document.getElementById('heroVideo');
    const audioToggle = document.getElementById('audioToggle');
    
    if (video && audioToggle) {
        // Gestione toggle audio
        audioToggle.addEventListener('click', function() {
            if (video.muted) {
                // Attiva audio
                video.muted = false;
                video.volume = 0.6; // Volume al 60%
                audioToggle.innerHTML = '<i class="bi bi-volume-up"></i>';
                audioToggle.setAttribute('title', 'Disattiva Audio');
                
                // Verifica se l'audio è effettivamente attivo
                setTimeout(() => {
                    if (video.muted) {
                        // Il browser ha bloccato l'audio
                        showAudioAlert();
                    }
                }, 100);
            } else {
                // Disattiva audio
                video.muted = true;
                audioToggle.innerHTML = '<i class="bi bi-volume-mute"></i>';
                audioToggle.setAttribute('title', 'Attiva Audio');
            }
        });
        
        // Funzione per mostrare avviso se l'audio è bloccato
        function showAudioAlert() {
            const alert = document.createElement('div');
            alert.className = 'alert alert-info position-fixed';
            alert.style.cssText = 'top: 120px; left: 50%; transform: translateX(-50%); z-index: 9999; max-width: 400px;';
            alert.innerHTML = `
                <i class="bi bi-info-circle me-2"></i>
                Audio bloccato dal browser. Clicca play sul video per attivarlo.
                <button type="button" class="btn-close" onclick="this.parentElement.remove()"></button>
            `;
            document.body.appendChild(alert);
            
            // Rimuovi dopo 5 secondi
            setTimeout(() => alert.remove(), 5000);
        }
    }
});

/* PATCH AUDIO - Aggiungi questo al file styles.css */

/* Controllo Audio migliorato */
.audio-toggle {
    position: absolute;
    bottom: 35px;
    right: 35px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(139, 69, 19, 0.9);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.audio-toggle:hover {
    background: #D2691E;
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.5);
}

/* Responsive audio control */
@media (max-width: 768px) {
    .audio-toggle {
        width: 45px;
        height: 45px;
        bottom: 25px;
        right: 25px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .audio-toggle {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }
}

/* =======================
   STILI PER COLLABORAZIONI E LOGO PARTNER
   Aggiungi questo alla fine del tuo styles.css
   ======================= */

/* Sezione Collaborazioni */
.partner-logo-container {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(139, 69, 19, 0.1);
}

.partner-logo-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.2) !important;
}

.collaboration-text {
    background: rgba(139, 69, 19, 0.02);
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
}

/* Footer logo partner */
footer img {
    transition: opacity 0.3s ease;
}

footer img:hover {
    opacity: 1 !important;
}

/* Gestione errori immagini logo */
.partner-logo-container img {
    transition: opacity 0.3s ease;
}

.partner-logo-container img:hover {
    opacity: 1;
}

/* Responsive per sezione collaborazioni */
@media (max-width: 768px) {
    .partner-logo-container {
        margin-bottom: 2rem;
    }
    
    .collaboration-text {
        padding: 2rem !important;
    }
    
    footer .row > div {
        text-align: center !important;
        margin-bottom: 1rem;
    }
    
    footer .col-md-4:last-child {
        margin-bottom: 0;
    }
}

/* Controllo Audio Video - Stili Aggiuntivi */
.audio-toggle {
    /* Assicurati che sia sopra tutti gli elementi */
    z-index: 100 !important;
    /* Migliore contrasto */
    background: rgba(139, 69, 19, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.audio-toggle:hover {
    background: #D2691E !important;
    border-color: rgba(255, 255, 255, 0.5);
}

.audio-toggle:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Debug per problemi con le immagini */
.img-debug {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}
/* =======================
   COOKIE BANNER E CONFORMITÀ LEGALE
   ======================= */

/* Cookie Banner */
.cookie-banner {
    background: linear-gradient(135deg, rgba(44, 24, 16, 0.98), rgba(139, 69, 19, 0.95)) !important;
    backdrop-filter: blur(15px);
    border-top: 2px solid rgba(139, 69, 19, 0.3);
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.3);
    animation: slideUpFade 0.5s ease-out;
}

@keyframes slideUpFade {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner p {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.cookie-banner a {
    color: #F4A460 !important;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-banner a:hover {
    color: #DAA520 !important;
}

.cookie-banner .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.6);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.cookie-banner .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
}

.cookie-banner .btn-warning {
    background: #DAA520;
    border-color: #DAA520;
    color: #2C1810;
    font-weight: 600;
}

.cookie-banner .btn-warning:hover {
    background: #B8860B;
    border-color: #B8860B;
    color: #2C1810;
}

/* Footer Legal Links */
.legal-links a {
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.legal-links a:hover {
    color: #F4A460 !important;
    text-decoration: underline;
}

.legal-contacts {
    font-size: 0.85rem;
}

.legal-contacts a {
    transition: color 0.3s ease;
}

.legal-contacts a:hover {
    color: #DAA520 !important;
}

/* Responsive Cookie Banner */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 1.5rem 1rem !important;
    }
    
    .cookie-banner .row > div {
        text-align: center !important;
    }
    
    .cookie-banner .col-md-4:last-child {
        margin-top: 1rem;
    }
    
    .cookie-banner .btn {
        margin: 0.25rem;
        width: auto;
        min-width: 100px;
    }
    
    .legal-links {
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
    
    .legal-links a {
        display: inline-block;
        margin: 0.25rem 0.5rem;
    }
    
    .legal-contacts {
        text-align: center !important;
    }
}

/* Notification System per Cookie */
.cookie-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(139, 69, 19, 0.95);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: cookieNotificationFade 0.3s ease-out;
}

@keyframes cookieNotificationFade {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Miglioramenti Accessibilità */
.cookie-banner:focus-within {
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(139, 69, 19, 0.3);
}

.btn:focus-visible {
    outline: 2px solid #F4A460;
    outline-offset: 2px;
}