/* Voorpagina (desktop)
 *
 * Zelfde kleuren, vakken en lettertype als de mobiele nieuwspagina. Het
 * lettertype (TPC Titillium) wordt al geladen door header.css.
 * Zie includes/front-page.php.
 */

.fp {
    --card: #161c2b;
    --card-2: #1c2230;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.16);
    --fg: #f3f5fa;
    --muted: #8d95a8;
    --dim: #5d6579;
    --red: #e10600;

    box-sizing: border-box;
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 48px;
    color: var(--fg);
    font-family: "TPC Titillium", "Titillium Web", "Segoe UI", system-ui, sans-serif;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}
.fp *, .fp *::before, .fp *::after { box-sizing: border-box; }
.fp a { color: inherit; text-decoration: none; }
.fp img { display: block; max-width: 100%; }
.fp button { font: inherit; color: inherit; }
.fp [hidden] { display: none !important; }
.fp a:focus-visible, .fp button:focus-visible, .fp summary:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 6px; }

/* Kopje met rode streep */
.fp .fp-h {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}
.fp .fp-h::before { content: ""; flex: none; width: 18px; height: 3px; background: var(--red); transform: skewX(-24deg); }
.fp .fp-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ── Coureursbalk ── */
/* Op een breed scherm passen alle coureurs, gelijk verdeeld; past het niet,
   dan schuift de rij (pijltjes, scrollwiel, vervaagde randen). */
.fp-rail {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--line);
}
.fp-rail-label { flex: none; width: 60px; font-size: 10.5px; font-weight: 700; line-height: 1.35; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.fp-rail-wrap { position: relative; flex: 1; min-width: 0; }
.fp-rail-track {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    padding: 7px 8px 3px 6px; /* ruimte voor de telbolletjes en de rode ring van de gekozen coureur */
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.fp-rail-track::-webkit-scrollbar { display: none; }
.fp-rail-wrap.can-prev .fp-rail-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px); mask-image: linear-gradient(90deg, transparent, #000 56px); }
.fp-rail-wrap.can-next .fp-rail-track { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.fp-rail-wrap.can-prev.can-next .fp-rail-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
.fp .fp-rail-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-top: -20px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    background: var(--card-2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}
.fp .fp-rail-arrow:hover { background: #262d3e; }
.fp-rail-arrow svg { width: 20px; height: 20px; }
.fp-rail-arrow.is-prev { left: -6px; }
.fp-rail-arrow.is-next { right: -6px; }
.fp .fp-drv { --c: #5d6579; flex: none; display: grid; justify-items: center; gap: 4px; min-width: 40px; padding: 0; border: 0; background: none; cursor: pointer; }
.fp-rail .fp-ava { width: 40px; height: 40px; }
.fp-ava {
    position: relative;
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--c);
    background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--c) 65%, #fff), color-mix(in srgb, var(--c) 40%, #1c2230));
    transition: box-shadow 0.15s, transform 0.15s;
}
.fp .fp-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.fp-ava.is-all { display: grid; place-items: center; border-color: var(--line-2); background: var(--card-2); font-size: 12px; font-weight: 900; letter-spacing: 0.06em; }
.fp-n { position: absolute; right: -6px; top: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--fg); color: #0e1320; font-size: 10.5px; font-weight: 900; line-height: 18px; text-align: center; }
.fp-code { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; color: var(--muted); }
.fp-drv.is-quiet .fp-ava { opacity: 0.45; filter: grayscale(0.6); }
.fp-drv:hover .fp-ava { transform: translateY(-2px); opacity: 1; filter: none; }
.fp-drv[aria-pressed="true"] .fp-ava { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--red); opacity: 1; filter: none; }
.fp-drv[aria-pressed="true"] .fp-code { color: #fff; }

.fp-filter { display: flex; align-items: center; gap: 10px; margin: -6px 0 20px; padding: 10px 14px; border-radius: 12px; background: rgba(225, 6, 0, 0.12); border: 1px solid rgba(225, 6, 0, 0.3); font-size: 14px; }
.fp .fp-filter button { margin-left: auto; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: none; font-size: 12px; font-weight: 700; cursor: pointer; }
.fp .fp-filter button:hover { background: rgba(255, 255, 255, 0.06); }

/* ── Bovenaan: topverhaal + volgende race ── */
.fp-top { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.fp-top-side { display: grid; gap: 20px; }
.fp-lead { border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line); transition: opacity 0.2s; }
.fp-lead:empty { display: none; }
.fp-lead-link { position: relative; display: block; }
.fp-lead-media { --c: #5d6579; aspect-ratio: 16 / 8; overflow: hidden; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 45%, #0b0f19), #0b0f19); }
.fp .fp-lead-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.fp-lead-link:hover .fp-lead-media img { transform: scale(1.02); }
.fp-lead-link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(8, 11, 20, 0.6) 58%, rgba(8, 11, 20, 0.97)); }
.fp-lead-over { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0 28px 24px; }
.fp-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px; background: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.fp .fp-lead h1 { margin: 12px 0 0; max-width: 24ch; font-family: inherit; font-size: 38px; line-height: 1.08; font-weight: 900; color: #fff; text-wrap: balance; }
.fp-lead-body { display: grid; gap: 14px; padding: 16px 28px 24px; }
.fp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.fp-also { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.fp-also a { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.025); font-size: 14px; line-height: 1.35; transition: background 0.15s; }
.fp-also a:hover { background: rgba(255, 255, 255, 0.06); }
.fp .fp-also img, .fp-also .fp-noicon { width: 16px; height: 16px; border-radius: 4px; margin-top: 2px; }
.fp-also .fp-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fp-also em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.fp-also time { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.fp .fp-more-btn { justify-self: start; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: none; font-size: 13px; font-weight: 700; cursor: pointer; }
.fp .fp-more-btn:hover { background: rgba(255, 255, 255, 0.06); }

/* Volgende race */
/* Volgende race: zie next-race.css (ook gebruikt op de standings-pagina's). */

/* Laatste race */
.fp-box { padding: 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.fp-last-name { font-size: 24px; font-weight: 900; line-height: 1.05; text-transform: uppercase; }
.fp-podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; margin: 12px 0 14px; }
.fp-pod { --c: #5d6579; display: grid; justify-items: center; gap: 6px; }
.fp-pod .fp-ava { width: 58px; height: 58px; }
.fp-pod.p1 .fp-ava { width: 74px; height: 74px; }
.fp-pod b { font-size: 14px; font-weight: 900; }
.fp-step { width: 100%; display: grid; place-items: center; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 45%, #1c2230), #1c2230); font-size: 20px; font-weight: 900; font-style: italic; }
.fp-pod.p1 .fp-step { height: 64px; }
.fp-pod.p2 .fp-step { height: 46px; }
.fp-pod.p3 .fp-step { height: 34px; }

/* ── Nieuws + zijkolom ── */
.fp-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; margin-top: 28px; }
.fp-feed { transition: opacity 0.2s; }
.fp.is-loading .fp-feed, .fp.is-loading .fp-lead { opacity: 0.45; pointer-events: none; }
.fp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 18px; margin-bottom: 26px; }

.fp-card { --c: #5d6579; position: relative; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); transition: border-color 0.15s, transform 0.15s; }
.fp-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: 2; height: 3px; background: var(--c); }
.fp-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.fp-card-media { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 40%, #0b0f19), #0b0f19); }
.fp .fp-card-media > img { width: 100%; height: 100%; object-fit: cover; }
.fp-noimg { position: absolute; inset: 0; display: grid; place-items: center; }
.fp .fp-noimg img { width: 32px; height: 32px; border-radius: 8px; opacity: 0.8; }
.fp-count { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 7px; padding: 4px 9px 4px 6px; border-radius: 999px; background: rgba(8, 11, 20, 0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 12px; font-weight: 700; }
.fp-logos { display: flex; }
.fp .fp-logos img { flex: none; width: 16px; height: 16px; max-width: none; border-radius: 4px; border: 1.5px solid #0e1320; background: #fff; }
.fp .fp-logos img + img { margin-left: -5px; }
.fp-card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 14px 16px 16px; }
.fp .fp-card h3 { margin: 0; font-family: inherit; font-size: 18px; line-height: 1.25; font-weight: 700; color: var(--fg); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fp-card-body > a:hover h3 { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.fp-ex { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fp-meta { display: flex; align-items: center; gap: 6px; margin-top: auto; font-size: 12.5px; color: var(--muted); }
.fp .fp-meta img, .fp-meta .fp-noicon { flex: none; width: 14px; height: 14px; border-radius: 3px; }
.fp-meta b { font-weight: 600; color: #c9cedb; }
.fp-noicon { display: block; width: 16px; height: 16px; border-radius: 4px; background: #2a3142; }

.fp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fp .fp-chip { --c: #5d6579; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); background: color-mix(in srgb, var(--c) 16%, transparent); font-size: 12px; font-weight: 700; line-height: 1.2; }
.fp button.fp-chip { cursor: pointer; }
.fp button.fp-chip:hover { background: color-mix(in srgb, var(--c) 30%, transparent); }
.fp-chip i { display: block; width: 20px; height: 20px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--c) 55%, #fff); }
.fp-chip.is-team i { border-radius: 5px; background: color-mix(in srgb, var(--c) 80%, #000); padding: 2px; }
.fp .fp-chip i img { width: 100%; height: 100%; object-fit: cover; }
.fp .fp-chip.is-team i img { object-fit: contain; }

.fp-card details { border-top: 1px solid var(--line); }
.fp-card summary { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 13px; color: var(--muted); cursor: pointer; list-style: none; }
.fp-card summary::-webkit-details-marker { display: none; }
.fp-card summary::after { content: "+"; margin-left: auto; font-size: 16px; font-weight: 700; color: var(--muted); }
.fp-card details[open] summary::after { content: "−"; }
.fp-card summary b { color: var(--fg); }
.fp-card details ul { display: grid; gap: 4px; margin: 0; padding: 0 10px 10px; list-style: none; }
.fp-card details li { margin: 0; }
.fp-card details li a { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; padding: 8px 6px; border-radius: 8px; font-size: 13.5px; line-height: 1.35; }
.fp-card details li a:hover { background: rgba(255, 255, 255, 0.05); }
.fp .fp-card details li img { width: 16px; height: 16px; border-radius: 4px; }
.fp-card details li em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }

.fp-card.is-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 46% minmax(0, 1fr); }
.fp-card.is-wide .fp-card-media { aspect-ratio: auto; min-height: 100%; }
.fp .fp-card.is-wide .fp-card-media > img { position: absolute; inset: 0; }
.fp .fp-card.is-wide h3 { font-size: 22px; }
.fp-card.is-wide details { grid-column: 1 / -1; }

.fp-empty { margin: 0 0 20px; color: var(--muted); }
.fp .fp-loadmore { display: block; width: 100%; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--card); font-size: 14px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.fp .fp-loadmore:hover { background: var(--card-2); }
.fp .fp-loadmore[aria-busy="true"] { opacity: 0.6; cursor: progress; }

/* Zijkolom */
.fp-side { display: grid; gap: 20px; }
.fp-ig { position: relative; display: block; overflow: hidden; border-radius: 12px; aspect-ratio: 1; background: #0b0f19; }
.fp .fp-ig img { width: 100%; height: 100%; object-fit: cover; }
.fp-play { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, 0.6); }
.fp-ig-cap { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: #c9cedb; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fp-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.fp-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width 0.2s; }
.fp-dots i.on { width: 18px; background: var(--red); }
.fp .fp-ig-follow { margin-top: 14px; background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.fp .fp-ig-follow:hover { background: linear-gradient(135deg, #f8963f, #e43a88 50%, #8e3fbd); }

.fp-heads { display: grid; }
.fp-heads a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.35; }
.fp-heads a:first-child { border-top: 0; padding-top: 0; }
.fp-heads a:hover span { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.fp-heads time { font-size: 12.5px; font-weight: 700; color: #ff6a64; font-variant-numeric: tabular-nums; }
.fp-heads span { color: #dfe3ec; }
.fp-heads em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--muted); }

/* ── Smallere vensters ── */
@media (max-width: 1100px) {
    .fp-top, .fp-body { grid-template-columns: minmax(0, 1fr); }
    .fp-top-side, .fp-side { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
}
@media (max-width: 760px) {
    .fp { padding: 16px 14px 32px; }
    .fp-rail-label { display: none; }
    .fp .fp-lead h1 { font-size: 26px; }
    .fp-lead-over { padding: 0 16px 16px; }
    .fp-lead-body { padding: 14px 16px 18px; }
    .fp-also { grid-template-columns: 1fr; }
    .fp-grid { grid-template-columns: minmax(0, 1fr); }
    .fp-card.is-wide { display: flex; }
    .fp-card.is-wide .fp-card-media { aspect-ratio: 16 / 9; min-height: 0; }
    .fp .fp-card.is-wide .fp-card-media > img { position: static; }
}
@media (prefers-reduced-motion: reduce) {
    .fp-card, .fp-ava, .fp .fp-lead-media img { transition: none; }
}
