body {
    display: grid;
    grid-template-rows: max-content auto max-content;
    gap: 5px;

    overflow-x: hidden;

    background-color: var(--bg-color);
}


main {
    justify-self: center;
    /* margin: 0 auto; */
    width: clamp(0px, 100%, 1366px);

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: minmax(300px, 1fr);
    grid-auto-flow: dense;

    gap: 4px;
}

main > a {
    width: 100%;
    height: auto;

    background-size: cover;
    background-repeat: no-repeat;
    background-position: top;

    transition: transform .2s linear;

    &:hover {
        transform: scale(1.1);
    }
}

footer {
    padding: 1rem 0;
    background-color: var(--hd-color);
    color: var(--txt-bn-color);

    text-align: center;
    font-size: .8rem;
}



.dialog {
    position: fixed;
    inset: 0 0 0 0;

    display: none;
    place-content: center;

    background-color: #00000088;

    &.active {
        display: grid;
    }
}

/* body:has(.dialog.active) {
    overflow-y: hidden;
} */

.dialog-cont {
    position: relative;
    padding: 1rem;

    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 1rem;

    border-radius: 5px;
    background-color: var(--bl-l-color);

    color: var(--txt-d-color);
}

.dialog-close {
    position: absolute;
    inset: 10px 10px auto auto;

    width: 30px;
    height: 30px;
}

.dialog-image {
    width: clamp(0px, 500px 600px);
    height: auto;
    max-height: 500px;
}

.dialog-download {
    display: grid;
    grid-template-columns: auto 30px;
    gap: 1rem;
}
.dialog-download > p {
    align-self: center;
}

.dialog-download > a {
    padding: 5px;

    display: grid;
    place-content: center;
    aspect-ratio: 1;

    border-radius: 5px;
    background-color: var(--bn-color);
}



@media screen and (max-width: 1920px) {
    main > a {
        &:nth-child(5n) {
            grid-column: span 2;
        }
    }
}

@media screen and (max-width: 720px) {
    main > a {
        &:nth-child(3n) {
            grid-column: span 2;
        }
    }
}