/* Galleri-siden */

.galleri-velkomst {
    text-align: center; /* centrerer teksten */
    width: 70%;
    margin: 50px auto 30px auto; /* centrerer teksten */
}

.galleri-velkomst h2 {
    margin-bottom: 20px; /* tilføjet margin-bottom for bedre afstand mellem h2 og p */
}

.galleri-container  {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
    gap: 20px;
    margin: 0 auto 40px auto;
    padding: 0 30px; 
}

.galleri-img-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4; 
    overflow: hidden;
    border-radius: 10px;

}

.galleri-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease; /* tilføjet transition for glidende effekt */
    cursor: pointer;
}

.galleri-img-wrapper img:hover {
    transform: scale(1.05); /* zoom-effekt ved hover */
}

/* Overlays til åbnet billede */

.galleri-overlay {
    position: fixed;
    inset: 0;
    padding: 140px 0 0 0;
    background-color: #1a1a1a50;
    backdrop-filter: blur(5px); 
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.galleri-overlay.active {
    display: flex;
    opacity: 1;
}

.galleri-overlay-backdrop {
    position:relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #FAFAF8;
    padding: 10px;
    border-radius: 15px;
    width: auto;
    max-width: 85vw;
    max-height: 85vh;
    gap: 10px;
}

.galleri-overlay img {
    position: relative;
    max-width: 80vw;
    max-height: 80vh;
    border-radius: 10px;
    margin-bottom: 10px;
    pointer-events: none;
}

.galleri-overlay img:hover {
    transform: none !important;
}

.galleri-overlay-close-button {
    position: absolute; /* position relative to .galleri-img-wrapper */
    top: 9px;          /* adjust as needed */
    right: 9px;        /* adjust as needed */
    background: #FAFAF8;
    border: none;
    border-radius: 0 0 0 15px;
    cursor: pointer;
    padding: 9px;
    z-index: 10;
}

.galleri-overlay-close-button img {
    width: 30px;
    height: auto;
    margin: 0;
}

.galleri-overlay-img-caption {
    font-family: 'playfair display', serif;
    font-size: 10pt;
    text-transform: uppercase;
    overflow-wrap: break-word;
    word-break: break-word;
    text-align: center;
    padding: 0 0 10px 0;
    min-width: 0;
    max-width: 80vw; 
    height: auto;
}

/* lille mobil */

@media screen and (max-width: 320px) {
    
}

/* tablet */

@media screen and (min-width: 768px) {
    .galleri-velkomst {
        width: 50%;
        padding: 30px 0 30px 0;
    }

    .galleri-container {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 50px;
    }
    
    .galleri-img-wrapper {
        aspect-ratio: 4 / 5;
    }

    .galleri-overlay-backdrop {
        max-width: 60vw;
        max-height: 75vh;
    }

    .galleri-overlay img {
        max-width: 50vw;
        max-height: 60vh;
    }

    .galleri-overlay-img-caption {
        max-width: 40vw;
    }
}

@media screen and (min-width: 1024px) {
    .galleri-overlay-img-caption {
        max-width: 35vw;
        font-size: 12pt;
    }

    .galleri-overlay-backdrop {
        max-height: 90vh;
    }

    .galleri-overlay img {
        max-height: 75vh;
    }

    .galleri-overlay-close-button img {
        width: 70px;
        height: auto;
    }

    .galleri-container {
        margin-bottom: 50px;
    }
}

/* laptop */

@media screen and (min-width: 1200px) {
    .galleri-velkomst {
        width: 40%;
    }

    .galleri-container {
        grid-template-columns: repeat(4, 1fr);
        padding: 0 70px;
    }

    .galleri-overlay-backdrop {
        max-width: 50vw;
        max-height: 80vh;
    }

    .galleri-overlay img {
        max-width: 45vw;
        max-height: 65vh;
    }

    .galleri-overlay-img-caption {
        max-width: 33vw;
    }
}

@media screen and (min-width: 1400px) {
    .galleri-velkomst {
        width: 35%;
    }

    .galleri-overlay-backdrop {
        max-width: 45vw;
        max-height: 80vh;
    }

    .galleri-overlay img {
        max-width: 35vw;
        max-height: 65vh;
    }

    .galleri-overlay-img-caption {
        max-width: 28vw;
    }
}