/* ==========================================
   STIJL.CSS - Zij-pijltjes, mobiel & fullscreen
   ========================================== */

:root {
    --primary: #007bff;
    --primary-dark: #0056b3;
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-color: #ddd;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 2px 0 5px rgba(0,0,0,0.02);
    box-sizing: border-box;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

h2, h3 {
    font-size: 1.1rem;
    margin-top: 0;
    color: #444;
}

.folder-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.folder-list li a {
    display: block;
    padding: 10px 12px;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 5px;
    transition: background 0.2s;
}

.folder-list li a:hover,
.folder-list li a.active {
    background-color: #eef2f7;
    color: var(--primary);
    font-weight: 600;
}

.viewer-container {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    max-width: 100%;
    width: 750px;
}

/* Afbeeldingsvak */
.image-box {
    position: relative;
    background-color: #eaeaea;
    border-radius: 8px;
    padding: 10px 50px;
    margin: 15px 0;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

img.main-img {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 4px;
    object-fit: contain;
    cursor: pointer;
}

/* Pijltjes links en rechts: standaard verborgen, zichtbaar bij randbeweging */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: white;
    border: none;
    width: 40px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, background 0.2s ease;
    z-index: 10;
}

.image-box.show-controls .nav-btn,
.image-box:hover .nav-btn,
.nav-btn:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.nav-btn.prev {
    left: 12px;
}

.nav-btn.next {
    right: 12px;
}

.nav-btn.disabled {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    cursor: not-allowed;
}

/* Volledig-schermknop: mee-verbergen en tonen bij randbeweging */
.fullscreen-btn {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, background 0.2s ease;
}

.image-box.show-controls .fullscreen-btn,
.image-box:hover .fullscreen-btn,
.fullscreen-btn:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

.bestandsnaam {
    font-weight: bold;
    font-size: 1.1rem;
    color: #555;
    word-break: break-all;
    margin-bottom: 5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    min-height: 1.5rem;
}

.bestandsnaam.zichtbaar {
    opacity: 1;
    visibility: visible;
}

.teller {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
}

/* Admin & Upload Sectie linksonder */
.admin-section {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: auto;
    font-size: 0.85rem;
}

input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
}

button.admin-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
}

button.admin-btn:hover {
    background: #218838;
}

.logout-link {
    color: #dc3545;
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-block;
    margin-top: 5px;
}

.logout-link:hover {
    text-decoration: underline;
}

.melding {
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.melding.success {
    background: #d4edda;
    color: #155724;
}

.melding.error {
    background: #f8d7da;
    color: #721c24;
}

/* Draaiknop */
.rotate-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease;
    z-index: 10;
}

.rotate-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Subtiele 'flying footer' rechtsonder in het scherm */
.flying-footer {
    position: fixed;
    bottom: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.85);
    padding: 6px 12px;
    font-size: 0.8rem;
    color: #777;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    backdrop-filter: blur(4px);
    z-index: 100;
    pointer-events: none;
}

/* ==========================================
   VOLLEDIG SCHERM (FULLSCREEN) - MAXIMALE FOTO
   ========================================== */
#imageBox:fullscreen,
#imageBox:-webkit-full-screen,
#imageBox:-moz-full-screen,
#imageBox:-ms-fullscreen,
.image-box:fullscreen,
.image-box:-webkit-full-screen,
.image-box:-ms-fullscreen {
    background: #000 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* In volledig scherm alleen tonen als de cursor dicht bij de zijkanten/randen is */
#imageBox:fullscreen .nav-btn,
#imageBox:fullscreen .fullscreen-btn,
#imageBox:-webkit-full-screen .nav-btn,
#imageBox:-webkit-full-screen .fullscreen-btn,
.image-box:fullscreen .nav-btn,
.image-box:fullscreen .fullscreen-btn,
.image-box:-webkit-full-screen .nav-btn,
.image-box:-webkit-full-screen .fullscreen-btn {
    opacity: 0;
    pointer-events: none;
}

#imageBox:fullscreen.edge-active .nav-btn,
#imageBox:fullscreen.edge-active .fullscreen-btn,
#imageBox:-webkit-full-screen.edge-active .nav-btn,
#imageBox:-webkit-full-screen.edge-active .fullscreen-btn,
.image-box:fullscreen.edge-active .nav-btn,
.image-box:fullscreen.edge-active .fullscreen-btn,
.image-box:-webkit-full-screen.edge-active .nav-btn,
.image-box:-webkit-full-screen.edge-active .fullscreen-btn {
    opacity: 1;
    pointer-events: auto;
}

#imageBox:fullscreen img.main-img,
#imageBox:-webkit-full-screen img.main-img,
#imageBox:-moz-full-screen img.main-img,
#imageBox:-ms-fullscreen img.main-img,
.image-box:fullscreen img.main-img,
.image-box:-webkit-full-screen img.main-img,
.image-box:-ms-fullscreen img.main-img {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    object-fit: cover !important; /* Aangepast van contain naar cover zodat de foto het volledige scherm vult */
}

/* ==========================================
   MOBIELE STIJLEN (Schermen kleiner dan 768px)
   ========================================== */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
    .image-box {
        padding: 8px 16px;
    }
    /* Op mobiel zichtbaar houden en extra klein */
    .nav-btn,
    .fullscreen-btn {
        opacity: 1;
        pointer-events: auto;
    }
    .nav-btn {
        width: 24px;
        height: 32px;
        font-size: 0.85rem;
        border-radius: 4px;
    }
    .nav-btn.prev {
        left: 3px;
    }
    .nav-btn.next {
        right: 3px;
    }
}
```[cite: 1]

### Wat is er aangepast?
* **`object-fit: cover !important;`**: In plaats van `contain` (wat de foto passend houdt met eventuele balken eromheen), zorgt `cover` ervoor dat de afbeelding in de fullscreen-modus wordt ingezoomd/opgeschaald zodat deze het **complete scherm** (zowel in de breedte als hoogte) volledig opvult[cite: 1].