/* Main Page Header */
.homepage_header {
    height: 100vh;
    width: 100%;
    display: block;
    background-color: var(--background);
    margin-bottom: 8rem;
}

.homepage_header_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 80%;
}

.portfolio_header {
    height: auto;
    width: 100%;
    display: block;
    margin-bottom: 8rem;
}

.portfolio_header_img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
}

/* Products general style */
.products_section {
    padding: 0 12rem;
    margin-bottom: 20rem;
}

.products_heading {
    color: var(--background);
    font-family: var(--header-font);
    font-weight: 400;
    text-align: center;
    font-size: 5rem;
    line-height: 1.1;
    margin: 0 auto 3rem;
}

.products_subheader {
    color: var(--background);
    font-weight: 300;
    text-align: center;
    font-size: 2rem;
    line-height: 1.1;
    margin: 0 auto 6rem;
}

.products_wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(25%, 1fr));
    grid-auto-rows: 1fr;
    gap: 4rem;
}

.product_container {
    display: block;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 5px;
    overflow: hidden;
    min-height: 30rem;
    background-size: cover;
    background-repeat: no-repeat;
}

.product_top {
    margin-bottom: 4rem;
    position: relative;
}

.product_name {
    font-family: var(--header-font);
    text-align: center;
    font-size: 2rem;
    font-weight: 300;
    padding: 1.2rem;
    background-color: var(--background);
}

.product_info {
    font-size: 1.3rem;
    line-height: 1.3;
    list-style: none;
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.7);
    font-weight: 300;
}

.product_info_spec {
    margin-bottom: 5px;
}

/* Product images */
#triplePlanter {
    background-image: url('../img/products/tripleplanter_display.jpg');
    background-position: center;
}

#triplo {
    background-image: url('../img/products/triplo-carla_display.jpg');
    background-position: center;
}

#solitario {
    background-image: url('../img/products/solitario_display.jpg');
    background-position: 50% 45%;
}

#lasergravures {
    background-image: url('../img/products/laser-plates2023_display.jpg');
    background-position: center;
}

#kandelaars {
    background-image: url('../img/products/kandelaars_display.jpg');
    background-position: center;
}

#houtenMesjes {
    background-image: url('../img/products/houtenMesjes_display.jpg');
    background-position: center;
}

/* Modals with carousel */
.carousel {
    height: 100%;
    width: 100%;
}

.carousel_images {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.carousel_images img {
    display: none; /* Hide all images by default */
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain; /* Keeps the aspect ratio without cropping */
    object-position: center;
}

.carousel_images img:first-child {
    display: block;
}

/* Video Modal */
.video_modal_content {
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.products_video {
    margin: auto;
    width: auto;
    height: 100%;
    display: block;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
    grid-auto-rows: 20rem;
    grid-auto-flow: dense;
    gap: 2rem;
}

.gallery_item {
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
}

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

.two-span-row {
    grid-row: auto / span 2;
}

.two-span-column {
    grid-column: auto / span 2;
}

/* Lightbox */
.products_lightbox_section {
    padding: 6rem 12rem 0;
    background-color: var(--background);
}

.lightbox_row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: 14rem;
    grid-auto-flow: dense;
    gap: 1.5rem;
}

.lightbox_column > img {
    display: block;
    object-fit: cover;
    width: 100%;
    height: 100%;
    object-position: center;
    border-radius: 3px;
}

/* Lightbox Modal */
.projects_modal {
    display: none;
    justify-content: center;
    flex-direction: column;
    position: fixed;
    z-index: 1;
    padding: 2rem 5rem;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.projects_modal_content {
    position: relative;
    margin: auto;
    padding: 0;
    overflow: hidden;
    width: 80%;
    height: 80%;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.projects_slide {
    display: none;
    margin: auto;
    height: 100%;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.projects_slide img {
    width: auto;
    height: 100%;
}

/* Modal navigation */

.close {
    color: var(--white);
    position: absolute;
    top: 0.5rem;
    right: 3rem;
    font-size: 4rem;
    font-weight: 400;
    z-index: 5;
}

.close:hover,
.close:focus {
    color: var(--yellow);
    text-decoration: none;
    cursor: pointer;
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    user-select: none;
    background-color: rgb(0, 0, 0); /* Fallback color */
    background-color: rgba(0, 0, 0, 0.6); /* Black w/ opacity */
}

.prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
    color: var(--yellow);
}

/* EXTRA classes */
.cursor {
    cursor: pointer;
}

.anchor,
.anchor:active,
.anchor:link {
    color: inherit;
    text-decoration: none;
}

.anchor:hover {
    color: var(--yellow);
    border-bottom: 1px solid var(--yellow);
    transition: all 0.2s;
}

.hover_shadow:hover {
    -webkit-filter: grayscale(1);
    filter: grayscale(1);
}

img.hover_shadow {
    transition: 0.3s;
}

/* Queries */
@media only screen and (max-width: 130em) {
    .products_heading {
        font-size: 4rem;
    }

    .products_subheader {
        font-size: 2rem;
    }

    .products_wrapper {
        gap: 2rem;
    }
}

@media only screen and (max-width: 56.25em) {
    .products_section,
    .products_lightbox_section {
        padding: 0 6rem;
    }

    .products_wrapper {
        grid-template-columns: repeat(auto-fill, minmax(80%, 1fr));
        gap: 2rem;
    }

    .product_info {
        font-size: 1.5rem;
        font-weight: 300;
    }

    .projects_modal {
        padding: 1rem;
    }

    .projects_modal_content {
        width: 92%;
        height: 92%;
    }

    .gallery {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .carousel_images {
        flex-direction: row;
    }

    .products_video {
        height: 80%;
    }

    .lightbox_caption-container {
        padding: 1rem 2rem;
        font-size: 1.7rem;
    }

    .lightbox_row {
        grid-template-columns: repeat(auto-fill, minmax(40%, 1fr));
    }
}

@media (orientation: portrait) {
    .products_video {
        width: 100%;
        height: auto;
    }

    .projects_modal_content {
        height: 85%;
    }

    .projects_slide img {
        width: 100%;
        height: auto;
    }
}
