.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;

    font-family: sans-serif;

    div, *::before, *::after {
        box-sizing: border-box;
    }

    .gallery-container {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: #000;
        position: relative;
        border-radius: 0;
    }

    @media (min-width: 992px) {
        .gallery-container {
            padding: 20px;
            width: 80%;
            max-width: 1200px;
            height: auto;
            max-height: 800px;
            border-radius: 12px;
            overflow: hidden;
        }
    }

    .gallery-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(44, 44, 44, 0.7);
        color: white;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 20px;
        cursor: pointer;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s ease;
        padding: 0;
    }

    .gallery-close:hover {
        background: rgba(44, 44, 44, 0.9);
    }

    .gallery-carousel {
        flex: 1;
        position: relative;
        overflow: hidden;
        margin-top: 1rem;
    }

    .gallery-slides {
        display: flex;
        height: 100%;
        transition: transform 0.3s ease;
    }

    .gallery-slide {
        min-width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .gallery-image {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .gallery-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.7);
        color: white;
        border: none;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        font-size: 24px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        transition: background 0.2s ease;
	padding: 0;
    }

    .gallery-nav:hover {
        background: rgba(0, 0, 0, 0.9);
    }

    .gallery-nav.prev {
        left: 20px;
    }

    .gallery-nav.next {
        right: 20px;
    }

    .gallery-caption {
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 15px;
        text-align: center;
        font-size: 20px;
        line-height: 1.4;
    }

    .gallery-counter {
        position: absolute;
        top: 20px;
        left: 20px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 5px 12px;
        border-radius: 15px;
        font-size: 14px;
        z-index: 10;
    }

    .gallery-thumbnails {
        position: absolute;
        bottom: 0;
        left: 50%;
        translate: -50%;
        display: flex;
        justify-content: center;
        gap: 8px;
        padding: 15px;
        background: rgba(0, 0, 0, 0.8);
        overflow-x: auto;
    }

    .gallery-thumbnail {
        width: 60px;
        height: 60px;
        border: 2px solid transparent;
        border-radius: 6px;
        cursor: pointer;
        opacity: 0.6;
        transition: all 0.2s ease;
    }

    .gallery-thumbnail:hover {
        opacity: 0.8;
        transform: scale(1.05);
    }

    .gallery-thumbnail.active {
        border-color: #007bff;
        opacity: 1;
    }

    .thumbnail-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 4px;
    }

    @media (max-width: 991px) {
        .gallery-nav {
            width: 40px;
            height: 40px;
            font-size: 18px;
        }

        .gallery-close {
            width: 35px;
            height: 35px;
            font-size: 16px;
        }

        .gallery-counter {
            font-size: 12px;
            padding: 4px 10px;
        }

        .gallery-thumbnails {
            padding: 10px;
            gap: 6px;
        }

        .gallery-thumbnail {
            width: 50px;
            height: 50px;
        }
    }

    @media (max-width: 480px) {
        .gallery-thumbnail {
            width: 40px;
            height: 40px;
        }
    }
}

#rymap-popup {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;

    background-color: #0e0e0e;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;

    background-image: url("assets/russian_flag.svg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;

    &.is-open {
        opacity: 1;
        visibility: visible;
    }

    .rymap-close-button {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3c?xml version='1.0' encoding='UTF-8'?%3e%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3e%3cpath d='M1.6666 1.13931L15 15M1 14.8607L14.3334 1' stroke='white' stroke-linecap='round'%3e%3c/path%3e%3c/svg%3e");
        background-size: cover;
        background-repeat: no-repeat;
        cursor: pointer;

        transition: transform 0.3s ease-in-out;

        &:hover {
            transform: rotate(90deg);
            transition: transform 0.3s ease-in-out;
        }
    }

    .rymap-herb {
        display: none;
    }

    #rymap-map {
        width: 100%;
        height: calc(100vh - 50px);
        margin-top: 50px;
    }

    @media (min-width: 640px) {
        display: flex;
        align-items: center;
        justify-content: center;

        .rymap-close-button {
            top: 3vh;
            right: 3vh;
        }

        .rymap-herb {
            display: block;
            position: absolute;
            width: min(100px, 20vw);
            height: min(100px, 20vw);
            bottom: 2%;
            right: 2%;
            background: url(https://static.tildacdn.com/tild3435-3638-4331-a433-626135653236/Rectangle.png);
            background-size: 100%;
        }

        #rymap-map {
            margin-top: 0;
            height: min(90vh, 90vw);
            width: min(90vh, 90vw);
            border-radius: 100500px;
            overflow: hidden;
        }
    }
}

