/* ===============================
   STYLE CONTATTI & NEWS
================================== */

/* --- HERO SPECIFICA --- */
.hero-contatti {
    position: relative;
    /* Inserisci qui l'URL della tua immagine di copertina */
    background-image: url('https://placehold.co/1920x600?text=Copertina+Contatti');
    background-size: cover;
    background-position: center;
    min-height: 50vh;
    /* Altezza media */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--colore-bianco);
    margin-bottom: 3rem;
}

.hero-contatti .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    /* Scurisce l'immagine per leggere il testo */
    z-index: 1;
}

.hero-contatti .hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    max-width: 800px;
}

.hero-contatti h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-contatti .hero-text {
    font-size: 1.3rem;
    font-weight: 300;
}

/* --- LAYOUT GENERALE --- */


.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: var(--colore-primario);
    font-size: 2.5rem;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

/* --- SEZIONE TEAM (GRIGLIA) --- */
.team-grid {
    display: grid;
    /* 4 colonne su schermi grandi */
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.team-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid #eee;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.team-img-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    /* Mantiene l'immagine quadrata */
    overflow: hidden;
}

.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    /* Rimuove il radius di default dell'img per adattarsi alla card */
    transition: transform 0.5s ease;
}

.team-card:hover .team-img-wrapper img {
    transform: scale(1.05);
}

.team-info {
    padding: 1.5rem;
}

.team-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
    color: var(--colore-nero);
}

.team-info .role {
    display: block;
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 1rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-contacts {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.team-contacts a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--colore-grigio);
    color: var(--colore-primario);
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.team-contacts a:hover {
    background-color: var(--colore-primario);
    color: var(--colore-bianco);
}

/* --- SEZIONE LOCATION (SEDI) --- */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.location-card {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    border-top: 5px solid var(--colore-secondario);
    /* Colore distintivo in alto */
}

.location-card.admin-card {
    border-top-color: var(--colore-primario);
    /* L'amministrazione ha il colore primario */
}

.location-icon {
    font-size: 2.5rem;
    color: var(--colore-primario);
    margin-bottom: 1.5rem;
}

.location-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.location-card .address {
    font-style: normal;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.location-card hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 1.5rem 0;
}

.location-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.location-details a {
    color: var(--colore-nero);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.location-details a:hover {
    color: var(--colore-secondario);
}

.btn-map {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--colore-primario);
    color: var(--colore-primario);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-map:hover {
    background-color: var(--colore-primario);
    color: var(--colore-bianco);
}

.badge {
    display: inline-block;
    background-color: #eee;
    color: #555;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- RESPONSIVE --- */

/* Tablet (max 992px) */
@media (max-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 colonne */
    }

    .locations-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 colonne, l'ultimo andrà a capo o si centrerà se gestito */
    }

    /* Centra l'ultimo elemento se dispari nei locations */
    .locations-grid> :last-child:nth-child(odd) {
        grid-column: span 2;
        /* L'amministrazione prende tutta la larghezza o si centra */
        max-width: 600px;
        margin: 0 auto;
        width: 100%;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    .hero-contatti h1 {
        font-size: 2.5rem;
    }

    .team-grid {
        grid-template-columns: 1fr;
        /* 1 colonna */
        max-width: 400px;
        margin: 0 auto;
    }

    .locations-grid {
        grid-template-columns: 1fr;
        /* 1 colonna */
    }

    .locations-grid> :last-child:nth-child(odd) {
        grid-column: auto;
        /* Reset per mobile */
    }
}