@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #FFFFFF;
    font-family: "Open Sans", sans-serif;
}

body::-webkit-scrollbar {
    display: none;
}

#particles-js {
    position: fixed;
    top: -5%; 
    left: -5%;
    width: 110%;
    height: 110%;
    z-index: -1;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505; 
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.preloader-content {
    text-align: center;
    width: 350px;
}


.preloader-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 900;
    font-size: 55px;
    letter-spacing: 12px;
    color: #FFFFFF;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    padding-left: 12px; 
}


.preloader-title span {
    display: inline-block;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px) scale(0.9);
    color: #FFFFFF;
}

.preloader-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.preloader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%; 
    background: #C73030; 
    box-shadow: 0 0 15px #C73030, 0 0 30px #C73030;
}
@media (max-width: 768px) {
    
    
    .preloader-content {
        width: 100%;
        max-width: 280px; 
        padding: 0 15px;  
    }

    
    .preloader-title {
        font-size: 34px;        
        letter-spacing: 8px;    
        padding-left: 8px;      
        margin-bottom: 20px;    
    }

    
    .preloader-bar {
        height: 2px; 
    }
}


@media (max-width: 359px) {
    .preloader-content {
        max-width: 240px;
    }
    .preloader-title {
        font-size: 28px;
        letter-spacing: 6px;
        padding-left: 6px;
    }
}

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
}

.container {
    max-width: 1200px;
    padding: 0 40px;
}

.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 20px 40px; 
    box-sizing: border-box;
    transition: 0.3s ease;
}

.header_inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%; 
    margin: 0;
}

/* =========================================
   ЛЕВЫЙ БЛОК: ЛОГОТИП
========================================= */
.logo-pill {
    display: flex;
    align-items: center;
    background: #3d3c3c; 
    backdrop-filter: blur(12px);       
    border: 1px solid #3f3e3e; 
    padding: 8px 25px 8px 10px;
    border-radius: 16px;
    text-decoration: none;
    transition: 0.3s ease;
}

.logo-pill:hover {
    background: #4e4e4e;
}

.logo-icon {
    width: 40px; 
    height: auto;
    margin-right: 12px;
    border-radius: 10px;
    
}



.logo-text {
    color: #FFFFFF;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 2px;
}

/* =========================================
   ПРАВЫЙ БЛОК: МЕНЮ + TELEGRAM
========================================= */
.nav-pill {
    display: flex;
    align-items: center;
    background: #3d3c3c;
    backdrop-filter: blur(12px);
    border: 1px solid #3f3e3e;
    border-radius: 50px;
    padding: 8px 8px 8px 40px; 
    transition: 0.3s ease;
}

.nav {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-right: 30px; 
}


.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 15px; 
    letter-spacing: 1.5px;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link.active::after {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: #C73030;
    border-radius: 50%;
    position: absolute;
    right: -8px;
    bottom: 2px;
    box-shadow: 0 0 6px #C73030; 
}


.nav-link:hover {
    color: #FFFFFF;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}


.red-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: #C73030;
    border-radius: 50%;
    position: absolute;
    right: -8px;
    bottom: 2px;
}


.tg-btn {
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 70px; 
    height: 42px;
    border-radius: 16px;
    overflow: hidden; 
    text-decoration: none;
    
    transition: width 1s cubic-bezier(0.25, 1, 0.5, 1), background 1s ease;
}

.tg-icon {
    flex-shrink: 0; 
}

.tg-text {
    color: #FFFFFF;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap; 
    
    
    opacity: 0;
    max-width: 0;
    margin-left: 0;
    transform: translateX(-15px); 
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}


.tg-btn:hover {
    background: #1a1a1a;
    width: 170px; 
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.tg-btn:hover .tg-text {
    opacity: 1;
    max-width: 150px;
    margin-left: 10px; 
    transform: translateX(0); /
}


.header.scrolled .logo-pill, 
.header.scrolled .nav-pill {
    background: #3d3c3ca4;
    border-color: #3f3e3e;
}

/* Прячем кнопку бургера на десктопе */
.burger-btn {
    display: none;
}

.mobile-nav-pill {
    display: none;
}

/* =========================================
   АДАПТИВ (Планшеты и Мобилки)
========================================= */
@media (max-width: 991px) {

    .logo-pill {
        position: absolute;
        left: -20px;
        top: 25px; 
        border-left: none;
        border-radius: 0 16px 16px 0;
        padding: 8px 12px 8px 20px;
    }

    
    .logo-text {
        display: none;
    }

    
    .logo-icon {
        margin-right: 0;
    }
    
    .nav-pill {
        display: none !important;
    }

    
    .header {
        padding: 15px 20px; 
    }

    .header_inner {
        position: relative;
    }

    
   .burger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 70px;
        height: 48px;
        background: #3d3c3c;
        border: 1px solid #FFFFFF;
        border-right: none;
        border-radius: 50px 0 0 50px;
        cursor: pointer;
        position: absolute;
        right: -20px;
        top: 25px; 
        z-index: 1001;
        padding-left: 8px;
    }

    .burger-btn svg {
        transition: transform 0.3s ease;
    }
    
    
    

    
    .mobile-nav-pill {
        position: fixed;
        top: 90px; 
        right: -100%; 
        width: 240px;
        background: rgba(61, 60, 60, 0.95);
        backdrop-filter: blur(15px);
        border: 1px solid #3f3e3e;
        border-radius: 24px;
        display: flex;
        flex-direction: column;
        padding: 30px 25px;
        transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: 1000;
        box-shadow: -5px 10px 30px rgba(0, 0, 0, 0.5);
    }

    /* Класс, который JS добавляет при клике */
    .mobile-nav-pill.active {
        right: 20px; 
    }

    
    .mobile-nav {
        display: flex;
        flex-direction: column;
        gap: 25px;
    }

    .mobile-nav-link {
        color: #FFFFFF;
        text-decoration: none;
        font-size: 16px;
        font-family: "Montserrat", sans-serif;
        font-weight: 500;
        position: relative;
        display: inline-block;
        width: fit-content;
        letter-spacing: 1px;
    }

    /* Красная точка активного раздела */
    .mobile-nav-link.active::after {
        content: "";
        display: inline-block;
        width: 5px;
        height: 5px;
        background-color: #C73030;
        border-radius: 50%;
        position: absolute;
        right: -12px;
        bottom: 5px;
        box-shadow: 0 0 6px #C73030;
    }

    /* Кнопка ТГ внутри мобильного меню */
    .mobile-tg-btn {
        background: #000000;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        width: 100%;
        height: 46px;
        border-radius: 14px;
        color: #FFFFFF;
        text-decoration: none;
        font-family: "Montserrat", sans-serif;
        font-size: 14px;
        font-weight: 500;
        margin-top: 35px;
        transition: background 0.3s ease;
    }

    /* 4. Затемнение фона при открытом меню */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: 0.3s ease;
        z-index: 999;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

.hero {
    background: transparent;
    height: 100vh;
    display: flex;
    align-items: center;
    perspective: 1000px;
    overflow: hidden; 
    position: relative; 
    box-sizing: border-box;
}

.hero_inner {
    width: 100%;
    position: relative;
    z-index: 2; 
}

.hero_left {
    max-width: 900px;
}

.hero_left h1 {
    font-size: 120px;
    line-height: 1.1;
    font-family: "Montserrat", sans-serif;
    font-weight: 900;
}

.glow-word { display: inline-block; }
.glow-word span {
    display: inline-block;
    color: #FFFFFF;
    transition: all 0.3s ease;
    cursor: default;
}
.glow-word span:hover {
    color: #c73030a1;
    text-shadow: 0 0 10px #c73030a1, 0 0 20px #c73030a1, 0 0 40px #c73030a1, 0 0 80px #c73030a1;
    transform: translateY(-5px) scale(1.1);
}

.hero_left p {
    margin-top: 60px;
    font-size: 25px;
    color: #aaa;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
}

/* =========================================
   КНОПКА 
========================================= */
.btn { position: relative; display: inline-block; padding: 12px 30px; margin: 50px 0 0 15px; background: transparent; border: none; cursor: pointer; color: #FFFFFF; font-size: 25px; letter-spacing: 2px; font-family: "Montserrat", sans-serif; font-weight: 600; overflow: hidden; }
.btn:focus { outline: none; }
.btn::before, .btn::after { content: ""; position: absolute; background: #C73030; transition: 0.4s; }
.btn::before { height: 2px; width: 0; top: 0; left: 0; }
.btn::after { height: 2px; width: 0; bottom: 0; right: 0; }
.btn span::before, .btn span::after { content: ""; position: absolute; background: #C73030; transition: 0.4s; }
.btn span::before { width: 2px; height: 0; left: 0; bottom: 0; }
.btn span::after { width: 2px; height: 0; right: 0; top: 0; }
.btn:hover::before, .btn:hover::after { width: 100%; }
.btn:hover span::before, .btn:hover span::after { height: 100%; }
.btn:hover { color: #C73030; }

@media (max-width: 991px) {
    .hero_inner {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .hero_left {
        max-width: 100%;
        text-align: center; 
        display: flex;
        flex-direction: column;
        align-items: center; 
        padding: 0 20px; 
    }

    .hero_left h1 {
        font-size: 75px; 
    }

    .hero_left p {
        margin-top: 40px; 
        font-size: 22px;
        br {
            display: none; 
        }
    }

    .btn {
        margin: 40px 0 0 0; 
        font-size: 22px;
    }
}

/* Мобильные телефоны */
@media (max-width: 576px) {
    .hero_left h1 {
        font-size: 42px;
        line-height: 1.2;
    }

    
    .hero_left p {
        margin-top: 40px; 
        font-size: 16px;
        line-height: 1.5; 
    }

    
    .btn {
        margin: 45px 0 0 0; 
        font-size: 18px;
        padding: 12px 28px;
    }
}









/* 2й секшн */
/* ==========================================================================
   СЕКЦИЯ "О НАС" 
   ========================================================================== */
.about {
    background: transparent;
    border: 2px solid #3d3c3c; 
}

.about_block {
    margin: 0 auto;
    padding: 80px 40px;
    background: #111; 
    border-radius: 20px; 
}

.about_content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

/* --- Левая часть со свечением --- */
.left_cnt h2 {
    font-size: 42px;
    line-height: 1.6;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    margin: 0;
    letter-spacing: 2px;
}

.glow-text {
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.3); /* Легкое белое свечение */
}

.glow-red {
    color: #c73030;
    text-shadow: 0 0 15px rgba(199, 48, 48, 0.6); /* Яркое красное свечение */
}

/* --- Правая часть с текстом --- */
.right_cnt {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.right_cnt p {
    font-size: 20px;
    line-height: 1.8;
    font-family: "Montserrat", sans-serif;
    color: #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 8px 0;
}

/* --- Кнопка "Для связи"  --- */
.contact-popover-wrapper {
    position: relative;
    margin-top: 40px;
    align-self: flex-end; /* Прижимаем кнопку к правому краю, как на макете */
}

.contact-pill-btn {
    background-color: #c73030;
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 6px 6px 6px 24px;
    font-size: 13px;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.contact-pill-btn:hover {
    background-color: #a32424;
    box-shadow: 0 0 20px rgba(199, 48, 48, 0.5);
}

.arrow-circle {
    background-color: #fff;
    color: #c73030;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.contact-pill-btn:hover .arrow-circle {
    transform: translateX(3px); 
}

/* --- POPOVER (Всплывающее меню контактов) --- */
.contact-popover {
    position: absolute;
    bottom: calc(100% + 15px); /* Появляется строго над кнопкой */
    right: 0;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    min-width: 260px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 100;
}

/* Треугольник указывающий на кнопку */
.contact-popover::after {
    content: "";
    position: absolute;
    bottom: -6px;
    right: 40px;
    width: 12px;
    height: 12px;
    background: rgba(18, 18, 18, 0.95);
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    transform: rotate(45deg);
}

.contact-popover.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.popover-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.popover-item:last-child {
    margin-bottom: 0;
}

.popover-icon {
    color: #c73030;
    font-size: 18px;
}

.popover-item a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-family: "Montserrat", sans-serif;
    transition: color 0.3s ease;
}

.popover-item a:hover {
    color: #c73030;
}

/* Адаптивность для телефонов */
@media (max-width: 992px) {
    .about_content {
        flex-direction: column;
        text-align: center;
    }
    .right_cnt {
        align-items: center;
    }
    .left_cnt h2 {
        font-size: 32px;
    }
    .contact-popover-wrapper {
        align-self: center; /* Центрируем кнопку на мобилках */
    }
    .contact-popover {
        right: 50%;
        transform: translate(50%, 15px);
    }
    .contact-popover.active {
        transform: translate(50%, 0);
    }
    .contact-popover::after {
        right: 50%;
        margin-right: -6px;
    }
}

/* 3й секшн */
/* ==========================================================================
    SELECTED WORK
   ========================================================================== */
.selected-work {
    background-color: #111; 
    padding: 140px 0; 
    color: #fff;
    font-family: "Montserrat", sans-serif;
    border: 2px solid #3d3c3c; 
}

.selected-work .container {
    max-width: 1440px; 
    margin: 0 auto;
    padding: 0 30px;
}

.section-subtitle {
    font-size: 28px;
    letter-spacing: 3px; 
    color: #c73030; 
    text-transform: uppercase;
    margin-bottom: 50px;
    font-weight: 600;
}
/* ==========================================================================
   АППАРАТНЫЙ СЛАЙДЕР РАБОТ 
   ========================================================================== */
.works-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 25px; 
    margin-bottom: 80px; 
    width: 100%;
}

.works-slider-wrap {
    overflow: hidden; 
    width: 100%;
    padding: 15px 0;
}

.works-slider-track {
    display: flex;
    gap: 35px; 
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform; 
}


.works-slider-track .work-item {
    flex: 0 0 calc(33.333% - 24px); 
    min-width: 320px;
    background-color: #161616;
    border-radius: 8px; 
    overflow: hidden;
    aspect-ratio: 16 / 10.5; 
    box-shadow: 0 15px 45px rgba(0,0,0,0.6);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
    cursor: pointer;
    border: 1px solid #222;
}

.works-slider-track .work-item:hover {
    transform: translateY(-12px); 
    border-color: #444;
    box-shadow: 0 25px 55px rgba(0,0,0,0.8);
}

.work-img-wrap {
    width: 100%;
    height: 100%;
}

.work-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}


.slider-arrow {
    background: #161616;
    border: 1px solid #333;
    color: #fff;
    width: 60px; /* Было 50px */
    height: 60px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    flex-shrink: 0;
}

.slider-arrow:hover {
    background: #c73030;
    border-color: #c73030;
    box-shadow: 0 0 20px rgba(199, 48, 48, 0.5);
}

/* Адаптивность слайдера под планшеты и мобилки */
@media (max-width: 992px) {
    .works-slider-track .work-item {
        flex: 0 0 100%; /* По 1 карточке на экране */
    }
}

/* ==========================================================================
   ПОДВАЛ СЕКЦИИ (ТЕКСТ + КНОПКА CONTACT US)
   ========================================================================== */
.selected-work-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 80px;
}

.footer-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 1px;
    margin: 0;
}

.red-text {
    color: #c73030;
}

.contact-us-btn {
    background: transparent;
    border: 1px solid #c73030;
    color: #fff;
    padding: 15px 35px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-us-btn:hover {
    background-color: #c73030;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.4);
}

.contact-us-btn .arrow {
    font-size: 18px;
}

/* ==========================================================================
    МОДАЛКА СВЯЗИ 
   ========================================================================== */
.modal-contact {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-contact.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-content-wrap {
    position: relative;
    background-color: #121212;
    border: 1px solid #222;
    padding: 45px;
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    transform: translateY(30px);
    transition: transform 0.4s ease;
    color: #fff;
}

.modal-contact.active .modal-content-wrap {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close-btn:hover {
    color: #c73030;
}

.modal-content-wrap h3 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 10px;
}

.modal-content-wrap p {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 30px;
}

.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form input, 
.modal-form textarea {
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid #333;
    padding: 14px;
    color: #fff;
    font-size: 14px;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s ease;
}

.modal-form input:focus, 
.modal-form textarea:focus {
    border-color: #c73030;
}

.submit-modal-btn {
    width: 100%;
    padding: 15px;
    background-color: #c73030;
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-modal-btn:hover {
    background-color: #e22d2d;
    color: #fff;
}

.link-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
    margin-top: 20px;
    width: 100%;
    text-align: center;
    transition: color 0.3s ease;
}

.link-btn:hover {
    color: #c73030;
}

.brief-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    max-height: 250px;
    overflow-y: auto;
}

.brief-list li {
    padding: 15px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    margin-bottom: 10px;
    border-radius: 4px;
    color: #ddd;
    font-size: 14px;
}

.brief-list::-webkit-scrollbar {
    width: 4px;
}
.brief-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 2px;
}

/* ==========================================================================
   НОВАЯ МОДАЛКА КЕЙСОВ (PROJECT VIEW MODAL) 
   ========================================================================== */
.modal-project {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-project.active {
    opacity: 1;
    visibility: visible;
}

.project-modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
}


.project-modal-container {
    position: relative;
    background-color: #121212;
    width: 94%;
    max-width: 1380px; 
    z-index: 2;
    margin-top: -2vh;
    
    overflow: visible; 
}


.project-modal-close {
    position: absolute;
    top: -45px; 
    right: 0;
    background: transparent;
    border: none;
    color: #999;
    font-size: 36px;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 20;
}

.project-modal-close:hover {
    color: #c73030;
    transform: rotate(90deg);
}

/* ЭЛЕГАНТНЫЕ СТРЕЛКИ НАВИГАЦИИ  */
.project-inner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(25, 25, 25, 0.6);
    border: 1px solid #333;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%; 
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 15;
}

.project-inner-arrow:hover {
    background: #c73030;
    border-color: #c73030;
    color: #fff;
    box-shadow: 0 0 20px rgba(199, 48, 48, 0.6);
}


.inner-prev { left: -85px; }
.inner-next { right: -85px; }


.project-modal-content {
    display: flex;
    flex-direction: row;
    min-height: 600px;
    border-radius: 12px;
    overflow: hidden; 
    border: 1px solid #222;
}


.project-modal-left {
    flex: 1.3;
    background-color: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-right: 1px solid #1c1c1c;
}

.project-modal-left img {
    width: 100%;
    object-fit: cover;
    display: block;
}


.project-modal-right {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: "Montserrat", sans-serif;
    background-color: #121212;
}


.project-modal-right h3 {
    font-size: 42px; 
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
    color: #fff;
    line-height: 1.2;
}


.project-modal-section {
    margin-bottom: 30px;
}

.section-label {
    display: block;
    font-size: 13px; 
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #c73030;
    margin-bottom: 12px;
    font-weight: 600;
}


.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stack-pill {
    background-color: #1a1a1a;
    border: 1px solid #333;
    padding: 8px 18px; 
    font-size: 14px; 
    color: #ddd;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.stack-pill:hover {
    border-color: #c73030;
    color: #fff;
    background-color: #1f1414;
}


.desc-bg {
    background: #171717;
    padding: 28px;
    border-radius: 8px;
    border: 1px solid #222;
}

#projectModalDesc {
    font-size: 16px; 
    color: #cccccc;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 1600px) and (min-width: 992px) {
    /* Переносим стрелки внутрь модалки, чтобы они не упирались в края экрана */
    .inner-prev { 
        left: 20px; 
    }
    .inner-next { 
        right: 20px; 
    }

    .project-inner-arrow {
        width: 50px;  
        height: 50px;
        font-size: 18px;
        background: rgba(18, 18, 18, 0.75); 
        backdrop-filter: blur(8px);
        border-color: #333;
    }
    
   
    .project-modal-right {
        padding: 60px 80px 60px 60px; 
    }
}

@media (max-width: 992px) {
    .project-modal-content {
        flex-direction: column;
    }
    
    .project-modal-container {
        margin-top: 0;
        max-height: 95vh; 
        overflow-y: auto;
        position: relative;
    }

    /* ==========================================================================
       КРЕСТИК НА МОБИЛКЕ: 
       ========================================================================== */
    .project-modal-close {
        top: 15px;
        right: 15px;
        background: rgba(18, 18, 18, 0.8); 
        backdrop-filter: blur(5px); 
        border: 1px solid #333;
        width: 44px;  
        height: 44px;
        border-radius: 50%; 
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 28px;
        color: #fff;
        z-index: 100; 
    }

    
    .project-inner-arrow {
        top: 25%; 
        width: 44px;
        height: 44px;
        font-size: 18px;
        background: rgba(18, 18, 18, 0.7);
    }
    
    
    .inner-prev { 
        left: 15px; 
    }
    .inner-next { 
        right: 15px; 
    }

    
    .project-modal-right {
        padding: 30px 20px;
    }
    .works-grid {
        grid-template-columns: 1fr;
    }
    .selected-work-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }
    .footer-title {
        font-size: 30px;
    }
}



/* 4й секшн карточки */
.services {
    width: 100%;
    max-width: 2000px;
    margin: 100px auto;
    padding: 0 40px;
}

.cards {
    display: flex;
    gap: 20px;
    height: 450px; 
    width: 100%;
}

.card {
    flex: 1; 
    position: relative;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.05); 
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    padding: 40px;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1), background 0.4s;
    
    z-index: 1; 
}


.card-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s ease;
    transform: scale(1.1);
}

.card:hover .card-bg-img {
    opacity: 0.15; 
    transform: scale(1);
}
/* ------------------------------------------- */

.card:hover {
    flex: 3; 
    background: #121212; 
    border-color: rgba(199, 48, 48, 0.2); 
}

.number {
    position: absolute;
    top: -20px;
    margin-top: 5px;
    left: 20px;
    font-size: 180px;
    font-weight: 300;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.267);
    transition: all 0.6s ease;
    pointer-events: none;
    font-family: "Montserrat", sans-serif;
    z-index: 2;
}

.card:hover .number {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    transform: translateX(10px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 0;
    transition: margin-bottom 0.4s ease;
    z-index: 2;
    position: relative;
}

.card:hover .card-header {
    margin-bottom: 15px; 
}

.red-line {
    width: 30px;
    height: 2px;
    background: #C73030;
    transition: width 0.4s ease;
}

.card:hover .red-line {
    width: 60px; 
}

.card-header h3 {
    font-size: 24px;
    letter-spacing: 1px;
    white-space: nowrap;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
}

.description {
    font-size: 15px;
    line-height: 1.5;
    color: #888;
    max-width: 400px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    max-height: 0;
    transition: all 0.5s ease;
    font-family: "Open Sans", sans-serif;
    z-index: 2;
    position: relative;
}

.card:hover .description {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 100px; 
    transition-delay: 0.1s; 
}

.arrow-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: #C73030;
    opacity: 0;
    transform: translateX(-20px) rotate(-45deg);
    transition: all 0.5s ease;
    z-index: 2;
}

.card:hover .arrow-btn {
    opacity: 1;
    transform: translateX(0) rotate(0deg); 
}

/* ==========================================
   СТИЛИ ДЛЯ МОДАЛКИ SERVICES
========================================== */
.service-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    pointer-events: none;
}

.service-details-modal.active {
    visibility: visible;
    pointer-events: auto;
}

.service-details-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #050505; 
    transform: translateY(100%); 
}

.service-details-content-wrap {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 1200px;
    height: 70vh;
    display: flex;
    gap: 60px;
    align-items: center;
    opacity: 0; /* Для GSAP */
}

.service-details-left {
    flex: 1;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.service-details-left img {
    height: 100%;
    object-fit: cover;
}

.service-details-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.service-details-right h2 {
    font-family: "Montserrat", sans-serif;
    font-size: 50px;
    font-weight: 800;
    margin-bottom: 30px;
    color: #C73030;
    min-height: 60px; 
    letter-spacing: 2px;
}

.service-details-right p {
    font-family: "Open Sans", sans-serif;
    font-size: 18px;
    line-height: 1.8;
    color: #fff;
    min-height: 150px;
}

.service-details-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.service-details-close:hover {
    color: #C73030;
}

#sdModalDesc {
    white-space: pre-wrap; 
}

@media (max-width: 992px) {
    
    
    .services {
        padding: 0 20px; 
        margin: 60px auto;
    }

    .cards {
        flex-direction: column; /* Карточки встают друг под друга */
        height: auto;           /* Сбрасываем фиксированную десктопную высоту */
        gap: 15px;              /* Расстояние между карточками */
    }

    .card {
        flex: none;
        width: 100%;
        height: 200px;          /* Комфортная фиксированная высота для вертикального списка */
        padding: 30px 20px;
    }

    /* Уменьшаем гигантский номер на фоне, чтобы он не перекрывал текст */
    .number {
        font-size: 110px;
        top: -10px;
        left: 10px;
    }

    .card-header h3 {
        font-size: 20px;
    }

    /* Делаем красную линию сразу длинной */
    .card .red-line {
        width: 50px;
    }

    /* 2. ПОДДСВЕТКА СТРЕЛКИ: Имитируем ховер по умолчанию для мобильных юзеров */
    .card .arrow-btn {
        opacity: 1;
        transform: translateX(0) rotate(0deg);
        bottom: 25px;
        right: 25px;
        width: 44px;
        height: 44px;
        font-size: 18px;
        border-color: rgba(199, 48, 48, 0.7); /* Делаем рамку ярче */
        background: rgba(199, 48, 48, 0.15); /* Легкое свечение внутри круга */
    }


    .service-details-bg {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh !important; /* Строго на всю высоту экрана */
    }

    /* Настройка скролла для контента */
    .service-details-modal {
        align-items: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .service-details-content-wrap {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        height: auto;
        gap: 0;
        margin-top: 0;
        padding: 0;
    }

    /* 1. УМЕНЬШАЕМ КАРТИНКУ: Срезали высоту почти в два раза */
    .service-details-left {
        width: 100%;
        height: 160px; /* Было 280px — теперь картинка аккуратная и не занимает весь экран */
        border-radius: 0;
    }

    .service-details-left img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* 2. СЖИМАЕМ ТЕКСТОВЫЙ БЛОК: Меньше отступы и шрифты */
    .service-details-right {
        width: 100%;
        padding: 20px 15px; /* Уменьшили внутренние отступы, чтобы сэкономить место */
        box-sizing: border-box;
    }

    /* Компактный заголовок */
    .service-details-right h2 {
        font-size: 22px; /* Было 28px — уменьшили размер */
        margin-bottom: 12px; /* Прижали ближе к списку */
        min-height: auto;
        letter-spacing: 1px;
    }

    /* Плотный и читабельный список услуг */
    .service-details-right p {
        font-size: 14px; /* Было 15px/18px */
        line-height: 1.5; /* Сделали межстрочный интервал более плотным */
        min-height: auto;
    }

    /* Компактный крестик закрытия поверх уменьшенной картинки */
    .service-details-close {
        top: 12px;
        right: 12px;
        font-size: 24px;
        background: rgba(5, 5, 5, 0.7); /* Чуть плотнее фон под крестиком */
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 100;
    }
}

/* footer */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.main-content {
    flex: 1 0 auto;
}

.footer {
    flex: 0 0 auto;
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 0;
    z-index: 1000;
    position: relative;
}

.footer_inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
}

.footer_links {
    display: flex;
    gap: 20px;
}

.footer_links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer_links a:hover {
    color: #C73030; 
}

@keyframes glow {
    0% {
        color: #FFFFFF;
        text-shadow: none;
    }
    50% {
        color: #C73030;
        text-shadow: 0 0 10px #C73030;
    }
    100% {
        color: #FFFFFF;
        text-shadow: none;
    }
}