*, *::before, *::after {
    box-sizing: border-box;
}

.gridcontainer {
    display: grid;
    grid-template-columns: 4fr 5fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "header header"
        "main div"
        "footer footer";
    gap: 5px;
    width: 100%;
    min-height: 100vh;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-image: url('Fotos_Background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Blijft netjes staan bij scrollen */
}

.text-box {
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--Hunter_Green);
    padding: 20px;
    margin-top: 70px;
    margin-left: 6px;
    border-radius: 2em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: min(450px, calc(100% - 12px));
    max-width: 450px;
    text-align: justify;
}

.text-box-crumb {
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid #ccc;
    padding: 20px;
    border-radius: 2em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: min(300px, 100%);
    max-width: 300px;
    text-align: justify;
}

.content {
    text-align: center;
    color: var(--Brunswick_Green);
    padding-top: 5vh; /* Ruimte bovenaan verminderd voor betere verhouding */
}

.content-footer {
    text-align: center;
    color: var(--Timberwolf);
    padding-top: 10px;
    margin-top: 0;
}

.gheader { grid-area: header; }
.gmain { grid-area: main; min-width: 0; }
.gfooter { grid-area: footer; }

.panel {
    border-radius: 5px;
    border: var(--Brunswick_Green) 1px;
    padding: 10px;
}

/* BREADCRUMB NAVIGATIE */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    display: inline;
    font-size: 16px;
}

.breadcrumb li + li::before {
    content: " > ";
    margin: 0 5px;
    color: var(--Brunswick_Green);
}

.breadcrumb a {
    text-decoration: none;
    color: var(--Brunswick_Green);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb li:last-child {
    font-weight: bold;
    color: var(--Brunswick_Green);
}

h1, h2 {
    text-align: center;
}

/* CARROUSEL */
.carousel {
    position: relative;
    width: min(80%, 600px);
    max-width: 600px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    touch-action: pan-y; /* Optimaliseert touch/swipe op mobiele telefoons */
}

.carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.carousel-image {
    display: block;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    flex: 0 0 100%;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    padding: 0;
    width: 44px; /* Voldoet aan de minimale 44px touch-target norm */
    height: 44px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-button:focus-visible {
    outline: 2px solid var(--Hunter_Green);
    outline-offset: 2px;
}

.carousel-button.left { left: 10px; }
.carousel-button.right { right: 10px; }


/* ==========================================
   MEDIA QUERIES (TABLET & GSM)
   ========================================== */

/* TABLETS (schermen tot 900px) */
@media (max-width: 900px) {
    .gridcontainer {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "header"
            "main"
            "div"
            "footer";
    }

    .text-box {
        margin: 30px auto;
        width: min(90%, 450px);
    }

    .text-box-crumb {
        margin: 10px auto;
        width: min(90%, 300px);
    }

    .carousel {
        width: min(90%, 600px);
        margin: 20px auto;
    }
}

/* MOBIELE TELEFOONS (schermen tot 600px) */
@media (max-width: 600px) {
    body {
        /* Voorkomt bug met background-attachment: fixed op iOS Safari */
        background-attachment: scroll;
    }

    .gridcontainer {
        gap: 0;
    }

    .text-box {
        width: calc(100% - 20px);
        margin: 15px auto;
        padding: 15px;
        border-radius: 1.2em;
        text-align: left; /* Voorkomt lelijke spatiëring bij justify op gsm */
    }

    .text-box-crumb {
        width: calc(100% - 20px);
        margin: 10px auto;
        padding: 12px 15px;
        border-radius: 1.2em;
        text-align: left;
    }

    .content {
        padding-top: 2vh;
        padding-left: 10px;
        padding-right: 10px;
    }

    .content-footer {
        padding: 10px;
    }

    .breadcrumb {
        padding: 0 10px;
    }

    .breadcrumb li {
        font-size: 14px;
    }

    .carousel {
        width: calc(100% - 20px);
        max-width: none;
        margin: 15px auto;
        border-radius: 8px;
    }

    .carousel-button {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .carousel-button.left { left: 8px; }
    .carousel-button.right { right: 8px; }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
}

/* HEEL KLEINE GSM (schermen tot 400px) */
@media (max-width: 400px) {
    .carousel {
        width: calc(100% - 12px);
        margin: 10px auto;
    }

    .carousel-button {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .carousel-button.left { left: 4px; }
    .carousel-button.right { right: 4px; }
}