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

/* =========================================
   1. FONTS & VARIABILI
   ========================================= */
@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;  /* Modificato da italic a normal */
}

@font-face {
  font-family: 'HelveticaBold';
  src: url('/assets/doc/HelveticaBold.ttf') format('truetype');
  font-weight: normal !important; /* Modificato da bold a normal */
  font-style: normal;  /* Lascia normal */
}

:root {
  --rosa-neon: #ff19ff;
  --viola: #790cfd; /* Aggiunto nuovo viola */
  --bianco: #ffffff;
  --nero-transp: rgba(18, 0, 40, 0.85); /* Vinaccia Trasparente */
  --bg-card: rgba(18, 0, 40, 0.6); /* Vinaccia Trasparente (Leggero) */
  --verde: #00ff66;
  --rosso: #ff3333;
  --bordo: rgba(255, 255, 255, 0.15);
}

/* =========================================
   2. BODY & SFONDO
   ========================================= */
body {
    background-color: #120028 !important; /* Base Vinaccia */
    color: var(--bianco);
    font-family: 'HelveticaBold', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body::before {
    content: ""; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    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;
    transform: translateZ(0);
    will-change: transform;
}

/* Utility Classes */
.druk-font { 
    font-family: 'DrukWide', sans-serif; 
    font-style: italic; 
    letter-spacing: 0; 
    text-transform: uppercase; 
}
.helvetica-font { 
    font-family: 'HelveticaBold', sans-serif; 
    letter-spacing: 0; 
    text-transform: uppercase; 
}

.container {
    max-width: 737px; width: 95%; margin: 13px auto;
    animation: fadeIn 0.8s ease-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   3. HEADER GRID (Identità + Stats)
   ========================================= */
.team-header-grid {
    display: flex; justify-content: space-between; align-items: stretch;
    gap: 20px; background: var(--nero-transp); padding: 20px;
    border-radius: 11px; margin-bottom: 20px; border: 1px solid var(--bordo);
}

.th-identity { display: flex; align-items: center; gap: 20px; flex: 1; }

.th-image-wrapper img {
    width: 121px; height: 121px; object-fit: contain;
    filter: drop-shadow(0 0 7px rgba(255, 25, 255, 0.2)); /* Leggero bagliore rosa sul logo */
}

.th-text { display: flex; flex-direction: column; justify-content: center; }

.th-name {
    font-family: 'DrukWide', sans-serif; font-size: 1.68rem;
    color: var(--rosa-neon); line-height: 1; margin-bottom: 7px; text-transform: uppercase;
}

.th-desc {
    font-family: 'HelveticaBold', sans-serif; font-size: 0.54rem;
    color: #ccc; text-transform: uppercase; max-width: 268px; line-height: 1.4;
}

.th-stats-container {
    display: flex; gap: 0; border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 20px;
}
.stats-col {
    display: flex; flex-direction: column; justify-content: center; gap: 13px;
    padding: 0 13px;
}
.stat-box { text-align: left; }
.stat-label {
    font-size: 0.44rem; color: var(--rosa-neon); margin-bottom: 3px; text-transform: uppercase;
}
.stat-number {
    font-family: 'DrukWide', sans-serif; font-size: 1.2rem; color: var(--bianco); line-height: 1;
}
.stat-outcome { display: flex; align-items: center; gap: 7px; }
.dot { width: 5px; height: 5px; border-radius: 50%; }
.dot-v { background: var(--verde); }
.dot-n { background: var(--bianco); }
.dot-p { background: var(--rosso); }


/* =========================================
   4. PALMARES
   ========================================= */
.trophies-container {
  position: relative;
  background: var(--bg-card); /* Usa Vinaccia trasparente */
  padding: 23px 20px 17px 20px;
  border-radius: 11px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 25, 255, 0.25);
}

.section-label {
  position: absolute; top: 10px; left: 13px;
  font-family: 'HelveticaBold', sans-serif; font-size: 0.54rem;
  color: var(--bianco); text-transform: uppercase; letter-spacing: 0;
}

.trophies-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 20px; margin-top: 7px;
}

.trophy-card {
  display: flex; flex-direction: column; align-items: center;
  height: 74px; width: 60px; transition: transform 0.3s ease;
}
.trophy-card:hover { transform: translateY(-2px); }

.trophy-upper-content {
  flex-grow: 1; display: flex; flex-direction: column;
  justify-content: center; align-items: center; width: 100%;
}

/* Fix per forzare le icone dei premi in bianco */
.trophy-img-std, .trophy-img-small { 
    filter: brightness(0) invert(1) !important; 
}

.trophy-img-std { height: 37px; width: auto; margin-bottom: 3px; }
.trophy-img-small { height: 23px; width: auto; }

.trophy-year { font-size: 0.57rem; color: var(--bianco); margin-top: 1px; }

.trophy-label {
  font-family: 'HelveticaBold', sans-serif; font-size: 0.4rem;
  color: #ffffff; text-align: center; text-transform: uppercase;
  margin-top: 5px; width: 100%; line-height: 1.2;
}

/* =========================================
   5. TOP PLAYERS (Cards & Grid)
   ========================================= */
.top-players-container {
    margin-bottom: 27px; width: 100%;
}

.top-players-grid {
    display: flex; flex-wrap: wrap; gap: 13px; justify-content: space-between;
}

.top-player-card {
    flex: 1; min-width: 201px;
    background: var(--bg-card); /* Vinaccia trasparente */
    border: 1px solid var(--bordo);
    border-radius: 8px; padding: 13px;
    display: flex; flex-direction: column;
    box-shadow: 0 3px 10px rgba(18, 0, 40, 0.4);
}

.top-player-card h4 {
    color: var(--rosa-neon); font-family: 'DrukWide', sans-serif;
    font-size: 0.6rem; text-transform: uppercase; text-align: center;
    margin: 0 0 10px 0; padding-bottom: 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); letter-spacing: 0.3px;
}

.player-row {
    display: flex; align-items: center; gap: 8px; padding: 7px 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); transition: background 0.2s;
}
.player-row:last-of-type { border-bottom: none; }
.player-row:hover { background: rgba(255, 255, 255, 0.05); border-radius: 4px; }

/* FIX FOTO: Quadrato smussato + Outline */
.player-photo {
    width: 30px; height: 30px;
    border-radius: 5px; 
    object-fit: cover;
    border: 1px solid rgba(200, 200, 200, 0.2); 
    background-color: #120028; /* Base foto in Vinaccia */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* PRIMO IN CLASSIFICA: Outline Rosa Neon */
.player-row:first-of-type .player-photo {
    border-color: var(--rosa-neon);
    box-shadow: 0 0 4px rgba(255, 25, 255, 0.3); 
}

.player-name {
    font-weight: normal !important;
    flex: 1; color: var(--bianco); text-decoration: none;
    font-size: 0.57rem; font-weight: bold; text-transform: uppercase;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s;
}
.player-name:hover { color: var(--rosa-neon); }

.player-value {
    font-family: 'DrukWide', sans-serif; font-size: 0.6rem;
    color: var(--rosa-neon); text-align: right; white-space: nowrap;
}

.see-all-btn {
    margin-top: auto; background: transparent;
    border: 1px solid var(--rosa-neon); color: var(--rosa-neon);
    padding: 7px; border-radius: 4px; cursor: pointer;
    font-family: 'HelveticaBold', sans-serif; text-transform: uppercase;
    font-size: 0.5rem; width: 100%; transition: all 0.3s;
}
.see-all-btn:hover { background: var(--rosa-neon); color: #fff; box-shadow: 0 0 7px var(--rosa-neon); }

/* =========================================
   6. STAGIONI & PARTITE
   ========================================= */
.season-box {
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: var(--bg-card); /* Vinaccia trasparente */
    overflow: hidden;
    outline: 1px solid transparent;
    transition: outline 0.4s ease; 
}

.season-box:hover {
    outline: 1px solid rgba(255, 25, 255, 0.25); 
}

.season-header {
    padding: 10px 13px; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.05); transition: background 0.2s;
}
.season-header:hover { background: rgba(255,255,255,0.1); }

.season-title { font-family: 'DrukWide', sans-serif; font-size: 0.67rem; color: var(--bianco); }
.toggle-icon { color: var(--rosa-neon); transition: transform 0.3s; }
.active .toggle-icon { transform: rotate(90deg); }

.season-content { display: none; padding: 0; }
.season-content a { text-decoration: none !important; color: var(--bianco) !important; display: block; }

.match-row {
    padding: 8px 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-between; align-items: center;
    transition: background 0.2s; color: var(--bianco);
}
.match-row:hover { background: rgba(255, 25, 255, 0.08); }

.match-info-left { display: flex; flex-direction: column; gap: 3px; }

.match-meta-line { display: flex; align-items: center; gap: 3px; }
.match-phase { font-size: 0.47rem; color: var(--rosa-neon); text-transform: uppercase; font-weight: bold; }
.match-date-inline { font-size: 0.47rem; color: #aaa; text-transform: uppercase; }

.match-teams { display: flex; align-items: center; gap: 7px; margin-top: 1px; }
.m-logo { width: 16px; height: 16px; object-fit: contain; }
.m-score {
    font-family: 'DrukWide', sans-serif; font-size: 0.74rem;
    color: var(--bianco); min-width: 34px; text-align: center;
}
.m-name { font-size: 0.6rem; font-weight: bold; text-transform: uppercase; color: var(--bianco); }

/* V/N/P Indicatori */
.result-char {
  font-family: 'DrukWide', sans-serif; font-size: 0.6rem;
  width: 13px; text-align: center; letter-spacing: 0;
}
.esito-v { color: var(--verde); }
.esito-n { color: var(--bianco); }
.esito-p { color: var(--rosso); }

/* =========================================
   7. MODALS
   ========================================= */
.modal {
    display: none; position: fixed; z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(18, 0, 40, 0.85); /* Overlay Vinaccia */
    backdrop-filter: blur(3px); overflow-y: auto;
}

.modal-content {
    background-color: #120028; /* Modal solida Vinaccia */
    margin: 10% auto; padding: 13px;
    border: 1px solid rgba(255, 25, 255, 0.18); border-radius: 8px;
    width: 90%; max-width: 335px;
    box-shadow: 0 4px 20px rgba(18, 0, 40, 0.6);
    position: relative; animation: slideDown 0.3s ease-out;
}
@keyframes slideDown { from { transform: translateY(-34px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-content h4 {
    color: var(--rosa-neon); font-family: 'DrukWide', sans-serif;
    text-align: center; margin-top: 0; margin-bottom: 13px; padding-bottom: 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.close {
    color: #aaa; float: right; font-size: 19px; font-weight: bold;
    cursor: pointer; position: absolute; right: 10px; top: 7px; line-height: 1;
}
.close:hover { color: var(--rosa-neon); }

/* =========================================
   8. RESPONSIVE (MOBILE)
   ========================================= */
@media (max-width: 515px) {
    .container { width: 98%; margin: 7px auto; }

    /* Header Grid */
    .team-header-grid { flex-direction: column; padding: 14px; gap: 14px; margin-bottom: 7px; }

    /* Identità: logo + nome affiancati */
    .th-identity { flex-direction: row; align-items: center; text-align: left; gap: 12px; width: 100%; }
    .th-image-wrapper img { width: 80px; height: 80px; }
    .th-text { flex: 1; }
    .th-name { font-size: 1.4rem; margin-bottom: 4px; }
    .th-desc { font-size: 0.42rem; max-width: 100%; }

    /* Stats: due righe orizzontali con separatore */
    .th-stats-container {
        border-left: none;
        padding-left: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    .stats-col {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 8px 0;
        border-top: 1px solid rgba(255,255,255,0.1);
        text-align: center;
    }
    .stat-box { text-align: center; flex: 1; }
    .stat-label { font-size: 0.42rem; margin-bottom: 3px; }
    .stat-number { font-size: 1rem; }
    .stat-outcome { justify-content: center; gap: 5px; }
    .dot { width: 6px; height: 6px; }

    /* Palmares */
    .trophies-container { padding: 20px 10px 10px 10px; margin-bottom: 7px; }
    .section-label { top: 5px; left: 5px; font-size: 0.34rem; }
    .trophies-grid { gap: 10px; }
    .trophy-card { width: 47px; height: auto; }
    .trophy-img-std { height: 23px; }
    .trophy-img-small { height: 15px; }
    .trophy-label { font-size: 0.3rem; margin-top: 3px; }
    .trophy-year { font-size: 0.4rem; text-align: center; }

    /* Top Players */
    .top-players-container { flex-direction: column; }
    .top-player-card { min-width: unset; }

    /* Stagioni & Partite */
    .season-box { margin-bottom: 7px; }
    .season-header { padding: 8px 10px; }
    .season-title { font-size: 0.54rem; }
    .match-row { flex-direction: row; align-items: center; padding: 6px 10px; }
    .match-info-left { flex: 1; }
    .match-phase { font-size: 0.4rem; }
    .match-date-inline { font-size: 0.4rem; }
    .m-logo { width: 13px; height: 13px; }
    .m-score { font-size: 0.6rem; min-width: 27px; }
    .m-name { font-size: 0.47rem; }
    .result-char { font-size: 0.47rem; width: 9px; }

    .modal-content { margin: 20% auto; width: 95%; }
}