.services-block.services-block--gallery-outer{
	margin: 10rem 0 3rem;
	overflow: hidden;
}
.services-tab-content--gallery{
	display:flex;

}

/*.tab-content.active{
    display: grid !important;
}*/

.services-tab-content--gallery img{
	max-width: 100%;
	height: 100%;
	border-radius: 5px;
	object-fit: cover;
}

.services-tab-content--gallery a{
	display: block;
}

.services-block.services-block--gallery-outer .h1-main{
    margin-top: 0;
}

.services-block.services-block--gallery-outer .swiper-pagination{
	position: relative;
    margin-top: 20px;
}

@media(max-width: 800px){
    .services-block.services-block--gallery-outer{
        overflow: visible;
    }
}

.staff-detail.wrap{
    overflow: hidden;
}

.services-block--gallery-outer .services-tabs-titles .swiper-slide{
    width: auto !important;
}

.services-block--gallery-outer .services-tabs-titles{
    display: block;
}

.services-tab-title-wrap:not(:last-child) {
    margin-right: 0px;
}

@media(max-width: 600px){
    html .services-tab-title{
        padding-left: 7px;
        padding-right: 7px;
        text-align: center;
    }

    .services-block--gallery-outer .services-tab-title-wrap{
        width: 100%;
        margin-bottom: 7px;
    }

    .services-block--gallery-outer .services-tabs-titles{
        margin-bottom: 20px;
    }

    .services-tab-content-img img{
        aspect-ratio: 300/200;
        max-height: 300px;
        width: 100%;
        object-fit: cover;
    }
}

.video-thumbnail {
    position: relative;
    width: 318px;
    height: 406px;
    background-repeat: no-repeat;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px auto;
    /* Иконка поверх изображения */
    background-size: cover;
    background-position: center, center;
}

.video-thumbnail::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1228 1228"><circle fill="%2366CCCC" cx="614" cy="614" r="614"/><path fill="white" d="M525 885l0 -542c0,-29 36,-44 56,-23l269 271c13,13 13,33 0,46l-269 271c-21,21 -56,6 -56,-23z"/></svg>');
    background-size: 40px;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2; /* чтобы иконка была поверх фона */
}





/* Стили для модального окна */
.a1-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.a1-modal-content {
    width: 456px;
    max-width: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 80%;
    min-height: 400px;
}






.a1-video-close {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}




.a1-video-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05) rotate(90deg); /* Вращение при наведении */
}

.a1-video-close svg {
    width: 24px;
    height: 24px;
    fill: #fff;
    transition: transform 0.3s ease;
}

video {
    width: 100%;
    height: 100%;
    max-height: 80vh;
    outline: none;
    border-radius: 8px;
    object-fit: cover;
}

/* Анимация появления */
.modal.show {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.a1-relative {
    position: relative;
    display: inline-block; /* Чтобы контейнер оборачивал содержимое */
}

.staff-video-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10; /* Чтобы кнопка была поверх изображения */
    opacity: 0.8;
    transition: all 0.2s ease;
    border-radius: 50%;
    #box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.staff-video-button:hover {
    opacity: 1;
    transform: scale(1.1);
}

.staff-video-button:hover::before {
    content: "Видеовизитка";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 11;
    pointer-events: none;
}

@media(max-width: 540px){
    .a1-modal-content{
        top: 350px;
        max-height: 60vh;
    }

    .a1-video-close {
        position: fixed;
        width: 50px;
        height: 50px;
        background: rgba(255,255,255,0.15);
        border: 1px solid rgba(255,255,255,0.2);
    }

    .a1-video-close svg {
        width: 30px !important;
        height: 30px !important;
        fill: #fff;
        transition: transform 0.3s ease;
        position: fixed;
    }
    .staff-video-button{
        top: -5px;
        right: -5px;
    }

    video{
        max-height: 70vh;
    }

}


