/* =========================================
   COMPONENTS.CSS - Bottoni, Card, Tabelle e Moduli
   ========================================= */

/* --- INTESTAZIONI PAGINE INTERNE --- */
.content-section {
    max-width: 1200px;
    margin: 60px auto 120px;
    padding: 0 5%;
}

.page-header {
    background-color: var(--csi-blue);
    color: white;
    padding: 60px 20px;
    text-align: center;
    width: 100%;
}

.titolo-gigante {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 2px;
    line-height: 1.1;
}

.section-title {
    color: var(--csi-blue);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 40px;
}

/* --- BOTTONI GLOBALI --- */
.btn-cta, .btn-strip, .btn-card, .btn-sport, .btn-outline, .btn-download, .btn-small {
    display: inline-block;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-cta {
    background-color: var(--csi-orange);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.btn-cta:hover { background-color: var(--csi-orange-hover); transform: translateY(-2px); }

.btn-strip {
    background-color: var(--csi-orange);
    color: white;
    padding: 15px 30px;
    font-size: 1.1rem;
    white-space: nowrap;
}
.btn-strip:hover { background-color: var(--csi-orange-hover); transform: scale(1.05); }

.btn-card {
    color: var(--csi-blue);
    border: 2px solid var(--csi-blue);
    padding: 8px 20px;
}
.btn-card:hover { background-color: var(--csi-blue); color: white; }

.btn-sport {
    background-color: var(--csi-orange);
    color: white;
    padding: 10px 20px;
    font-size: 0.9rem;
}
.btn-sport:hover { background-color: var(--csi-orange-hover); }

.btn-outline {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    padding: 10px 20px;
    font-size: 0.9rem;
}
.btn-outline:hover { background-color: white; color: var(--csi-blue); }

.btn-download {
    background-color: #d32f2f; /* Rosso PDF */
    color: white;
    padding: 10px 20px;
}
.btn-download:hover { background-color: #b71c1c; }

.btn-small {
    background-color: var(--csi-blue);
    color: white;
    padding: 5px 15px;
    font-size: 0.9rem;
    border-radius: 4px;
}
.btn-small:hover { background-color: var(--csi-orange); }

.btn-text { color: var(--csi-orange); font-weight: bold; text-decoration: none; font-size: 0.9rem; }
.btn-text:hover { text-decoration: underline; }

/* --- GRIGLIE E CARD GENERICHE --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}
.card:hover { transform: translateY(-5px); }

.card-image { height: 200px; background-size: cover; background-position: center; }
.card-content { padding: 20px; }
.card-content h3 { color: var(--csi-blue); margin-bottom: 10px; }
.card-content p { color: #666; margin-bottom: 20px; font-size: 0.9rem; }

/* --- CARD SPORT (Discipline) --- */
.main-sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}
.sport-card-big {
    height: 300px; background-size: cover; background-position: center;
    border-radius: 15px; display: flex; align-items: center; justify-content: center;
    text-align: center; color: white; box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s; position: relative; overflow: hidden;
}
.sport-card-big:hover { transform: translateY(-5px); }
.sport-info h2 { font-size: 2.2rem; margin-bottom: 5px; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); font-weight: 800; }
.sport-info p { font-size: 1rem; margin-bottom: 25px; text-shadow: 1px 1px 3px rgba(0,0,0,0.9); color: #eee; }

.other-sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.sport-card-small {
    height: 150px; background-size: cover; background-position: center;
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    text-align: center; color: white; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s; cursor: pointer;
}
.sport-card-small:hover { transform: scale(1.03); box-shadow: 0 8px 15px rgba(0,0,0,0.2); }
.sport-card-small h3 { font-size: 1.3rem; text-shadow: 2px 2px 4px rgba(0,0,0,1); padding: 0 10px; }

/* --- CARD SERVIZI E TEAM --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card {
    background: white; padding: 30px; border-radius: 10px; text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); border-bottom: 4px solid var(--csi-blue);
    transition: transform 0.3s; border: 1px solid #eee;
}
.service-card:hover { transform: translateY(-5px); border-bottom-color: var(--csi-orange); }
.service-icon { font-size: 3rem; color: var(--csi-blue); margin-bottom: 20px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 50px; justify-content: center; }
.team-card { text-align: center; padding: 20px; background: white; border-radius: 10px; transition: transform 0.3s; border: 1px solid #eee; }
.team-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.avatar-circle {
    width: 100px; height: 100px; background-color: #eef2ff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 15px auto;
    color: var(--csi-blue); font-size: 40px; border: 3px solid var(--csi-blue);
}
.president .avatar-circle { border-color: var(--csi-orange); color: var(--csi-orange); }
.role { color: var(--csi-blue); font-weight: bold; font-size: 0.9rem; text-transform: uppercase; }

/* --- COMPONENTI EXTRA (Tabelle, Download, InfoBox) --- */
.download-area { background-color: #ffffff; padding: 30px; border-radius: 10px; border-left: 5px solid var(--csi-blue); margin-bottom: 40px; }
.category-block { margin-bottom: 30px; }
.action-buttons { display: flex; gap: 10px; margin-top: 10px; }

.table-container { overflow-x: auto; margin-top: 20px; box-shadow: 0 0 10px rgba(0,0,0,0.1); border-radius: 8px; }
.standings-table { width: 100%; border-collapse: collapse; background-color: white; text-align: left; }
.standings-table th, .standings-table td { padding: 12px 15px; border-bottom: 1px solid #ddd; }
.standings-table th { background-color: var(--csi-blue); color: white; text-transform: uppercase; font-size: 0.85rem; }
.standings-table tr:nth-child(even) { background-color: #f9f9f9; }
.standings-table tr:hover { background-color: #f1f1f1; }
.standings-table td:first-child { font-weight: bold; color: var(--csi-orange); text-align: center; }
.standings-table th:first-child { text-align: center; }

.info-box {
    background-color: white; padding: 40px; border-radius: 30px; text-align: center;
    box-shadow: 0 10px 30px rgba(0, 51, 153, 0.15); margin: 60px auto; max-width: 800px;
    border-top: 5px solid var(--csi-orange);
}
.map-container { border-radius: 15px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.2); border: 4px solid white; }

/* --- STILE LISTA COMUNICATI (Pagine Sport) --- */
.comunicato-item {
    background: white;
    border-left: 5px solid var(--csi-blue);
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}
.comunicato-item:hover { transform: translateX(5px); }
.comunicato-titolo { font-weight: bold; font-size: 1.1rem; color: #333; }
.btn-scarica {
    background-color: var(--csi-orange);
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}
.btn-scarica:hover { background-color: var(--csi-orange-hover); color: white; }

@media (max-width: 600px) {
    .comunicato-item { flex-direction: column; align-items: flex-start; gap: 10px; }
    .btn-scarica { width: 100%; text-align: center; box-sizing: border-box; }
}
/* --- COLORI SPECIFICI BACHECA COMUNICATI --- */
.item-calcio { border-left: 5px solid var(--csi-blue); }
.item-pallavolo { border-left: 5px solid var(--csi-orange); }
.item-basket { border-left: 5px solid #28a745; }

.item-calcio .btn-scarica:hover { background-color: var(--csi-blue); color: white; border-color: var(--csi-blue); }
.item-pallavolo .btn-scarica:hover { background-color: var(--csi-orange); color: white; border-color: var(--csi-orange); }
.item-basket .btn-scarica:hover { background-color: #28a745; color: white; border-color: #28a745; }

/* Scroller personalizzato per le liste interne */
.lista-scroll {
    max-height: 350px; 
    overflow-y: auto; 
    padding-right: 15px;
}
.lista-scroll::-webkit-scrollbar { width: 6px; }
.lista-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

/* Stile per le nuove Card Premium della Dirigenza */
    
    .premium-card {
        background: white;
        border-radius: 12px;
        overflow: hidden; /* Questo fa sì che la foto segua l'angolo arrotondato della card */
        box-shadow: 0 5px 20px rgba(0,0,0,0.08);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        text-align: center;
    }

    .premium-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(19, 67, 149, 0.15); /* Ombra bluastra CSI al passaggio del mouse */
    }

    .premium-photo {
        width: 100%;
        height: 250px; /* Altezza verticale a ritratto */
        background-size: cover;
        background-position: top center; /* "top center" evita che tagli la testa se la foto è grande */
        border-bottom: 4px solid var(--csi-orange); /* La riga arancione che separa foto e testo */
    }

    .premium-info {
        padding: 25px 15px;
    }

    .premium-info h3 {
        color: var(--csi-blue);
        margin-bottom: 5px;
        font-size: 1.4rem;
    }

    .premium-info span {
        color: #777;
        font-size: 0.95rem;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    /* =========================================
   BOX INTRODUTTIVO E GRIGLIA VALORI (Pillole)
   ========================================= */

.intro-context { max-width: 900px; margin: 0 auto 50px auto; text-align: center; padding-top: 40px; }
.intro-context h2 { color: var(--csi-blue); margin-bottom: 20px; font-size: 2.2rem; }
.intro-context p { font-size: 1.15rem; color: #444; line-height: 1.8; margin-bottom: 15px; }
.intro-context strong { color: var(--csi-orange); }

.valori-grid { display: flex; justify-content: center; gap: 40px; margin-top: 40px; flex-wrap: wrap; }

.valore-item { width: 260px; text-align: center; padding: 10px; }
.valore-item i { font-size: 2.2rem; color: var(--csi-orange); margin-bottom: 20px; background: rgba(236, 102, 8, 0.1); width: 80px; height: 80px; line-height: 80px; border-radius: 50%; display: inline-block; }
.valore-item h4 { color: var(--csi-blue); margin-bottom: 12px; font-size: 1.25rem; font-weight: 700; }
.valore-item p { font-size: 0.95rem; color: #555; line-height: 1.6; margin: 0; }