/* H2O Trevignano - CSS Minimal */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #0066cc, #004d99);
}

/* Menu di navigazione */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 51, 102, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.8rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #FFD700;
}

/* Sezioni principali - Rimozione frame */
.section {
    min-height: 100vh;
    padding: 80px 1rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Home Section - Minimal */
.home-section {
    padding: 2rem 1rem;
    text-align: center;
}

.home-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.home-title {
    font-size: 2rem;
    color: white;
    margin-bottom: 0.8rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.home-subtitle {
    font-size: 1.3rem;
    color: #FFD700;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.home-description {
    font-size: 1rem;
    color: white;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

/* Social Links Styling - Più compatti */
.social-links {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
    font-size: 0.9rem;
}

.social-link svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.facebook-link {
    background: #4267B2;
}

.facebook-link:hover {
    background: #365899;
    transform: translateY(-2px);
}

.instagram-link {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.instagram-link:hover {
    background: linear-gradient(45deg, #e0842c 0%, #d65a2e 25%, #cc1e3a 50%, #bc1f5c 75%, #ac1279 100%);
    transform: translateY(-2px);
}

/* Slideshow - Frame 4:3 con fit verticale FORZATO */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75% !important; /* Aspect ratio 4:3 FORZATO */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: none !important;
    overflow: hidden;
}

.slide.active {
    display: block !important;
}

.slide img {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    min-height: 100% !important; /* Forza l'altezza minima al 100% */
    width: auto !important; /* Larghezza automatica per mantenere proporzioni */
    max-width: none !important; /* Rimuove limitazioni di larghezza */
    height: auto !important;
}

/* Rimozione pulsanti slideshow */
.slideshow-controls {
    display: none;
}

.prev-btn, .next-btn {
    display: none;
}

/* Weather Section - Minimal */
.weather-section {
    padding: 2rem 1rem;
}

.section-title {
    font-size: 1.8rem;
    color: white;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.weather-intro {
    color: white;
    text-align: center;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.webcam-container {
    margin-bottom: 2rem;
    text-align: center;
}

.webcam-container h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Webcam frame - Full width senza barre nere */
.webcam-frame-container {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Aspect ratio 16:9 */
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.webcam-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.webcam-refresh-btn {
    background: #FFD700;
    color: #003366;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    margin-top: 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.webcam-refresh-btn:hover {
    transform: translateY(-2px);
}

/* Weather Current - Minimal */
.weather-current-frame {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.weather-frame-title {
    color: white;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.weather-current-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: center;
}

.weather-data-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.weather-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.weather-item .weather-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 0.2rem;
}

.weather-item .weather-label {
    color: white;
    font-size: 0.8rem;
}

/* Rosa dei Venti - Aumentata del 50% */
.wind-rose-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.wind-rose {
    position: relative;
    width: 210px; /* Aumentato da 140px */
    height: 210px; /* Aumentato da 140px */
    background-image: url('rosa-dei-venti.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(76, 144, 226, 0.4);
}

.wind-rose-direction {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 210px; /* Aumentato da 140px */
    height: 210px; /* Aumentato da 140px */
    transform: translate(-50%, -50%);
    transition: transform 0.8s ease-in-out;
    z-index: 15;
}

.wind-arrow {
    position: absolute;
    top: -18px; /* Aumentato da -12px */
    left: 50%;
    transform: translateX(-50%);
    font-size: 3.75rem; /* Aumentato da 2.5rem (50% in più) */
    color: #FFD700;
    font-weight: 900;
    text-shadow: 
        0 0 22px rgba(255, 215, 0, 1),
        0 0 37px rgba(255, 215, 0, 0.8),
        4px 4px 9px rgba(0, 0, 0, 0.9);
    filter: drop-shadow(4px 4px 12px rgba(0, 0, 0, 0.8));
    z-index: 20;
}

/* Modifica per weather-historical-frame - grafici uno sotto l'altro */
.weather-historical-frame {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.charts-container {
    display: flex;
    flex-direction: column; /* MODIFICATO: da grid a colonna */
    gap: 2rem; /* AUMENTATO: da 1rem a 2rem per più spazio */
    margin-top: 1rem;
}

.chart-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    width: 95%;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    min-height: 280px;
    max-height: 320px;
}

.chart-title {
    color: #003366; /* MODIFICATO: da #FFD700 a blu scuro per contrasto su bianco */
    font-size: 1.1rem; /* AUMENTATO: da 0.9rem */
    font-weight: 600;
    margin-bottom: 1rem; /* AUMENTATO: da 0.5rem */
}

.chart-item canvas {
    max-width: 100%;
    height: 200px !important;
    max-height: 200px !important;
    border-radius: 5px;
}

/* Sun Info - Minimal */
.sun-info-frame {
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.sun-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.sun-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sun-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 0.2rem;
}

.sun-label {
    color: white;
    font-size: 0.8rem;
}

.weather-links {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.weather-link {
    background: rgba(255, 215, 0, 0.15);
    color: white;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid #FFD700;
    font-size: 0.9rem;
}

.weather-link:hover {
    background: #FFD700;
    color: #003366;
    transform: translateY(-2px);
}

/* Contact Section - Minimal */
.contact-section {
    padding: 2rem 1rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-info {
    background: rgba(0, 51, 102, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.5rem;
}

.contact-info h3, .contact-form h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    color: white;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.submit-btn {
    background: #FFD700;
    color: #003366;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

/* Map container - Aumentato del 50% in altezza */
.map-container {
    border-radius: 10px;
    overflow: hidden;
    height: 450px; /* Aumentato da 300px a 450px (+50%) */
    margin-top: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.map-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer - Minimal */
.footer {
    background: rgba(0, 30, 60, 0.7);
    color: white;
    margin-top: 3rem;
    padding: 2rem 1rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.footer-section h4 {
    color: #FFD700;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.footer-section p {
    line-height: 1.5;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    padding: 0.2rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

/* SEO Hidden Keywords */
.keywords-seo {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Language Switcher - Minimal */
.language-switcher {
    position: fixed;
    top: 70px;
    right: 15px;
    z-index: 1001;
    display: flex;
    gap: 8px;
}

.lang-link {
    background: rgba(0, 51, 102, 0.9);
    color: white;
    padding: 6px 10px;
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-link:hover, .lang-link.active {
    background: #FFD700;
    color: #003366;
    transform: translateY(-2px);
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 0.8rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .logo {
        height: 35px;
    }

    .home-title {
        font-size: 1.6rem;
    }

    .home-subtitle {
        font-size: 1.1rem;
    }

    .home-description {
        font-size: 0.9rem;
    }

    .home-logo {
        max-width: 150px;
    }

    /* Social Links Mobile */
    .social-links {
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
    }
    
    .social-link {
        width: 100%;
        max-width: 250px;
        justify-content: center;
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }

    /* SLIDESHOW MOBILE - FIT VERTICALE CORRETTO */
    .slide img {
        position: absolute !important;
        top: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        height: 100% !important; /* Riempie l'altezza del frame */
        width: auto !important; /* Larghezza proporzionale */
        min-width: 100% !important; /* Assicura copertura orizzontale */
        max-width: none !important;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .weather-links {
        flex-direction: column;
        align-items: center;
    }

    .weather-link {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }

    .section {
        padding: 70px 0.8rem 1rem;
    }

    .weather-current-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .weather-data-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sun-info-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .wind-rose {
        width: 150px; /* Aumentato da 100px (50% in più) */
        height: 150px;
    }
    
    .wind-rose-direction {
        width: 150px;
        height: 150px;
    }
    
    .wind-arrow {
        top: -15px; /* Aumentato da -10px */
        font-size: 3rem; /* Aumentato da 2rem (50% in più) */
        color: #000000;
        text-shadow: 
            0 0 4px #FFFFFF,
            0 0 9px #FFFFFF,
            3px 3px 0 #FFFFFF,
            -3px -3px 0 #FFFFFF,
            3px -3px 0 #FFFFFF,
            -3px 3px 0 #FFFFFF;
        filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.8));
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .language-switcher {
        top: 60px;
        right: 10px;
    }
    
    .lang-link {
        padding: 5px 8px;
        font-size: 0.7rem;
    }

    .map-container {
        height: 375px; /* Aumentato da 250px a 375px (+50%) */
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }

    .nav-menu {
        gap: 0.7rem;
    }

    .nav-link {
        font-size: 0.7rem;
    }

    .logo {
        height: 30px;
    }
    
    .home-title {
        font-size: 1.4rem;
    }

    .home-subtitle {
        font-size: 1rem;
    }

    .home-description {
        font-size: 0.85rem;
    }

    .home-logo {
        max-width: 120px;
    }

    /* SLIDESHOW MOBILE SMALL - FIT VERTICALE CORRETTO */
    .slide img {
        position: absolute !important;
        top: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        height: 100% !important; /* Riempie l'altezza del frame */
        width: auto !important; /* Larghezza proporzionale */
        min-width: 100% !important; /* Assicura copertura orizzontale */
        max-width: none !important;
    }

    .wind-rose {
        width: 120px; /* Aumentato da 80px (50% in più) */
        height: 120px;
    }
    
    .wind-rose-direction {
        width: 120px;
        height: 120px;
    }
    
    .wind-arrow {
        top: -12px; /* Aumentato da -8px */
        font-size: 2.4rem; /* Aumentato da 1.6rem (50% in più) */
    }

    .weather-item .weather-value {
        font-size: 1.2rem;
    }

    .weather-item .weather-label {
        font-size: 0.7rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .map-container {
        height: 300px; /* Aumentato da 200px a 300px (+50%) */
    }
}

/* Utilities */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 1.5rem; }
.text-white { color: white; }
.mt-2 { margin-top: 1.5rem; }