/* assets/css/coop.css */
:root {
    --ocean-deep: #0a3d62;
    --ocean-light: #1e90ff;
    --sun-yellow: #ffc93c;
    --sun-orange: #ff9a3c;
    --sand: #f8e8d4;
    --grass: #27ae60;
    --coral: #ff6b6b;
    --white: #ffffff;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --gradient-summer: linear-gradient(135deg, var(--ocean-light) 0%, var(--ocean-deep) 100%);
    --shadow-soft: 0 10px 40px rgba(10, 61, 98, 0.15);
    --shadow-card: 0 8px 30px rgba(10, 61, 98, 0.1);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
}

/* Colore e dimensione delle icone nei titoli H3 */
.info-card h3 i {
    color: var(--ocean-deep);
    font-size: 1.2rem;
}

/* Allineamento delle icone dentro i cerchi/span dei link */
.contact-link span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px; /* Larghezza fissa per allineare le icone verticalmente */
    color: var(--ocean-deep);
}

/* Icona orologio negli orari */
.office-hours h4 i {
    margin-right: 8px;
    font-size: 1rem;
}

/* --- RESET E BARRA DI NAVIGAZIONE --- */
.nav {
    background-color: #004a99; /* Il blu della tua sezione hero */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 80px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
}

/* --- LOGO --- */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo-text {
    color: #ffffff !important;
    font-size: 1.2rem;
    font-weight: 600;
}

/* --- MENU PRINCIPALE (Senza Bullets) --- */
.nav-links {
    display: flex;
    list-style: none !important; /* Rimuove pallini */
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-links li {
    list-style: none !important; /* Rimuove pallini dagli item */
    position: relative; /* FONDAMENTALE: fa da ancora per il dropdown */
    display: flex;
    align-items: center;
}

.nav-links li a {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 500;
}

/* --- DROPDOWN (Senza Bullets e Centrato) --- */
.dropdown-menu {
    display: none;
    list-style: none !important; /* Rimuove pallini sottomenu */
    margin: 0;
    padding: 10px 0;
    
    /* Posizionamento Centrato */
    position: absolute;
    top: 100%;       /* Appare sotto il testo */
    left: 50%;       /* Inizia dal centro del testo genitore */
    transform: translateX(-50%); /* Si sposta indietro per centrarsi perfettamente */
    
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 1100;
}

.dropdown-menu li {
    list-style: none !important;
    width: 100%;
    display: block;
}

.dropdown-menu li a {
    color: #004a99 !important; /* Blu su sfondo bianco */
    padding: 12px 20px;
    display: block;
    white-space: nowrap; /* Evita che il testo vada a capo */
    text-align: left;
}

.dropdown-menu li a:hover {
    background-color: #f5f5f5;
}

/* MOSTRA AL PASSAGGIO DEL MOUSE */
.dropdown:hover .dropdown-menu {
    display: block;
}

/* --- BOTTONE AREA RISERVATA --- */
.nav-cta {
    background-color: #ffcc44; /* Giallo screenshot */
    color: #004a99 !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.2s;
}

.nav-cta:hover {
    transform: scale(1.05);
}

/* --- Stile specifico per FAQ --- */
.faq-container {
    max-width: 850px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 25px; /* Distanza tra le domande */
}

.faq-container .info-card {
    border-left: 5px solid #ffcc44; /* Barra gialla decorativa a sinistra */
    transition: transform 0.3s ease;
}

.faq-container .info-card:hover {
    transform: translateY(-5px);
}

.faq-container h3 {
    margin-bottom: 10px;
    color: var(--ocean-deep);
    font-size: 1.3rem;
}

.faq-container i {
    color: #ffcc44; /* Icone gialle come i pulsanti */
    margin-right: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: 'DM Sans', sans-serif; color: var(--text-dark); background: var(--sand); overflow-x: hidden; line-height: 1.6; }
h1, h2, h3, h4, h5, h6 { font-family: 'Baloo 2', cursive; font-weight: 700; line-height: 1.2; }

/* Navigation - override di coop.css, il layout e' in header.php */
.nav { transition: all 0.3s ease; }
.nav.scrolled { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); box-shadow: var(--shadow-soft); }
.nav.scrolled .nav-logo-text { color: var(--ocean-deep) !important; }
.nav.scrolled .nav-links > li > a { color: var(--text-dark) !important; }
.nav.scrolled .custom-hamburger { border-color: rgba(0,0,0,0.2); }
.nav.scrolled .custom-hamburger .bar { background-color: var(--ocean-deep); }
.nav-logo-icon { width: 48px; height: 48px; background: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; overflow: hidden; }
.nav-logo-icon img { width: 100%; height: 100%; object-fit: cover; }

/* Hero */
.hero { min-height: 100vh; background: var(--gradient-summer); display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); padding: 2rem; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }

/* Sections */
.section { padding: 5rem 2rem; max-width: 1200px; margin: 0 auto; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.info-card { background: var(--white); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }

/* Footer */
.footer { background: var(--ocean-deep); color: var(--white); padding: 4rem 2rem 2rem; }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.8fr repeat(3, 1fr); gap: 3rem; }
.footer-logo img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; }
.footer p, .footer .footer-brand p { color: rgba(255,255,255,0.9) !important; line-height: 1.7; }
.footer strong { color: #ffcc44 !important; }
.footer-brand span { color: #ffffff !important; font-weight: 600; }
.footer-section h4 { color: var(--sun-yellow); margin-bottom: 1rem; }
.footer-section a { color: rgba(255,255,255,0.8); text-decoration: none; display: block; margin-bottom: 0.5rem; }
.footer-section a:hover { color: #ffcc44; opacity: 1; }
.footer-section i { margin-right: 10px; color: #ffcc44; }
.footer-bottom { text-align: center; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); opacity: 0.7; }
.footer-bottom p { color: rgba(255,255,255,0.9); }

/* Animations */
.fade-in { opacity: 0; transform: translateY(20px); transition: 0.6s all ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* === SECTION HEADER (Pagine pubbliche) === */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-tag {
    display: inline-block;
    background: var(--sand);
    color: var(--ocean-deep);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 15px;
}

.section-header h1 {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--ocean-deep);
    margin-bottom: 12px;
}

.section-description {
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.7;
    text-align: left;
}

/* === Contenuto da editor (pagine pubbliche) === */
.section-description p {
    margin-bottom: 0.6rem;
}

.section-description hr {
    border: none;
    border-top: 2px solid var(--sand, #f8e8d4);
    margin: 1.8rem 0;
}

/* Titoli sezione (i <strong> soli dentro un <p>) */
.section-description p > strong:only-child {
    display: block;
    font-family: 'Baloo 2', cursive;
    font-size: 1.2rem;
    color: var(--ocean-deep, #0a3d62);
    margin-bottom: 0.3rem;
}

/* Liste */
.section-description ul,
.section-description ol {
    padding-left: 1.3rem;
    margin-bottom: 1rem;
}

.section-description li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Tabelle responsive — scrollabili singolarmente su mobile */
.section-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.92rem;
    background: var(--white, #fff);
    border-radius: var(--radius-sm, 8px);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.section-description thead { display: table-header-group; }
.section-description tbody { display: table-row-group; }
.section-description tr { display: table-row; }

.section-description th,
.section-description td {
    display: table-cell;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.section-description th {
    background: var(--ocean-deep, #0a3d62);
    color: #fff;
    font-weight: 600;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.section-description tbody tr:nth-child(even) {
    background: #f9fafb;
}

.section-description tbody tr:hover {
    background: #eef4ff;
}

/* === OFFSEASON MESSAGE BOX === */
.offseason-box {
    max-width: 700px;
    margin: 140px auto 60px;
    padding: 60px 40px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
    border: 2px solid var(--sand);
}

.offseason-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    line-height: 1;
}

.offseason-box h2 {
    font-family: 'Baloo 2', cursive;
    color: var(--ocean-deep);
    font-size: 2rem;
    margin-bottom: 15px;
}

.offseason-box p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

.offseason-contact {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--sand);
}

.offseason-contact p {
    margin-bottom: 5px;
}

.offseason-contact a {
    color: var(--ocean-light);
    text-decoration: none;
    font-weight: 600;
}

.offseason-contact a:hover {
    color: var(--ocean-deep);
}

@media (max-width: 600px) {
    .offseason-box {
        margin-top: 100px;
        padding: 40px 20px;
    }
    .offseason-box h2 {
        font-size: 1.5rem;
    }
}

/* === HOME PAGE: Sezioni Aggiuntive === */
.home-section {
    padding: 60px 0;
}

.home-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.home-section-alt {
    background-color: #fdf6e9;
}

.home-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.home-section .section-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: #444;
    line-height: 1.8;
}

.home-section .section-content p {
    margin-bottom: 0.8rem;
}

.home-section .section-content ul,
.home-section .section-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.home-section .section-content li {
    margin-bottom: 0.4rem;
}

.home-section .section-content strong {
    color: var(--ocean-deep);
}

.home-section-cta {
    background: var(--gradient-summer);
    color: var(--white);
    text-align: center;
    padding: 60px 2rem;
}

.home-section-cta h2 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 15px;
}

.home-section-cta .section-content {
    color: rgba(255,255,255,0.9);
}

.home-section-cta .section-content strong {
    color: var(--white);
}

.home-section-cta .btn-cta-white {
    display: inline-block;
    margin-top: 25px;
    background: var(--white);
    color: var(--ocean-deep);
    font-weight: 700;
    padding: 14px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Baloo 2', cursive;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.home-section-cta .btn-cta-white:hover {
    transform: scale(1.05);
}

/* ============================================
   MOBILE USABILITY IMPROVEMENTS
   ============================================ */

/* Improve tap targets everywhere */
a, button, input, select, textarea {
    -webkit-tap-highlight-color: rgba(0,0,0,0.05);
}

/* === MOBILE GLOBAL === */
@media (max-width: 768px) {
    /* Body safe area padding for notch devices */
    body {
        padding-top: env(safe-area-inset-top, 0);
    }

    /* Navbar mobile */
    .nav {
        height: 60px;
        padding: 0 15px;
        max-width: 100vw;
        overflow: visible;
    }

    .nav-logo-icon {
        width: 38px;
        height: 38px;
    }

    .nav-logo {
        gap: 8px;
    }

    .nav-logo-text {
        font-size: 1rem;
    }

    /* Hero mobile — contenuto centrato e contenuto nei bordi */
    .hero {
        min-height: auto;
        padding: 80px 20px 40px;
        overflow: hidden;
    }

    .hero-content {
        padding: 20px 0;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 7vw, 2.4rem);
        margin-bottom: 15px;
    }

    .hero-desc {
        font-size: 0.95rem;
        line-height: 1.6;
        padding: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Hero buttons — impilati verticalmente */
    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .hero-btns .btn,
    .hero-btns a {
        width: 100%;
        max-width: 280px;
        text-align: center;
        margin-left: 0 !important;
        padding: 14px 20px !important;
        font-size: 1rem !important;
    }

    /* Section tag più piccolo su mobile */
    .section-tag {
        font-size: 0.7rem;
        padding: 5px 12px;
    }

    /* Section adjustments */
    .section {
        padding: 3rem 1.2rem;
    }

    /* Info grid: 1 colonna su mobile */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .info-card {
        padding: 1.5rem;
        border-radius: var(--radius-md);
    }

    /* Footer mobile — 2 colonne per sezioni navigazione/contatti/legale */
    .footer {
        padding: 3rem 20px 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }

    /* Brand (logo + indirizzo) a tutta larghezza */
    .footer-brand {
        text-align: center;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .footer-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-bottom: 12px;
    }

    /* Le 3 sezioni sotto in griglia 2 colonne */
    .footer-content {
        display: flex;
        flex-wrap: wrap;
    }

    .footer-brand {
        flex: 0 0 100%;
    }

    .footer-section {
        flex: 0 0 calc(50% - 10px);
    }

    /* Se c'è una terza sezione (Legale), la mettiamo sotto a destra */
    .footer-section:last-child {
        flex: 0 0 calc(50% - 10px);
    }

    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .footer-section a {
        padding: 5px 0;
        font-size: 0.9rem;
    }

    .footer-bottom {
        margin-top: 1.5rem;
        padding-top: 1rem;
        font-size: 0.75rem;
    }

    /* FAQ mobile */
    .faq-container {
        margin: 20px auto;
        gap: 15px;
    }

    .faq-container h3 {
        font-size: 1.1rem;
    }

    /* Home sections mobile */
    .home-section {
        padding: 40px 0;
    }

    .home-section .container {
        padding: 0 1.2rem;
    }

    .home-section .section-content {
        font-size: 1rem;
        line-height: 1.7;
    }

    .home-section-cta {
        padding: 40px 1.2rem;
    }

    .home-section-cta h2 {
        font-size: 1.5rem;
    }

    .home-section-cta .btn-cta-white {
        padding: 12px 28px;
        font-size: 1rem;
        width: 100%;
        text-align: center;
    }

    /* Section header mobile */
    .section-header {
        margin-bottom: 25px;
    }

    .section-header h1 {
        font-size: 1.5rem;
    }

    .section-description {
        font-size: 0.93rem;
        padding: 0 5px;
    }

    .section-description p > strong:only-child {
        font-size: 1.05rem;
    }

    /* ============================
       TABELLE MOBILE — Card layout
       ============================ */
    .section-description table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.82rem;
        margin: 1rem -5px 1.5rem;
        width: calc(100% + 10px);
        border-radius: var(--radius-sm, 8px);
    }

    .section-description table thead,
    .section-description table tbody,
    .section-description table tr {
        display: table-row-group;
    }

    .section-description table tr {
        display: table-row;
    }

    .section-description th,
    .section-description td {
        padding: 8px 10px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Scroll indicator per tabelle */
    .section-description table::after {
        content: '';
        display: block;
    }

    /* Hero tabelle mobile */
    .hero-desc table {
        font-size: 0.82rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 1rem 0;
    }

    .hero-desc table th,
    .hero-desc table td {
        padding: 7px 10px;
        white-space: nowrap;
        font-size: 0.8rem;
    }

    /* Offseason mobile */
    .offseason-box {
        margin: 85px 15px 40px;
        padding: 35px 20px;
        border-radius: var(--radius-md);
    }

    .offseason-icon {
        font-size: 3rem;
    }

    .offseason-box h2 {
        font-size: 1.4rem;
    }

    .offseason-box p {
        font-size: 1rem;
    }

    .offseason-contact a {
        display: inline-block;
        padding: 8px 0;
        font-size: 1rem;
    }

    /* Course grid mobile — 1 colonna */
    .course-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .course-card {
        padding: 18px;
    }

    .courses-wrapper {
        margin-top: 80px !important;
        padding: 0 15px !important;
    }

    .search-bar {
        padding: 12px;
        flex-direction: column;
    }

    .search-input {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
}

/* === EXTRA SMALL MOBILE (< 400px) === */
@media (max-width: 400px) {
    .nav {
        height: 54px;
        padding: 0 10px;
    }

    .nav-logo-text {
        font-size: 0.85rem !important;
    }

    .nav-logo-icon {
        width: 32px;
        height: 32px;
    }

    .nav-logo {
        gap: 6px;
    }

    .hero {
        padding: 70px 15px 30px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-desc {
        font-size: 0.88rem;
    }

    .section-header h1 {
        font-size: 1.3rem;
    }

    /* Footer 1 colonna su schermi molto piccoli */
    .footer-section {
        flex: 0 0 100% !important;
    }
}

/* ============================================
   SCHEDA RAGAZZO (Gestionale)
   ============================================ */

/* Layout base */
body.scheda-gestionale { background-color: #f4f7f6; display: flex; min-height: 100vh; margin: 0; }
.main-content { flex-grow: 1; padding: 30px; width: calc(100% - 280px); }

/* Header Ragazzo: rimosso gradiente, trasformato in card elegante */
.header-ragazzo { 
    background-color: #ffffff; 
    border: 1px solid #dee2e6; 
    border-radius: var(--radius-md); 
    padding: 20px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

/* Iniziali del ragazzo nell'header */
.avatar-iniziali {
    background-color: var(--sand);
    color: var(--ocean-deep);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid var(--sun-yellow);
}

/* Tabs della scheda */
.nav-tabs .nav-link { color: #495057; font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--ocean-deep); font-weight: bold; border-bottom: 3px solid var(--ocean-deep); background-color: transparent; }

/* Contenuto delle Tabs */
.tab-content { 
    background: #ffffff; 
    border: 1px solid #dee2e6; 
    border-top: none; 
    border-radius: 0 0 var(--radius-md) var(--radius-md); 
    padding: 20px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

/* Tipografia interna della scheda */
.info-label { font-size: 0.80rem; color: #6c757d; text-transform: uppercase; font-weight: bold; margin-bottom: 2px; }
.info-value { font-size: 1.05rem; color: #212529; margin-bottom: 15px; word-break: break-word; }
.section-title { font-size: 1.1rem; color: var(--ocean-deep); border-bottom: 2px solid #e9ecef; padding-bottom: 5px; margin-bottom: 15px; margin-top: 10px; font-family: 'Baloo 2', cursive; }