:root {
    --images-per-row: 5;
    --images-per-row-print: 3;
}

.print-only {
    display: none;
}

section.print-only {
    width: calc(100% - 1rem);
    page-break-after: always;

    img {
        width: 100%;
    }
}

.main-content {
    gap: 0;
    row-gap: 0;
}

#fotozoektocht {
    display: flex;
    flex-direction: column;

    .fotozoektocht-knoppen {
        display: flex;
        flex-direction: row;
        gap: 1em;
        align-items: center;
        margin-top: 1rem;
    }

    .fotozoektocht-affiche {
        display: block;
        margin-top: 1rem;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;

        img {
            width: 100%;
            max-width: 1080px;
        }
    }

    .two-columns{
        display: flex;
        flex-direction: row;
        gap: 1em;
        align-items: center;
        margin: 1rem 0 1rem 0;

        img {
            width: 100%;
            max-width: 100px;
        }
    }

    section:not(.print-only) {
        margin: 1rem 0 1rem 0;
    }
}

.uitleg {
    h4 {
        margin-top: 1rem;
    }
}

.route {
    li {
        margin-top: 0.5rem !important;
    }
}

.fotos-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    row-gap: 0.5rem;
}

.fotos-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    width: calc((100vw / var(--images-per-row)) - 1.5rem);
    height: calc((100vw / var(--images-per-row)) - 1.5rem);
    border-radius: var(--border-radius);
    border-color: var(--default-text-color);
    border-style: solid;
    border-width: 1px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    position: relative;

    img {
        width: calc(100% - 0.5rem);
        max-height: calc((100vw / var(--images-per-row)) - 1.7rem);
        margin-top: 0.25rem;
        margin-left: 0.25rem;
    }

    h3 {
        font-size: var(--default-font-size);
        position: absolute;
        margin: 0;
        top: 0.5rem;
        left: 0.5rem;
        text-shadow: 0.1rem 0.1rem 1rem var(--color-background-light);
    }
}

.overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2;
    cursor: pointer;
}

.fotos-card-detail {
    width: 100%;
    height: 100%;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    h1 {
        font-size: calc(var(--default-font-size) * 5);
        text-shadow: 0.1rem 0.1rem 1rem var(--color-background-light);
        position: fixed;
        top: 5rem;
        left: 5rem;
    }
}

.flex-grid-volgorde {
    display: flex;
    flex-direction: column;

    h3 {
        font-size: var(--default-font-size);
        margin: 0;
    }
}

.row-volgorde {
    display: flex;
    flex-direction: row;
    justify-content: start;
    gap: 1%;
}

.flex-grid-volgorde .col-volgorde {
    width: 32%;
}

.col-volgorde {
    display: flex;
    flex-direction: row;
    justify-content: space-between;

    div:nth-child(1),
    div:nth-child(2) {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        border-style: solid;
        border-width: 1px;
        border-color: var(--default-text-color);
        text-align: center;
    }
}

.fotos-sponsors {
    display: flex;
    flex-direction: column;

    .fotos-sponsors-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-evenly;
        gap: 2rem;
        text-align: center;

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

.gegevens {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 5rem;

    .gegevens-row {
        display: flex;
        flex-direction: row;
        flex: 1;
        gap: 1rem;

        > div:nth-child(2) {
            flex: 1;
            border-bottom-style: dotted;
        }
    }
}

@media print {
    .print-only {
        display: block;
    }

    nav,
    .overlay,
    .sponsors,
    footer {
        display: none !important;
    }

    .uitleg {
        h4 {
            margin-top: 0.5rem;
            margin-bottom: 0;
            font-size: var(--default-font-size);
        }

        li {
            margin-top: 0 !important;
        }
    }

    #fotozoektocht {
        h1 {
            display: none !important;
        }

        .fotos-container {
            h1 {
                display: block !important;
            }
        }

        .fotos-card {
            width: calc((100vw / var(--images-per-row-print)) - 1.5rem);
            height: calc((100vw / var(--images-per-row-print)) - 1.5rem);

            img {
                width: calc(100% - 0.5rem);
                max-height: calc(
                    (100vw / var(--images-per-row-print)) - 1.7rem
                );
            }
        }

        .fotos-card:nth-child(12n),
        .fotos {
            page-break-after: always;
        }
    }
}
