html {
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape while allowing user zoom */
}

.artist-name {
    position: absolute;
    font-family: Lato;
    font-size: 40px;
    left: 64px;
    top: 48px;
}
.landscapes-heading {
    position: absolute;
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 32px;
    left: 64px;
    top: 84px;
}
.navigation {
    display: flex;
    gap: 30px;
    position: absolute;
    top: 114px;
    right: 64px;
}
.navigation .item {
    font-family: Lato;
    font-weight: 500;
    font-style: normal;
    font-size: 20px;
    text-decoration: none;
    color: black;
}
.landscapes-gallery {
    display: flex;
    flex-direction: column;
    gap: 48px;
    justify-content: center;
    margin-top: 184px;
}
.video-gallery {
    display: flex;
    flex-direction: column;
    gap: 48px;
    justify-content: center;
    margin-top: 184px;
}
.out-container {
    position:relative
}
.out-of-layout {
    position: absolute;
    top: 0;
    left: 0;
}
.video-item iframe{
    min-height: 40vh;
    width: 100%;
}
.text-item {
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 19px;
    line-height: 1.5;
    margin-left: 64px;
    margin-right: 48px;
    margin-top: 24px;
}
.painting-gallery {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 168px;
    margin-left: 48px;
    margin-right: 48px;
}
.painting-gallery .gallery-item {
    flex: 1 1 0;
    text-align: center;
}
.painting-gallery img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto 12px auto;
}
.painting-gallery-label {
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 20px;
}
.painting-gallery-label-small, .gallery-item-label-small {
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 16px;
}
.landscapes-row {
    display: flex;
    gap: 48px;
    margin-left: 48px;
    margin-right: 48px;
}
.landscapes-row .gallery-item {
    flex: 1 1 0;
    max-width: 50%;
}
.gallery-item {
    text-align: center;
}
.gallery-item img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 90vh;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 12px;
    /* Ensures aspect ratio is preserved and width shrinks if max-height is hit */
}
.gallery-item-label {
    font-family: 'Lato', sans-serif;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
    margin-top: 0;
    letter-spacing: 0.01em;
}

.text-item p {
    margin: 0;
}

.gallery-item.text-item {
    text-align: left;
    margin: 0;
}

.gallery-item.text-item p {
    margin-bottom: 12px;
}

.gallery-item.full-width {
    max-width: 100% !important;
    margin-left: 48px;
    margin-right: 48px;
}
.gallery-item.full-width img {
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 900px) {
    .artist-name {
        font-size: 28px;
        text-align: center;
        left: 0;
        width: 100%;
    }
    .landscapes-heading {
        font-size: 28px;
        text-align: center;
        left: 0;
        width: 100%;
        margin-top: 30px;
        margin-bottom: 20px;
    }
    .navigation {
        position: static;
        flex-direction: column;
        align-items: center;
        gap: 24px;
        margin-top: 112px;
        margin-left: 0;
    }
    .landscapes-heading {
        top: 390px;
    }
    .painting-gallery {
        flex-direction: column !important;
        align-items: center;
        margin-left: 0;
        margin-right: 0;
        margin-top: 30px;
    }
    .painting-gallery.home {
        margin-top: 0;
    }
    .painting-gallery .gallery-item {
        width: 100%;
        max-width: 95vw;
    }
    .painting-gallery img {
        max-width: 95vw;
        margin-left: auto;
        margin-right: auto;
    }
    .landscapes-gallery, .video-gallery {
        gap: 48px;
        margin-top: 100px;
    }
    .landscapes-row {
        flex-direction: column;
        gap: 48px;
        margin-left: 0;
        margin-right: 0;
    }
    .landscapes-row .gallery-item,
    .gallery-item.full-width {
        max-width: 100% !important;
        margin-left: 0;
        margin-right: 0;
    }
    .gallery-item img {
        max-width: 95vw;
        margin-left: auto;
        margin-right: auto;
    }
    .gallery-item.full-width img {
        margin-left: 0;
        margin-right: 0;
    }
}
