
/* =========================================
   ALGEMEEN
   ========================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
}


/* =========================================
   MAIN BLOCK - SLIDESHOW
   ========================================= */

.main-block {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px;
    overflow: hidden;
    background-color: #d9d4cc;
}

/* Achtergrondafbeeldingen */

.main-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

    .main-slide.active {
        opacity: 1;
    }

/* Tekstkader */

.main-block-overlay {
    position: absolute;
    z-index: 2;
    padding: 30px;
    text-align: left;
    background: transparent;
}

    .main-block-overlay h1 {
        font-size: clamp(2rem, 5vw, 4rem);
        font-weight: 400;
        margin-bottom: 20px;
    }

    .main-block-overlay p {
        font-size: clamp(1rem, 2vw, 1.4rem);
        line-height: 1.5;
    }


/* =========================================
   INFO BLOCK - ALGEMEEN
   ========================================= */

/*
   De tussenruimte wordt ingesteld via
   --info-spacing vanuit InfoBlock.razor.

   0px betekent geen buitenruimte.
*/

.info-section {
    width: 100%;
    padding: var(--info-spacing, 0px);
    display: flex;
    justify-content: center;
}

/* Twee even brede vlakken naast elkaar */

.info-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    max-width: var(--info-width, 1200px);
    min-height: var(--info-min-height, 0px);
    height: var(--info-height, auto);
    margin: 0 auto;
    gap: 0;
}


/* =========================================
   INFO BLOCK - TEKSTVLAK
   ========================================= */

.info-text {
    grid-column: 1;
    grid-row: 1;
    aspect-ratio: 1 / 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8%;
}

.info-text-content {
    width: 100%;
    max-width: 420px;
}

/* Titel */

.info-text h2 {
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    font-weight: 400;
    margin-bottom: 25px;
}

/* Tekst uit SQL Server */

.info-text-content p,
.info-text-content li {
    font-size: inherit;
    line-height: 1.8;
}

.info-text-content p {
    margin-top: 0;
    margin-bottom: 1em;
}

    .info-text-content p:last-child {
        margin-bottom: 0;
    }


/* =========================================
   INFO BLOCK - AFBEELDING
   ========================================= */

.info-image {
    grid-column: 2;
    grid-row: 1;
    aspect-ratio: 1 / 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

    .info-image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }


/* =========================================
   INFO BLOCK - AFBEELDING LINKS
   ========================================= */

.info-container.image-left .info-image {
    grid-column: 1;
}

.info-container.image-left .info-text {
    grid-column: 2;
}


/* =========================================
   INFO BLOCK - INSTELBARE HOOGTE
   ========================================= */

/*
   Wanneer een hoogte is opgegeven, vullen
   tekst en afbeelding de beschikbare hoogte.

   Zonder ingestelde hoogte blijven de
   vlakken standaard vierkant.
*/

.info-container[style*="--info-height"] .info-text,
.info-container[style*="--info-height"] .info-image {
    aspect-ratio: auto;
}


/* =========================================
   TOP MENU
   ========================================= */

.top-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 24px 20px;
    background: transparent;
}

    .top-menu a {
        color: #333;
        text-decoration: none;
        font-size: 1rem;
        font-weight: 400;
        transition: opacity 0.2s ease;
    }

        .top-menu a:hover {
            opacity: 0.55;
        }


/* =========================================
   SIDE NAVIGATION
   ========================================= */

.side-navigation {
    position: fixed;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nav-square {
    display: block;
    width: 12px;
    height: 12px;
    border: 1.5px solid #333;
    background: transparent;
    transition: background-color 0.2s ease;
}

    .nav-square.active,
    .nav-square:hover {
        background-color: #333;
    }


/* =========================================
   MOBIELE WEERGAVE
   ========================================= */

@media (max-width: 768px) {

    /* Main block */

    .main-block-overlay {
        left: 5% !important;
        top: 35% !important;
        width: 90% !important;
        padding: 20px;
    }

    /* Infoblokken */

    /*
       Geen aparte padding voor info-section.
       De algemene --info-spacing blijft gelden.
    */

    .info-container {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        height: auto;
        min-height: 0;
    }

        .info-text,
        .info-image,
        .info-container.image-left .info-text,
        .info-container.image-left .info-image {
            grid-column: 1;
            aspect-ratio: 1 / 1;
        }

        .info-text,
        .info-container.image-left .info-text {
            grid-row: 1;
        }

        .info-image,
        .info-container.image-left .info-image {
            grid-row: 2;
        }

    .info-text {
        padding: 10%;
    }

    /* Navigatie */

    .top-menu {
        gap: 14px;
        padding: 18px 12px;
        flex-wrap: wrap;
    }

        .top-menu a {
            font-size: 0.8rem;
        }

    .side-navigation {
        right: 10px;
        gap: 12px;
    }

    .nav-square {
        width: 10px;
        height: 10px;
    }
}


/* =========================================
   GALERIJ-UITBREIDING
   ========================================= */

.info-container {
    position: relative;
}

.info-photo-trigger {
    border: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
    background: transparent;
}

    .info-photo-trigger img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.info-image-contain {
    background: var(--info-image-bg, #f2f2f2);
}

    .info-image-contain .info-photo-trigger img {
        object-fit: contain;
    }

.info-photo-count {
    position: absolute;
    z-index: 5;
    right: 12px;
    top: 12px;
    border: 0;
    border-radius: 15px;
    background: #000b;
    color: white;
    padding: 7px 12px;
    cursor: pointer;
}

.info-background-mode {
    display: block;
    isolation: isolate;
    min-height: 400px;
}

.info-background-photo {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    z-index: -1;
    pointer-events: none;
}

.info-background-mode .info-text {
    position: relative;
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: auto;
    min-height: 400px;
    width: 100%;
    box-sizing: border-box;
}

.info-background-mode .info-text-content {
    max-width: none;
    width: 100%;
}

.info-background-open {
    position: absolute;
    inset: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 1;
}

.info-background-mode .info-text {
    z-index: 2;
    pointer-events: none;
}

    .info-background-mode .info-text a {
        pointer-events: auto;
        position: relative;
        z-index: 3;
    }

.info-background-mode .info-photo-count {
    z-index: 4;
}


/* =========================================
   GALERIJ - LIGHTBOX
   ========================================= */

.info-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .94);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .info-lightbox img {
        max-width: 85vw;
        max-height: 85vh;
        object-fit: contain;
    }

    .info-lightbox button {
        position: absolute;
        background: #222b;
        color: white;
        border: 0;
        border-radius: 8px;
        font-size: 28px;
        cursor: pointer;
        padding: 8px 15px;
    }

.info-lightbox-close {
    top: 15px;
    right: 15px;
}

.info-lightbox-prev {
    left: 12px;
    top: 48%;
}

.info-lightbox-next {
    right: 12px;
    top: 48%;
}

.info-lightbox-counter {
    position: absolute;
    bottom: 15px;
    color: white;
}
