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

/* =========================================
   1. GLOBAL & FONTS
   ========================================= */
@font-face {
    font-family: 'DrukWide';
    src: url('/assets/doc/DrukTextWide-MediumItalic-Trial.otf') format('opentype');
    font-weight: normal ; /* Modificato da bold a normal */  
    font-style: normal;  
}

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

:root {
    --rosa-neon: #ff19ff;
    --viola: #790cfd;
    --bianco: #ffffff;
    --bianco-soft: #f0f0f0; 
    --nero-transp: rgba(18, 0, 40, 0.85); /* Vinaccia scuro semitrasparente */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.15);
}

body {
    background-color: #120028 !important; /* Base Vinaccia */
    color: var(--bianco);
    font-family: 'HelveticaBold', sans-serif;
    margin: 0;
    position: relative;
    z-index: 0;
}

/* Sfondo FISSO ottimizzato 2026 (Immagine + Overlay integrato) */
body::before {
    content: ""; 
    position: fixed; 
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    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);
}

.storia-container {
    width: 95%;
    max-width: 938px; 
    margin: 0 auto;
    padding: 27px 0;
}

/* =========================================
   2. HERO & NAVIGAZIONE (Tabs in alto)
   ========================================= */
.storia-hero {
    text-align: center;
    margin-bottom: 34px;
    background: var(--nero-transp);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
}

.storia-hero h1 {
    font-family: 'DrukWide', sans-serif;
    font-size: 1.68rem;
    color: var(--bianco);
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.storia-hero p {
    color: #ccc;
    font-size: 0.6rem !important;
    font-weight: normal;
}

.nav-pills { display: flex; justify-content: center; gap: 10px; margin-top: 17px; }

.nav-pill {
    background: rgba(255,255,255,0.1);
    color: white; 
    padding: 8px 20px; 
    border-radius: 20px;
    text-decoration: none !important; 
    font-family: 'DrukWide', sans-serif; 
    font-size: 0.54rem;
    border: 1px solid transparent; 
    transition: all 0.3s ease;
    cursor: pointer;
    outline: none;
    text-transform: uppercase;
}

.nav-pill:hover, .nav-pill.active { 
    background: var(--rosa-neon); 
    box-shadow: 0 0 10px rgba(255, 25, 255, 0.4); 
    border-color: var(--rosa-neon);
    color: #fff;
}

/* Contenitore Viste (Timeline / HOF) */
.view-section {
    display: none; 
    animation: fadeInView 0.5s ease-out forwards;
}
.view-section.active { display: block; }

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

/* =========================================
   3. TIMELINE: FINESTRE INTERATTIVE
   ========================================= */
.timeline-container {
    display: flex; flex-direction: column; gap: 20px;
    max-width: 804px; margin: 0 auto;
}

/* La Card/Finestra */
.timeline-window {
    display: flex; 
    background: rgba(18, 0, 40, 0.85); /* Vinaccia 85% */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    overflow: hidden; 
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-height: 168px;
}

.timeline-window:hover {
    border-color: var(--rosa-neon);
    box-shadow: 0 3px 17px rgba(255, 25, 255, 0.15);
}

/* Colonna Sinistra: Immagine */
.window-visual {
    width: 35%; 
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,0.1);
    background: #120028; /* Base foto in Vinaccia */
    position: relative;
    overflow: hidden;
}

.window-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.timeline-window:hover .window-img { transform: scale(1.05); }

.window-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'DrukWide', sans-serif; font-size: 2rem; 
    color: rgba(255,255,255,0.1); background: #120028;
}

/* Colonna Destra: Contenuto */
.window-content {
    padding: 20px;
    flex-grow: 1;
    display: flex; flex-direction: column;
}

.window-header { margin-bottom: 13px; }

.window-year {
    font-family: 'DrukWide', sans-serif;
    color: var(--rosa-neon);
    font-size: 1rem;
    display: block; margin-bottom: 5px;
    letter-spacing: 1.34px;
}

.window-title {
    font-family: 'HelveticaBold', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
}

.window-subtitle {
    font-style: italic; color: #aaa;
    font-size: 0.67rem; margin-top: 3px;
}

/* --- AREA TESTO (ACCORDION) --- */
.window-body {
    position: relative;
    max-height: 80px; 
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    padding-bottom: 0;
}

.window-text-inner p {
    font-size: 0.77rem;       
    color: var(--bianco-soft); 
    line-height: 1.6;
    margin-bottom: 10px;
    font-weight: normal;      
}

/* Sfumatura quando chiuso (Adattata al Vinaccia) */
.window-fade-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 54px;
    background: linear-gradient(to bottom, transparent, rgba(18,0,40,0.95));
    transition: opacity 0.4s ease;
    opacity: 1;
    pointer-events: none;
}

/* Tasto Toggle */
.window-toggle {
    margin-top: 10px;
    font-size: 0.57rem;
    color: var(--rosa-neon);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.67px;
    display: flex; align-items: center; gap: 5px;
}
.toggle-icon { transition: transform 0.4s ease; font-size: 0.47rem; }

/* --- STATO ATTIVO (APERTO) --- */
.timeline-window.active {
    background: rgba(18, 0, 40, 0.98); /* Quasi solido */
    border-color: var(--rosa-neon);
    cursor: default;
}

.timeline-window.active .window-fade-overlay {
    opacity: 0; 
}

.timeline-window.active .toggle-icon {
    transform: rotate(180deg);
}

/* =========================================
   4. STILE LINK INTERATTIVI
   ========================================= */
.player-link, 
.team-link, 
.match-link {
    color: var(--rosa-neon) !important;
    font-weight: bold !important;
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative; 
    z-index: 10; 
}

.player-link:hover, 
.team-link:hover, 
.match-link:hover {
    color: #ffffff !important;
    text-shadow: 0 0 5px var(--rosa-neon);
}

/* =========================================
   5. HALL OF FAME (Integrato)
   ========================================= */
.hof-section {
    position: relative;
    width: 100%;
    animation: fadeInView 0.6s ease;
}

.section-title {
    font-family: 'DrukWide', sans-serif; 
    font-size: 1.47rem; color: var(--rosa-neon);
    text-align: center; margin-bottom: 27px; letter-spacing: 1.34px;
}

/* Tabs interne HOF */
.hof-tabs { display: flex; justify-content: center; gap: 13px; margin-bottom: 27px; }

.hof-tab {
    background: transparent; border: 1px solid var(--border-glass);
    color: #888; padding: 7px 17px; border-radius: 5px;
    cursor: pointer; font-family: 'DrukWide', sans-serif; font-size: 0.54rem;
    transition: 0.3s; text-transform: uppercase; letter-spacing: 0.67px;
}
.hof-tab.active {
    background: var(--rosa-neon); color: white; border-color: var(--rosa-neon);
}

/* Griglia HOF */
.hof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 17px; width: 100%;
}

.hof-content { display: none; }
.hof-content.active { display: block; animation: fadeInView 0.5s ease; }

/* Card Stagione (Albo d'oro) */
.season-card {
    background: rgba(18, 0, 40, 0.85); /* Vinaccia 85% */
    border: 1px solid var(--border-glass);
    border-radius: 11px; padding: 17px;
    display: flex; flex-direction: column;
    box-shadow: 0 7px 20px rgba(18,0,40,0.5);
    transition: transform 0.3s ease;
}
.season-card:hover { transform: translateY(-3px); border-color: var(--rosa-neon); }

.season-year {
    font-family: 'DrukWide', sans-serif; color: var(--rosa-neon); font-size: 1rem;
    margin-bottom: 13px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); 
    padding-bottom: 10px;
}

/* Podio */
.podium-list { display: flex; flex-direction: column; gap: 7px; }
.podium-row {
    display: flex; align-items: center; gap: 10px;
    padding: 5px; border-radius: 5px;
    background: rgba(255,255,255,0.03);
}
.podium-row:first-child { 
    background: linear-gradient(90deg, rgba(255, 25, 255, 0.1), transparent);
    border: 1px solid rgba(255, 25, 255, 0.2);
}
.rank-badge { font-family: 'DrukWide', sans-serif; width: 20px; text-align: center; }
.r-1 { color: var(--rosa-neon); }
.r-2, .r-3 { color: #ccc; font-size: 0.6rem; }
.team-logo-mini { width: 23px; height: 23px; object-fit: contain; }
.team-name { font-size: 0.64rem; text-transform: uppercase; font-weight: normal; }

/* Item Premi Individuali */
.award-item {
    display: flex; align-items: center; gap: 10px;
    background: rgba(18, 0, 40, 0.6); /* Vinaccia semitrasparente */
    padding: 7px; border-radius: 7px;
    border: 1px solid transparent; transition: 0.2s; cursor: pointer;
    text-decoration: none; margin-bottom: 5px;
}
.award-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--rosa-neon);
}
.award-icon { width: 20px; height: 20px; object-fit: contain; filter: brightness(0) invert(1); }
.award-player-img { width: 27px; height: 27px; border-radius: 5px; object-fit: cover; filter: grayscale(100%); }
.award-item:hover .award-player-img { filter: grayscale(0); }

.award-info { display: flex; flex-direction: column; }
.award-label { font-size: 0.47rem; color: var(--rosa-neon); text-transform: uppercase; margin-bottom: 1px;}
.award-player { font-size: 0.6rem; color: #fff; text-transform: uppercase; 
    font-weight: normal !important;
}

/* =========================================
   6. RESPONSIVE
   ========================================= */
@media (max-width: 603px) {
    .timeline-window { flex-direction: column; }
    
    .window-visual { 
        width: 100%; height: 147px; 
        border-right: none; 
        border-bottom: 1px solid rgba(255,255,255,0.1); 
    }
    
    .window-content { padding: 13px; }
    
    .window-title { font-size: 0.94rem; }
    .window-year { font-size: 0.8rem; }
    
    .storia-hero h1 { font-size: 1.2rem; }
    .hof-grid { grid-template-columns: 1fr; }

    .window-text-inner p {
        font-size: 0.64rem !important; 
        font-weight: normal !important; 
        line-height: 1.5;
    }

    .nav-pills { gap: 5px; }
    .nav-pill { padding: 5px 11px; font-size: 0.44rem; }

    .hof-tabs { gap: 5px; margin-bottom: 17px; flex-wrap: wrap; }
    .hof-tab { padding: 5px 9px; font-size: 0.44rem; }

    .window-toggle { font-size: 0.44rem; margin-top: 7px; }
    .toggle-icon { font-size: 0.44rem; }
    
    .section-title { font-size: 1rem; margin-bottom: 17px; }

    .hof-grid { grid-template-columns: 1fr; gap: 10px; }
    .season-card { padding: 10px; border-radius: 8px; }
    .season-year { font-size: 0.8rem; margin-bottom: 8px; padding-bottom: 7px; }

    .podium-list { gap: 4px; }
    .podium-row { padding: 4px 7px; gap: 7px; }
    .team-logo-mini { width: 19px; height: 19px; }
    .team-name { font-size: 0.57rem; }

    .award-item { padding: 4px 7px; gap: 7px; margin-bottom: 0; }
    .award-icon { width: 16px; height: 16px; }
    .award-player-img { width: 21px; height: 21px; border-radius: 4px; }
    .award-label { font-size: 0.4rem; margin-bottom: 1px; }
    .award-player { font-size: 0.54rem; }
    
    .storia-hero {
        padding: 13px 10px; margin-bottom: 20px; border-radius: 8px;
    }
    .storia-hero h1 { font-size: 0.87rem; margin-bottom: 3px; }
    .storia-hero p { font-size: 0.55rem !important; line-height: 1.4; margin-bottom: 3px; }
}