html {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}
/* =========================================================
   FONTS
   ========================================================= */

@font-face {
    font-family: 'F1DisplayRegular';
    src: url('/fonts/Formula1-Regular_web_0.woff2') format('woff2'),
         url('/fonts/Formula1-Regular_web_0.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'F1DisplayBold';
    src: url('/fonts/Formula1-Bold_web_0.woff2') format('woff2'),
         url('/fonts/Formula1-Bold_web_0.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'F1DisplayWide';
    src: url('/fonts/Formula1-Wide_web_0.woff2') format('woff2'),
         url('/fonts/Formula1-Wide_web_0.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


/* =========================================================
   ALGEMENE BASIS
   ========================================================= */

body {
    margin: 0;
    padding-top: 0;
    marging-top: 0;
    background:
        repeating-linear-gradient(
            45deg,
            #0d0d0d,
            #0d0d0d 10px,
            #1a1a1a 10px,
            #1a1a1a 20px
        );
    color: #FFD700;
    font-family: 'F1DisplayRegular', sans-serif !important;
    text-align: center;
}

h1 { margin-bottom: 0px; color:#d40000; font-family: 'F1DisplayWide', sans-serif !important; font-size: 25px;}
p  { margin-bottom: 20px; font-size: 0.95em; opacity: 0.9; }

a {
    color: #FFD700;
    text-decoration: none;
}
a:hover {
    color: #FFFFFF;
}

/* Algemene logo class voor ALLE pagina’s */
.logo-img {
    width: auto;
    height: 60px;
    display: block;
    margin: 0 auto;
}

.logo-header {
    text-align: center;
    margin-top: 0;        /* belangrijk */
    padding-top: 0;       /* belangrijk */
    margin-bottom: 20px;  /* afstand tussen titel en content */
    padding-bottom: 0;
}

.logo-header h1,
.logo-header h2,
.logo-header .title {
    margin-top: 0px;  /* of 0, of 15, wat jij mooi vindt */
}

.container {
    padding-top: 0;
    margin-top: -20px;
}


/* =========================================================
   INDEX PAGINA
   ========================================================= */

img.logo {
    width: 240px;
    display: block;
    margin: 0 auto;
    margin-top: -20px; /* of -10px, wat jij mooi vindt */
}

.site-header {
    padding-top: 0px;
}

.title {
    font-family: 'F1DisplayWide', sans-serif;
    font-size: 25px;
    font-weight: bold;
    color: #FF0000;
}

.race-name {
    font-size: 16px;
    margin-bottom: 0;
}

.race-time {
    font-size: 14px;
    margin: 3px 0;
    color: #ffffff;
}

.countdown {
    font-size: 20px;
    font-weight: bold;
    margin-top: 5px;
}

#timezone-info {
    font-size: 12px;
    margin-top: 8px;
    opacity: 0.8;
}

.f1-button {
    color: white;
    background: linear-gradient(90deg, #d40000, #ff0000);
    padding: 10px 24px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 4px;
    display: inline-block;
    margin-top: 10px;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: 0.2s;
    width: 250px;
}

.f1-button:last-of-type {
    margin-bottom: 40px;
}


/* =========================================================
   DRIVERS INFO PAGINA
   ========================================================= */

.drivers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    
}
.drivers-grid {
    grid-template-columns: repeat(2, auto);
    justify-content: center;
    gap: 20px;
}

.driver-card {
    background: #151515;
    border-radius: 10px;
    border: 1px solid #FFD700;
    padding: 15px;
    transition: transform 0.2s;

}
.driver-card:hover { transform: scale(1.0); }

.driver-photo {
    width: 100%;
    max-width: 180px;
    border-radius: 50%;
    border: 1px solid #FFD700;
    margin-bottom: 12px;
    height: 350px; /* vaste hoogte.    */
    width: auto;  /* behoud verhouding */
    object-fit: contain; /* nooit uitrekken */
}

.team-logo {
    width: 60px;
    margin: 8px auto;
    display: block;
}

.driver-name {
    font-size: 1.3em;
    font-weight: bold;
    margin: 8px 0;
    height: 3.6em; 
    line-height: 1.2em;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
}

.driver-info {
    font-size: 0.95em;
    opacity: 0.9;
}

@media (max-width: 600px) {
    .drivers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Modal */
#modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    z-index: 900;
}

#modal-window {
    position: fixed;
    box-sizing: border-box;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 420px;
    background: #151515;
    border: 2px solid #FFD700;
    border-radius: 12px;
    padding: 20px;
    display: none;
    z-index: 1000;
}

.modal-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid #FFD700;
    object-fit: cover;
    object-position: top;
    margin-bottom: 10px;
}

.modal-teamlogo {
    width: 70px;
    margin: 10px auto;
    display: block;
}

.modal-summary {
    font-size: 0.9em;
    opacity: 0.85;
    margin: 15px 0;
}

/* CLOSE BUTTON */
#modal-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #d40000;
}

/* =========================================================
   CONSTRUCTEURS PAGINA
   ========================================================= */

table {
    width: 100%;
    max-width: 900px;
    background: #111111;
    margin: 0 auto;
    border-collapse: collapse;
}

th, td {
    padding: 10px 8px;
    border: 1px solid #FFD700;
    vertical-align: middle;
}

th {
    background: #111111;
}

.flag {
    font-size: 1.5em;
}

.logo img {
    max-width: 40px;
    height: auto;
}

.pnt-cell {
    text-align: center;
    width: 40px;
    font-weight: bold;
    font-size: 1.1em;
}

.constructors-table {
    background-color: #444;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden; /* zorgt dat afgeronde hoeken ook echt zichtbaar zijn */
}

.constructors-table th,
.constructors-table td {
    background-color: #151515;
}



/* =========================================================
   RACES PAGINA
   ========================================================= */

.race-block {
    margin-bottom: 30px;
    padding: 15px;
    background: #151515;
    border-radius: 10px;
    border: 1px solid #FFD700;
}

.race-date {
    font-size: 1.1em;
    font-weight: bold;
    color: #ccc;
}

.race-name {
    font-size: 1.25em;
    margin-bottom: 8px;
    font-family: 'F1DisplayBold', sans-serif;
}

.circuit {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 15px;
}

.podium-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0;
}

.podium-line .medal {
    width: 40px;
    height: 40px;
}

.youtube-thumbnail-container {
    margin-top: 20px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #444;
    position: relative;
}

.youtube-thumbnail-container img {
    width: 100%;
    display: block;
}

.youtube-thumbnail-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4em;
    color: rgba(255,255,255,0.7);
}

.youtube-thumbnail-text {
    margin-top: 8px;
    font-size: 0.95em;
    color: #ff4d4d;
        color: white;
    background: linear-gradient(90deg, #d40000, #ff0000);
    padding: 8px 16px;
    font-family: 'F1DisplayRegular', sans-serif;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    margin-top: 10px;
    letter-spacing: 1px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    transition: 0.2s;
}

.race-separator {
    margin: 1em 0;
    height: 4px;
    background: #444;
    opacity: 0.4;
}

.f1-button-small {
    color: white;
    background: linear-gradient(90deg, #d40000, #ff0000);
    padding: 8px 16px;
    font-family: 'F1DisplayRegular', sans-serif;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    margin-top: 10px;
    letter-spacing: 1px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    transition: 0.2s;
}

.f1-button-small:hover {
    transform: scale(1.05);
    color: #fff;
}

/* Navigatiebalk alleen op mobiel/tablet */
@media (max-width: 1024px) {
    .swipe-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(0,0,0,0.7);
        color: #fff;
        padding: 10px 5px;
        padding-bottom: env(safe-area-inset-bottom);
        display: flex;
        justify-content: space-between;
        font-size: 14px;
        z-index: 9999;
        backdrop-filter: blur(6px);
    }
}

/* Desktop: verbergen */
@media (min-width: 1025px) {
    .swipe-nav {
        display: none;
    }
}
/* Menu verbergen op mobiel/tablet */
@media (max-width: 1024px) {
    .menu {
        display: none;
    }
}

/* Menu tonen op desktop */
@media (min-width: 1025px) {
    .menu {
        display: block;
    }
}
.swipe-nav {
    padding-bottom: env(safe-area-inset-bottom);
}
.swipe-nav span {
    flex: 2;
    text-align: center;
}

.dots {
    position: fixed;
    bottom: 20px; /* afstand van onderkant scherm */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 9999; /* altijd boven andere elementen */
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #e10600; /* F1 rood */
    background-color: transparent;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #e10600; /* F1 rood gevuld */
}

.share-button {
    display: none; /* standaard verborgen, desktop ziet hem niet */
    background: #e10600;
    color: white;
    border: none;
    padding: 12px 20px;
    margin: 20px auto;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    width: 90%;
    max-width: 300px;
    text-align: center;
    font-weight: bold;
}

@media (max-width: 768px) {
    .share-button {
        display: block; /* alleen op mobiel */
    }
}


/*nieuw */
/* === NIEUWS PAGINA - MOBIEL OPTIMALISATIE === */
.news-container {
    max-width: 1200px;
    margin: 15px auto;
    padding: 0 12px;
}

.news-header {
    text-align: center;
    margin-bottom: 25px;
}

.news-header h1 {
    margin: 0 0 12px 0;
    font-size: 1.8em;
}

.refresh-btn {
    display: inline-block;
    background: #e30613;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin: 8px 0;
    box-shadow: 0 3px 8px rgba(227, 6, 19, 0.3);
    transition: all 0.2s;
}

.refresh-btn:active {
    transform: scale(0.95);
}

.last-update {
    font-size: 0.85em;
    color: #888;
    margin: 5px 0 0 0;
}

/* Grid optimalisatie voor mobiel */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

/* Kleinere kaarten op mobiel */
.news-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s;
}

.news-card:hover {
    transform: translateY(-3px);
}

.news-card img {
    width: 100%;
    height: auto;
    display: block;
}

.news-source {
    background: #e30613;
    color: white;
    font-size: 0.82em;
    padding: 7px 12px;
    text-align: right;
}

.news-card h3 {
    margin: 14px 14px 10px;
    font-size: 1.05em;
    line-height: 1.35;
}

.news-desc {
    padding: 0 14px 14px;
    color: #ccc;
    font-size: 0.93em;
    line-height: 1.45;
}

.read-more {
    display: block;
    margin: 8px 14px 16px;
    color: #ff9999;
    font-weight: bold;
    text-decoration: none;
}

/* Extra mobiel aanpassingen */
@media (max-width: 480px) {
    .news-grid {
        gap: 16px;
    }
    
    .news-card h3 {
        font-size: 1em;
    }
    
    .news-desc {
        font-size: 0.9em;
    }
}

.race-time.past-session {
    opacity: 0.6;
    text-decoration: line-through;
}

