/* --- Impostazioni Globali e Variabili --- */
:root {
    --primary-color: #0d2c4b; /* Blu Aviazione Scuro */
    --secondary-color: #fca311; /* Arancione/Oro per accenti */
    --background-color: #f4f5f7; /* Grigio Chiaro */
    --text-color: #333333;
    --light-text-color: #ffffff;
    --card-bg-color: #ffffff;
    --footer-bg-color: #1e1e1e;
    --main-font: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--main-font);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- Header e Navigazione --- */
.main-header {
    background-color: var(--light-text-color);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--secondary-color);
}

.nav-button {
    background-color: var(--primary-color);
    color: var(--light-text-color) !important;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-button:hover {
    background-color: #0056b3;
    color: var(--light-text-color) !important;
}


/* --- Sezione Hero (Solo Home Page) --- */
.hero {
    height: 70vh;
    /* MODIFICA QUESTA RIGA 👇 */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('images/dolomites_bg2.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-text-color);
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* --- Intestazione Pagine Interne --- */
.page-header {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* --- Area Contenuti Principale --- */
.content-area {
    padding: 4rem 0;
}

.info-section {
    text-align: center;
    margin-bottom: 4rem;
}

.info-section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-section .subtitle {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    color: #555;
}

/* --- Layout a Card --- */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-bg-color);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-link {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

.card-link:hover {
    color: var(--secondary-color);
}

/* --- Sezione Team (Pagina Chi Siamo) --- */
.team-section {
    margin-top: 4rem;
    text-align: center;
}

.team-section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-member {
    background: var(--card-bg-color);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.team-member h3 {
    margin-top: 1rem;
    color: var(--primary-color);
}

.team-member span {
    color: var(--secondary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

/* --- Lista News (Pagina News) --- */
.news-list .news-article {
    background-color: var(--card-bg-color);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.news-article h2 {
    color: var(--primary-color);
}

.article-meta {
    margin: 0.5rem 0 1rem 0;
    color: #777;
    font-size: 0.9rem;
}

.article-meta span {
    margin-right: 1.5rem;
}

.article-meta i {
    margin-right: 0.5rem;
}

.read-more-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.read-more-link:hover {
    color: var(--secondary-color);
}

/* --- Footer --- */
.main-footer {
    background-color: var(--footer-bg-color);
    color: #a9a9a9;
    padding-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-section h4 {
    color: var(--light-text-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-section a {
    color: #a9a9a9;
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--light-text-color);
}

.footer-section i {
    margin-right: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #444;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

/* --- Media Queries per la Responsività --- */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .info-section h2 {
        font-size: 2rem;
    }
    .page-header h1 {
        font-size: 2.5rem;
    }
}

/* --- Stili per Menu Hamburger --- */
.mobile-nav-toggle {
    display: none; /* Nascosto di default sui desktop */
}

@media (max-width: 768px) {
    .main-nav {
        /* Nasconde il menu fuori dallo schermo */
        position: fixed;
        inset: 0 0 0 30%; /* Da destra fino al 30% dello schermo */
        flex-direction: column;
        padding: min(20vh, 10rem) 2em;
        
        background: hsl(0 0% 100% / 0.1); /* Sfondo semi-trasparente */
        backdrop-filter: blur(1rem); /* Effetto vetro smerigliato */
        
        transform: translateX(100%);
        transition: transform 350ms ease-out;
    }

    .main-nav[data-visible="true"] {
        transform: translateX(0%); /* Mostra il menu */
    }

    .main-nav ul {
        flex-direction: column; /* Voci del menu in colonna */
        align-items: flex-start;
        gap: 2rem;
    }

    .mobile-nav-toggle {
        display: block;
        position: absolute;
        z-index: 9999;
        background-color: transparent;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="%230d2c4b"><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></svg>');
        background-repeat: no-repeat;
        width: 2rem;
        height: 2rem;
        border: 0;
        top: 1.5rem;
        right: 1.5rem;
    }

    .mobile-nav-toggle[aria-expanded="true"] {
         background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="%230d2c4b"><path d="M19.3 5.3l-1.4-1.4L12 10.6 6.1 4.7 4.7 6.1 10.6 12l-5.9 5.9 1.4 1.4L12 13.4l5.9 5.9 1.4-1.4L13.4 12l5.9-5.9z"/></svg>');
    }
    
    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0,0,0,0);
        border: 0;
    }
}

/* --- Stili per Selettore Lingua (VERSIONE CORRETTA E MIGLIORATA) --- */
.language-selector {
    position: relative; /* Mantiene il menu ancorato al genitore */
}

/* Applichiamo il padding qui per creare un'area "ponte" invisibile */
.language-selector > a {
    padding-bottom: 1rem; 
}

.language-selector ul {
    display: block; /* Lo teniamo sempre visibile ma lo nascondiamo con altri metodi */
    opacity: 0; /* Lo rendiamo invisibile */
    visibility: hidden; /* Lo nascondiamo agli screen reader quando non visibile */
    
    position: absolute;
    top: 100%; /* Posizionato esattamente sotto l'header */
    right: 0;
    background-color: var(--card-bg-color);
    list-style: none;
    padding: 0.5rem 0;
    
    margin-top: 0; /* Rimosso il margine che creava il problema */
    
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 120px;
    z-index: 10;
    
    /* Aggiungiamo una transizione per un effetto di comparsa più morbido */
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    transform: translateY(10px); /* Parte leggermente più in basso */
}

.language-selector:hover ul {
    opacity: 1; /* Lo rendiamo visibile */
    visibility: visible; /* Lo rendiamo accessibile */
    transform: translateY(0); /* Torna alla sua posizione originale */
}

.language-selector ul li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--primary-color);
}

.language-selector ul li a:hover {
    background-color: var(--background-color);
    color: var(--secondary-color);
}

.language-selector .fa-caret-down {
    font-size: 0.8rem;
    margin-left: 0.3rem;
}




/* ===================================*/
/* --- Stili per Pagina Contatti --- */
/* ===================================*/

.contact-form-container {
    max-width: 700px;
    margin: 0 auto; /* Centra il form */
    padding: 2.5rem;
    background-color: var(--card-bg-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-form-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--main-font);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(13, 44, 75, 0.3);
}

.contact-form button[type="submit"] {
    width: 100%;
    border: none;
    cursor: pointer;
}


/* ===================================*/
/* --- Stili per Pagina Login --- */
/* ===================================*/

.login-container {
    max-width: 450px;
    margin: 4rem auto;
    padding: 2.5rem;
    background-color: var(--card-bg-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.login-container h2 {
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.login-form input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--main-font);
    font-size: 1rem;
}

.login-form button[type="submit"] {
    width: 100%;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
}

.forgot-password {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
}
.forgot-password:hover {
    text-decoration: underline;
}


/* --- Stili per Area Soci --- */
.header-soci {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.user-info {
    font-weight: 600;
    color: var(--primary-color);
}
.logout-button {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    margin-left: 1rem;
    font-weight: 700;
}

.container-fullwidth {
    width: 100%;
    max-width: 100%;
}

.soci-area {
    display: flex;
    min-height: calc(100vh - 80px); /* Altezza minima (tutta la pagina meno l'header) */
}

.soci-menu {
    flex: 0 0 250px; /* Base fissa di 250px, non si espande, non si restringe */
    background-color: var(--primary-color);
    padding: 2rem 0;
}

.soci-menu nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.soci-menu nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--light-text-color);
    text-decoration: none;
    font-weight: 600;
    border-left: 4px solid transparent;
    transition: background-color 0.3s ease, border-left 0.3s ease;
}
.soci-menu nav a i {
    margin-right: 1rem;
}

.soci-menu nav a:hover {
    background-color: #0056b3;
}

.soci-menu nav li.active a {
    background-color: #0056b3;
    border-left: 4px solid var(--secondary-color);
}

.soci-content {
    flex-grow: 1; /* Occupa tutto lo spazio rimanente */
    padding: 2rem 3rem;
    background-color: #f4f5f7; /* Sfondo leggermente grigio per la content area */
}
.soci-content h1 {
    color: var(--primary-color);
    border-bottom: 2px solid #ddd;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}
