/* --- 1. RESET & UTILS --- */
.hero-content h1, .section-title, .sub-title { text-transform: uppercase; }
.btn-primary, .btn-outline, .btn-doc, .btn-sponsor, .tab-btn { transition: 0.3s; text-decoration: none; }

/* --- 2. HERO SECTION --- */
.hero { 
    height: 100vh; 
    background: url('../images/ginnasti-in-riga.jpg') no-repeat center center/cover; 
    display: flex; align-items: center; justify-content: center; position: relative; text-align: center;
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); }
.hero-content { position: relative; z-index: 2; padding: 0 20px; transform: translateY(-50px); }
.hero-content h1 { font-size: 5rem; font-weight: 900; line-height: 1; margin-bottom: 20px; }
.hero-content h3 { font-size: 1.5rem; color: #0d9644; text-transform: uppercase; letter-spacing: 3px; }
.hero-btns { display: flex; gap: 20px; justify-content: center; margin-top: 35px; }

/* Bottoni Hero */
.btn-primary, .btn-outline { padding: 15px 35px; border-radius: 50px; text-transform: uppercase; }
.btn-primary { background: #0d9644; color: #000; font-weight: 600; }
.btn-primary:hover { background: #fff; transform: translateY(-3px); }
.btn-outline { background: transparent; color: #fff; font-weight: 800; border: 2px solid #fff; }
.btn-outline:hover { background: #fff; color: #000; transform: translateY(-3px); }

/* --- 3. SEZIONI NEWS & LOCANDINE --- */
.news-section { background: #1a1a1a; border-bottom: 1px solid #333; padding: 80px 0; }
.news-container { display: flex; flex-direction: column; gap: 20px; max-width: 800px; margin: auto; }
.news-card { background: #222; padding: 25px; border-left: 5px solid #0d9644; border-radius: 8px; transition: 0.3s; }
.news-card h3 { margin: 0 0 10px 0; color: #fff; font-size: 1.4rem; }
.news-card p { color: #ccc; line-height: 1.6; margin: 0; }

.flyer-section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 50px; font-weight: 800; }
.locandine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; max-width: 1000px; margin: 0 auto; }
.locandina img { width: 100%; border-radius: 12px; cursor: pointer; transition: 0.4s; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.locandina img:hover { transform: scale(1.02); filter: brightness(1.1); }

/* --- 4. INFO, CONTATTI & MODULISTICA --- */
.dark-bg { background: #0a0a0a; padding: 100px 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; }

.info-card { background: #161616; padding: 40px; border-radius: 20px; border: 1px solid #222; transition: 0.3s ease; }
.card-header { margin-bottom: 30px; }
.card-header p { color: #888; font-size: 0.9rem; margin-top: -20px; }
.sub-title { color: #0d9644; margin-bottom: 30px; font-size: 1.6rem; font-weight: 800; }

/* Modulistica */
.buttons-stack { display: grid; grid-template-columns: 1fr; gap: 12px; }
.doc-row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; grid-column: 1 / -1; }
.doc-link { 
    display: flex; align-items: center; gap: 15px; padding: 15px 20px; background: #1f1f1f; 
    border-radius: 12px; color: #fff; border: 1px solid transparent; transition: 0.3s; text-decoration: none;
}
.doc-link:hover { background: #252525; border-color: #0d9644; padding-left: 25px; }
.doc-icon i { color: #0d9644; font-size: 1.1rem; width: 25px; text-align: center; }
.doc-link:hover .doc-icon i { color: #fff; }
.btn-text { font-weight: 500; font-size: 1rem; }

.btn-doc { display: block; padding: 12px 25px; border: 2px solid #333; color: #fff; border-radius: 8px; font-weight: 600; text-align: center; }
.doc-row:hover .btn-doc { border-color: #0d9644; background: #0d9644; color: #000; }

/* Contatti e Social Grid */
.contact-group { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; align-items: center; gap: 20px; }
.contact-details { display: flex; flex-direction: column; }
.contact-details span { font-size: 0.75rem; color: #0d9644; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.contact-fa-icon { font-size: 1.5rem; color: #0d9644; width: 30px; text-align: center; }
.contact-item a { color: #fff; text-decoration: none; font-size: 1.1rem; transition: 0.3s; }
.contact-item a:hover { color: #0d9644; }
.card-divider { border: 0; border-top: 1px solid #222; margin: 30px 0; }

.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 5px; }
.social-card { 
    position: relative; display: flex; text-decoration: none; align-items: center; justify-content: space-between; padding: 20px; 
    background: #1f1f1f; border-radius: 15px; color: #fff; overflow: hidden; border: 1px solid transparent; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.social-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.1); }
.social-content { display: flex; align-items: center; gap: 15px; z-index: 2; }
.social-content i { font-size: 1.8rem; transition: 0.3s; }
.social-content span { font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; }
.external-link { font-size: 0.8rem; opacity: 0.3; transition: 0.3s; }
.social-card:hover .external-link { opacity: 1; transform: translate(2px, -2px); }

/* --- 5. TABS ORARI & PREVIEW --- */
.tabs-container { max-width: 800px; margin: 0 auto; }
.tabs-nav { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; }
.tab-btn { background: #1f1f1f; border: 2px solid #333; color: #fff; padding: 12px 25px; border-radius: 50px; cursor: pointer; font-weight: 700; text-transform: uppercase; }
.tab-btn.active { border-color: #0d9644; background: #0d9644; color: #000; }
.tab-pane { display: none; animation: fadeIn 0.5s ease; }
.tab-pane.active { display: block; }

.locandina-preview { 
    position: relative; max-width: 600px; margin: 0 auto; border-radius: 12px; overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid #444; transition: 0.3s; background: #000; 
}
.locandina-preview:hover { transform: scale(1.02); border-color: #0d9644; }
.locandina-preview img { width: 100%; height: auto; max-height: 70vh; object-fit: cover; object-position: top; display: block; }

.zoom-hint { 
    position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(transparent, rgba(0,0,0,0.9)); 
    color: #fff; padding: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; 
    font-weight: 600; opacity: 0.9; transition: 0.3s; 
}
.locandina-preview:hover .zoom-hint { background: rgba(112, 185, 103, 0.9); color: #000; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }


/* --- 7. RESPONSIVE --- */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 3rem; }
    .hero-btns { flex-direction: column; align-items: center; }
    .hero-btns a { width: 80%; }
    .locandine-grid, .footer-grid { grid-template-columns: 1fr; }
    .info-card { padding: 30px 20px; }
    .card-header, .sub-title { text-align: center; }
    .card-header p { margin-top: 10px; }
    .buttons-stack { grid-template-columns: 1fr 1fr; gap: 10px; }
    .doc-row-split { display: contents; }
    .doc-link { flex-direction: column; justify-content: center; text-align: center; text-decoration: none; padding: 15px 10px; min-height: 100px; }
    .doc-icon i { font-size: 1.4rem; margin-bottom: 8px; width: auto; }
    .btn-text { font-size: 0.8rem; line-height: 1.2; }
    .tab-btn { padding: 10px 15px; font-size: 0.8rem; flex: 1; }
    .locandina-preview img { max-height: none; }
    .tabs-nav { flex-wrap: wrap; }
    .tabs-content { padding: 15px; background: transparent; border: none; }
}

@media (max-width: 480px) {
    .social-grid { grid-template-columns: 1fr; }
}

/* --- SEZIONE PARTNER & SPONSOR --- */
.partners-section {
    background: #fff;
    padding: 80px 0;
    border-top: 5px solid #0d9644;
}

.partners-group {
    text-align: center;
    margin-bottom: 40px;
}

.group-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.logo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 50px;
}

.logo-grid img {
    max-width: 100%;    
}

.istituzionali img { height: 60px; }
.sponsors img { height: 80px;}

.divider-small {
    width: 50px;
    height: 2px;
    background: #eee;
    margin: 40px auto;
}

/* Bottone Sponsor */
.btn-sponsor-wrapper {
    text-align: center;
    margin-top: 60px;
}

.btn-sponsor {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 16px 40px;
    background: transparent;
    border: 2px solid #0d9644;
    color: #333;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-sponsor:hover {
    background: #0d9644;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(112, 185, 103, 0.3);
}

/* --- FOOTER LEGAL --- */
.footer-legal {
    background: #0a0a0a;
    padding: 60px 0 30px;
    color: #777;
    font-size: 0.85rem;
    text-align: center;
}

.footer-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto; /* Tolto il margine bottom per gestire la privacy riga */
    padding-bottom: 20px;
    /* La linea qui sotto è quella che vedevi negli screen */
}

.footer-info p { margin: 5px 0; }
.footer-info strong { color: #aaa; }

/* NUOVA SEZIONE GDPR - Sopra la riga */
.footer-privacy-text {
    max-width: 1000px;
    margin: 0 auto 30px; /* 30px di spazio sopra il divider */
    padding-bottom: 30px;
    border-bottom: 1px solid #1a1a1a; /* Questa è la riga rossa che hai disegnato */
    text-align: center;
}

.footer-privacy-text p {
    color: #777; /* Stesso colore dei testi sopra */
    font-size: 0.85rem; /* Stessa grandezza */
    font-weight: 400; /* Non bold */
    margin: 0;
    line-height: 1.5;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.admin-link {
    color: #444;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 15px;
    border: 1px solid #1a1a1a;
    border-radius: 5px;
    transition: 0.3s;
}

.admin-link:hover {
    color: #0d9644;
    border-color: #0d9644;
}

/* Mobile */
@media (max-width: 768px) {
    .footer-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .footer-privacy-text {
        padding: 0 20px 30px; /* Padding laterale per non toccare i bordi su mobile */
    }

    .logo-grid { gap: 30px; }
    .istituzionali img { height: 45px; }
    .sponsors img { height: 60px; }
}

.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 24px;
    white-space: nowrap; 
}

/* Sezione Corsi coordinata */
#corsi { background: #0a0b09; padding: 80px 0; }

.tabs-container { margin-top: 40px; }

/* Navigazione Tab - Coesa con i documenti */
.tabs-nav {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.tab-btn {
    background: #14160f;
    border: 1px solid #262a1f;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-location {
    color: #f4f7f1;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
}

.btn-year {
    color: #9aa392;
    font-size: 11px;
    font-weight: 600;
}

.tab-btn.active {
    background: #0d9644;
    border-color: #0d9644;
}

.tab-btn.active .btn-location,
.tab-btn.active .btn-year {
    color: #0a0b09;
}

/* Contenuto Tab - Locandina non troppo grande */
.locandina-wrapper {
    max-width: 550px; /* Dimensione contenuta per stare in una schermata */
    margin: 0 auto;
    text-align: center;
}

.locandina-preview {
    position: relative;
    background: #14160f;
    border: 1px solid #262a1f;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.locandina-preview img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.zoom-overlay {
    position: absolute;
    inset: 0;
    background: rgba(112, 185, 103, 0.8); /* Verde accent semi-trasparente */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #0a0b09;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-overlay i { font-size: 24px; margin-bottom: 8px; }
.zoom-overlay span { font-weight: 800; font-size: 12px; text-transform: uppercase; }

.locandina-preview:hover { border-color: #0d9644; }
.locandina-preview:hover .zoom-overlay { opacity: 1; }

.locandina-caption {
    margin-top: 15px;
    font-size: 13px;
    color: #9aa392;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.empty-state { text-align: center; color: #9aa392; opacity: 0.6; }

/* Responsive */
@media (max-width: 768px) {
    .tab-btn { padding: 10px 16px; min-width: 120px; }
    .locandina-wrapper { max-width: 100%; }
}

/* --- 12. SEZIONE CORSI & SEDI (RE-DESIGN ARROTONDATO) --- */
#corsi { padding: 80px 0; background: #0a0b09; }

.corsi-wrapper { margin-top: 40px; }

/* Navigazione Tab (Pillole) */
.sedi-selector { display: flex; justify-content: center; margin-bottom: 30px; }

.sedi-nav {
    display: inline-flex;
    background: #14160f;
    padding: 6px;
    border-radius: 100px; /* Arrotondamento massimo */
    border: 1px solid #262a1f;
    overflow-x: auto;
    scrollbar-width: none;
}
.sedi-nav::-webkit-scrollbar { display: none; }

.sede-tab {
    background: transparent;
    border: none;
    color: #9aa392;
    padding: 10px 25px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sede-tab.active { background: #0d9644; color: #0a0b09; }

/* Pannelli Contenuto */
.sede-pane { display: none; animation: fadeIn 0.4s ease forwards; }
.sede-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Card Orari */
.orari-card {
    max-width: 600px; /* Contenuto per evitare preview troppo grandi */
    margin: 0 auto;
    background: #14160f;
    border: 1px solid #262a1f;
    border-radius: 24px;
    padding: 12px; /* Cornice intorno all'immagine */
}

.orari-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px 15px;
}

.info-label { display: block; font-size: 10px; color: #9aa392; text-transform: uppercase; font-weight: 800; letter-spacing: 0.05em; margin-bottom: 2px; }
.info-title { font-size: 18px; font-weight: 700; color: #f4f7f1; }
.info-year { font-size: 16px; font-weight: 700; color: #0d9644; }
.header-season { text-align: right; }

/* Immagine Preview */
.orari-preview {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
}

.orari-preview img { width: 100%; height: auto; display: block; transition: opacity 0.3s; }

.orari-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 11, 9, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    color: #fff;
}

.orari-overlay i { font-size: 24px; margin-bottom: 8px; color: #0d9644; }
.orari-overlay span { font-size: 12px; font-weight: 800; text-transform: uppercase; }

.orari-preview:hover .orari-overlay { opacity: 1; }

/* Responsive Mobile */
@media (max-width: 650px) {
    .sedi-selector { justify-content: flex-start; padding: 0 10px; }
    .orari-card { border-radius: 20px; }
    .info-title { font-size: 15px; }
    .info-year { font-size: 14px; }
    .header-info, .header-season { padding: 0 5px; }
}

/* --- 4. MODULISTICA (DESIGN A RIGA INTERA) --- */
.docs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-row-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: #1f1f1f;
    border-radius: 14px;
    border: 1px solid #262a1f;
    text-decoration: none;
    transition: all 0.3s ease;
}

.doc-row-link:hover {
    background: #252525;
    border-color: #0d9644;
    transform: translateX(5px);
}

.doc-content-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.doc-icon-circle {
    width: 35px;
    height: 35px;
    background: rgba(112, 185, 103, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-icon-circle i {
    color: #0d9644;
    font-size: 0.9rem;
}

.doc-title-text {
    color: #f4f7f1;
    font-weight: 600;
    font-size: 1rem;
}

.doc-content-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.doc-type-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #9aa392;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #14160f;
    padding: 4px 10px;
    border-radius: 6px;
}

.doc-arrow {
    color: #333;
    font-size: 0.8rem;
    transition: 0.3s;
}

.doc-row-link:hover .doc-arrow {
    color: #0d9644;
    transform: translateX(3px);
}

/* --- 12. FIX TABS CENTRATE SU MOBILE --- */
.sedi-selector {
    display: flex;
    justify-content: center; /* Centra su PC */
    width: 100%;
    margin-bottom: 35px;
}

.sedi-nav {
    display: inline-flex;
    background: #14160f;
    padding: 6px;
    border-radius: 100px;
    border: 1px solid #262a1f;
    /* Rimuovi overflow-x su mobile se vuoi il centramento perfetto, 
       o tienilo se le sedi sono troppe per lo schermo */
}

@media (max-width: 768px) {
    /* Reset della griglia documenti per occupare sempre la riga intera */
    .buttons-stack { 
        grid-template-columns: 1fr !important; 
    }

    .info-card {
        padding: 30px 20px;
    }

    /* Fix definitivo centramento tab mobile */
    .sedi-selector {
        justify-content: center; /* Forza il centro anche su mobile */
        padding: 0;
    }

    .sedi-nav {
        margin: 0 auto; /* Centra il blocco inline-flex */
        max-width: 95%; /* Evita che tocchi i bordi */
        justify-content: center;
    }

    .sede-tab {
        padding: 10px 18px; /* Leggermente più piccolo su mobile */
        font-size: 11px;
    }
}