/* === FOTO.PHP STYLING - MOBILE FIRST === */
.gallery {
    padding: 2rem 1rem;
    background: var(--kleur-achtergrond);
}


.gallery .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    display: block;
}


/* Section title */
.section-title {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--kleur-basis-donker);
    font-weight: 400;
}


.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--kleur-basis);
    margin: 0.8rem auto 0;
}


/* === FILTER/ZOEK === */
.gallery-filter {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}


.filter-form {
    display: inline-block;
    width: 100%;
    max-width: 300px;
}


.filter-select {
    width: 100%;
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
    border: 2px solid var(--kleur-basis);
    border-radius: 25px;
    background: var(--kleur-tekst-licht);
    color: var(--kleur-tekst);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}


.filter-select:hover {
    border-color: var(--kleur-knop);
    box-shadow: 0 4px 12px var(--schaduw);
}


.filter-select:focus {
    outline: none;
    border-color: var(--kleur-knop);
    box-shadow: 0 0 0 3px rgba(160,82,45,0.1);
}


/* Stats */
.gallery-stats {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
    font-size: 0.95rem;
    color: var(--kleur-basis-donker);
    font-weight: 500;
}


.back-cat {
    display: inline-block;
    margin-left: 1rem;
    color: var(--kleur-knop);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}


.back-cat:hover {
    color: var(--kleur-knop-secondair);
}


/* === GALLERY GRID - MOBIEL 1 KOLOM === */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
    margin-bottom: 2rem;
}


.gallery-item {
    background: var(--kleur-tekst-licht);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 20px var(--schaduw);
    transition: all 0.3s ease;
    cursor: pointer;
}


.gallery-item:active {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px var(--schaduw-donker);
}


.gallery-image-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
}


.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}


.gallery-item:hover .gallery-img {
    transform: scale(1.08);
}


/* ✅ BEKIJKEN KNOP - HIDDEN BY DEFAULT */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}


.gallery-image-wrapper:hover .image-overlay {
    opacity: 1;
}


.view-btn {
    background: white;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}


.view-btn:hover {
    background: #333;
    color: white;
    transform: scale(1.05);
}


/* Admin overlay */
.admin-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 20;
}


.gallery-image-wrapper:hover .admin-overlay {
    opacity: 1;
}


.admin-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}


.admin-btn:hover {
    background: var(--kleur-knop);
    transform: scale(1.1);
}


/* Gallery info */
.gallery-info {
    padding: 1.2rem;
    text-align: left;
}


.gallery-info h3 {
    color: var(--kleur-basis-donker);
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
}


.gallery-info p {
    color: var(--kleur-tekst);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}


.gallery-info small {
    color: var(--kleur-secondair);
    font-weight: 600;
    font-size: 0.8rem;
}


/* No photos */
.no-photos {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--kleur-tekst);
}


.no-photos p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}


/* === TABLET 768px+ === */
@media (min-width: 768px) {
    .gallery {
        padding: 4rem 2rem;
    }
    
    .gallery .container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 3rem;
    }
    
    .gallery-filter {
        margin-bottom: 3rem;
        padding: 0;
    }
    
    .filter-form {
        max-width: 350px;
    }
    
    .filter-select {
        padding: 0.8rem 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding: 0;
        margin-bottom: 0;
    }
    
    .gallery-image-wrapper {
        height: 220px;
    }
    
    .gallery-info {
        padding: 1.5rem;
    }
}


/* === DESKTOP 1024px+ === */
@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .gallery-image-wrapper {
        height: 240px;
    }
}


/* === GROOT 1400px+ === */
@media (min-width: 1400px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
}


/* === LIGHTBOX === */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}


.lightbox.active {
    display: flex;
}


.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
}


.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
    background: var(--kleur-achtergrond);
    border-radius: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}


.lightbox-img {
    width: 100%;
    max-height: 50vh;
    object-fit: contain;
}


.lightbox-info {
    padding: 1.5rem;
}


.lightbox-title {
    font-size: 1.3rem;
    color: var(--kleur-basis-donker);
    margin-bottom: 0.5rem;
}


.lightbox-desc {
    color: var(--kleur-tekst);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.lightbox-thumbnails-wrap {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.lightbox-thumbnails-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--kleur-tekst);
    margin-bottom: 0.5rem;
}

.lightbox-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lightbox-thumb {
    width: 56px;
    height: 56px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #eee;
    transition: border-color 0.2s, opacity 0.2s;
}

.lightbox-thumb:hover {
    opacity: 0.9;
}

.lightbox-thumb.active {
    border-color: var(--kleur-basis-donker, #333);
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.lightbox-category {
    background: var(--kleur-basis);
    color: var(--kleur-tekst-licht);
    padding: 0.4rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}


/* Lightbox nav */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 2.5rem;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    user-select: none;
    border: none;
    z-index: 10;
}


.lightbox-nav:hover {
    background: rgba(255,255,255,0.4);
}


.lightbox-nav.prev {
    left: 1rem;
}


.lightbox-nav.next {
    right: 1rem;
}


/* Lightbox close */
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    z-index: 20;
}


.lightbox-close:hover {
    background: rgba(255,255,255,0.4);
}


/* === ANIMATIES === */
.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
