

/** СТИЛИ ДЛЯ БЛОКОВ */


/* БЛОК ИЗОБРАЖЕНИЯ (Одно и с текстом)*/

.image-block {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
}
.image-block-box {
    display: flex;
    min-height: 200px;
    width: 100%; 
    max-width: var(--width);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.image-block-container {
    position: relative; 
    display: inline-block; 
    max-width: var(--image-size-desktop);
    transform: scale(var(--image-transform-desktop));
    transform-origin: center;
}
.image-block-img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}
.text-block-box {
    position: absolute; 
    pointer-events: none;
}
.image-block-text {
    font-size: 15px;
    text-align: inherit;
    border: 2px solid var(--color-yellow);
    padding: 20px;
    pointer-events: auto;
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .image-block-container {
        max-width: var(--image-size-mobile, 95%) !important;
        transform: scale(var(--image-transform-mobile));
    }
    .image-block-box {
        align-items: center !important; 
    }
    .text-block-box {
        display: none;
    }
}



/* СЕТКА ИЗОБРАЖЕНИЙ */

.grid-image-block {
    width: 100%;
}
.grid-container {
    display: grid;
    gap: var(--gap-size);
    max-width: var(--width);
    margin: 0 auto;
    padding: 0 60px;
    padding-top: var(--top-padding);
    padding-bottom: var(--top-padding);
}

.grid-layout-1 { grid-template-columns: 1fr; }
.grid-layout-2 { grid-template-columns: repeat(2, 1fr); }
.grid-layout-3 { grid-template-columns: repeat(3, 1fr); }
.grid-layout-4 { grid-template-columns: repeat(4, 1fr); }

.grid-item {
    position: relative;
}

.grid-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0px;
}
.grid-image {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .grid-layout-4 { grid-template-columns: repeat(3, 1fr); }
    .grid-container {
        width: var(--width-mobile) !important;
        padding: 0 0px;
        padding-top: var(--top-padding);
        padding-bottom: var(--top-padding);
    }
}
@media (max-width: 768px) {
    .grid-layout-3, 
    .grid-layout-4 { grid-template-columns: repeat(1, 1fr); }
}
@media (max-width: 480px) {
    .grid-layout-2,
    .grid-layout-3,
    .grid-layout-4 { grid-template-columns: 1fr; }
}




/* УНИВЕРСАЛЬНЫЙ БЛОК */

.universal-block {
    width: 100%;
    padding: 0 var(--spacing);
}
.universal-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    max-width: var(--width);
    margin: 0 auto;
}

/* Разделитель */
.divider {
    height: 1px;
    background: var(--color-yellow);
    width: 60%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--color-yellow) 20%,
        var(--color-yellow) 80%,
        transparent 100%
    );
    margin-bottom: 60px;
}

/* Изображение */
.universal-image {
    max-width: 100%;
    height: auto;
    display: inline-block;
    margin-top: 0px;
    margin-bottom: 20px;
    pointer-events: none;
}

/* Заголовок */
.universal-heading {
    display: flex;
    width: 100%;
    max-width: 1000px;
    font-size: 2.2rem;
    line-height: 1.6;
    font-weight: 200;
    margin: 0;
    margin-top: 0px;
    margin-bottom: 20px;
}

/* Описание */
.description-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: lighter;
    color: var(--color-text2);
    margin: 0;
    margin-top: 0px;
    margin-bottom: 20px;
}

/* Основной текст */
.universal-content {
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 300;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .universal-block {
        padding: 0 14px;
    }
    .divider {
        margin-bottom: 30px;
    }
    .universal-heading {
        font-size: 1.3rem;
        margin-bottom: 0px;
        line-height: 1.4;
    }
    .universal-description {
        font-size: 1.0rem;
    }
    .universal-content {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 10px;
    }
    .image-section {
        width: 60% !important;
    }
}




/* ВИДЕО БЛОК */

.video-block {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.video-container {
    position: relative;
    max-width: var(--width);
}
.responsive-video {
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .video-container {
        width: 95% !important;
    }
}

@media (max-width: 480px) {
    .video-container {
        width: 100% !important;
        padding: 0 10px;
    }
}




/* ПАРАЛАКС БЛОК */

.parallax-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.parallax-viewport {
    position: relative;
    width: 100%;
    height: auto;
    /* overflow: hidden; */
}

.parallax-base {
    margin: 0 auto;
    height: auto;
    position: relative;
    /* padding: 0 var(--spacing); */
    width: 100%;
    max-width: 1920px;
}
.parallax-base-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    pointer-events: none; 
}

.parallax-layer {
    position: absolute;
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 100%;
    height: auto;
    pointer-events: none;
    overflow: "visible";
}
.parallax-layer img {
    position: absolute;
    will-change: transform;
    backface-visibility: hidden;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    pointer-events: none;
}

@media (max-width: 768px) {
    .parallax-base {
        width: 100% !important;
        padding: 0 0;
    }
}





/* СЛАЙДЕР БЛОК */

.slider-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: var(--width);
    position: relative;
}
@media (max-width: 768px) {
    .slider-container {
        width: 100% !important;
    }
}

/* Текст */
.slider-background-texts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.background-text {
    position: absolute;
    left: -500%;
    top: 0%;
    font-size: 120px;
    font-weight: 400;
    color: var(--color-yellow);
    white-space: nowrap;
    transition: left 0.4s ease;
}
.background-text.active {
    left: 30%;
    transform: translateX(-50%);
}
@media (max-width: 768px) {
    .background-text {
        font-size: 100px;
    }
    .background-text.active {
        left: 40%;
    }
}

/* Изображение */
.slider-images-block {
    display: flex;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    position: relative; 
}
.slide {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none; 
}
.slide.active {
    opacity: 1;
    position: relative; 
    pointer-events: auto;
}
.slide-image {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

/* Стрелки */
.slider-arrow {
    position: absolute;
    top: 50%;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    overflow: hidden;
}
.slider-arrow-image {
    width: 70px;
    height: auto;
    display: block;
    position: relative;
    pointer-events: none;
    z-index: 2;
    transform-origin: center;
    pointer-events: none;
}

.slider-prev {
    left: -30px;
    transform: translateY(-50%) scaleX(-1);
}
.slider-next {
    right: -30px;
    transform: translateY(-50%);
}

.slider-arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-yellow);
    transition: left 0.5s ease;
    z-index: 1;
}
.slider-arrow:hover::before {
    left: 0;
}
@media (max-width: 768px) {
    .slider-arrow-image {
        width: 40px;
    }
    .slider-prev {
        left: 8px;
    }
    .slider-next {
        right: 8px;
    }
}

/* Точки */
.slider-dots {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.slider-dot {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.dot-image {
    width: 35px;
    height: 35px;
    display: block;
    pointer-events: none;
}
@media (max-width: 768px) {
    .slider-dots {
        bottom: -30px;
    }
    .dot-image {
        width: 30px;
        height: 30px;
    }
}





/* ИЗОБРАЖЕНИЕ ДО/ПОСЛЕ */

.before-after-block {
    display: flex;
    justify-content: center;
    width: 100%;
}
.before-after-container {
    position: relative;
    max-width: var(--width);
}

.before-after-wrapper {
    position: relative;
    overflow: hidden;
    height: 600px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Изображения */
.image-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.image-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%;
    z-index: 2;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%); 
}

.before-image,
.after-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Ползунок */
.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    z-index: 3;
    transform: translateX(-50%);
    cursor: pointer;
    touch-action: none;
}
.slider-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--color-yellow);
    box-shadow: 0 0 4px rgba(43, 27, 8, 0.5);
    transform: translateX(-50%);
}
.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px;
    height: 25px;
    background: var(--color-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 4px rgba(43, 27, 8, 0.5);
}

/* Адаптивность */
@media (max-width: 768px) {
    .before-after-container {
        padding: 0 10px;
        width: 100% !important;
    }
    .before-after-wrapper {
        height: 300px;
    }
    .slider-button {
        width: 20px;
        height: 20px;
    }
    
}





/* ИЗОБРАЖЕНИЕ TOOLTIP */

.image-map-block {
    display: flex;
    justify-content: center;
    width: 100%;
}
.image-map-container {
    display: flex;
    justify-content: center;
    position: relative;
    max-width: var(--width);
}

.main-map-image {
    max-width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.map-point {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
}
.point-marker {
    width: 25px;
    height: 25px;
    background: var(--color-yellow);
    border-radius: 50%;
    border: 2px solid var(--color-white);
    box-shadow: 0 2px 8px rgba(52, 50, 18, 0.3);
    transition: all 0.2s ease;
}
.map-point:hover .point-marker {
    transform: scale(1.1);
    background: var(--color-text2);
}

.map-tooltip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-white);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(52, 50, 18, 0.3);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
    gap: 10px;
    border: 1px solid var(--color-text2);
}
.map-point:hover .map-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

.map-tooltip-image {
    width: 180px;
    height: auto;
    object-fit: cover;
    pointer-events: none;
}
.map-tooltip-text {
    font-size: 1.0em;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .image-map-container {
        width: 100% !important;
    }
    .point-marker {
        width: 20px;
        height: 20px;
    }
    .map-tooltip {
        padding: 6px;
        min-width: 100px;
    }
    .map-tooltip-image {
        width: 120px;
    }
    .map-tooltip-text {
        font-size: 0.7em;
    }
}