/* ================================================
   Oma's Fotogalerij – stijl.css
   ================================================ */

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

:root {
    --kleur-primair: #4f7942;
    --kleur-primair-hover: #3d6132;
    --kleur-achter: #f5f3ee;
    --kleur-wit: #ffffff;
    --kleur-rand: #ddd8ce;
    --kleur-tekst: #2c2c28;
    --kleur-subtekst: #6b6b64;
    --kleur-fout-achter: #fff0ef;
    --kleur-fout-rand: #f5c6c2;
    --kleur-fout-tekst: #8b1a14;
    --kleur-ok-achter: #edf7eb;
    --kleur-ok-rand: #b8ddb4;
    --kleur-ok-tekst: #1e5c18;
    --radius: 10px;
    --schaduw: 0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--kleur-achter);
    color: var(--kleur-tekst);
    font-size: 16px;
    line-height: 1.6;
}

a { color: var(--kleur-primair); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navigatie ── */
.nav {
    background: var(--kleur-wit);
    border-bottom: 1px solid var(--kleur-rand);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-merk { font-size: 1.1rem; font-weight: 600; color: var(--kleur-primair); }
.nav-merk a { color: inherit; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-naam { color: var(--kleur-subtekst); font-size: .9rem; }
.nav-uitlog { color: var(--kleur-subtekst); font-size: .9rem; }
.nav-uitlog:hover { color: var(--kleur-tekst); }

/* ── Zoekveld in header ── */
.nav-zoek { display: flex; align-items: center; }
.nav-zoek-input {
    padding: 7px 14px;
    border: 1.5px solid var(--kleur-rand);
    border-radius: 20px;
    font-size: .85rem;
    width: 220px;
    background: var(--kleur-achter);
    transition: border-color .15s, background .15s;
}
.nav-zoek-input:focus {
    outline: none;
    border-color: var(--kleur-primair);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79,121,66,.15);
}
@media (max-width: 768px) {
    .nav-zoek-input { width: 110px; }
}

/* ── Knoppen ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, transform .1s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primair { background: var(--kleur-primair); color: #fff; }
.btn-primair:hover { background: var(--kleur-primair-hover); color: #fff; }
.btn-klein { background: #eee; color: var(--kleur-tekst); padding: 6px 12px; font-size: .85rem; }
.btn-klein:hover { background: #e0e0e0; }
.btn-terug { background: transparent; color: var(--kleur-subtekst); border: 1px solid var(--kleur-rand); }
.btn-rood { background: #fde8e8; color: #8b1a14; }
.btn-rood:hover { background: #f5c6c2; }

/* ── Container ── */
.container { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }
.container-smal { max-width: 680px; }

/* ── Meldingen ── */
.melding {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: .95rem;
}
.melding.ok   { background: var(--kleur-ok-achter);   border: 1px solid var(--kleur-ok-rand);   color: var(--kleur-ok-tekst); }
.melding.fout { background: var(--kleur-fout-achter); border: 1px solid var(--kleur-fout-rand); color: var(--kleur-fout-tekst); }

/* ── Filter tabs ── */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.tab {
    padding: 7px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--kleur-rand);
    color: var(--kleur-subtekst);
    font-size: .9rem;
    background: var(--kleur-wit);
    transition: all .15s;
    text-decoration: none;
}
.tab:hover { border-color: var(--kleur-primair); color: var(--kleur-primair); text-decoration: none; }
.tab.actief { background: var(--kleur-primair); border-color: var(--kleur-primair); color: #fff; font-weight: 500; }

/* ── Galerij grid ── */
.sectie-titel { font-size: 1.2rem; font-weight: 600; margin-bottom: 20px; color: var(--kleur-tekst); }

.galerij {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.galerij-item {
    background: var(--kleur-wit);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--schaduw);
    border: 1px solid var(--kleur-rand);
    transition: transform .15s, box-shadow .15s;
    display: block;
    text-decoration: none;
    color: inherit;
}
.galerij-item:hover { transform: translateY(-3px); box-shadow: 0 4px 20px rgba(0,0,0,.12); text-decoration: none; }
.galerij-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: #eee;
}
.galerij-info {
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.galerij-kinderen { font-size: .85rem; font-weight: 500; color: var(--kleur-primair); }
.galerij-datum { font-size: .8rem; color: var(--kleur-subtekst); white-space: nowrap; }

/* ── Leeg ── */
.leeg { text-align: center; padding: 64px 24px; color: var(--kleur-subtekst); }
.leeg p { font-size: 1.1rem; margin-bottom: 20px; }

/* ── Login pagina ── */
.login-pagina {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-kaart {
    background: var(--kleur-wit);
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 40px rgba(0,0,0,.1);
    text-align: center;
}
.login-logo { font-size: 3rem; margin-bottom: 12px; }
.login-kaart h1 { font-size: 1.5rem; margin-bottom: 6px; }
.subtitel { color: var(--kleur-subtekst); font-size: .95rem; margin-bottom: 28px; }
.login-kaart .melding { text-align: left; }
.login-kaart form { text-align: left; }
.login-kaart label { display: block; font-weight: 500; font-size: .9rem; margin: 16px 0 6px; }
.login-kaart input { width: 100%; }
.login-kaart .btn { width: 100%; justify-content: center; margin-top: 24px; padding: 12px; }

/* ── Formulier elementen ── */
input[type=text], input[type=email], input[type=password],
input[type=date], select, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--kleur-rand);
    border-radius: var(--radius);
    font-size: .95rem;
    color: var(--kleur-tekst);
    background: var(--kleur-wit);
    transition: border-color .15s;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--kleur-primair);
    box-shadow: 0 0 0 3px rgba(79,121,66,.15);
}
label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 6px; }
label input, label select { margin-top: 6px; }

/* ── Upload formulier ── */
.upload-form { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
.upload-zone {
    border: 2px dashed var(--kleur-rand);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    position: relative;
    background: var(--kleur-wit);
    transition: border-color .15s, background .15s;
    cursor: pointer;
}
.upload-zone:hover { border-color: var(--kleur-primair); background: #f7fbf6; }
.upload-zone input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer;
    width: 100%; height: 100%;
}
.upload-icoon { display: block; font-size: 2.5rem; margin-bottom: 10px; }
.upload-tekst { display: block; font-weight: 500; margin-bottom: 4px; }
.upload-subtekst { display: block; color: var(--kleur-subtekst); font-size: .85rem; }
.upload-bestandsnaam { margin-top: 10px; font-size: .9rem; color: var(--kleur-primair); font-weight: 500; }

/* ── Kleinkind keuze checkboxen ── */
fieldset.kids-keuze { border: 1.5px solid var(--kleur-rand); border-radius: var(--radius); padding: 16px 20px; }
fieldset.kids-keuze legend { font-weight: 600; font-size: .9rem; padding: 0 6px; }
.kids-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.kid-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    border: 2px solid var(--kleur-rand);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 500;
    transition: all .15s;
    background: var(--kleur-wit);
}
.kid-label:hover { border-color: var(--kleur, var(--kleur-primair)); }
.kid-label input[type=checkbox] { display: none; }
.kid-label:has(input:checked) {
    background: var(--kleur, var(--kleur-primair));
    border-color: var(--kleur, var(--kleur-primair));
    color: #fff;
}

/* ── Foto detailpagina ── */
.foto-pagina {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    align-items: start;
}
.foto-groot {
    position: relative;
}
.foto-groot img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--schaduw);
    display: block;
    max-height: 90vh;
    object-fit: contain;
    background: var(--kleur-achter);
}

/* Zij-navigatiepijltjes over de foto – alleen op grote schermen (iMac) */
.foto-zij-nav {
    display: none;
}
@media (min-width: 1400px) {
    .foto-zij-nav {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 48px;
        height: 48px;
        align-items: center;
        justify-content: center;
        background: rgba(0,0,0,.45);
        color: #fff;
        border-radius: 50%;
        font-size: 26px;
        line-height: 1;
        text-decoration: none;
        z-index: 5;
        transition: background .15s, opacity .15s;
    }
    .foto-zij-nav:hover { background: rgba(0,0,0,.7); text-decoration: none; color: #fff; }
    .foto-zij-nav.vorig { left: 16px; }
    .foto-zij-nav.volgend { right: 16px; }
    .foto-zij-nav.uit { opacity: .25; pointer-events: none; }
}

.foto-meta {
    background: var(--kleur-wit);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--kleur-rand);
    position: sticky;
    top: 72px;
}

.werkbalk-tabs .tab.actief {
    background: #007bff !important;
    color: #fff !important;
    border-color: #007bff !important;
}
.werkbalk-tabs .tab.actief .tab-teller {
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
}


.foto-meta h2 { font-size: 1rem; margin-bottom: 12px; }
.foto-meta p { color: var(--kleur-subtekst); font-size: .85rem; margin-bottom: 6px; }
.foto-meta .btn { margin-top: 12px; width: 100%; justify-content: center; }

/* Grotere foto op brede schermen (iMac, grote monitor) */
@media (min-width: 1400px) {
    .foto-pagina { grid-template-columns: 1fr 240px; gap: 28px; }
    .foto-groot img { max-height: 92vh; }
}
@media (min-width: 1800px) {
    .foto-pagina { grid-template-columns: 1fr 220px; gap: 32px; }
    .foto-groot img { max-height: 95vh; }
}

/* ── Beheer pagina ── */
h1 { font-size: 1.6rem; margin-bottom: 28px; }
h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 18px; }
h3 { font-size: 1rem; font-weight: 600; margin: 20px 0 10px; }

.stats-rij {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-kaart {
    background: var(--kleur-wit);
    border: 1px solid var(--kleur-rand);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.stat-getal { font-size: 2rem; font-weight: 700; color: var(--kleur-primair); }
.stat-label { font-size: .85rem; color: var(--kleur-subtekst); margin-top: 4px; }

.beheer-kolommen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
.kaart {
    background: var(--kleur-wit);
    border: 1px solid var(--kleur-rand);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--schaduw);
}
.kaart form { display: flex; flex-direction: column; gap: 14px; }

.kid-lijst { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.kid-lijst li { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.kid-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

.tabel { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabel th { text-align: left; padding: 10px 14px; font-weight: 600; border-bottom: 2px solid var(--kleur-rand); font-size: .85rem; color: var(--kleur-subtekst); }
.tabel td { padding: 10px 14px; border-bottom: 1px solid var(--kleur-rand); vertical-align: middle; }
.tabel tr:last-child td { border-bottom: none; }

.badge { padding: 3px 10px; border-radius: 12px; font-size: .8rem; font-weight: 500; }
.badge-blauw { background: #e8f0fe; color: #1a56db; }
.badge-groen { background: #edf7eb; color: #1e5c18; }

/* ── Export formulier ── */
.export-form {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}
.export-form label { flex: 1 1 260px; margin-bottom: 0; }
.export-form .btn { flex-shrink: 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav { padding: 0 16px; }
    .nav-naam { display: none; }
    .container { padding: 20px 16px; }
    .galerij { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .foto-pagina { grid-template-columns: 1fr; }
    .beheer-kolommen { grid-template-columns: 1fr; }
    .login-kaart { padding: 32px 24px; }
    .stats-rij { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tab teller ── */
.tab-teller {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.10);
    color: inherit;
    font-size: .75rem;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    margin-left: 4px;
}
.tab.actief .tab-teller {
    background: rgba(255,255,255,.25);
}
.resultaat-item.dubbel { background: #fef9e7; color: #7d6608; }

/* ── Galerij laadanimatie ── */
.galerij-item img {
    opacity: 0;
    transition: opacity .3s ease;
    background: #f0f0f0;
}
.galerij-item img.geladen {
    opacity: 1;
}
.galerij-item.fout img {
    opacity: .3;
}
/* Placeholder shimmer animatie terwijl foto laadt */
.galerij-item img:not(.geladen) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Paginering ── */
.paginering {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--kleur-rand);
}
.pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1.5px solid var(--kleur-rand);
    background: var(--kleur-wit);
    color: var(--kleur-tekst);
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .15s;
}
.pag-btn:hover { border-color: var(--kleur-primair); color: var(--kleur-primair); text-decoration: none; }
.pag-btn.actief { background: var(--kleur-primair); border-color: var(--kleur-primair); color: #fff; }
.pag-dots { padding: 0 4px; color: var(--kleur-subtekst); }
.pag-info { margin-left: 12px; font-size: .85rem; color: var(--kleur-subtekst); }

/* ── Onthoud mij checkbox ── */
.onthoud-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    font-size: .9rem;
    color: var(--kleur-subtekst);
    cursor: pointer;
    margin-top: 4px;
}
.onthoud-label input[type=checkbox] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--kleur-primair);
}

/* ── Foto navigatie ── */
.foto-navigatie {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}
.nav-knop {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    background: var(--kleur-wit);
    border: 1.5px solid var(--kleur-rand);
    color: var(--kleur-tekst);
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .15s;
    min-width: 120px;
    justify-content: center;
}
.nav-knop:hover { border-color: var(--kleur-primair); color: var(--kleur-primair); text-decoration: none; }
.nav-knop-midden { background: var(--kleur-achter); min-width: 100px; }
.nav-knop-uit { opacity: .35; cursor: default; }