/* ==========================================================================
   Hauptbereich
   ========================================================================== */
main {
    margin: 0 auto;
    width: 100%;
    padding: 20px;
}

main h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 36px;
    color: #c03030;
}

main h2 {
    text-align: center;
    margin-bottom: 5px;
    font-size: 25px;
    color: #000000;
}

/* ==========================================================================
   Galerie-Section
   ========================================================================== */
.section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 0 auto 40px auto;
    max-width: 1300px;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Galerie Filter
   ========================================================================== */
.gallery-filter {
    text-align: center;
    margin-bottom: 20px;
}

.filter-btn {
    background-color: #f4f4f4;
    border: 2px solid #c03030;
    color: #c03030;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #c03030;
    color: #fff;
}

.filter-btn.active {
    background-color: #c03030;
    color: #fff;
}


/* ==========================================================================
   Galerie-Element
   ========================================================================== */
.gallery__item {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f9f9f9;
    /*border-left: 5px solid #c03030;*/
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    padding: 10px;
    text-align: center;
    overflow: hidden;
}

/* ==========================================================================
   Bilder
   ========================================================================== */

.gallery__item img {
    display: block;
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 4px;
}

.gallery__item:hover img {
    cursor: pointer;
}

/* Ausnahme: wenn Section nur ein Bild enthält */
.section.gallery:has(.gallery__item:only-child) .gallery__item img {
    height: auto;
    max-width: 300px;
    max-height: 500px;
    object-fit: contain;
    margin: 0 auto;
}

.section.gallery.single-image .gallery__item img {
    height: auto;
    max-width: 600px;
    max-height: 500px;
    object-fit: contain;
    margin: 0 auto;
}

/* ==========================================================================
   Titel & Untertitel
   ========================================================================== */
.gallery__title {
    margin-top: 15px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    width: 100%;
}

.gallery__caption {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
    position: fixed;
    z-index: 999;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.lightbox__img {
    max-width: 85%;
    max-height: 80vh;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    object-fit: contain;
}

.lightbox__caption {
    margin-top: 15px;
    text-align: center;
    font-size: 16px;
    color: #f1f1f1;
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox__close:hover {
    color: #c03030;
}
