/* --- CSS BASELINE ATHLENA (FINAL NO BORDER) --- */

.ath-hero-wrapper {
    /* VARIABILI (Fallback) */
    --font-brand: 'Montserrat', sans-serif;
    --lime: #DFFD8F;
    --lime-hover: #cbe87d;
    --orange: #EF7148;
    --orange-hover: #d65f3a;
    --card-bg: rgba(24, 27, 33, 0.7);
    --border: rgba(255, 255, 255, 0.15);
    --text-white: #ffffff;
    --text-muted: #9ca3af;
    
    --input-h: 55px;
    --radius-elem: 2px;
    --radius-card: 2px;
    
    font-family: var(--font-brand);
    color: var(--text-white);
    
    width: 100%; 
    position: relative;
    box-sizing: border-box;
    overflow: visible !important;
}

.ath-hero-wrapper * { box-sizing: border-box; }
.ath-hidden { display: none !important; }
.d-block { display: block; }

/* Scrollbar */
.ath-hero-wrapper ::-webkit-scrollbar { width: 6px; }
.ath-hero-wrapper ::-webkit-scrollbar-track { background: #181b21; }
.ath-hero-wrapper ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 4px; }
.ath-hero-wrapper ::-webkit-scrollbar-thumb:hover { background: var(--lime); }
.ath-hero-wrapper .ath-options-list, .ath-hero-wrapper .ath-city-results { scrollbar-width: thin; scrollbar-color: var(--border) #181b21; }

/* --- TOGGLE ORIGINAL (SENZA BORDO) --- */
.ath-toggle-wrapper { 
    display: flex; 
    justify-content: center; 
    margin-bottom: 40px;
}

.ath-toggle-container { 
    background: #181b21; 
    padding: 5px; 
    display: inline-flex; 
    gap: 5px; 
    border-radius: 2px !important;
    line-height: 1;
}

.ath-toggle-btn { 
    background: transparent !important; 
    border: none !important; 
    color: var(--text-muted); 
    padding: 10px 24px !important; 
    font-family: inherit; 
    font-size: 15px !important; 
    font-weight: 600 !important; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    border-radius: 2px !important;
    box-shadow: none !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
}

.ath-toggle-btn:hover { color: var(--text-white); }
.ath-toggle-btn.active-athlete { background-color: var(--lime) !important; color: #0F1115 !important; }
.ath-toggle-btn.active-coach { background-color: var(--orange) !important; color: var(--text-white) !important; }

/* Headlines */
.ath-headline { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; font-weight: 300; }
.ath-headline strong { font-weight: 800; }
.text-lime { color: var(--lime); }
.text-orange { color: var(--orange); }

/* Glass Panels */
.ath-glass-panel { 
    background: var(--card-bg); 
    border: 1px solid var(--border); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-radius: var(--radius-card); 
    padding: 25px; 
    margin-top: 20px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.4); 
    display: flex; 
    gap: 15px; 
    align-items: stretch; 
    position: relative;
    z-index: 10; 
}
.ath-glass-panel.athlete-mode { align-items: flex-end; }
.ath-glass-panel.coach-border { border-color: rgba(239, 113, 72, 0.4); flex-wrap: wrap; justify-content: center; align-items: normal; padding-bottom: 30px; }

/* Inputs Wrapper */
.ath-field-group { flex: 1; display: flex; flex-direction: column; gap: 8px; position: relative; min-width: 150px; }

/* Z-INDEX MANAGEMENT */
.z-high { z-index: 30; }
.z-mid { z-index: 20; }
.z-low { z-index: 10; }

.ath-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.ath-label.lime-icon i { color: var(--lime); }

/* Input Fields */
.ath-input { width: 100%; background: rgba(10, 12, 16, 0.6); border: 1px solid var(--border); color: var(--text-white); padding: 0 15px; border-radius: var(--radius-elem); font-family: inherit; font-size: 1rem; outline: none; height: var(--input-h); transition: 0.3s; }
.ath-input:focus { border-color: var(--lime); background: rgba(10, 12, 16, 0.9); }

/* Custom Select */
.ath-custom-select { position: relative; width: 100%; height: var(--input-h); cursor: pointer; font-family: inherit; }
.ath-select-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 100%; background: rgba(10, 12, 16, 0.6); border: 1px solid var(--border); border-radius: var(--radius-elem); padding: 0 15px; font-size: 1rem; color: var(--text-white); transition: 0.3s; }
.ath-custom-select.open .ath-select-trigger { border-color: var(--lime); border-bottom: 1px solid transparent; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.ath-arrow { font-size: 0.8rem; transition: transform 0.3s; }
.ath-custom-select.open .ath-arrow { transform: rotate(180deg); color: var(--lime); }

/* Dropdown Options (FIX SOVRAPPOSIZIONE) */
.ath-options-list { 
    position: absolute; 
    top: 100%; left: 0; right: 0; 
    background: #181b21; 
    border: 1px solid var(--border); 
    border-top: none; 
    z-index: 99999 !important; 
    opacity: 0; 
    visibility: hidden; 
    pointer-events: none; 
    transition: 0.1s; 
    max-height: 250px; 
    overflow-y: auto; 
    border-bottom-left-radius: var(--radius-elem); 
    border-bottom-right-radius: var(--radius-elem); 
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}
.ath-custom-select.open .ath-options-list { opacity: 1; visibility: visible; pointer-events: all; }
.ath-option { padding: 12px 15px; font-size: 0.95rem; color: var(--text-muted); transition: 0.2s; border-bottom: 1px solid rgba(255,255,255,0.05); }
.ath-option:hover { background: rgba(255, 255, 255, 0.05); color: var(--lime); padding-left: 20px; }

/* City Autocomplete */
.ath-city-results { 
    position: absolute; 
    top: 100%; left: 0; right: 0; 
    background: #181b21; 
    border: 1px solid var(--border); 
    z-index: 99999 !important; 
    max-height: 200px; 
    overflow-y: auto; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}
.ath-city-item { padding: 12px 15px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05); }
.ath-city-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--lime); }
.ath-match { color: var(--lime); font-weight: bold; }

/* Info Boxes */
.ath-info-box { flex: 1; background: rgba(15, 17, 21, 0.6); border: 1px solid var(--border); border-radius: var(--radius-elem); padding: 30px 20px; display: flex; flex-direction: column; justify-content: center; transition: 0.3s; min-width: 250px; }
.ath-info-box:hover { border-color: var(--orange); background: rgba(15, 17, 21, 0.9); }
.ath-ib-title { color: var(--orange); font-weight: 800; font-size: 1.05rem; margin-bottom: 8px; text-transform: uppercase; }
.ath-ib-subtitle { color: var(--text-white); font-size: 0.9rem; line-height: 1.4; }

/* Buttons */
.ath-btn-submit { border-radius: var(--radius-elem); border: none; font-family: inherit; font-weight: 800; font-size: 1rem; text-transform: uppercase; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.3s; white-space: nowrap; }
.ath-btn-lime { background: var(--lime); color: #0F1115; height: var(--input-h); padding: 0 35px; }
.ath-btn-lime:hover { background: var(--lime-hover); transform: translateY(-2px); }
.ath-btn-orange { background: var(--orange); color: var(--text-white); width: 100%; height: auto; padding: 18px 30px; margin-top: 20px; font-size: 1rem; line-height: 1.2; }
.ath-btn-orange:hover { background: var(--orange-hover); box-shadow: 0 0 20px rgba(239, 113, 72, 0.4); }

/* Link */
.ath-link-wrapper { 
    margin-top: 25px; 
    display: block; 
    text-align: left; 
    padding-left: 5px; 
    position: relative;
    z-index: 0; 
}
.ath-link { color: var(--text-white); text-decoration: none; font-size: 0.95rem; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; opacity: 0.8; transition: 0.3s; }
.ath-link:hover { opacity: 1; gap: 12px; }
.ath-link i { color: var(--lime); }

/* Responsive */
@media (max-width: 900px) {
    .ath-glass-panel { flex-direction: column; padding: 20px; align-items: stretch !important; }
    .ath-btn-orange { min-height: 60px; width: 100%; padding: 20px; }
    .ath-info-box { width: 100%; margin-bottom: 10px; }
    .ath-btn-lime { width: 100%; margin-top: 10px; }
    .ath-field-group { margin-bottom: 10px; }
    .ath-headline { font-size: 2.2rem; }
}

/* Stato iniziale: invisibile e spostato in basso */
.ath-animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

/* Stato finale: visibile e nella posizione originale */
.ath-animate-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ritardi per l'effetto sequenza (Stagger) */
.ath-delay-1 { transition-delay: 0.1s; } /* Titolo */
.ath-delay-2 { transition-delay: 0.3s; } /* Pannello Vetro */
.ath-delay-3 { transition-delay: 0.5s; } /* Link in basso */

/* --- PARALLAX EFFETTO (Opzionale, solo desktop) --- */
@media (min-width: 1024px) {
    .ath-hero-wrapper {
        perspective: 1000px; /* Abilita il 3D */
    }
    .ath-glass-panel {
        /* Sarà manipolato dal JS, ma prepariamo la transizione smooth */
        transition: transform 0.1s linear; 
        /* Nota: per il parallax usiamo JS per performance migliori o CSS scroll-timeline se supportato */
    }
}

/* --- LOGICA DUAL UNIVERSE (Display Sezioni) --- */

/* Quando sono un Atleta: nascondi tutto ciò che è solo per Coach */
body.ath-mode-athlete .ath-only-coach {
    display: none !important;
}

/* Quando sono un Coach: nascondi tutto ciò che è solo per Atleta */
body.ath-mode-coach .ath-only-athlete {
    display: none !important;
}

/* Opzionale: Transizione morbida tra i mondi */
.elementor-section {
    transition: opacity 0.3s ease;
}