/* ========================================
   BILLEDGALLERI
======================================== */

.gallery-page {
    padding: 85px 0;
}


.gallery-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 35px;
}



/* ========================================
   BILLEDKORT
======================================== */

.gallery-card {
    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 12px;

    overflow: hidden;

    box-shadow:
        0 8px 25px rgba(0,0,0,0.04);
}


.gallery-open {
    display: block;

    width: 100%;

    padding: 0;

    border: 0;

    background: none;

    cursor: zoom-in;

    overflow: hidden;
}


.gallery-open img {
    width: 100%;

    aspect-ratio: 4 / 3;

    object-fit: cover;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}


.gallery-open:hover img {
    transform: scale(1.025);

    opacity: 0.94;
}



/* ========================================
   BILLEDTEKST
======================================== */

.gallery-card figcaption {
    padding: 24px 26px 27px;
}


.gallery-card h2 {
    margin-bottom: 8px;

    color: var(--green-dark);

    font-size: 1.25rem;

    line-height: 1.25;
}


.gallery-card p {
    color: var(--grey);

    font-size: 0.95rem;

    line-height: 1.6;
}



/* ========================================
   LIGHTBOX / OVERLAY
======================================== */

.lightbox {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 40px;

    background: rgba(0,0,0,0.82);
}


.lightbox.is-open {
    display: flex;
}


.lightbox-content {
    position: relative;

    max-width: min(1200px, 94vw);

    max-height: 92vh;

    padding: 18px;

    background: var(--white);

    border-radius: 10px;

    box-shadow:
        0 20px 60px rgba(0,0,0,0.35);
}


.lightbox-content img {
    display: block;

    max-width: 100%;

    max-height: 76vh;

    width: auto;

    height: auto;

    margin: 0 auto;

    object-fit: contain;
}



/* ========================================
   RØDT LUKKEKRYDS
======================================== */

.lightbox-close {
    position: absolute;

    top: -18px;
    right: -18px;

    width: 44px;
    height: 44px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 3px solid white;

    border-radius: 50%;

    background: #c62828;

    color: white;

    font-size: 2rem;

    line-height: 1;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 4px 14px rgba(0,0,0,0.3);

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}


.lightbox-close:hover {
    background: #a91f1f;

    transform: scale(1.06);
}



/* ========================================
   TEKST UNDER FORSTØRRET BILLEDE
======================================== */

.lightbox-caption {
    padding: 15px 5px 2px;

    color: var(--charcoal);

    text-align: center;

    font-size: 0.95rem;
}



/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 800px) {

    .gallery-grid {
        grid-template-columns: 1fr;
    }


    .gallery-page {
        padding: 60px 0;
    }


    .lightbox {
        padding: 25px;
    }


    .lightbox-close {
        top: -14px;
        right: -14px;
    }
}


@media (max-width: 500px) {

    .gallery-card figcaption {
        padding: 20px;
    }


    .lightbox {
        padding: 15px;
    }


    .lightbox-content {
        padding: 10px;
    }


    .lightbox-close {
        top: 7px;
        right: 7px;

        width: 40px;
        height: 40px;

        border-width: 2px;

        font-size: 1.7rem;
    }
}