.tour-gallery, .tour-gallery * {box-sizing:border-box}
.tour-gallery {container-type:inline-size;width:100%;min-width:0;margin:40px 0;font-family:"Montserrat",sans-serif}
.tour-gallery__track {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:23cqw;gap:clamp(8px,1.3cqw,20px);width:100%}
.tour-gallery__item {position:relative;display:block;min-width:0;min-height:0;overflow:hidden;border-radius:6px;background:#ddd;cursor:zoom-in}
.tour-gallery__image {display:block;width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.tour-gallery__item:hover .tour-gallery__image {transform:scale(1.045)}
.tour-gallery__item:focus-visible {outline:3px solid #f41934;outline-offset:3px}
/* Ровно как в макете: 1+2+1, затем 1+заголовок(2)+1, затем 2+2 */
.tour-gallery__item:nth-of-type(1) {grid-column:1;grid-row:1}
.tour-gallery__item:nth-of-type(2) {grid-column:2 / span 2;grid-row:1}
.tour-gallery__item:nth-of-type(3) {grid-column:4;grid-row:1}
.tour-gallery__item:nth-of-type(4) {grid-column:1;grid-row:2}
.tour-gallery__item:nth-of-type(5) {grid-column:4;grid-row:2}
.tour-gallery__item:nth-of-type(6) {grid-column:1 / span 2;grid-row:3}
.tour-gallery__item:nth-of-type(7) {grid-column:3 / span 2;grid-row:3}
.tour-gallery__desktop-heading {position:relative;grid-column:2 / span 2;grid-row:2;display:flex;align-items:center;justify-content:center;min-width:0;padding:0 clamp(8px,2cqw,26px);text-align:center}
.tour-gallery__heading-inner {position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-width:0}
.tour-gallery__heading-text {margin:0;font-family:"Bebas Neue Cyrillic","Bebas Neue",sans-serif;font-size:clamp(28px,4.5cqw,64px);font-weight:400;line-height:1.02;text-align:center;text-transform:uppercase;color:#212121}
.tour-gallery__line {display:block;width:63%;height:auto;margin-top:-1px;margin-left:9%;align-self:center}
.tour-gallery__star {position:absolute;display:block;width:clamp(20px,3.6cqw,50px);height:auto}
.tour-gallery__star--left {left:0;top:5%}
.tour-gallery__star--right {right:0;bottom:5%}
.tour-gallery__mobile-heading {display:none}
/* Чтобы дополнительные фото не заполняли визуальный центр и продолжали сетку ниже первых семи */
.tour-gallery__item:nth-of-type(n+8) {grid-column:auto;grid-row:auto}
@media(max-width:767px) {
    .tour-gallery {margin:28px 0}
    .tour-gallery__mobile-heading {display:flex;justify-content:center;padding:0 12px;margin-bottom:24px}
    .tour-gallery__mobile-heading .tour-gallery__heading-inner {max-width:420px}
    .tour-gallery__mobile-heading .tour-gallery__star--top {position:static;width:30px;margin-bottom:12px;align-self:flex-start}
    .tour-gallery__mobile-heading .tour-gallery__heading-text {font-size:clamp(32px,7.5vw,48px)}
    .tour-gallery__desktop-heading {display:none}
    .tour-gallery__track {display:flex;gap:12px;overflow-x:auto;overflow-y:hidden;padding-bottom:10px;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
    .tour-gallery__item,.tour-gallery__item:nth-of-type(n) {flex:0 0 min(78vw,380px);width:min(78vw,380px);aspect-ratio:4/5;grid-column:auto;grid-row:auto;scroll-snap-align:start;border-radius:8px}
}
@media(prefers-reduced-motion:reduce){.tour-gallery__image{transition:none}}
/* Просмотр фотографий */
.tour-gallery-lightbox,.tour-gallery-lightbox * {box-sizing:border-box}
.tour-gallery-lightbox[hidden] {display:none!important}
.tour-gallery-lightbox {position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;width:100%;height:100dvh;padding:60px clamp(12px,5vw,80px);background:rgba(0,0,0,.94)}
.tour-gallery-lightbox__image {display:block;max-width:100%;max-height:calc(100dvh - 120px);width:auto;height:auto;object-fit:contain}
.tour-gallery-lightbox__close,.tour-gallery-lightbox__prev,.tour-gallery-lightbox__next {position:absolute;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.15);color:#fff;font-size:28px;line-height:1;cursor:pointer}
.tour-gallery-lightbox__close {top:16px;right:20px}
.tour-gallery-lightbox__prev {top:50%;left:16px;transform:translateY(-50%)}
.tour-gallery-lightbox__next {top:50%;right:16px;transform:translateY(-50%)}
.tour-gallery-lightbox__close:hover,.tour-gallery-lightbox__prev:hover,.tour-gallery-lightbox__next:hover {background:rgba(255,255,255,.3)}
.tour-gallery-lightbox__counter {position:absolute;bottom:20px;left:50%;transform:translateX(-50%);color:#fff;font:500 14px "Montserrat",sans-serif}
@media(max-width:767px){.tour-gallery-lightbox{padding:65px 8px}.tour-gallery-lightbox__image{max-height:calc(100dvh - 135px)}.tour-gallery-lightbox__prev{left:5px}.tour-gallery-lightbox__next{right:5px}.tour-gallery-lightbox__prev,.tour-gallery-lightbox__next{width:36px;height:36px;background:rgba(0,0,0,.45)}}

.tour-gallery__desktop-heading {
    position: relative;
    isolation: isolate;
}

.tour-gallery__desktop-heading .work-directions__ellipse {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    transform: translate(-50%, -50%);
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    height: 65%;
    border: 2px dashed #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-11.54deg);
    z-index: 1;
    pointer-events: none;
}

.tour-gallery__desktop-heading .tour-gallery__heading-inner,
.tour-gallery__desktop-heading .tour-gallery__star {
    position: relative;
    z-index: 1;
}

