/* ============================================================
   KiloRace 2026 — Stijlen
   Nautisch thema: wit, marineblauw, lichtgrijs
   ============================================================ */

:root {
    --navy:   #1a3a5c;
    --navy2:  #0d2440;
    --sky:    #c8dff0;
    --white:  #ffffff;
    --gray:   #f4f6f9;
    --muted:  #6b7a8d;
    --border: rgba(255,255,255,0.2);
    --shadow: 0 4px 24px rgba(0,0,0,0.25);
    --radius: 10px;
    --font:   'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--gray);
    color: #1a1a2e;
    min-height: 100vh;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)),
                      url('../img/homepage.jpg');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-box {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem 4rem;
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: 4rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: 700;
}

.hero .subtitle { font-size: 1.6rem; margin-top: 0.75rem; font-weight: 300; }
.hero .location { font-size: 1.2rem; margin-top: 0.4rem; color: #d0e8ff; font-style: italic; }

/* ===== SPONSOR CAROUSEL ===== */
.sponsor-carousel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 20vh;
    min-height: 60px;
    max-height: 260px;
    overflow: hidden;
    background: rgba(13, 36, 64, 0.55);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}

.sponsor-track {
    display: flex;
    align-items: center;
    height: 100%;
    width: max-content;
    animation-name: sponsor-scroll;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: calc(var(--sponsor-count, 6) * 4s);
}

.sponsor-logo {
    flex: 0 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 2.5rem;
}

.sponsor-logo img {
    height: 55%;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

@keyframes sponsor-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .sponsor-logo { padding: 0 1.4rem; }
    .sponsor-logo img { max-width: 100px; }
}

/* ===== NAVIGATIE ===== */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: transparent;
    transition: background 0.3s;
    padding: 0 1rem;
}

#navbar.scrolled {
    background: rgba(13, 36, 64, 0.92);
    backdrop-filter: blur(8px);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 0.5rem;
}

.nav-brand {
    color: var(--white);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-right: 2rem;
    white-space: nowrap;
}

/* Nav list */
.nav-list {
    list-style: none;
    display: flex;
    gap: 0;
    align-items: center;
    flex: 1;
}

.nav-list > li { position: relative; }

.nav-list > li > a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: color 0.15s;
    letter-spacing: 0.5px;
}

.nav-list > li > a:hover,
.nav-list > li > a.active { color: var(--sky); }

.arrow { font-size: 0.6rem; opacity: 0.7; }

/* Submenus */
.submenu {
    list-style: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: rgba(13,36,64,0.97);
    border: 1px solid rgba(200,223,240,0.15);
    border-radius: var(--radius);
    min-width: 180px;
    padding: 0.4rem 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.18s;
    box-shadow: var(--shadow);
}

.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.submenu li { position: relative; }

.submenu a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #d0e8ff;
    text-decoration: none;
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
}

.submenu a:hover { background: rgba(255,255,255,0.08); color: var(--white); }

/* Diep submenu */
.submenu .submenu {
    top: 0;
    left: 100%;
}

.nav-logout {
    margin-left: auto;
    color: #f0a0a0;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(240,160,160,0.4);
    border-radius: var(--radius);
    transition: all 0.15s;
    white-space: nowrap;
}
.nav-logout:hover { background: rgba(240,100,100,0.15); }

/* Hamburger (mobiel) */
.burger {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.6rem;
    cursor: pointer;
    margin-left: auto;
}

/* ===== PAGINA-INHOUD ===== */
.page-content {
    max-width: 1000px;
    margin: 100px auto 3rem;
    padding: 0 1.5rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--sky);
    letter-spacing: 1px;
}

/* ===== KAART ===== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(26,58,92,0.1);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* ===== WEDSTRIJD INFO-PAGINA ===== */
.lead {
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--navy2);
    margin-bottom: 1.75rem;
}

.card-title {
    font-size: 1.25rem;
    color: var(--navy);
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--sky);
}

.card p { line-height: 1.7; margin-bottom: 0.9rem; }
.card p:last-child { margin-bottom: 0; }
.card a { color: var(--navy); font-weight: 600; text-decoration: underline; }

.schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.schedule-day h4 {
    color: var(--navy);
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #dfe6ee;
}
.schedule-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.schedule-list li {
    display: flex;
    gap: 0.9rem;
    align-items: baseline;
    line-height: 1.5;
}
.schedule-time {
    flex: 0 0 auto;
    min-width: 58px;
    font-weight: 700;
    color: var(--white);
    background: var(--navy);
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
    font-size: 0.82rem;
    text-align: center;
}
.schedule-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 700px) {
    .schedule-grid { grid-template-columns: 1fr; }
}

/* ===== FORMULIER ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-group.checkbox-group { flex-direction: row; align-items: center; gap: 10px; }

/* Groep-kader voor bij elkaar horende velden (bijv. zaterdag/zondag) */
.day-group-box {
    position: relative;
    border: 1px solid #c8d6e5;
    border-radius: var(--radius);
    padding: 1rem 1.1rem 0.8rem;
    margin-top: 0.4rem;
}
.day-group-label {
    position: absolute;
    top: -0.65rem;
    left: 0.8rem;
    background: var(--white);
    padding: 0 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.day-group-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.day-group-inner .checkbox-group { flex-direction: row; align-items: center; gap: 10px; }

label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.help-text { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

input[type=text],
input[type=email],
input[type=tel],
input[type=number],
select {
    height: 42px;
    border: 1.5px solid #c8d6e5;
    border-radius: 7px;
    padding: 0 12px;
    font-size: 0.95rem;
    font-family: var(--font);
    color: #1a1a2e;
    background: #f8fafc;
    transition: border-color 0.15s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--navy);
    background: var(--white);
}

input[type=checkbox] {
    width: 18px; height: 18px;
    accent-color: var(--navy);
    cursor: pointer;
}

.required-star { color: #c0392b; }

/* Submit knop */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
}
.btn:hover { background: var(--navy2); }
.btn:active { transform: scale(0.98); }
.btn-outline {
    background: transparent;
    border: 2px solid var(--navy);
    color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-danger { background: #c0392b; }
.btn-danger:hover { background: #96281b; }

/* Formulier foutmelding */
.error-box {
    background: #fdf0f0;
    border: 1px solid #f0c0c0;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    color: #c0392b;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ===== DEELNEMERSLIJST ===== */
.table-wrap { overflow-x: auto; }

table.kr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.kr-table th {
    background: var(--navy);
    color: var(--white);
    padding: 0.6rem 0.9rem;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.kr-table td {
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid #e0eaf2;
    color: #2c3e50;
}

.kr-table tr:nth-child(even) td { background: #f4f8fc; }
.kr-table tr:hover td { background: #e8f2fb; }

/* Uitslag podium */
.rank-1 td:first-child { color: #b8860b; font-weight: 700; font-size: 1.1rem; }
.rank-2 td:first-child { color: #888; font-weight: 700; }
.rank-3 td:first-child { color: #a0522d; font-weight: 700; }

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}
.badge-a { background: #d4eaff; color: #0d4080; }
.badge-b { background: #d4f4e2; color: #0d6633; }
.badge-c { background: #fff0cc; color: #8a6000; }
.badge-d { background: #f4d4e8; color: #7a0044; }

/* ===== LOGIN ===== */
.login-wrap {
    max-width: 380px;
    margin: 8rem auto 3rem;
    padding: 0 1rem;
}

/* ===== BEDANKPAGINA ===== */
.thanks-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    color: var(--white);
}
.thanks-box {
    background: rgba(13,36,64,0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 3rem 3.5rem;
    max-width: 600px;
}
.thanks-box h2 { font-size: 2.2rem; margin-bottom: 1rem; }
.thanks-box p  { font-size: 1.1rem; margin-bottom: 1.75rem; line-height: 1.7; }

.thanks-costs {
    text-align: left;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
}
.thanks-costs-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    font-size: 1rem;
}
.thanks-costs-total {
    border-top: 1px solid rgba(255,255,255,0.25);
    margin-top: 0.4rem;
    padding-top: 0.7rem;
    font-weight: 700;
    font-size: 1.15rem;
}
.thanks-costs-iban {
    margin: 0.9rem 0 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #d0e8ff;
}

/* ===== BEHEER TABEL ===== */
.admin-actions { display: flex; gap: 0.5rem; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; border-radius: 6px; }

/* ===== MOBIEL ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.4rem; }
    .hero-box { padding: 2rem 1.5rem; }
    .hero .subtitle { font-size: 1.2rem; }

    .burger { display: block; }

    .nav-list {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 64px; left: 0; right: 0;
        background: rgba(13,36,64,0.97);
        padding: 1rem 0 1.5rem;
        align-items: flex-start;
        gap: 0;
    }
    .nav-list.open { display: flex; }
    .nav-list > li > a { padding: 0.7rem 1.5rem; width: 100%; }

    .submenu {
        position: static;
        background: rgba(255,255,255,0.07);
        border: none;
        border-radius: 0;
        padding-left: 1rem;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        display: none;
    }
    .has-sub.open > .submenu { display: block; }

    .form-grid { grid-template-columns: 1fr; }
    .form-group.full { grid-column: 1; }
}
