@charset "utf-8";

/* -------------------------------------
    font 
----------------------------------------*/

@font-face {
    font-family: 'CaveatVariable';
    src: url('Caveat_VariableFont_wght/Caveat-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}


/* ----------------------------------------------------
    BASIS
---------------------------------------------------- */

:root {
    --bg-light: #ededed;
    --bg-dark: #1f1f1f;
    --text-dark: #222;
    --menu-bg: #ededed;
    --menu-hover: #b5b5b5;
    --accent-grey: #a6a6a6;
    --shadow: 0 0 12px rgba(0,0,0,0.4);
    --radius: 8px;
    --max-width: 1024px;
}

body {
    background: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Raleway', sans-serif;
    font-size: 1em;
    line-height: 1.4;
    margin: 0;
}

/* ----------------------------------------------------
    TYPOGRAFIE
---------------------------------------------------- */

h1, h2, h3, h4, nav {
    font-family: 'Caveat', sans-serif;
}

h1 {
    color: #fff;
    text-shadow: 4px 4px 4px #000;
}

/* ----------------------------------------------------
    OUDE HEADER (HERSTELD)
---------------------------------------------------- */

header {
    background-color: #A6A6A6;
    background-image: url(web_images/koolmees.png);
    background-repeat: repeat-x;
    background-position: bottom center;
    background-size: auto 100%;
    height: 220px;
    text-align: center;
    border-bottom: 1px solid #A6A6A6;
    
    display: flex;
    justify-content: center;   /* horizontaal centreren */
    align-items: center;       /* verticaal centreren */
    text-align: center;        /* tekst centreren */
    padding: 0;                
}

header h1 {
    margin: 0;
    background-color: rgba(166,166,166,0.05);
    padding: .3em .5em;
    font-size: 2em; /* basisgrootte op mobiel */
    text-shadow: 3px 3px 4px rgba(0,0,0,0.6);

}

header a {
    text-decoration: none;
    color: #ededed;
}

/* iPad portrait → 2 vogels */
@media (min-width: 600px) {
    header {
        height: 260px;
        background-size: auto 100%;
    }
}

/* iPad landscape / desktop → 3 vogels */
@media (min-width: 1000px) {
    header {
        height: 300px;
        background-size: auto 100%;
    }
}

/* Extra breed */
@media (min-width: 1500px) {
    header {
        height: 300px;
    }
}

/* ----------------------------------------------------
    NAVIGATIE
---------------------------------------------------- */

nav {
    background: var(--menu-bg);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

nav p.menuknop {
    font-family: courier, monospace;
    font-size: 28px;
    margin: 0 4px 0 0;
    text-align: left;
}

nav p.menuknop a {
    color: black;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    background: var(--menu-bg);
    position: absolute;
    top: 220px;
    left: 0;
    right: 0;
}

nav ul li {
    border-top: 1px solid darkgrey;
    padding: .7em .4em;
}

nav a {
    color: black;
    text-decoration: none;
}

nav ul li:hover {
    background: var(--menu-hover);
}

nav ul li.submenu {
    position: relative;
}

nav ul li.submenu > a::after {
    content: " ▼";
}

nav ul li.submenu:hover ul {
    display: block;
    background: #c7c7c7;
    width: 50%;
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 2;
}

/* ----------------------------------------------------
    CONTENT
---------------------------------------------------- */

article {
    padding: 1em;
}

article h1 {
    font-size: 1.8em;
}

article h2 {
    font-size: 1.5em;
    margin-top: 1.5em;
}

aside {
    background: #9e9c9c;
    padding: 1em 1em 2em;
    text-align: center;
}

/* ----------------------------------------------------
    VIDEO (RESPONSIVE 16:9)
---------------------------------------------------- */

figure.video {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 0 1em 0;
}

figure.video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ----------------------------------------------------
    TABELLEN ALGEMEEN
---------------------------------------------------- */

.tijdlijn-tabel table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 1em;
}

.tijdlijn-tabel th {
    background-color: #ddd;
    padding: .5em;
    text-align: center;
}

.tijdlijn-tabel td {
    padding: .4em .6em;
    border: 1px solid #bbb;
}

.tijdlijn-tabel tr:nth-child(even) {
    background-color: #f7f7f7;
}

.tijdlijn-tabel tr:nth-child(odd) {
    background-color: #fff;
}

/* ----------------------------------------------------
   STATISTIEK TABEL (Specifiek)
---------------------------------------------------- */

.stat-container {
    overflow-x: auto; /* Zorgt voor scrollen op kleine telefoons */
    margin: 1.5em 0;
}

.stat-tabel {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden; /* Zorgt dat afgeronde hoeken werken */
}

.stat-tabel th {
    background-color: var(--accent-grey);
    color: #fff;
    padding: 12px 8px;
    text-align: center;
    font-family: 'Raleway', sans-serif;
    font-size: 0.9em;
    text-transform: uppercase;
}

.stat-tabel td {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

/* De eerste kolom (Pagina naam) links uitlijnen */
.stat-tabel td:first-child {
    text-align: left;
    font-weight: bold;
    color: var(--text-dark);
}

/* Om-en-om kleuren voor leesbaarheid */
.stat-tabel tr:nth-child(even) {
    background-color: #f9f9f9;
}

.stat-tabel tr:hover {
    background-color: #f1f1f1;
}

/* De Totaal rij onderaan extra opvallen */
.stat-tabel tr.totaal-rij {
    background-color: var(--bg-dark);
    color: #fff;
    font-weight: bold;
}

.stat-tabel tr.totaal-rij td {
    border-top: 2px solid #000;
}

/* ----------------------------------------------------
    FOOTER
---------------------------------------------------- */

footer {
    background: var(--bg-dark);
    color: white;
    font-size: .9em;
    padding: 2em;
    text-align: center;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ----------------------------------------------------
    RESPONSIVE: >= 500px
---------------------------------------------------- */

@media (min-width: 500px) {

    header {
        padding: 6em 0 1em;
    }

    nav p.menuknop {
        display: none;
    }

    nav > ul {
        display: flex !important;
        justify-content: space-around;
        top: 0;
        background: var(--menu-bg);
    }

    nav ul li.submenu:hover ul {
        width: 8em;
        left: 0;
        top: 100%;
        flex-direction: column;
        border-top: 1px solid darkgrey;
    }

    img.rechts {
        float: right;
        margin: .4em 0 .4em .8em;
    }

    img.links {
        float: left;
        margin: .4em .8em .4em 0;
    }
}

/* ----------------------------------------------------
    RESPONSIVE: >= 1000px
---------------------------------------------------- */

@media (min-width: 1000px) {
    header h1 {
        font-size: 3.2em;
    }
    
    nav > ul {
        margin: 0 auto;
        justify-content: flex-end;
    }

    nav > ul > li {
        margin: 0 .5em;
    }

    nav ul li {
        padding: 1.1em .4em;
    }

    .art-aside {
        display: flex;
        max-width: var(--max-width);
        margin: 0 auto;
        align-items: flex-start; /* voorkomt wit vlak */
    }

    article {
        align-self: flex-start; /* voorkomt uitrekken */
    }

    aside {
        flex: 0 0 18%;
        font-size: .9em;
        background: transparent;
        margin-top: 1em;
    }

    footer {
        display: flex;
        justify-content: center;
    }

    footer p {
        margin: .1em;
    }
}

.naar-boven {
    text-decoration: underline;
    color: #000;
    text-align: right;
    font-family: 'CaveatVariable', 'Caveat', cursive;
    font-size: 1.4em;
    margin-top: 2em;
}

.naar-boven a {
    color: inherit;
    text-decoration: inherit;
}

figure.galerij {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* twee naast elkaar */
    gap: 6px;
    padding: 6px;
    background-color: #101010;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

figure.galerij img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* ----------------------------------------------------
   GALERIJ UPDATE (Voor statistiek header)
---------------------------------------------------- */

figure.galerij.stat-header {
    margin-bottom: 2em;
}

/* ----------------------------------------------------
    VIDEO FALLBACK (HTTP → melding tonen)
---------------------------------------------------- */

.stream-container {
    position: relative;
}

.stream-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Fallback standaard verbergen */
.stream-container .fallback {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 1.2em;
    padding: 1.5em;
    text-align: center;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius);
}

/* Als iframe geblokkeerd wordt → iframe blijft leeg → fallback tonen */
.stream-container iframe:empty + .fallback {
    display: flex;
}