/* ==========================================================================
   СОДЕРЖАНИЕ
   1. Основные настройки ............ Переменные, сброс стилей, общие стили
   2. Навигация .................... Меню, мобильная навигация
   3. Главная страница ............. Hero, услуги, преимущества и т.д.
   4. Портфолио ................... Стили страницы портфолио
   5. Подвал ...................... Footer и его компоненты
   6. Модальные окна .............. Стили для модальных окон
   7. Вспомогательные классы ...... Утилиты и общие компоненты
   8. Медиа запросы ............... Адаптивные стили
========================================================================== */

/* ==========================================================================
   1. ОСНОВНЫЕ НАСТРОЙКИ
========================================================================== */
:root {
    --primary-color: #2B7239;
    --secondary-color: #1D4D26;
    --accent-color: #3C9F4F;
    --text-color: #333333;
    --light-bg: #F5F8F5;
    --white: #ffffff;
    --light-gray: #F5F5F5;
    --border-color: #E5E5E5;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    width: 100%;
}

/* ==========================================================================
   2. НАВИГАЦИЯ
========================================================================== */
/* 2.1 Основная навигация */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: white;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-img {
    height: 35px;
    width: auto;
}

/* Десктопное меню */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
    display: block;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu li.active a {
    color: var(--primary-color);
}

/* Мобильное меню */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1002;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: white;
        padding: 80px 20px 120px; /* Увеличил нижний padding */
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
        margin-left: 0;
    }

    .nav-links.active {
        display: block;
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu li {
        width: 100%;
        margin: 0;
    }

    .nav-menu a {
        padding: 12px;
        font-size: 16px;
        width: 100%;
        display: block;
    }

    body.menu-open {
        overflow: hidden;
    }

    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    .menu-overlay.active {
        display: block;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .mobile-contacts {
        position: fixed;
        bottom: 0;
        right: 0;
        width: 80%;
        max-width: 400px;
        background: white;
        padding: 15px 20px;
        z-index: 1002;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
}

@media (min-width: 769px) {
    .nav-links {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        background: transparent;
        overflow: visible;
        display: flex !important;
        margin-left: auto;
    }

    .mobile-menu-btn,
    .menu-overlay {
        display: none;
    }

    .mobile-only-logo {
        display: none !important;
    }

    .nav-menu {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
}

.nav-scrolled {
    padding: 0.8rem 7%;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.02);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    font-size: 14px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0.8;
}

.nav-menu a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.nav-menu li.active a {
    color: var(--primary-color);
    opacity: 1;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links li.active a {
    color: var(--primary-color);
    opacity: 1;
}

.nav-links li.active a::after {
    width: 100%;
}

/* 2.2 Мобильное меню */
.mobile-menu-btn {
    display: none; /* По умолчанию скрыто */
}

/* Показываем мобильное меню только при ширине экрана меньше 1400px */
@media (max-width: 1400px) {
    /* Скрываем стандартное меню */
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        padding: 80px 2rem 2rem;
        z-index: 1001;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    }

    /* Показываем мобильное меню при активации */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        right: 0;
    }

    /* Затемнение фона при открытом меню */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }

    .menu-overlay.active {
        display: block;
    }

    /* Стили для кнопки бургера */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }

    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--primary-color);
        transition: all 0.3s ease;
    }

    /* Анимация кнопки бургера */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Фиксируем body при открытом меню */
    body.menu-open {
        overflow: hidden;
    }
}

/* Анимация кнопки меню */
.mobile-menu-btn.active {
    transform: rotate(180deg);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--accent-color);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--accent-color);
}

/* Анимация пунктов меню */
@keyframes navItemShow {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-links li {
    animation: navItemShow 0.5s ease forwards;
    opacity: 0;
}

.nav-links li:nth-child(1) { animation-delay: 0.1s; }
.nav-links li:nth-child(2) { animation-delay: 0.2s; }
.nav-links li:nth-child(3) { animation-delay: 0.3s; }
.nav-links li:nth-child(4) { animation-delay: 0.4s; }
.nav-links li:nth-child(5) { animation-delay: 0.5s; }
.nav-links li:nth-child(6) { animation-delay: 0.6s; }

/* Навигация с контактами */
.nav-left {
    display: flex;
    align-items: center;
        gap: 2rem;
    }

.nav-contacts {
    display: flex;
    gap: 1.5rem;
}

.nav-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-contact-item:hover {
    color: var(--primary-color);
}

.nav-contact-item svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

/* Мобильная версия */
@media (max-width: 1024px) {
    .nav-contacts {
        display: none;
    }
}

/* ==========================================================================
   3. ГЛАВНАЯ СТРАНИЦА
========================================================================== */
/* 3.1 Главный экран (Hero) */
.hero {
    height: 75vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 140px 10% 80px;
    position: relative;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(
            135deg,
            rgba(27, 75, 37, 0.97) 0%,
            rgba(43, 114, 57, 0.9) 50%,
            rgba(60, 159, 79, 0.85) 100%
        ),
        url('img/offis.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    max-width: 800px;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    max-width: 600px;
    font-size: 1.2rem;
    margin-bottom: 1.8rem;
    opacity: 0.9;
}

.cta-button {
    padding: 1.2rem 2.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    text-align: center;
}

.cta-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* 3.2 Секция услуг */
#services {
    padding: 8rem 7%;
    background-color: var(--light-bg);
}

#services h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1rem;
}

#services h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.service-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    border-bottom: 3px solid var(--accent-color);
    box-shadow: 0 10px 40px rgba(43, 114, 57, 0.15);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.2rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.service-card p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
}

/* 3.3 Секция преимуществ */
#advantages {
    padding: 6rem 7%;
    background-color: white;
    margin-top: -2rem;
}

.advantages-container {
    max-width: 1400px;
    margin: 0 auto;
}

#advantages h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1rem;
}

#advantages h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.advantage-card {
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.advantage-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(43, 114, 57, 0.1);
}

.advantage-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-bg);
    border-radius: 50%;
    color: var(--primary-color);
}

.advantage-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.advantage-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 3.4 Секция о компании */
#about {
    padding: 6rem 7%;
    background-color: white;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1rem;
}

.about-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.about-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--primary-color);
}

.about-feature svg {
    min-width: 24px;
}

.about-feature span {
    font-size: 1.1rem;
    font-weight: 500;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    object-fit: cover;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* 3.5 Секция "Почему мы" */
#why-us {
    padding: 6rem 7%;
    background-color: var(--light-bg);
}

.why-us-container {
    max-width: 1400px;
    margin: 0 auto;
}

#why-us h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1rem;
}

#why-us h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.why-us-card {
    padding: 2rem;
        text-align: center;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.why-us-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(43, 114, 57, 0.1);
}

.why-us-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.why-us-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.why-us-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 3.6 Секция "Как мы работаем" */
#workflow {
    padding: 6rem 7%;
    background-color: white;
}

.workflow-container {
    max-width: 1400px;
    margin: 0 auto;
}

#workflow h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1rem;
}

#workflow h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 220px;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.workflow-step:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(43, 114, 57, 0.1);
}

.step-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-bg);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.step-number {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.step-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.step-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.step-arrow {
    color: var(--primary-color);
    opacity: 0.3;
    display: flex;
    align-items: center;
}

/* 3.7 Секция "Оставьте заявку" */
#contact-form {
    padding: 6rem 7%;
    background-color: var(--light-bg);
    position: relative;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info-block h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.contact-info-block p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.contact-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--primary-color);
}

.feature svg {
    min-width: 24px;
}

.feature span {
    font-size: 1.1rem;
    font-weight: 500;
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(43, 114, 57, 0.1);
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.privacy-policy {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* ==========================================================================
   4. ПОРТФОЛИО
========================================================================== */
.portfolio-hero {
    padding-top: 120px; /* Учитываем высоту шпки */
    text-align: center;
    background: linear-gradient(rgba(27, 75, 37, 0.9), rgba(43, 114, 57, 0.85));
    color: white;
    padding: 120px 7% 60px;
}

.portfolio-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.portfolio-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .portfolio-hero {
        padding: 100px 5% 40px;
    }
    
    .portfolio-hero h1 {
        font-size: 2rem;
    }
    
    .portfolio-hero p {
        font-size: 1rem;
    }
}

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    background: var(--light-bg);
    color: var(--text-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.portfolio-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.portfolio-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(43, 114, 57, 0.2);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.portfolio-item-content {
    padding: 1.5rem;
    background: white;
}

.portfolio-item h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.portfolio-item p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* Адаптивность */
@media (max-width: 768px) {
    .portfolio-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .portfolio-items {
        padding: 0 1rem;
        gap: 1rem;
    }
}

/* Стили для слайдера в портфолио */
.portfolio-slider {
    position: relative;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    background: var(--light-bg);
    height: 400px;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.1);
}

.slider-container {
    display: flex;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
}

.slider-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    filter: brightness(0.95);
    transition: all 0.5s ease;
}

.slider-container img:hover {
    filter: brightness(1.05);
    transform: scale(1.02);
}

.slider-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, 
        rgba(0,0,0,0.4) 0%,
        rgba(0,0,0,0.2) 40%,
        transparent 100%);
    pointer-events: none;
}

/* Счетчик слайдов */
.slider-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    z-index: 2;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.slider-counter .current {
    color: var(--accent-color);
    font-weight: 600;
}

.slider-counter .total {
    opacity: 0.8;
}

/* Кнопки навигации */
.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.98);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
}

.portfolio-slider:hover .slider-prev,
.portfolio-slider:hover .slider-next {
    opacity: 1;
}

.slider-prev {
    left: 20px;
    transform: translate(-20px, -50%);
}

.slider-next {
    right: 20px;
    transform: translate(20px, -50%);
}

.portfolio-slider:hover .slider-prev {
    transform: translate(0, -50%);
}

.portfolio-slider:hover .slider-next {
    transform: translate(0, -50%);
}

.slider-prev:hover,
.slider-next:hover {
    background: white;
    transform: scale(1.15) translateY(-50%) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    color: var(--accent-color);
}

.slider-prev svg,
.slider-next svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.slider-prev:hover svg {
    transform: translateX(-3px);
}

.slider-next:hover svg {
    transform: translateX(3px);
}

/* Мобильная версия */
@media (max-width: 768px) {
    .portfolio-slider {
        height: 300px;
    }

    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
        opacity: 1;
    }

    .slider-counter {
        bottom: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   5. ПОДВАЛ
========================================================================== */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 5rem 7% 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-info {
    max-width: 400px;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.footer-links h4,
.footer-contact h4,
.footer-schedule h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 1rem;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--accent-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item svg {
    min-width: 20px;
    color: var(--accent-color);
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.schedule-note {
    margin-top: 1rem;
    color: var(--accent-color);
    font-size: 0.9rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-policy {
    display: flex;
    gap: 2rem;
}

.footer-policy a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-policy a:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   6. МОДАЛЬНЫЕ ОКНА
========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-content {
    background: white;
    width: 95%;
    max-width: 600px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

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

.modal-body {
    padding: 40px;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #E5E7EB transparent;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: #E5E7EB;
    border-radius: 3px;
}

.modal-body h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.modal-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 2rem 0 1rem;
    line-height: 1.3;
}

.modal-body p {
    font-size: 1rem;
    line-height: 1.6;
    color: #6B7280;
    margin-bottom: 1rem;
}

.modal-body ul {
    list-style: disc;
    margin: 1rem 0 1.5rem 1.5rem;
}

.modal-body li {
    color: #6B7280;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.last-updated {
    font-size: 0.9rem;
    color: #9CA3AF;
    margin-bottom: 2rem;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease;
}

.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background-color: #666;
    transition: background-color 0.3s ease;
}

.modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-close:hover::before,
.modal-close:hover::after {
    background-color: var(--primary-color);
}

/* Адаптивность модальных окон */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        margin: 20px;
    }
    
    .modal-body {
        padding: 30px 25px;
    }
    
    .modal-body h1 {
        font-size: 1.8rem;
    }
    
    .modal-body h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 15px;
    }
    
    .modal-body {
        padding: 25px 20px;
    }
    
    .modal-body h1 {
        font-size: 1.5rem;
    }
    
    .modal-body h2 {
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   8. МЕДИА ЗАПРОСЫ
========================================================================== */
/* 8.1 Десктоп (>1200px) */
@media (min-width: 1200px) {
    .container {
    max-width: 1400px;
    }
}

/* 8.2 Планшеты (768px - 1199px) */
@media (max-width: 1199px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid,
    .advantages-grid,
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 8.3 Мобильные (< 768px) */
@media (max-width: 767px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .services-grid,
    .advantages-grid,
.why-us-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

.scroll-to-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Оптимизация производительности */
.nav-scrolled,
.service-card,
.advantage-card,
.why-us-card,
.workflow-step,
.portfolio-item,
.modal-content {
    will-change: transform;
    transform: translateZ(0);
}

/* Отключаем тяжелые эффекты на мобильных */
@media (max-width: 768px) {
    .nav-links li {
        animation: none;
        opacity: 1;
    }

    nav {
        backdrop-filter: none;
        background-color: rgba(255, 255, 255, 0.98);
    }

    .service-card:hover,
    .advantage-card:hover,
    .why-us-card:hover,
    .workflow-step:hover {
        transform: none;
        box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    }
}

/* Оптимизация для мобильных устройств */
@media (max-width: 768px) {
    /* Базовые настройки */
    :root {
        --header-height: 60px;
    }

    /* Оптимизация шрифтов */
    body {
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
    }

    /* Оптимизация навигации */
    nav {
        height: var(--header-height);
        padding: 0 15px;
        position: fixed;
        top: 0;
        width: 100%;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .logo-img {
        height: 35px;
    }

    /* Мобильное меню */
    .nav-links {
        /* Существующие стили */
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: #fff;
        padding: 80px 20px 20px;
        transition: 0.3s;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        z-index: 998;
        display: flex;
        flex-direction: column;
    }

    .nav-links.active {
        right: 0;
        touch-action: pan-y pinch-zoom;
    }

    /* Оптимизация секций */
    section {
        padding: 40px 20px;
    }

    .hero {
        padding-top: calc(var(--header-height) + 20px);
        min-height: 100vh;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.3;
    }

    /* Оптимизация сетки */
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Оптимизация карточек */
    .service-card,
    .portfolio-item {
        margin-bottom: 15px;
    }

    /* Оптимизация слайдера */
    .portfolio-slider {
        height: 300px;
    }

    .slider-container {
        height: 100%;
    }

    .slider-container img {
        height: 100%;
        object-fit: cover;
    }

    /* Оптимизация кнопок слайдера */
    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
        background: rgba(255,255,255,0.9);
        border-radius: 50%;
    }

    /* Оптимизация счетчика */
    .slider-counter {
        padding: 5px 10px;
        font-size: 12px;
        background: rgba(0,0,0,0.7);
        color: white;
        border-radius: 15px;
        position: absolute;
        bottom: 10px;
        right: 10px;
    }

    /* Оптимизация форм */
    input,
    textarea,
    select {
        font-size: 16px; /* Предотвращает зум на iOS */
        padding: 12px;
    }

    /* Оптимизация модальных окон */
    .modal-content {
        width: 95%;
        margin: 10px;
        max-height: 90vh;
    }
}

/* Дополнительные стили для очень узких экранов */
@media (max-width: 360px) {
    .nav-links {
        width: 85%;
        padding: 80px 0.8rem 2rem;
    }

    .mobile-contacts {
        padding: 0.8rem;
    }

    .mobile-contacts .nav-contact-item {
        padding: 0.6rem;
    }
    
    .nav-links a {
        font-size: 0.95rem;
        padding: 0.7rem;
    }
}

.mobile-menu-overlay {
        display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.mobile-menu-overlay.active {
    display: block;
}

body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Стрелка вверх для мобильных */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1099; /* Выше всего контента */
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    animation: bounce 2s infinite;
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Анимация для привлечения внимания */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Стили для мобильных устройств */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 25px;
        right: 20px;
        width: 50px; /* Увеличили размер */
        height: 50px; /* Увеличили размер */
        background-color: var(--accent-color); /* Сделали более заметным */
    }

    .scroll-to-top svg {
        width: 28px; /* Увеличили иконку */
        height: 28px;
    }

    .scroll-to-top:active {
        transform: scale(0.95);
    }
}

/* Стили для формы консультации */
.consultation-form {
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 16px;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    height: calc(100% - 40px); /* Высота textarea равна высоте всех полей слева */
}

.submit-button {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: var(--secondary-color);
}

.privacy-policy {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #6B7280;
}

.services-cta,
.why-us-cta {
        text-align: center;
    margin-top: 3rem;
}

.services-cta .cta-button,
.why-us-cta .cta-button {
    background-color: var(--primary-color);
}

.services-cta .cta-button:hover,
.why-us-cta .cta-button:hover {
    background-color: var(--accent-color);
}

@media (max-width: 768px) {
    .services-cta,
    .why-us-cta {
        margin-top: 2rem;
    }
}

/* Мобильные контакты в меню */
.mobile-contacts {
    display: none;
    padding: 1.5rem;
    margin-top: 1rem;
    width: 100%;
    background: var(--light-bg);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .mobile-contacts {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin: 1rem;
        width: calc(100% - 2rem);
    }

    .mobile-contacts .contact-item {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    width: 100%;
    }

    .mobile-contacts .contact-label {
        font-size: 0.8rem;
        color: #666;
        display: block;
        padding: 0 0.8rem;
    }

    .mobile-contacts .nav-contact-item {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.7rem;
        color: var(--text-color);
        text-decoration: none;
        font-size: 0.9rem;
        background: white;
        border-radius: 8px;
        width: 100%;
        min-height: 44px;
    }

    .mobile-contacts .nav-contact-item svg {
        width: 18px;
        height: 18px;
        color: var(--primary-color);
        flex-shrink: 0;
    }

    .mobile-contacts .contact-value {
        font-weight: 500;
        display: block;
        width: 100%;
        word-break: normal;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Мобильное меню */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        position: relative;
        z-index: 1002;
    }

    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--primary-color);
        transition: all 0.3s ease;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: white;
        flex-direction: column;
        padding: 20px;
        z-index: 1001;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
        width: 100%;
        text-align: left;
    }

    .nav-links a {
        display: block;
        padding: 10px 15px;
        width: 100%;
        font-size: 16px;
    }

    /* Фиксируем body при открытом меню */
    body.menu-open {
        overflow: hidden;
    }
}

/* Большие десктопные мониторы */
@media (min-width: 1921px) {
    .container,
    .topbar-container,
    .about-container,
    .why-us-container,
    .workflow-container,
    .contact-container,
    .footer-container {
        max-width: 1800px;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: 4rem;
        max-width: 1000px;
    }

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

/* Стандартные десктопы */
@media (max-width: 1440px) {
    .container {
        max-width: 1200px;
    }

    nav {
        padding: 1rem 5%;
    }

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

/* Ноутбуки и маленькие десктопы */
@media (max-width: 1280px) {
    .container {
        max-width: 1000px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

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

    }

/* Планшеты */
@media (max-width: 1024px) {
    nav {
        padding: 1rem 3%;
}

    .hero {
        padding: 120px 5% 60px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image {
        order: -1;
    }

    .services-grid,
    .advantages-grid,
    .why-us-grid {
        gap: 1.2rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    }
}

/* Маленькие планшеты и большие телефоны */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
        text-align: center;
    }

    .services-grid,
    .advantages-grid,
    .why-us-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Телефоны */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    nav {
        padding: 0.8rem 3%;
    }

    .service-card,
    .advantage-card,
    .why-us-card {
        padding: 1.2rem;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Маленькие телефоны */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .nav-links {
        width: 90%;
    }

    .mobile-contacts {
        padding: 1rem;
    }
}

/* Стили для полноэкранного просмотра */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.fullscreen-overlay.active {
    display: flex;
}

.fullscreen-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    cursor: default;
}

/* Добавляем индикатор зума при наведении */
.portfolio-slider .slider-container img {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.portfolio-slider .slider-container img:hover {
    transform: scale(1.05);
}

/* Адаптивность для планшетов */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        order: -1;
    }

    .about-stats {
        gap: 1rem;
    }
    }

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 0.8rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.85rem;
        max-width: 200px;
        margin: 0 auto;
    }

    .about-image img {
        max-height: 300px;
    width: 100%;
    object-fit: cover;
    }
}

/* Адаптивность для маленьких экранов */
@media (max-width: 480px) {
    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
        max-width: 150px;
    }

    .about-image img {
        max-height: 250px;
    }
}

/* Общие правила для предотвращения горизонтального скролла */
body {
    overflow-x: hidden;
    width: 100%;
}

/* Контейнеры секций */
    .about-container,
.services-grid,
.advantages-container,
.why-us-container,
    .workflow-container,
.contact-container,
.footer-container {
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Адаптивность текста */
@media (max-width: 768px) {
    .about-description {
        font-size: 1rem;
        width: 100%;
    }

    .about-feature span {
        font-size: 0.95rem;
        word-wrap: break-word;
    }

    /* Статистика */
    .about-stats {
        width: 100%;
    padding: 0;
}

    .stat-item {
        width: 100%;
        box-sizing: border-box;
}

    .stat-label {
    font-size: 0.8rem;
        word-wrap: break-word;
    width: 100%;
        max-width: none;
    }

    /* Изображение */
    .about-image {
        width: 100%;
        margin: 0;
    }

    .about-image img {
        width: 100%;
        height: auto;
        max-width: 100%;
    }
}

/* Дополнительные правила для очень маленьких экранов */
@media (max-width: 360px) {
    .stat-number {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }
}

/* Центрирование на мобильных */
@media (max-width: 768px) {
    .hero {
        text-align: center;
        align-items: center;
    }

    .hero h1,
    .hero p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .cta-button {
        margin: 0 auto;
        display: block;
        width: fit-content;
    }
}

/* Дополнительные стили для маленьких экранов */
@media (max-width: 480px) {
    .cta-button {
        width: 90%;
        max-width: 300px;
    }
}

/* Стили для секции about на мобильных устройствах */
@media (max-width: 768px) {
    .about-section {
        width: 100vw;
        padding: 20px 0;
        margin: 0;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .about-container {
        width: 100%;
        margin: 0;
        padding: 0;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .about-content {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .about-text {
        width: 100%;
        padding: 0 15px;
        margin: 0;
        -webkit-text-size-adjust: 100%;
    }

    .about-text h2,
    .about-text h3,
    .about-text p {
        text-align: center;
        width: 100%;
        margin-bottom: 15px;
        padding: 0;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .about-image {
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
        overflow: visible;
        position: relative;
    }

    .about-image img {
        width: 100%;
        height: auto;
        max-height: 400px;
        object-fit: cover;
        object-position: center;
        display: block;
        margin: 0 auto;
    }

    /* Специфичные размеры для разных устройств */
    @media only screen and (max-width: 428px) {
        .about-image img {
            max-height: 300px;
        }
    }

    @media only screen and (max-width: 375px) {
        .about-image img {
            max-height: 250px;
        }
    }

    @media only screen and (max-width: 320px) {
        .about-image img {
            max-height: 200px;
        }
    }

    .about-stats {
        display: -ms-grid;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        width: 100%;
        margin: 20px 0 0 0;
        padding: 0 15px;
    }

    .stat-item {
        background: var(--light-bg);
        padding: 20px 15px;
        border-radius: 10px;
        text-align: center;
        -webkit-tap-highlight-color: transparent;
    }

    .stat-number {
        font-size: 1.8rem;
        font-weight: 700;
        color: var(--primary-color);
        display: block;
        margin-bottom: 5px;
    }

    .stat-label {
        font-size: 0.9rem;
        line-height: 1.4;
        color: var(--text-color);
    }
}

/* iOS специфичные стили */
@supports (-webkit-touch-callout: none) {
    .about-section {
        padding-bottom: env(safe-area-inset-bottom);
        padding-top: env(safe-area-inset-top);
    }
}

/* Android специфичные стили */
@supports not (-webkit-touch-callout: none) {
    .about-section {
        overscroll-behavior: none;
    }
}

/* Samsung Browser и Chrome для Android */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .about-image {
        will-change: transform;
    }
}

/* iPhone 14 Pro Max и новые iPhone */
@media only screen and (min-width: 428px) and (max-width: 926px) and (-webkit-min-device-pixel-ratio: 3) {
    .about-image,
    .about-image img {
        height: 350px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 1rem;
    }
}

/* Для старых iPhone */
@media only screen and (max-width: 375px) {
    .about-image,
    .about-image img {
        height: 250px;
    }
}

/* Для устройств в альбомной ориентации */
@media (max-width: 768px) and (orientation: landscape) {
    .about-image,
    .about-image img {
        height: 200px;
    }
}

/* Стили для заголовка секции about */
@media (max-width: 768px) {
    .about-text h2 {
        font-size: 1.8rem;
        text-align: center;
        margin-bottom: 1.5rem;
        position: relative;
        padding-bottom: 1rem;
    }

    .about-text h2::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 3px;
        background-color: var(--accent-color);
        border-radius: 2px;
    }

    /* Остальные стили для текста */
    .about-text h3,
    .about-text p {
        text-align: center;
        width: 100%;
        margin-bottom: 15px;
        padding: 0;
    }
}

/* Дополнительная настройка для iPhone */
@supports (-webkit-touch-callout: none) {
    .about-text h2::after {
        width: 80px; /* Фиксированная ширина для iOS */
        left: calc(50% - 40px); /* Альтернативный способ центрирования для iOS */
    }
}

.thanks-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(27, 75, 37, 0.97) 0%, rgba(43, 114, 57, 0.9) 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.thanks-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('img/pattern.png') repeat;
    opacity: 0.05;
    pointer-events: none;
}

.thanks-content {
    background: white;
    padding: 3.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
    animation: slideUp 0.6s ease-out;
}

.thanks-logo {
    height: 50px;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.thanks-logo:hover {
    transform: scale(1.05);
}

.success-icon {
    color: var(--primary-color);
    margin: 2rem 0;
    animation: scaleIn 0.5s ease-out 0.3s both;
    background: var(--light-bg);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
}

.success-icon svg {
    width: 50px;
    height: 50px;
}

.success-icon .circle {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: drawCircle 0.6s ease-out forwards;
}

.success-icon .check {
    stroke-dasharray: 15;
    stroke-dashoffset: 15;
    animation: drawCheck 0.4s ease-out 0.6s forwards;
}

.success-icon .sparkle-1,
.success-icon .sparkle-2,
.success-icon .sparkle-3,
.success-icon .sparkle-4,
.success-icon .sparkle-5,
.success-icon .sparkle-6,
.success-icon .sparkle-7,
.success-icon .sparkle-8 {
    opacity: 0;
    stroke-linecap: round;
}

.success-icon .sparkle-1 { animation: sparkle 0.4s ease-out 1s forwards; }
.success-icon .sparkle-2 { animation: sparkle 0.4s ease-out 1.1s forwards; }
.success-icon .sparkle-3 { animation: sparkle 0.4s ease-out 1.2s forwards; }
.success-icon .sparkle-4 { animation: sparkle 0.4s ease-out 1.3s forwards; }
.success-icon .sparkle-5 { animation: sparkle 0.4s ease-out 1.4s forwards; }
.success-icon .sparkle-6 { animation: sparkle 0.4s ease-out 1.5s forwards; }
.success-icon .sparkle-7 { animation: sparkle 0.4s ease-out 1.6s forwards; }
.success-icon .sparkle-8 { animation: sparkle 0.4s ease-out 1.7s forwards; }

@keyframes drawCircle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.thanks-content h1 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    animation: fadeIn 0.5s ease-out 0.4s both;
}

.thanks-content p {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.6;
    animation: fadeIn 0.5s ease-out 0.5s both;
}

.contact-info {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
    animation: fadeIn 0.5s ease-out 0.6s both;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-info p {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: var(--text-color);
    text-decoration: none;
    margin: 1rem 0;
    padding: 0.8rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
}

.contact-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out 0.7s both;
    box-shadow: 0 4px 15px rgba(43, 114, 57, 0.2);
}

.cta-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 114, 57, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 480px) {
    .thanks-content {
    padding: 2rem;
        margin: 1rem;
        border-radius: 20px;
    }

    .thanks-content h1 {
        font-size: 1.8rem;
    }

    .thanks-content p {
        font-size: 1rem;
    }

    .contact-info {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }

    .contact-link {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .success-icon {
        width: 80px;
        height: 80px;
    }

    .success-icon svg {
        width: 40px;
        height: 40px;
    }
}

/* Контейнер для полей слева */
.form-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Контейнер для textarea справа */
.form-right {
    height: 100%;
}

/* Кнопка и политика на всю ширину */
.form-footer {
    grid-column: 1 / -1;
    text-align: center;
}

/* Стили для контактной секции */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* Разделение на две равные колонки */
    gap: 40px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

/* Левая часть с информацией */
.contact-info-block {
    padding-right: 20px;
}

/* Правая часть с формой */
.contact-form-block {
    width: 100%;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;  /* Одна колонка на мобильных */
        gap: 30px;
    }

    .contact-info-block {
        padding-right: 0;
    }
}

/* Контактная секция */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}

/* Левая часть */
.contact-info-block {
    padding-right: 40px;
}

.contact-info-block h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contact-info-block p {
    font-size: 1.1rem;
    color: #6B7280;
    margin-bottom: 2rem;
}

/* Преимущества */
.contact-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #F9FAFB;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.feature svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.feature span {
    font-size: 1rem;
    font-weight: 500;
}

/* Форма */
.contact-form-block {
    background: #F9FAFB;
    padding: 40px;
    border-radius: 20px;
}

.request-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    width: 100%;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: box-shadow 0.3s ease;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    outline: none;
}

.submit-button {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.submit-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.privacy-policy {
    text-align: center;
    margin-top: 15px;
        font-size: 0.9rem;
    color: #6B7280;
}

/* Адаптивность */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 30px;
    }

    .contact-info-block {
        padding-right: 0;
    }

    .contact-info-block h2 {
        font-size: 2rem;
    }
    
    .contact-form-block {
        padding: 30px 20px;
    }
}

/* Медиа-запросы */
@media (min-width: 1921px) {
    .container,
    .about-container,
    .why-us-container,
    .workflow-container,
    .contact-container,
    .footer-container {
        max-width: 1800px;
        margin: 0 auto;
    }
}

@media (max-width: 1440px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 1024px) {
    .contact-container {
        padding: 30px;
        gap: 40px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 30px;
    }

    .contact-info-block {
        padding-right: 0;
    }

    .contact-info-block h2 {
        font-size: 2rem;
    }
    
    .contact-form-block {
        padding: 30px 20px;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
        max-width: 150px;
    }
}

/* Мобильные контакты */
.mobile-contacts {
    display: none;
    padding: 1.5rem;
    margin-top: 1rem;
    width: 100%;
    background: var(--light-bg);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .mobile-contacts {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin: 1rem;
        width: calc(100% - 2rem);
    }
}

.contact-form {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
}

.contact-form h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.contact-form .form-group {
    margin-bottom: 15px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.contact-form .submit-button {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Стили для мобильного меню */
.nav-links {
    /* Существующие стили */
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #fff;
    padding: 80px 20px 20px;
    transition: 0.3s;
    overflow-y: auto; /* Добавляем скролл */
    -webkit-overflow-scrolling: touch; /* Плавный скролл для iOS */
    overscroll-behavior: contain; /* Предотвращает прокрутку body при скролле меню */
    z-index: 998;
}

/* Стили для открытого меню */
.nav-links.active {
    right: 0;
    touch-action: pan-y pinch-zoom; /* Разрешаем вертикальный скролл и зум */
}

/* Стили для контейнера мобильных контактов */
.mobile-contacts {
    /* Существующие стили */
    margin-top: auto;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 12px;
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

.mobile-contacts .contact-item {
    margin-bottom: 15px;
}

.mobile-contacts .contact-value {
    font-weight: 500;
    display: block;
    width: 100%;
    word-break: break-word;
    white-space: normal;
    overflow: visible;
}

.nav-menu {
    flex: 1;
    margin-bottom: 20px;
}

/* Блокируем скролл body при открытом меню */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Стили для кнопки быстрых контактов */
.mobile-contact-button {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 1000;
}

.contact-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.contact-toggle:hover {
    transform: scale(1.05);
    background: var(--accent-color);
}

.contact-toggle svg {
    width: 24px;
    height: 24px;
    color: white;
    transition: transform 0.3s ease;
}

.contact-toggle.active svg {
    transform: rotate(135deg);
}

.quick-contacts {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.quick-contacts.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.quick-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: var(--primary-color);
}

.quick-contact-item:hover {
    background-color: var(--secondary-color);
}

.quick-contact-item svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.quick-contact-item span {
    font-size: 14px;
    font-weight: 500;
}

/* Корректировка для маленьких экранов */
@media (max-width: 360px) {
    .mobile-contact-button {
        bottom: 80px;
        right: 15px;
    }
    
    .contact-toggle {
        width: 45px;
        height: 45px;
    }
    
    .quick-contacts {
        min-width: 140px;
        right: 0;
    }
}

/* Добавляем стили для отображения ошибок */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #ff4444;
}

.error-message {
    color: #ff4444;
    font-size: 12px;
    margin-top: 4px;
    position: absolute;
    bottom: -20px;
    left: 0;
}

/* Оптимизируем медиа-запросы */
@media (max-width: 1440px) {
    .container,
    .about-container,
    .services-container,
    .contact-container {
        max-width: 1200px;
        padding: 0 2rem;
    }
}

@media (max-width: 1024px) {
    .container,
    .about-container,
    .services-container,
    .contact-container {
        max-width: 960px;
        padding: 0 1.5rem;
    }

    .services-grid,
    .advantages-grid,
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .about-content {
        flex-direction: column;
        gap: 2rem;
    }

    .about-text,
    .about-image {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container,
    .about-container,
    .services-container,
    .contact-container {
        padding: 0 1rem;
    }

    .services-grid,
    .advantages-grid,
    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.3;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .workflow-steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }

    .contact-content {
        flex-direction: column;
        gap: 2rem;
    }

    .contact-info-block,
    .contact-form-block {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2rem;
    }

    .form-group {
        margin-bottom: 2rem;
    }

    .error-message {
        font-size: 11px;
        bottom: -18px;
    }
}

/* Стили для кнопки отправки в состоянии disabled */
.submit-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.submit-button:disabled:hover {
    background-color: #cccccc;
    transform: none;
}

/* Десктопная навигация */
@media (min-width: 769px) {
    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.8rem 2%;
        background: rgba(255, 255, 255, 0.98);
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        height: 70px;
    }

    .nav-left {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }

    .logo-img {
        height: 40px;
        width: auto;
    }

    .nav-links {
        display: flex !important;
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .nav-menu {
        display: flex;
        list-style: none;
        gap: 1.5rem;
        margin: 0;
        padding: 0;
    }

    .nav-menu li {
        margin: 0;
        opacity: 1;
        animation: none;
    }

    .nav-menu a {
        color: var(--text-color);
        text-decoration: none;
        font-weight: 500;
        font-size: 14px;
        padding: 0.5rem 0;
        transition: all 0.3s ease;
        position: relative;
        opacity: 0.9;
        white-space: nowrap;
    }

    .nav-menu a:hover {
        color: var(--primary-color);
        opacity: 1;
    }

    .nav-menu a::after {
        content: '';
        position: absolute;
        bottom: -3px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--primary-color);
        transition: width 0.3s ease;
        border-radius: 2px;
    }

    .nav-menu a:hover::after {
        width: 100%;
    }

    .nav-menu li.active a {
        color: var(--primary-color);
        opacity: 1;
    }

    .nav-menu li.active a::after {
        width: 100%;
    }

    .mobile-menu-btn,
    .menu-overlay,
    .mobile-contacts {
        display: none !important;
    }

    /* Анимация при скролле */
    .nav-scrolled {
        padding: 0.6rem 2%;
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
        height: 60px;
    }

    .nav-scrolled .logo-img {
        height: 35px;
    }

    /* Контакты в навигации */
    .nav-contacts {
        display: flex;
        gap: 1.5rem;
        margin-left: 1.5rem;
    }

    .nav-contact-item {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        color: var(--text-color);
        text-decoration: none;
        font-size: 13px;
        transition: color 0.3s ease;
        opacity: 0.9;
        white-space: nowrap;
    }

    .nav-contact-item:hover {
        color: var(--primary-color);
        opacity: 1;
    }

    .nav-contact-item svg {
        width: 14px;
        height: 14px;
        color: var(--primary-color);
    }
}

/* Дополнительные медиа-запросы для больших экранов */
@media (min-width: 1200px) {
    nav {
        padding: 0.8rem 4%;
    }

    .nav-menu {
        gap: 1.8rem;
    }

    .nav-menu a {
        font-size: 14px;
    }

    .nav-contacts {
        gap: 1.8rem;
        margin-left: 2rem;
    }

    .nav-contact-item {
        font-size: 13px;
    }
}

@media (min-width: 1440px) {
    nav {
        padding: 0.8rem 6%;
    }

    .nav-menu {
        gap: 2rem;
    }

    .nav-menu a {
        font-size: 14px;
    }

    .nav-contacts {
        gap: 2rem;
        margin-left: 2.5rem;
    }

    .nav-contact-item {
        font-size: 14px;
    }
}

/* Для очень больших экранов */
@media (min-width: 1920px) {
    nav {
        padding: 0.8rem 8%;
    }

    .nav-menu {
        gap: 2.5rem;
    }
}

/* Стрелка для прокрутки вверх */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Адаптив для кнопки прокрутки */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 15px;
        width: 35px;
        height: 35px;
    }

    .scroll-to-top svg {
        width: 16px;
        height: 16px;
    }
}

/* Стили для кнопки прокрутки наверх */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 90px; /* Изменено с 20px на 90px */
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    border: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    color: white;
    transition: transform 0.3s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-2px);
}

.scroll-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-ripple {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    animation: ripple 1.5s infinite;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Адаптив для кнопки прокрутки */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 90px; /* Изменено с 20px на 90px */
        right: 20px;
        width: 40px;
        height: 40px;
    }

    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* Стили для плавающей кнопки контактов */
.mobile-contact-button {
    position: fixed;
    right: 20px;
    bottom: 20px; /* Изменено с 80px на 20px */
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.contact-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.contact-toggle:hover {
    transform: scale(1.05);
    background-color: var(--secondary-color);
}

.contact-toggle svg {
    width: 24px;
    height: 24px;
    stroke: white;
    transition: transform 0.3s ease;
}

.contact-toggle.active svg {
    transform: rotate(135deg);
}

.quick-contacts {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.quick-contacts.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.quick-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: var(--light-bg);
}

.quick-contact-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.quick-contact-item:hover svg {
    stroke: white;
}

.quick-contact-item svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary-color);
}

.quick-contact-item span {
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .mobile-contact-button {
        bottom: 20px;
        right: 20px;
    }

    .contact-toggle {
        width: 50px;
        height: 50px;
    }

    .quick-contacts {
        bottom: 60px;
        min-width: 180px;
    }
}
