/* IMPORTAZIONE FONT */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;600;700&display=swap');

@font-face { font-family: 'Formula1'; src: url('../font/Formula1-Regular_web_0.ttf') format('truetype'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'Formula1'; src: url('../font/Formula1-Bold_web_0.ttf') format('truetype'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'Formula1'; src: url('../font/Formula1-Wide_web_0.ttf') format('truetype'); font-weight: 800; font-style: normal; }

body, html { margin: 0; padding: 0; background-color: #000000; color: #ffffff; font-family: 'Barlow Condensed', sans-serif; overflow-x: hidden; }

/* ===== NAVBAR ===== */
.navbar-custom { display: flex; width: 100%; height: 64px; padding: 0 40px; justify-content: space-between; align-items: center; background-color: #000000; border-bottom: 2px solid #e10600; position: sticky; top: 0; z-index: 1000; box-sizing: border-box; }
.navbar-custom .logo { color: #e10600; font-weight: 900; font-style: italic; text-decoration: none; font-size: 1.5rem; text-transform: uppercase; }
.navbar-custom nav a { color: #ffffff; text-decoration: none; font-weight: 700; text-transform: uppercase; margin-left: 25px; font-size: 14px; transition: 0.3s ease; }
.navbar-custom nav a:hover { color: #e10600; }

/* ===== HERO SECTION ===== */
.hero-container { position: relative; padding: 100px 40px; background-color: #0b0b0b; }
.season-label { display: flex; align-items: center; gap: 15px; color: #E10600; font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }
.linea-rossa { width: 32px; height: 1px; background: #E10600; }
.hero-title { color: #FFF; font-family: 'Formula1', sans-serif; font-size: 100px; font-weight: 500; line-height: 108px; letter-spacing: -3.6px; text-transform: uppercase; margin: 20px 0; }
.hero-desc { color: #FFF; font-size: 16px; font-weight: 300; line-height: 25.6px; max-width: 500px; margin-bottom: 30px; }
.btn-container { display: flex; gap: 15px; }
.btn-red { background: #E10600; color: #FFF; padding: 14px 32px; border-radius: 4px; text-decoration: none; font-weight: 700; text-transform: uppercase; }
.btn-black { background: rgba(255,255,255,0.1); color: #FFF; padding: 14px 32px; border-radius: 4px; text-decoration: none; font-weight: 700; text-transform: uppercase; border: 1px solid #FFF; }

/* ===== COUNTDOWN E TICKER ===== */
.countdown-box { position: absolute; right: 33.58px; top: 215px; width: 300px; padding: 20px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(5px); }
.ticker-wrap { width: 100%; background-color: #E10600; overflow: hidden; white-space: nowrap; padding: 12px 0; position: relative; z-index: 10; }
.ticker-track { display: inline-block; animation: f1-ticker 25s linear infinite; }
.ticker-item { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255, 255, 255, 0.90); padding: 0 40px; }
@keyframes f1-ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ===== HEADER SEZIONI ===== */
.section-header { display: flex; justify-content: space-between; align-items: flex-end; padding: 80px 80px 20px 80px; }
.section-title { color: #FFF; font-family: 'Formula1', sans-serif; font-size: 48px; font-weight: 500; letter-spacing: -0.96px; text-transform: uppercase; margin: 0; }
.view-all { color: #E10600; font-family: "Barlow Condensed", sans-serif; font-size: 14px; font-weight: 600; text-decoration: none; text-transform: uppercase; letter-spacing: 1.8px; transition: 0.3s; }
.view-all:hover { color: #FFF; }

/* ===== CONTENITORE CARD ===== */
.cards-container { display: flex; gap: 20px; justify-content: center; padding-bottom: 80px; flex-wrap: wrap; }

/* ===== CARD PILOTI ===== */
.driver-card { position: relative; overflow: hidden; display: flex; width: 425.34px; height: 300px; padding: 32px 28px; flex-direction: column; gap: 16px; border-radius: 8px; border: 1px solid #1A1A1A; background: #111; transition: border-color 0.3s ease; }
.driver-card:hover { border-color: var(--team-color); }
.side-line { position: absolute; left: 0; top: 0; width: 3px; height: 100%; }
.scuderia { color: var(--team-color); font-size: 11px; font-weight: 900; letter-spacing: 2.2px; text-transform: uppercase; position: relative; z-index: 1; }
.driver-name { color: #FFF; font-size: 36px; font-weight: 900; line-height: 36px; text-transform: uppercase; position: relative; z-index: 1; max-width: 55%; }

.helmet-container { position: absolute; right: 0; top: 0; width: 45%; height: 100%; display: flex; justify-content: center; align-items: center; z-index: 2; pointer-events: none; overflow: visible; }
.helmet-glow { position: absolute; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, var(--team-color) 0%, transparent 70%); opacity: 0.3; pointer-events: none; z-index: 1; }
.helmet-img { position: relative; z-index: 2; width: 130px !important; height: 130px !important; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.7)); transition: transform 0.4s ease; }
.driver-card:hover .helmet-img { transform: scale(1.05) rotate(-4deg); }

.bg-number { position: absolute; right: -10px; bottom: -10px; color: rgba(255, 255, 255, 0.03); font-size: 120px; font-weight: 900; pointer-events: none; z-index: 0; margin: 0; line-height: 1; transition: color 0.2s ease; }
.driver-card:hover .bg-number { color: var(--team-color); }

.points { color: #FFF; font-family: 'Formula1', sans-serif; font-size: 64px; font-weight: 700; line-height: 64px; position: relative; z-index: 1; }
.driver-label-punti { color: #555; font-size: 13px; font-weight: 600; letter-spacing: 1.95px; text-transform: uppercase; }

/* ===== CARD SCUDERIE ===== */
.team-card { position: relative; overflow: hidden; display: flex; width: 425.34px; height: 320px; padding: 32px 28px; flex-direction: column; justify-content: space-between; border-radius: 8px; border: 1px solid #1A1A1A; background: #0F0F0F; }
.team-position { color: #E10600; font-family: 'Formula1', sans-serif; font-size: 24px; font-weight: 700; text-transform: uppercase; }
.scuderia1 { color: #FFF; font-family: 'Formula1', sans-serif; font-size: 20px; font-weight: 700; line-height: 30px; text-transform: uppercase; flex-grow: 1; }
.team-points { color: #FFF; font-family: 'Formula1', sans-serif; font-size: 64px; font-weight: 700; line-height: 64px; }
.team-label-punti { color: #555; font-size: 13px; font-weight: 600; letter-spacing: 1.95px; text-transform: uppercase; }

/* ===== STATS ===== */
.stats-container { display: flex; width: 100%; max-width: 1440px; margin: 40px auto; padding: 0 80px 80px 80px; justify-content: center; gap: 2px; }
.stat-block { display: flex; padding: 32px 28px; flex-direction: column; gap: 8px; flex: 1; border: 1px solid #1A1A1A; background: #0F0F0F; }
.stat-number { color: #E10600; font-family: 'Formula1', sans-serif; font-size: 56px; font-weight: 500; }
.stat-label { color: #FFF; font-size: 20px; font-weight: 600; letter-spacing: 2.2px; text-transform: uppercase; }

/* ===== CIRCUITI ===== */
.section-header-circuits { display: flex; justify-content: space-between; align-items: flex-end; padding: 80px 80px 20px 80px; }
.section-header-circuits .section-title { color: #FFF; font-family: 'Formula1', sans-serif; font-size: 48px; font-weight: 500; letter-spacing: -0.96px; text-transform: uppercase; }
.view-all-circuits { color: #E10600; text-align: center; font-family: "Barlow Condensed", sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; text-decoration: none; }
.circuits-container { display: flex; width: 1280px; margin: 50px auto 0 auto; justify-content: center; align-items: flex-start; gap: 2px; padding-bottom: 80px; }
.circuit-card { display: flex; width: 425.34px; padding: 32px 28px; flex-direction: column; justify-content: center; align-items: center; gap: 16px; flex-shrink: 0; border-radius: 8px; border: 1px solid #1A1A1A; background: #111; transition: 0.3s ease; }
.circuit-card:hover { border-color: #E10600; background: #161616; }
.circuit-img-map { width: 150px; height: 150px; object-fit: contain; transition: transform 0.4s ease; }
.circuit-card:hover .circuit-img-map { transform: scale(1.05) rotate(-4deg); }
.circuit-info-box { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; text-align: center; }
.circuit-name { color: #FFF; font-family: 'Formula1', sans-serif; font-size: 18px; font-weight: 700; }
.circuit-event { color: #FFF; font-family: 'Formula1', sans-serif; font-size: 14px; font-weight: 400; opacity: 0.8; }
.circuit-date { color: #555; font-family: "Barlow Condensed", sans-serif; font-size: 16px; font-weight: 600; text-transform: uppercase; }

/* ===== SPONSORS ===== */
.sponsors-section { display: flex; flex-direction: column; align-items: center; padding: 60px 80px 0 80px; background-color: #000; overflow: hidden; }
.sponsor-block-one { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 100px; width: 100%; }
.sponsor-block-two { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 60px; width: 100%; }
.sponsor-block-one img, .sponsor-block-two img { height: 60px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.8; transition: opacity 0.3s; }
.sponsor-block-one img:hover, .sponsor-block-two img:hover { opacity: 1; }

.piloti-page-header {
    display: flex;
    padding: 60px 80px 20px 80px; /* Specifiche richieste */
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    align-self: stretch;
    background-color: #000;
}

.red-line-small {
    width: 24px;
    height: 2px;
    flex-shrink: 0;
    background-color: #E10600;
}

.breadcrumb-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 28px;
}

.breadcrumb-text {
    color: #FFF;
    font-family: "Barlow Condensed";
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
    line-height: normal;
    letter-spacing: 3.9px;
    text-transform: uppercase;
}


.f1-label-top {
    align-self: stretch;
    color: #E10600;
    font-family: "Barlow Condensed";
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    letter-spacing: 2.75px;
    text-transform: uppercase;
    margin: 0;
}


.main-title-grid {
    color: #FFF;
    font-family: "Barlow Condensed";
    font-size: 80px;
    font-style: normal;
    font-weight: 900;
    line-height: 76px;
    letter-spacing: -2.4px;
    text-transform: uppercase;
    margin: 0;
}

.main-title-grid .text-red {
    color: #E10600;
   
}

.sub-description {
    color: #555;
    font-family: "Barlow";
    font-size: 15px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    margin-top: 8px;
}


.buttons-container-wrapper {
    display: flex;
    width: 100%; 
    max-width: 1440px;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 40px;
    margin-bottom: 40px
}

.team-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


.filter-btn {
    display: flex;
    padding: 10px 20px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    cursor: pointer;
    transition: 0.3s;
    
    color: #FFF; 
    text-align: center;
    font-family: "Barlow Condensed";
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.filter-btn.active {
    border: 1px solid rgba(225, 6, 0, 0.30);
    background: rgba(225, 6, 0, 0.10);
    color: #E10600;
}

.filter-btn:hover {
    border-color: rgba(225, 6, 0, 0.5);
}

.glossario-header {
    display: flex;
    padding: 60px 80px 20px 80px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    align-self: stretch;
    background-color: #000;
}

.glossario-title {
    color: #FFF;
    font-family: "Barlow Condensed";
    font-size: 80px;
    font-weight: 900;
    line-height: 76px; /* 95% */
    letter-spacing: -2.4px;
    text-transform: uppercase;
    margin: 0;
}

.glossario-sub {
    color: #555;
    font-family: "Barlow";
    font-size: 15px;
    font-weight: 300;
    line-height: normal;
    margin-top: 8px;
}

/* Container Lettere (Indicatori Alfabetici) */
.letter-divider {
    display: flex;
    padding: 40px 80px 20px 80px;
    align-items: center;
    gap: 20px;
}

.letter-badge {
    display: flex;
    padding: 8px 16px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    border: 1px solid rgba(225, 6, 0, 0.30);
    background: rgba(225, 6, 0, 0.10);
    
    /* Testo Lettera Grande */
    color: #E10600;
    text-align: center;
    font-family: "Barlow Condensed";
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1.65px;
    text-transform: uppercase;
}

/* Accordion Item */
.glossario-container {
    padding: 0 80px 80px 80px;
}

.glossario-item {
    margin-bottom: 12px;
}

.glossario-header-item {
    display: flex;
    padding: 20px 28px;
    justify-content: space-between;
    align-items: center;
    flex: 1 0 0;
    align-self: stretch;
    border-radius: 8px;
    border: 1px solid #1A1A1A;
    background: #0F0F0F;
    cursor: pointer;
    position: relative; /* Per il bollino */
    transition: border-color 0.3s ease;
}

.glossario-header-item:hover {
    border-color: rgba(225, 6, 0, 0.5);
}

/* ===== STILE BARRA DI RICERCA GLOSSARIO ===== */
.search-container {
    position: relative;
    width: 100%;
    max-width: 500px; /* Allineata visivamente alla gerarchia dei titoli */
    margin-top: 32px;
    margin-bottom: 20px;
}

#glossarySearch {
    width: 100%;
    background-color: #0F0F0F; /* Stesso sfondo delle card scuderia */
    border: 1px solid #1A1A1A; /* Bordo standard del sito */
    border-radius: 4px;
    padding: 16px 48px 16px 20px; /* Spazio a destra per l'icona */
    
    /* Tipografia Barlow Condensed */
    color: #FFF;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    
    outline: none;
    transition: all 0.3s ease;
}

/* Effetto al click/focus: bordo rosso neon come le card piloti */
#glossarySearch:focus {
    border-color: rgba(225, 6, 0, 0.6);
    background-color: #151515;
    box-shadow: 0 0 15px rgba(225, 6, 0, 0.1);
}

/* Placeholder personalizzato */
#glossarySearch::placeholder {
    color: #ffffff; /* Grigio scuro come i sottotitoli */
    opacity: 1;
}

/* Testo Termine */
.term-title {
    color: #FFF;
    font-family: "Barlow Condensed";
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-transform: uppercase;
    display: block;
}

/* Testo Piccolo Sotto */
.term-subtitle {
    color: #555;
    font-family: "Barlow Condensed";
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.65px;
    text-transform: uppercase;
    align-self: stretch;
}

/* Bollino Decorativo */
.bollino-decor {
    width: 10px;
    height: 10px;
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%); /* Centrato verticalmente rispetto alla card */
    border-radius: 5px;
    border: 2px solid #2A2A2A;
    background: #1A1A1A;
    z-index: 2;
}

/* Contenuto Espandibile (Container Testo) */
.glossario-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: transparent;
}

.glossario-item.active .glossario-content {
    max-height: 500px; /* Valore indicativo per l'animazione */
}

.content-inner {
    display: flex;
    width: 100%;
    max-width: 1180px;
    padding: 20px 0 20px 32px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #FFF;
    font-family: "Barlow";
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
}

/* ===== PAGINA SCUDERIE ===== */
.scuderie-container {
    display: flex;
    padding: 40px 80px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    align-self: stretch;
}

.scuderia-row {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 24px 28px;
    border-radius: 8px;
    border: 1px solid #1A1A1A;
    background: #0F0F0F;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    gap: 40px;
}

.scuderia-row:hover { border-color: var(--team-color); }

/* Barra colorata laterale */
.scuderia-side-bar {
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--team-color);
}

/* Blocco sinistro: posizione + nome + piloti */
.scuderia-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 0 350px;
    min-width: 0;
}

.scuderia-position-label {
    color: #E10600;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.65px;
    text-transform: uppercase;
    margin: 0;
}

.scuderia-nome {
    color: #FFF;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.64px;
    text-transform: uppercase;
    align-self: stretch;
    line-height: 1;
    margin: 0;
    line-height: 1;
}

.scuderia-piloti {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pilota-badge {
    display: flex;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid #1A1A1A;
    background: #1A1A1A;
    color: #BBB;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.65px;
    text-transform: uppercase;
}

/* Blocco centrale: titoli e vittorie */
.scuderia-stats {
    display: flex;
    gap: 40px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-item .stat-val {
    color: #FFF;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 32px;
    font-weight: 900;
    line-height: 32px;
    text-align: center;
}

.stat-item .stat-lbl {
    color: #444;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
}

/* Blocco destra: punti stagione */
.scuderia-punti-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex: 0 0 120px;
    text-align:right;
}

.scuderia-punti-numero {
    color: var(--team-color);
    font-family: "Barlow Condensed", sans-serif;
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
}

.scuderia-punti-label {
    color: #444;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.accordion-icon {
    color: #E10600;
    font-family: "Barlow Condensed";
    font-size: 20px;
    font-weight: 700;
}


.footer-custom { 
    background-color: #000000; 
    padding: 60px 40px; 
    border-top: 2px solid #e10600; 
}

.footer-top { 
    display: flex; 
    justify-content: space-between;
    align-items: center; 
    margin-bottom: 40px; 

}

.footer-logo { 
    width: 442px; 
    height: 110px; 
    object-fit: contain; 
}

.footer-menu a { 
    color: #ffffff; 
    text-decoration: none; 
    font-weight: 700; 
    text-transform: uppercase; 
    margin-left: 25px; 
    font-size: 14px; 
    transition: 0.3s ease; 
}

