/* Main Gallery Section Styling */
.galerie-section {
    position: relative;
    background-color: #000000;
    color: #fff;
    padding: 60px 0;
    overflow: hidden;
}

/* Container */
.galerie-section__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header (Title) */
.galerie-section__header {
    text-align: center;
    margin-bottom: 50px;
}

.galerie-section__title {
    font-family: 'Lato', sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

/* Flag Underline for Title */
.galerie-section__flag-underline {
    display: flex;
    justify-content: center;
    gap: 0;
    width: 100px;
    height: 4px;
    margin: 0 auto;
}

.galerie-section__flag-white {
    width: 33.33%;
    background-color: #fff;
    border-radius: 4px 0 0 4px;
}

.galerie-section__flag-red {
    width: 33.33%;
    background-color: #ED2024;
}

.galerie-section__flag-green {
    width: 33.33%;
    background-color: #0E8040;
    border-radius: 0 4px 4px 0;
}

/* Filter Tabs */
.galerie-section__filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.galerie-section__filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.galerie-section__filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.galerie-section__filter-btn.active {
    background: #ED2024;
    color: #fff;
    border-color: #ED2024;
    box-shadow: 0 4px 10px rgba(237, 32, 36, 0.3);
}


/* Masonry Grid Layout */
.galerie-section__grid {
    column-count: 3;
    column-gap: 20px;
    margin-bottom: 40px;
}

.galerie-section__item {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.galerie-section__item:hover {
    transform: translateY(-5px);
}

.galerie-section__item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    /* Ensure images fill the card */
    object-fit: cover;
}

/* Overlay on Hover */
.galerie-section__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.galerie-section__item:hover .galerie-section__overlay {
    opacity: 1;
}

.galerie-section__item-title {
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Bottom Fade Effect */
.galerie-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, #000000, transparent);
    pointer-events: none;
    z-index: 1;
}

/* Action Button Wrapper */
.galerie-section__actions {
    text-align: center;
    position: relative;
    z-index: 2;
    /* Above fade effect */
    margin-top: -20px;
    /* Pull into fade area */
}

/* Red Button Style */
.galerie-section__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #ED2024;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(237, 32, 36, 0.3);
}

.galerie-section__btn:hover {
    background-color: #c91b1e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 32, 36, 0.4);
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
    .galerie-section__grid {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .galerie-section__grid {
        column-count: 1;
    }

    .galerie-section__item {
        margin-bottom: 15px;
    }
}

/* Lightbox Styles */
.galerie-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.galerie-lightbox__content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.galerie-lightbox__image {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.galerie-lightbox__caption {
    margin-top: 15px;
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 18px;
    text-align: center;
    position: absolute;
    bottom: -40px;
    width: 100%;
}

.galerie-lightbox__close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
}

.galerie-lightbox__close:hover,
.galerie-lightbox__close:focus {
    color: #bbb;
}

.galerie-lightbox__prev,
.galerie-lightbox__next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.6s ease;
    border-radius: 3px;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
}

.galerie-lightbox__prev:hover,
.galerie-lightbox__next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.galerie-lightbox__prev {
    left: 0;
    border-radius: 0 3px 3px 0;
    transform: translateX(-100%);
}

.galerie-lightbox__next {
    right: 0;
    border-radius: 3px 0 0 3px;
    transform: translateX(100%);
}

/* Move arrows outside the image on desktop */
@media (min-width: 768px) {
    .galerie-lightbox__prev {
        left: -60px;
        transform: none;
    }

    .galerie-lightbox__next {
        right: -60px;
        transform: none;
    }
}