/* assets/css/archivio.css - TEMA 2026 */

/* =========================================
   1. FONTS & VARIABILI
   ========================================= */
@font-face {
    font-family: 'DrukWide';
    src: url('/assets/doc/DrukTextWide-MediumItalic-Trial.otf') format('opentype');
    font-weight: bold;
    font-style: italic; /* Aggiornato al nuovo corsivo */
}

@font-face {
    font-family: 'HelveticaBold';
    src: url('/assets/doc/HelveticaBold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --rosa-neon: #ff19ff;
    --viola: #790cfd;
    --bianco: #ffffff;
    --nero-transp: rgba(18, 0, 40, 0.85); /* Vinaccia scuro */
    --bg-menu: rgba(18, 0, 40, 0.7); /* Vinaccia medio */
    --testo-bianco: #ffffff;
}

.druk-font { font-family: 'DrukWide', sans-serif; font-style: italic; letter-spacing: 0; }
.helvetica-font { font-family: 'HelveticaBold', sans-serif; letter-spacing: 0; }

/* =========================================
   2. GLOBAL BODY & RESET & SFONDO FISSO
   ========================================= */
html {
    height: 100%;
    background-color: #120028; /* Colore base di sicurezza */
}

body {
    font-family: 'HelveticaBold', Arial, sans-serif;
    color: var(--testo-bianco);
    margin: 0;
    padding: 0;
    background-color: transparent !important; /* Trasparente per mostrare il background fisso sotto */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 0;
}

/* SFONDO FISSO 2026 CON OVERLAY VINACCIA (Metodo sicuro cross-browser) */
body::before {
    content: "";
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    
    background: linear-gradient(rgba(18, 0, 40, 0.5), rgba(18, 0, 40, 0.5)), 
                url('/assets/imm/gradiente26.jpg') center/cover no-repeat;
    
    z-index: -1; 
    pointer-events: none;
    transform: translateZ(0); 
    will-change: transform;
}

main.container {
    flex: 1;
    width: 100%;
    padding-bottom: 27px;
    display: flex;
    flex-direction: column;
    align-items: center; 
}

a, a:hover, a:visited, a:active {
    text-decoration: none !important;
    color: inherit !important;
}

/* =========================================
   3. HEADER STAGIONI
   ========================================= */
.sottoheader {
    background-color: var(--bg-menu);
    padding: 7px;
    margin-bottom: 13px;
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    gap: 7px;
    justify-content: center;
    width: 100%;
}

.sottoheader a {
    text-decoration: none !important;
    color: var(--testo-bianco) !important;
    display: block; 
}

.stagione-box {
    background-color: rgba(255, 255, 255, 0.05); /* Tocco di luce tenue */
    color: var(--testo-bianco);
    padding: 7px;
    border-radius: 3px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    min-width: 54px;
    font-family: 'HelveticaBold', sans-serif !important;
    font-size: 9px !important; 
    font-weight: bold;
}

.stagione-box:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.stagione-box img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    margin-top: 3px;
}

.stagione-box.active-stagione {
    outline: 1px solid var(--rosa-neon);
    outline-offset: 1px;
    box-shadow: 0 0 10px var(--rosa-neon);
    background-color: rgba(18, 0, 40, 0.9); /* Attivo è Vinaccia scuro */
}

/* =========================================
   4. MENU TAB
   ========================================= */
.archivio-menu {
    background-color: var(--bg-menu);
    padding: 7px;
    margin-bottom: 13px;
    border-radius: 3px;
    text-align: center;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    max-width: 804px;
}

.archivio-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 7px;
}

.archivio-menu ul li a {
    color: var(--testo-bianco);
    padding: 7px 10px;
    border-radius: 3px;
    display: block;
    white-space: nowrap;
    transition: background 0.3s;
    font-weight: bold;
    text-transform: uppercase;
    font-family: 'HelveticaBold', sans-serif !important;
    font-size: 0.67rem !important;
}

.archivio-menu ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.archivio-menu ul li a.active {
    background-color: var(--rosa-neon);
    color: white !important;
    box-shadow: 0 0 7px rgba(255, 25, 255, 0.5) !important;
}

/* =========================================
   5. CONTENUTO & FIX PARTITE
   ========================================= */
.archivio-content {
    width: 100%;
    max-width: 804px;
    display: flex;
    flex-direction: column;
    align-items: center; 
}

.archivio-content h1, 
.archivio-content h2,
.archivio-content .phase-title {
    display: none !important;
}

/* TOGGLE SWITCH INTERNO */
.archivio-content .toggle-switch {
    background: var(--bg-menu) !important; /* Usa Vinaccia trasparente */
    border: none !important;
    border-radius: 5px !important;
    margin: 13px auto 20px auto !important;
    display: flex !important;
    justify-content: center !important;
    width: fit-content !important;
    min-width: 134px;
    padding: 5px !important;
    box-shadow: none !important;
    gap: 3px !important;
}

.archivio-content .toggle-switch a {
    font-family: 'HelveticaBold', sans-serif !important;
    font-size: 9px !important;
    border-radius: 3px !important;
    border: none !important;
    text-transform: uppercase !important;
    padding: 5px 10px !important;
    text-align: center !important;
    flex: 1;
}

.archivio-content .toggle-switch a.active {
    background: var(--rosa-neon) !important;
    color: white !important;
    box-shadow: 0 0 7px rgba(255, 25, 255, 0.5) !important;
}

/* --- FIX PARTITE (Vinaccia) --- */
.match-row, 
.partita-box, 
.box-partita, 
.match-row-glass { 
    background-color: rgba(18, 0, 40, 0.6) !important; /* Vinaccia 60% */
    backdrop-filter: blur(3px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    transition: background-color 0.3s ease;
}

/* Hover su desktop */
@media (min-width: 516px) {
    .match-row:hover, 
    .partita-box:hover, 
    .box-partita:hover,
    .match-row-glass:hover {
        background-color: rgba(18, 0, 40, 0.9) !important; /* Si scurisce in Vinaccia */
    }
}

/* =========================================
   6. RESPONSIVE MOBILE
   ========================================= */
@media (max-width: 515px) {
    
    body { font-size: 90% !important; }
    
    .sottoheader { 
        justify-content: flex-start;
        padding: 3px 0 3px 10px; 
        gap: 5px;
        margin-bottom: 7px;
    }
    .stagione-box {
        min-width: 40px !important;
        padding: 4px !important;
        font-size: 7px !important;
    }
    .stagione-box img {
        width: 23px !important;
        height: 23px !important;
        margin-top: 2px !important;
    }
    
    .archivio-menu { 
        padding: 3px; 
        width: 100%;
        margin-bottom: 10px;
    }
    .archivio-menu ul { 
        justify-content: flex-start;
        padding-left: 7px;
        gap: 3px;
    }
    .archivio-menu ul li a { 
        font-size: 7px !important;
        padding: 4px 7px !important;
    }
    
    .archivio-content .toggle-switch {
        margin: 3px auto 10px auto !important;
        padding: 3px !important;
        min-width: auto !important;
        width: fit-content !important;
        gap: 1px !important;
    }
    
    .archivio-content .toggle-switch a {
        font-size: 7px !important;
        padding: 4px 7px !important;
        border-radius: 3px !important;
    }
}