#gallerey h1 {
    padding: 1em 0;
}
#gallerey .container.desktop {
    gap: 7em
}

#gallerey .photos { 
    display: grid;
    grid-auto-flow: row;
    grid-template-areas:
      "left . ."
      "left bottom bottom";
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-auto-columns: 1fr;
    margin-bottom: 3em;
    width: 100%;
    gap: 1em;
}
#gallerey .photos .photo {
    height: 100%;
    width: 100%;
    border-radius: 12px;
    background: var(--bgImg, rgba(0, 0, 0, 0.226));
    background-position: center;
    background-size: cover;
    filter: brightness(90%);
    transition: all 0.2s ease-in;
}
#gallerey .photos .photo:hover {
    box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.25);
    filter: brightness(100%);
}
#gallerey .photos .photo.left {
    grid-area: left;
    height: 600px;
}
#gallerey .photos .photo.bottom {
    grid-area: bottom;
}

#gallerey .video {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center;
    gap: 1em
}

#gallerey .video .video-card {
    position: relative;
    cursor: pointer;
}
#gallerey .video .video-card a {
    display: block;
    height: 400px;
    border-radius: 12px;
    background: var(--bgImg, rgba(0, 0, 0, 0.226));
    background-position: center;
    background-size: cover;
    filter: brightness(40%)
}


#gallerey .video .video-card .play {
    aspect-ratio: 1;
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 100px;
    width: 10%;
    backdrop-filter: blur(13px);
    padding: 2em;
    transition: all 0.2s ease-in;
}
#gallerey .video .video-card:hover img {
    width: 20%;
    cursor: pointer;
}
#gallerey .video .video-card:hover a {
    filter: brightness(80%);
    box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.25);
}

#gallerey .container.desktop .video-card .video-preview {
    display: block;
    height: 400px;
    border-radius: 12px;
    background: var(--bgImg, rgba(0, 0, 0, 0.226));
    background-position: center;
    background-size: cover;
    filter: brightness(40%);
    transition: all 0.2s ease-in;
}
#gallerey .container .video-card:hover .video-preview {
    filter: brightness(80%);
    box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.25);
}

#gallerey .photos-viwer {
    display: none;
    position: fixed;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.95);
    width: calc(100% - 4em);
    z-index: 2000;
    height: 100%;
    padding: 2em;
    left: 0;
    top: 0;
}
#gallerey .desktop #metaslider_140 .ms-image {
    display: none !important;
    width: 100% !important;
}
#gallerey .desktop #metaslider_140 .ms-image.active {
    display: block !important;
}
#gallerey .desktop #metaslider_140 ul {
    width: 100% !important;
}

#gallerey .photos-viwer.active {
    display: flex;
    flex-direction: row;
    gap: 1em
}

#gallerey .photos-viwer .metaslider {
    width: calc(100% - 4em) !important;
}

/*
#gallerey .photos-viwer .slider-container {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    gap: 1em;
}
#gallerey .photos-viwer .slider-arrow {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 24px;
}
#gallerey .photos-viwer .slide {
    display: none;
}
#gallerey .photos-viwer .slide.active {
    display: block;
}
#gallerey .photos-viwer .photo-slide {
    height: 80vh;
    width: 50vw;
    border-radius: 10px;
    background-image: var(--bgImg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
#gallerey .photos-viwer .slider-dots {
    display: flex;
    gap: 1em;
}
#gallerey .photos-viwer .dot {
    display: inline-block;
    aspect-ratio: 1;
    width: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s;
}
#gallerey .photos-viwer .dot.active {
    background: #333;
}
*/


/* Стили для мобильной версии */
#gallerey .container.phone {
    display: none;
}

#gallerey .container.phone .slider-container {
    position: relative;
    margin: 1em 0;
}
    
#gallerey .container.phone .slider-track {
    display: flex;
    overflow: hidden;
    border-radius: 12px;
}
    
#gallerey .container.phone .slide {
    display: none;
    width: 100%;
    flex-shrink: 0;
}
    
#gallerey .container.phone .slide.active {
    display: block;
}
    
#gallerey .container.phone .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
}
    
#gallerey .container.phone .slider-arrow.prev {
    left: 10px;
}
    
#gallerey .container.phone .slider-arrow.next {
    right: 10px;
}
    
/* Стили для фото слайдов */
#gallerey .container.phone .photo-slide {
    height: 300px;
    border-radius: 12px;
    background: var(--bgImg, rgba(0, 0, 0, 0.226));
    background-position: center;
    background-size: cover;
}
    
    /* Стили для видео слайдов */
#gallerey .container.phone .video-slide {
    position: relative;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
}
    
#gallerey .container.phone .video-preview {
    height: 100%;
    background: var(--bgImg, rgba(0, 0, 0, 0.226));
    background-position: center;
    background-size: cover;
    filter: brightness(60%);
}
    
#gallerey .container.phone .video-slide .play {
    position: absolute;
    cursor: pointer;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    padding: 1em;
    border-radius: 100px;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(13px);
    filter: brightness(100%);
}
    
    /* Точки навигации */
#gallerey .container.phone .slider-dots {
    text-align: center;
    margin: 1em 0;
}
    
#gallerey .container.phone .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s;
}
    
#gallerey .container.phone .dot.active {
    background: #333;
}
    
/* Модальное окно для видео */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}
    
.modal-content {
    position: relative;
    margin: 5% auto;
    width: 95%;
    max-width: 800px;
}
    
.modal-content .close {
    position: absolute;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

#videoPlayer {
    width: 100%;
    height: 80vh;
}