* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

html {
    scroll-behavior: auto;
}

a {
    color: #fff9cb;
}

section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.bg-image {
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transform: scale(1.1);
    transition: transform 0.1s ease;
}

.content_lenny {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.content_lenny.visible {
    opacity: 1;
    transform: translateY(0);
}

.sticky {
    position: sticky;
    top: 0;
}

body {
    width: 100vw;
    min-height: 100svh;
    overflow-x: hidden;
    overflow: hidden;
    background: linear-gradient(223.17deg,
            rgb(28, 24, 41) 0%,
            rgb(27, 24, 40) 8.61%,
            rgb(25, 23, 36) 17.21%,
            rgb(22, 21, 32) 25.82%,
            rgb(20, 19, 28) 34.42%,
            rgb(18, 18, 24) 43.03%,
            rgb(17, 17, 23) 51.63%);
    padding-bottom: 20px;
    box-sizing: border-box;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: gray #111;
}

/* WebKit (Chrome, Edge, Safari) */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: #111;
}

*::-webkit-scrollbar-thumb {
    background-color: gray;
    border-radius: 4px;
    border: 2px solid #111;
}


.container {
    min-height: 100svh;
    position: relative;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: black;
    z-index: 1;
    pointer-events: none;
}

.hero-main-container {
    width: 100%;
    height: 100vh;
    position: relative;
    transform: scale(1.25);
    background-image: url("./logo/ff_iv.svg");
    background-size: 1000vh;
    background-position: 50% 41.7%;
    background-repeat: no-repeat;
    background-origin: content-box;
    padding-bottom: 200px;
}

.hero-main-image {
    width: 100%;
    height: 100vh;
    /* transform: scale(1.25); */
    position: absolute;
    inset: 0;
    object-fit: cover;
}

.hero-main-logo {
    width: 100%;
    height: 100vh;
    position: absolute;
    inset: 0;
    z-index: 1;
    object-fit: cover;
}

.hero-text-logo-container {
    width: 100%;
    height: 100vh;
    position: absolute;
    inset: 0;
    z-index: 10;
    object-fit: cover;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    justify-content: center;
    align-items: center;
}

.hero-text-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-bottom: 200px;
    height: 100vh;
    position: absolute;
    inset: 0;
}

/* Scroll Indicator Styles */
.scroll-indicator {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 14px;
    z-index: 10;
}

.scroll-indicator svg {
    color: #ffb0c4;
    width: 100%;
    height: 100%;
}

.hero-text {
    color: #ffb0c4;
    text-align: center;
    text-transform: uppercase;
    background-image: radial-gradient(circle at 50% 200vh,
            rgba(255, 214, 135, 0) 0,
            rgba(157, 47, 106, 0.5) 90vh,
            rgba(157, 47, 106, 0.8) 120vh,
            rgba(32, 31, 66, 0) 150vh);
    -webkit-text-fill-color: transparent;
    font-size: 4.5rem;
    background-clip: text;
    width: 100%;
    line-height: 0.9;
    margin-top: 30%;
    display: block;
    z-index: 10;
    position: relative;
}

.hero-text:hover {
    opacity: 0.8;
}

.hero-text_2 {
    position: absolute;
    display: block;
    left: 0;
    right: 0;
    color: #ffb0c4;
    text-align: center;
    text-transform: uppercase;
    background-image: radial-gradient(circle at 50% 200vh,
            rgba(255, 214, 135, 0) 0,
            rgba(157, 47, 106, 0.5) 90vh,
            rgba(157, 47, 106, 0.8) 120vh,
            rgba(32, 31, 66, 0) 150vh);
    -webkit-text-fill-color: transparent;
    font-size: 2.5rem;
    background-clip: text;
    width: 100%;
    line-height: 0.9;
    margin-top: 9%;
}

.hero-2-container {
    width: 100%;
    height: 100vh;
    position: absolute;
    inset: 0;
    /* z-index: -1; */
    opacity: 0;
    object-fit: cover;
    background-image: radial-gradient(circle at 50% 200vh,
            rgba(255, 214, 135, 0) 0,
            rgba(157, 47, 106, 0.5) 90vh,
            rgba(157, 47, 106, 0.8) 120vh,
            rgba(32, 31, 66, 0) 150vh);
    -webkit-text-fill-color: transparent;
    font-size: 6rem;
    background-clip: text;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 0 2rem;
    /* mobile */
    visibility: hidden;
}

.container_hero-2 {
    width: 100%;
    max-width: 1200px;
    margin: auto;
}

.hero-2-container p {
    max-width: 90%;
    font-size: 2rem;
}

.hero-2-container h3 {
    font-size: 4.5rem;
}

.hero-2-container h4 {
    font-size: 4.0rem;
}

.block_text p {
    text-align: justify;
}

.block_text.container_text_block {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    margin-top: 50px;
    margin-bottom: 50px;
    padding: 10px;
    box-sizing: border-box;
}

.block_text h2 {
    font-size: 7.5rem;
    line-height: 112%;
    letter-spacing: -10px;
    color: #ffeb90;
    margin-bottom: 80px;
    text-transform: uppercase;
}

.block_text h3 {
    font-size: 3rem;
    line-height: 120%;
    color: #ff1582;
    margin-bottom: 80px;
}

.block_text h4 {
    font-size: 2rem;
    line-height: 120%;
    color: #ff1582;
    margin-bottom: 80px;
}

.block_text p {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.5;
}

.character-section {
    display: flex;
    flex-flow: wrap;
    justify-content: space-between;
}

.character-section .image a {
    position: relative;
}

.comparison-full-image {
    position: relative;
}

.character-section .image_plus,
.comparison-full-image .arrow_modal {
    position: absolute;
    color: #fff9cb;
    background: #36364e;
    border-radius: 100%;
    left: 30px;
    bottom: 30px;
    display: flex;
    align-items: center;
    width: 60px;
    height: 60px;
    transition: transform 0.1s ease;
    /* Smooth transform for Lenis */
}

.comparison-full-image .arrow_modal {
    cursor: pointer;
    z-index: 10;
}

.comparison-full-image .arrow_modal:after {
    display: block;
    content: '';
    background-image: url('../img/arrow.svg');
    background-repeat: no-repeat;
    background-size: contain;
    width: 24px;
    height: 24px;
    margin: auto;
}

.character-section .image:hover .image_plus,
.comparison-full-image:hover .arrow_modal {
    color: #36364e;
    background: #fff9cb;
}

.comparison-full-image:hover .arrow_modal:after {
    background-image: url('../img/arrow_hover.svg');
}

.character-section .image_plus svg {
    margin: auto;
    width: 30px;
    height: auto;
}

.character-text {
    width: 100%;
    max-width: 50%;
}

.character-section_full {
    position: relative;
}

.block_image {
    position: relative;
}

.block_image.image_1 {
    height: 800px;
    margin-bottom: 200px;
}

.block_image.image_2 {
    height: 800px;
    margin-bottom: 200px;
    margin-top: 200px;
}

.block_text.container_text_block .image {
    position: relative;
    width: 100%;
    border-width: 0;
    border-color: #fff9cb00;
    box-sizing: border-box;
    border-style: solid;
    transition: 0.4s ease;
}

.block_text.container_text_block .image:hover {
    outline: none;
    border-width: .5vw;
    border-color: #fff9cb;
}

.block_text.container_text_block .image_1 {
    height: 900px;
    margin-top: 100px;
}

.block_text.container_text_block .images .image_2 {
    height: 100vh;
    position: absolute;
    width: 100%;
}

.block_text.container_text_block .images .image_3 {
    height: 600px;
    margin-top: 1020px;
}

.block_text.container_text_block .images .image_5 {
    height: 600px;
    top: 840px;
    left: 20px;
    position: absolute;
    width: 48%;
    margin-top: 5em;
}

.block_text.container_text_block .image_6 {
    height: auto;
    margin-top: 20px;
    margin-bottom: 300px;
}

.block_text.container_text_block .image_7 {
    height: auto;
    position: absolute;
    width: 48%;
    top: 1036px;
    left: 20px;
}

.block_text.container_text_block .images .image_8 {
    height: 400px;
    margin-top: 1020px;
}

.block_text.container_text_block .images {
    width: 100%;
    max-width: 47%;
}

.block_text.container_text_block .images4 {
    width: 100%;
    max-width: 47%;
    position: relative;
}

.block_text.container_text_block .images4 .image_2 {
    height: 100vh;
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.block_text.container_text_block .images10 {
    width: 100%;
    max-width: 47%;
}

.block_text.container_text_block .images10 .image_2 {
    height: 100vh;
    position: absolute;
    width: 77%;
    top: 0;
    box-sizing: border-box;
    margin-bottom: 10px;
    right: auto;
}

.block_text.container_text_block img {
    object-position: 80% center;
    object-fit: cover;
    height: 100%;
    transition: 0.4s ease;
}

.character-section.character_style_2 {}

.character-section.character_style_2 .images .image_2 {
    width: 48%;
    left: 20px;
}



#sidebar .tabs {
    display: flex;
    flex-direction: column;
}

#sidebar .tab-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    margin-bottom: 50px;
}

#sidebar .tab-list li {
    margin: 0;
}

#sidebar .tab-list li span {
    display: block;
    padding: 22px 25px;
    text-decoration: none;
    color: #ffffff;
    border-radius: 53px;
    font-size: 19px;
    line-height: 19px;
    font-weight: 600;
    cursor: pointer;
}

#sidebar .tab-list li span:hover {
    color: #fff9cb;
}

#sidebar .tab-list li.active span {
    background-color: #ffffff;
    color: #13131a;
}

#sidebar .tab-content {}

#sidebar .tab-pane {
    display: none;
}

#sidebar .tab-pane.active {
    display: block;
}

#sidebar .tab-pane ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#sidebar .tab-pane ul li span {
    display: block;
    padding: 5px 0;
    text-decoration: none;
    color: #0066cc;
}

#sidebar .tab-pane ul li span:hover {
    text-decoration: underline;
}

#sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 50%;
    background-color: #13131a;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 40;
    padding-top: 60px;
    padding-left: 80px;
    padding-right: 120px;
    padding-bottom: 60px;
    box-sizing: border-box;
}

/* Открытый сайдбар */
#sidebar.open {
    transform: translateX(0);
}

#sidebar .menu-content {
    padding: 50px;
    padding-right: 100px;
}

#sidebar h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

#sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#sidebar li {
    margin-bottom: 10px;
    display: flex;
    flex-flow: column;
    height: 100%;
}

#sidebar a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s;
    font-size: 2em;
    line-height: 0.64em;
    text-transform: uppercase;
    font-weight: 600;
}

#sidebar a:hover {
    color: #fff9cb;
}

.hamburger {
    position: fixed;
    top: 7%;
    right: 3%;
    left: auto;
    z-index: 100;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: auto;
    max-width: max-content;
}

.hamburger span {
    display: block;
    width: 33px;
    height: 7px;
    background-color: #ffffff;
    margin-bottom: 7px;
    transition: all 0.3s ease-in-out;
}

.hamburger:hover span {
    background-color: #fff9cb;
}

.hamburger.open span {
    width: 19px;
    height: 3px;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(49deg) translate(3px, 5px);
}

.hamburger.open span:nth-child(2) {
    transform: rotate(-48deg) translate(2px, -5px);
}

.image-comparison-wrapper {
    all: initial;
    /* Сбрасываем стили, чтобы минимизировать влияние внешних стилей */
    display: block;
    font-family: sans-serif;
}

.image-comparison-wrapper .comparison-container {
    position: relative;
    width: 100%;
    height: 800px;
    margin: 0 auto;
    overflow: hidden;
    isolation: isolate;
}

.image-comparison-wrapper .comparison-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: auto;
    user-select: none;
    transition: unset !important;
}

.image-comparison-wrapper .comparison-image-overlay {
    position: relative;
    clip-path: inset(0 50% 0 0);
}

.image-comparison-wrapper .comparison-image-overlay:after {
    display: block;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: darkred;
}

.image-comparison-wrapper .comparison-slider {
    position: absolute;
    top: 50%;
    left: 0px;
    width: 100%;
    transform: translateY(-50%);
    appearance: none;
    height: 10px;
    outline: none;
    cursor: pointer;
    z-index: 10;
    background-color: #ffffff00;
}

.image-comparison-wrapper .comparison-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ffffff00;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
}

.image-comparison-wrapper .comparison-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ffffff00;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
}

.image-comparison-wrapper .comparison-slider::-ms-thumb {
    width: 20px;
    height: 20px;
    background: #ffffff00;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.comparison-divider {
    position: absolute;
    background: #000000;
    z-index: 1;
    transition: top 0.1s ease;
    display: block;
    width: 2px;
    height: 100%;
    top: 0px;
}

.comparison-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #2ecc71;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    top: 49%;
    left: 0px;
    right: auto;
    padding: 10px;
    z-index: 2;
}

.copyright {
    display: block;
    text-align: center;
    margin-top: 50px;
    color: #000000;
}

.copyright a {
    text-decoration: none;
    color: #000000;
}

.block_full_margin_1 {
    margin-bottom: 450px;
}

.title_style_1 h2 {
    font-size: 5.5rem;
}

.image_comparison_block .block_text.container_text_block img {
    transition: unset;
}

.image_comparison_block .image-comparison-wrapper .comparison-image {
    transition: unset;
}

.block_text.container_text_block .images .image_4 {
    margin-top: 100px;
}

div.jx-controller {
    display: none;
    position: absolute;
    margin: auto;
    top: 0;
    bottom: 0;
    height: 14px;
    width: 14px;
    margin-left: -6px;
    background-color: #2ecc71;
    border-radius: 10px;
}

div.jx-arrow {
    display: none !important;
}

div.jx-control {
    background-color: rgb(0 0 0);
}

a.jx-knightlab {
    display: none !important;
}


.modal {
    display: none;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    transition: opacity 0.8s ease;
}


.modal.active_modal {
    display: block;
    visibility: visible;
}



.modal.active_modal .modal-content {
    position: relative;
    max-width: max-content;
    text-align: center;
    margin: 3% auto;
    border-radius: 4px;
    background-color: #000;
    padding: 4px;
}

.modal.active_modal .modal-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    /* Показываем изображение */
}

.modal.active_modal .modal-close {
    display: none;
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

.modal.active_modal .modal-prev,
.modal.active_modal .modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: block;
    width: 50px;
    height: 45px;
    opacity: 0;
    -webkit-transition: opacity .6s;
    -moz-transition: opacity .6s;
    -o-transition: opacity .6s;
    transition: opacity .6s;
}

.modal.active_modal .modal-content .modal-prev:hover,
.modal.active_modal .modal-content .modal-next:hover {
    opacity: 1;
}

.modal.active_modal .modal-prev {
    left: 10px;
    background-image: url(../lightbox/images/prev.png);
}

.modal.active_modal .modal-next {
    right: 10px;
    background-image: url(../lightbox/images/next.png);
}

.lb-data {
    display: none;
}

.hero-main-logo_mobile {
    display: none;
}

@media (max-width: 768px) {
    .hero-text {
        font-size: 2.5rem;
        margin-top: 20%;
    }

    .hero-text_2 {
        font-size: 1.5rem;
        margin-top: 5%;
    }

    .hero-main-container {
        /* Allow GSAP animations to control scale and background-size on mobile */
        position: relative;
    }

    .hero-main-logo_mobile {
        display: block !important;
        /* Show mobile logo */
    }

    .hero-main-logo {
        display: none;
    }

    .character-section {
        flex-direction: column;
        align-items: center;
    }

    .character-text {
        max-width: 100%;
        text-align: center;
    }

    .images,
    .images4,
    .images10 {
        max-width: 100%;
        margin-top: 20px;
    }

    .block_image {
        height: 50vh;
    }

    .block_text h2 {
        font-size: 4rem;
        letter-spacing: -5px;
    }

    .block_text h3,
    .block_text h4 {
        font-size: 1.8rem;
    }

    .block_text p {
        font-size: 1.2rem;
    }

    #sidebar {
        width: 100%;
        padding: 20px;
    }

    .hamburger {
        top: 5%;
        right: 5%;
    }

    .image-comparison-wrapper .comparison-container {
        height: auto !important;
        /* Dynamic height on mobile */
    }

    .modal-content {
        max-width: 90vw;
        max-height: 90vh;
        padding: 10px;
    }

    .modal-image {
        max-height: 70vh;
    }

    .scroll-indicator {
        bottom: 5%;
        width: 50px;
    }

    /* Video optimizations */
    video {
        width: 100%;
        height: auto;
    }
}

/* Tablet (768-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-text {
        font-size: 3.5rem;
    }

    .block_text h2 {
        font-size: 5.5rem;
    }

    /* Adjust other elements similarly */
}

/* General optimizations */
.bg-image {
    background-attachment: fixed;
    /* Parallax only on desktop */
    transition: transform 0.3s ease;
    /* Smoother */
}

@media (max-width: 768px) {
    .bg-image {
        background-attachment: scroll;
        /* No fixed on mobile for perf */
    }
}

/* Modal styles (refactored) */
.modal {
    transition: opacity 0.5s ease;
}

.modal.active_modal {
    opacity: 1;
}

.modal-content {
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.active_modal .modal-content {
    transform: scale(1);
}

/* Swipe for modals on mobile */
.modal {
    touch-action: pan-y;
    /* Allow vertical scroll */
}

/* Disable user selection on modal images and content */
.modal img,
.modal .modal-content,
.modal .modal-image {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Disable tap highlight on mobile/touch devices */
.modal .modal-prev,
.modal .modal-next,
.modal .modal-close,
.modal img {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.modal .modal-prev:focus,
.modal .modal-next:focus,
.modal .modal-close:focus {
    outline: none;
}

@media (max-width: 768px) {
    #definition .character-section.character_style_2 {
        display: flex !important;
        flex-direction: column !important;
    }

    #definition .character-section.character_style_2 .character-text {
        order: 1 !important;
        /* H2 first */
    }

    #definition .character-section.character_style_2 .images {
        order: 2 !important;
        /* Images second */
    }

    #definition .character-section.character_style_2>div:last-child {
        order: 3 !important;
        /* Text and content last */
    }
}

@media (min-width: 769px) {
    #colorcorrection h2 {
        font-size: 6.5rem;
    }
}

@media (max-width: 768px) {
    #turnindicators .character-section.character_style_2 {
        display: flex !important;
        flex-direction: column !important;
    }

    #turnindicators .character-section.character_style_2 .character-text {
        order: 1 !important;
        /* Text/H2 first */
    }

    #turnindicators .character-section.character_style_2>div:last-child {
        order: 2 !important;
        /* Next video/content second (after text) */
    }

    #turnindicators .character-section.character_style_2 .images {
        order: 3 !important;
        /* First video/images last */
    }
}

@media (max-width: 768px) {
    .character-text {
        margin-top: 5em;
    }
}