
/* Базовый класс для всех элементов, которые должны появляться */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    
    /* Меняем 0.8s на 1.5s (или то, которое тебе больше нравится) */
    transition: all 1.5s ease-out; 
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Принудительное появление блока при переходе по ссылке */
.reveal:target {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important; /* Отключаем анимацию при прыжке к якорю */
}

/* ==========================================================================
   1. ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ, ШРИФТЫ И ОБНУЛЕНИЕ
   ========================================================================== */
   :root {
    --color-bg-main: #dfd3c3;       /* Твой благородный бежевый фон */
    --color-accent: #7c5c43;        /* Фирменный шоколадно-коричневый */
    --color-text-main: #2c1a11;     /* Темно-коричневый для идеального контраста */
    --color-text-muted: #5e4a3c;    /* Мягкий цвет для описаний и био */
    --color-frame-bg: #f5ebe0;      /* Светлая кремовая подложка для карточек */
    --font-primary: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth; /* Плавный скролл по якорным ссылкам */
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-main);
    color: var(--color-text-main);
    overflow-x: hidden;
    min-height: 100vh;
    padding-top: 80px; /* Должен быть равен высоте твоего .main-header */
}



/* Красивый кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
}

/* Класс скрытия элементов для JS анимации */
.id-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;       /* Схлопываем высоту в 0, чтобы ушёл скроллбар */
    overflow: hidden !important; /* Прячем всё, что выходит за рамки */
}

/* Задний фон с частицами */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Поднимаем выше приветственного экрана (у которого 2000) */
    pointer-events: none; /* Пропускает клики сквозь себя на кнопки и ссылки */
    opacity: 0.85; /* Легкая элегантная прозрачность */
}


/* Для всех основных блоков сайта задаем слой выше, чтобы они перекрывали точки */
header, 
main,
section, 
.container, 
.project-card,
.workflow-section {    /* Сюда можно дописать классы твоих блоков из HTML */
    position: relative;/* Чтобы z-index сработал, у блока должно быть позиционирование */
    z-index: 2;        /* Этот слой выше, чем у точек, поэтому контент будет перекрывать их */
}



/* ==========================================================================
   2. ФИКСИРОВАННЫЙ ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКА (RU/EN)
   ========================================================================== */
.global-lang-container {
    position: fixed;
    top: 24px;
    right: 40px;
    z-index: 3000; /* Всегда выше шапки и приветственного экрана */
}

.lang-btn {
    background: none;
    border: 1.5px solid var(--color-accent);
    color: var(--color-accent);
    padding: 6px 14px;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background-color: var(--color-accent);
    color: #fff;
}

/* ==========================================================================
   3. СЕКЦИЯ ПРИВЕТСТВИЯ (SPLASH SCREEN)
   ========================================================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
}

/* Эффект вылета экрана вверх, когда нажимаешь кнопку */
.splash-screen.screen-up {
    transform: translateY(-100vh);
    opacity: 0;
}

.splash-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    max-width: 600px;
}

.profile-frame {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid var(--color-accent);
    padding: 6px;
    background-color: var(--color-frame-bg);
    margin-bottom: 28px;
    box-shadow: 0 10px 30px rgba(44, 26, 17, 0.12);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.main-name {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--color-text-main);
    margin-bottom: 12px;
}

.main-bio {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 36px;
    font-weight: 500;
}

.enter-btn {
    padding: 16px 40px;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    background-color: var(--color-accent);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(124, 92, 67, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.enter-btn:hover {
    background-color: var(--color-text-main);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 26, 17, 0.4);
}

/* 4. ГЛАВНАЯ ШАПКА САЙТА (MAIN HEADER) */
.main-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 80px;
    background: rgba(223, 211, 195, 0.85); backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 5%; z-index: 1000; border-bottom: 1px solid rgba(124, 92, 67, 0.15);


    /* Добавляем нижнюю границу */
    border-bottom: 2px solid rgba(124, 92, 67, 0.4); 
    
    /* Можно добавить небольшой отступ снизу, чтобы контент не прилипал к линии */
    padding-bottom: 10px;
}

/* Логотип: рамка и текст в 2 ряда */
.header-left { display: flex; align-items: center; gap: 14px; }
.logo-frame { 
    width: 50px;              /* Задаем фиксированный размер круга (можно сделать 60px, если хочется чуть крупнее) */
    height: 50px;
    border-radius: 50%;       /* Делаем контейнер идеально круглым */
    overflow: hidden;         /* Все, что вылезает за пределы круга — намертво обрезается */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #735943;/* Твоя фирменная коричневая рамка (можешь убрать или поменять цвет под дизайн) */
    background: #000;         /* Черный фон, так как сам логотип на темном фоне */
    flex-shrink: 0;           /* Защита от сжатия, чтобы кружок не сплющивался на планшетах */
}


/* Сама картинка логотипа внутри круга */
.logo-img {
    width: 100%;              /* Растягиваем картинку на всю ширину кружка */
    height: 100%;             /* Растягиваем на всю высоту */
    object-fit: cover;        /* Картинка автоматически масштабируется и заполняет круг без искажения пропорций */
    object-position: center;  /* Центрируем изображение внутри рамки */
}

/* Вспомогательные стили для правильного выравнивания текста рядом */
.header-left {
    display: flex;
    align-items: center;      /* Выравниваем кружок и текст "EGOR 3D" строго по одной горизонтальной линии */
    gap: 12px;                /* Отступ между круглым логотипом и текстом */
}

.logo-text {
    display: flex;
    flex-direction: column;   /* Строки "EGOR 3D" и "3D Artist" идут друг под другом */
}





.logo-text { display: flex; flex-direction: column; }
.company-name { font-weight: 700; font-size: 16px; line-height: 1.2; color: var(--color-text-main); }
.company-sub { font-size: 11px; font-weight: 500; color: var(--color-text-muted); line-height: 1.2; }

/* Навигация (ПК - Центр) */
.nav-links { display: flex; gap: 40px; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-links a { text-decoration: none; font-size: 13px; font-weight: 600; color: var(--color-text-main); }

/* Бургер и язык */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 6px; }
.bar { width: 28px; height: 3px; background: var(--color-text-main); }
.header-right { display: flex; align-items: center; }

/* АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ: Окошко по центру */
@media (max-width: 900px) {
    .hamburger { 
        display: flex; 
        position: absolute; 
        left: 50%; 
        transform: translateX(-50%); 
        z-index: 1002;
    }
    
    .nav-links {
        display: none; /* Скрыто по умолчанию */
        
        /* Делаем его плавающим окошком */
        position: fixed;
        top: 100px; /* Немного ниже хедера */
        left: 50%;
        transform: translateX(-50%);
        width: 80%; /* Занимает 80% ширины экрана */
        max-width: 300px; /* Не больше 300px, чтобы было аккуратным */
        
        background: #e5dcd3;
        border-radius: 20px; /* Закругленные края */
        padding: 30px 20px;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        
        /* Тень для объема */
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        z-index: 1001;
    }
    
    .nav-links.open { 
        display: flex !important; 
    }
    
    .nav-links a {
        font-size: 18px;
        color: #2c1a11;
    }
}

/* ==========================================================================
   5. СЕКЦИЯ «ОБО МНЕ» (ABOUT SECTION) - ТЕПЕРЬ КРУГЛАЯ АВАТАРКА
   ========================================================================== */
   .about-section {
    max-width: 1100px;
    margin: 40px auto 60px auto;
    padding: 0 20px;
}

.about-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.about-content {
    flex: 1;
    
    /* Увеличиваем плотность фона */
    background: rgba(124, 92, 67, 0.08);
    
    /* Усиливаем рамку для четкости */
    border: 1px solid rgba(124, 92, 67, 0.2);
    
    /* Добавляем мягкую тень */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    
    /* Сохраняем оформление для гармонии с другими блоками */
    border-radius: 15px;
    padding: 25px;
    margin: 10px;
}

.section-title-left {
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-main);
    margin-bottom: 20px;
    position: relative;
}

.about-text {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--color-text-muted);
    text-align: justify;
}

.about-image-block {
    flex-shrink: 0;
}

/* Фрейм-подложка теперь идеально круглая */
.about-profile-frame {
    width: 240px;
    height: 240px;
    border-radius: 50%; /* Изменено с 16px на 50% для идеального круга */
    padding: 8px;
    background-color: var(--color-frame-bg);
    border: 1px solid rgba(124, 92, 67, 0.2);
    box-shadow: 0 0 20px rgba(109, 84, 69, 0.8);
}

/* Сама картинка внутри фрейма тоже круглая */
.about-profile-frame .profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Изменено с 10px на 50% */
}

/* ==========================================================================
   6. СЕКЦИЯ ПОРТФОЛИО (РАЗДЕЛИТЕЛЬ И СЕТКА КАРТОЧЕК)
   ========================================================================== */
.portfolio-section {
    max-width: 1100px;
    margin: 80px auto;
    padding: 0 20px;
}

/* Красивая линия-разделитель с текстом по центру */
.portfolio-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 45px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background-color: rgba(124, 92, 67, 0.3);
}

.portfolio-main-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--color-text-main);
    text-align: center;
}

/* Идеальная трехколоночная Grid-сетка */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Карточка твоего 3D-проекта */
.portfolio-card {
    background-color: var(--color-frame-bg);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 6px 20px rgba(44, 26, 17, 0.04);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(124, 92, 67, 0.16);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: 0.5px;
}

/* Обертка для картинок рендеров */
.card-image-wrapper {
    width: 100%;
    height: 210px;
    overflow: hidden;
    border-radius: 8px;
    background-color: rgba(124, 92, 67, 0.08); /* Тёплая подложка на время загрузки */
}

.card-img-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-card:hover .card-img-placeholder {
    transform: scale(1.04); /* Мягкий интерактивный зум при наведении на карту */
}

/* Твои крутые кнопки «VIEW PROJECT» */
.card-btn {
    width: 100%;
    padding: 13px;
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-accent);
    background: none;
    border: 1.5px solid var(--color-accent);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto; /* Прижимает кнопку к самому низу карточки, если названия разной длины */
}

.card-btn:hover {
    background-color: var(--color-accent);
    color: #fff;
}

/* ==========================================================================
   7. ПОДВАЛ И КОНТАКТЫ (CONTACTS SECTION)
   ========================================================================== */

   #contacts-section {
    /* 100px сверху меняем на 40px, чтобы блок подтянулся к резюме */
    /* 30px снизу оставляем или чуть увеличиваем для баланса */
    margin: 40px auto 40px auto !important; 
    
    /* Padding (зеленая зона) тоже можно подправить для симметрии */
    padding: 40px 20px 40px 20px !important; 
}


.contacts-section {
    width: 100%;
    background-color: #ffffff;
    
    /* 80px — это отступ между коричневой линией и текстом "Связаться со мной"
       20px — боковые отступы
       40px — отступ снизу
    */
    padding-top: 80px !important; 
    padding-bottom: 40px;
    padding-left: 20px;
    padding-right: 20px;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 0 !important; /* Убираем любые margin, они нам не нужны */
}

.contacts-section h2 {
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-main);
    margin-bottom: 12px;
}

.contacts-sub {
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: 30px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 35px;
    margin-bottom: 50px;
}

.social-item {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-item:hover {
    color: var(--color-text-main);
    transform: translateY(-2px);
}

.copyright {
    color: #8b5e3c; /* Коричневый цвет текста */
    font-size: 14px;
    text-align: center; /* Выравнивание по центру */
    
    /* Отступ сверху, чтобы он не "прилипал" к белому блоку */
    margin-top: 20px; 
    
    /* Отступ снизу, чтобы он не прилипал к самому низу экрана */
    margin-bottom: 20px; 
    
    width: 100%;
}

/* ==========================================================================
   8. АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ========================================================================== */
@media (max-width: 900px) {
    .main-header {
        padding: 0 30px;
    }
    .header-nav {
        margin-right: 60px;
        gap: 16px;
    }
    .about-container {
        flex-direction: column-reverse; /* На мобилках текст падает под картинку */
        text-align: center;
        gap: 35px;
    }
    .about-text {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .main-header {
        height: 70px;
    }
    .logo-text, .header-nav {
        display: none; /* Прячем текстовый логотип и навигацию на мелких смартфонах */
    }
    .main-site-wrapper {
        padding-top: 90px;
    }
    .main-name {
        font-size: 28px;
    }
    .portfolio-main-title {
        font-size: 20px;
    }
}

/* ==========================================================================
   9. СТИЛИ ДЛЯ СТЕКА, ПАЙПЛАЙНА И КНОПОК CTA
   ========================================================================== */

/* Общий контейнер модулей */
.pro-skills-pipeline {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    margin-top: 50px;
    
    /* Увеличиваем плотность фона с 0.03 до 0.08 или 0.1 */
    background: rgba(124, 92, 67, 0.08); 
    
    padding: 35px;
    border-radius: 16px;
    
    /* Усиливаем рамку с 0.08 до 0.2, чтобы добавить четкости */
    border: 1px solid rgba(124, 92, 67, 0.2);

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.skills-column {
    flex: 1;
}

.pipeline-column {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрирует всё содержимое по горизонтали */
    width: 100%;
}

.pro-block-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: 1px;
    margin-bottom: 25px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(124, 92, 67, 0.15);
    padding-bottom: 8px;
    text-align: center; /* Центрирует текст */
    width: 100%;        /* Занимает всю ширину блока */
    margin-bottom: 20px; /* Добавляем немного воздуха снизу */
    
}

/* Сетка софта */
.software-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.software-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(124, 92, 67, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.software-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(124, 92, 67, 0.08);
}

/* Квадратные заглушки/рамки под иконки приложений */
.sw-icon-placeholder {
    width: 44px;
    height: 44px;
    background-color: rgba(124, 92, 67, 0.08);
    border-radius: 10px; /* Аккуратные закругленные края */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.sw-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sw-info {
    display: flex;
    flex-direction: column;
}

.sw-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--color-text-main);
}

.sw-status {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Пайплайн (Цепочка шагов) */
.pipeline-chain {
    display: grid;
    /* Первая колонка для линии (35px - ширина кружка), вторая для текста */
    grid-template-columns: 35px 1fr;
    gap: 20px; /* Расстояние между кружком и текстом */
    position: relative;
    padding-bottom: 20px;
}

/* Линия теперь привязана к первой колонке */
.pipeline-chain::before {
    content: '';
    position: absolute;
    left: 16.5px; /* Точный центр колонки в 35px */
    top: 20px;
    bottom: 20px;
    width: 2px;
    background-color: #8b5e3c;
    z-index: 0;
}

.pipeline-step {
    display: contents; /* Позволяет элементам внутри занять место в Grid */
}

.step-number {
    width: 35px;
    height: 35px;
    background: #8b5e3c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 1;
    margin-bottom: 30px; /* Отступ между шагами */
    margin-right: 35px;
}

.step-content {
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: 10px;
}


/* Стили кнопок Call to Action (CTA) */
/* Контейнер для кнопок */
.about-cta-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

/* Применяем стили ко всем кнопкам сразу через перечисление классов */
.cta-button, .artstation-cta, .fiverr-cta {
    background-color: #7c5c43; /* Твой коричневый цвет */
    color: #ffffff !important; /* Важно: принудительно белый цвет текста */
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    transition: opacity 0.3s ease, transform 0.2s ease;
    border: none;
    display: inline-block;
    cursor: pointer;
    text-align: center;
}

/* Эффект при наведении для всех вариантов кнопок */
.cta-button:hover, .artstation-cta:hover, .fiverr-cta:hover {
    opacity: 0.7;
    transform: translateY(-2px);
}

/* Адаптивность для мобилок */
@media (max-width: 850px) {
    .pro-skills-pipeline {
        flex-direction: column;
        gap: 40px;
        padding: 20px;
    }
    .software-grid {
        grid-template-columns: 1fr;
    }
    .about-cta-container {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ==========================================================================
   10. СТИЛИ МОДАЛЬНОГО ОКНА ПРОЕКТОВ (MODAL WINDOW)
   ========================================================================== */

/* Сетка карточек на 3 колонки */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Затемняющий фон за окном */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 26, 17, 0.6); /* Шоколадное полупрозрачное затемнение */
    backdrop-filter: blur(8px); /* Красивое размытие основного сайта */
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* Класс активации окна из JS */
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Само окно (Почти на весь экран, но с элегантными отступами) */
.modal-window {
    background-color: #fcfaf7; /* Светло-бежевый фон в тон сайта */
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow-y: auto; /* Скроллбар внутри окна, если контент огромный */
    box-shadow: 0 25px 60px rgba(44, 26, 17, 0.25);
    border: 1px solid rgba(124, 92, 67, 0.15);
    transform: translateY(30px);
    transition: transform 0.4s ease;
}

.modal-overlay.active .modal-window {
    transform: translateY(0);
}

/* Кнопка закрытия */
.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 35px;
    background: none;
    border: none;
    color: #7c5c43;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: #c0392b;
}

/* Заголовок внутри карточки */
.modal-title {
    font-size: 26px;
    font-weight: 700;
    color: #2c1a11;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    padding-right: 40px;
}

/* Прямоугольный блок технических характеристик */
.modal-specs-box {
    background-color: #fff;
    border: 1px solid rgba(124, 92, 67, 0.12);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: inset 0 2px 6px rgba(124, 92, 67, 0.02);
}

.spec-item {
    display: flex;
    font-size: 15px;
    line-height: 1.5;
}

.spec-label {
    font-weight: 700;
    color: #7c5c43;
    width: 140px;
    flex-shrink: 0;
}

.spec-value {
    color: #4a3525;
}

/* Блок галереи рендеров и сетки */
.modal-gallery {
    display: flex !important;
    flex-direction: row !important; /* ЖЁСТКО: на ПК и планшетах только в ряд! */
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    width: 100%;
    margin-top: 20px;
}

.gallery-item-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallery-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #7c5c43;
    letter-spacing: 0.5px;
}

/* Красивая рамочка под скриншоты */
.gallery-img-frame {
    background: #fff;
    border: 1px solid rgba(124, 92, 67, 0.15);
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.03);
    height: 280px;
}

.gallery-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background-color: #eaeaea; /* Временный фон, пока картинка грузится */
}

/* Адаптивность для небольших экранов */
@media (max-width: 850px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .modal-gallery {
        flex-direction: column;
    }
    .modal-window {
        padding: 20px;
        width: 95%;
    }
    .gallery-img-frame {
        height: 200px;
    }
}

/* ==========================================================================
   ИСПРАВЛЕНИЕ СТИЛИЗАЦИИ ГЛАВНОГО ЭКРАНА КАРТОЧЕК
   ========================================================================== */

/* Правильное позиционирование сетки, чтобы кнопки CTA сверху на неё не давили */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto 0 auto;
    padding: 0 20px;
    clear: both; /* Очистка обтекания от верхних блоков */
}

/* Оформление карточки с новой коричневой обводкой */
.project-card {
    background: #fff;
    /* Увеличили толщину до 2px и сделали цвет более насыщенным */
    border: 2px solid #8b5e3c; 
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 92, 67, 0.05);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(124, 92, 67, 0.1);
    /* При наведении делаем рамку чуть темнее для эффекта */
    border-color: #6e4a2f; 
}

/* Контейнер для превью-картинки внутри карточки */
.project-img-wrapper {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    background-color: rgba(124, 92, 67, 0.05);
    margin-bottom: 15px;
    border: 1px solid rgba(124, 92, 67, 0.06);
}

.project-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-preview-img {
    transform: scale(1.04);
}

/* Блок с текстом и кнопкой внутри карточки */
.project-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.project-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: #2c1a11;
    margin: 0;
}

/* Стилизация кнопки "Open Project / Открыть проект" под стиль твоего сайта */
.open-project-btn.view-project {
    background-color: #7c5c43;
    color: #fff;
    border: 1px solid #7c5c43;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    text-align: center;
}

.open-project-btn.view-project:hover {
    background-color: transparent;
    color: #7c5c43;
    box-shadow: 0 5px 15px rgba(124, 92, 67, 0.15);
}

/* Адаптивность для планшетов и мобилок */
@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Отступ между заголовком и блоком информации */
#modal-project-title {
    margin-bottom: 30px; 
}

/* Оформление списка внутри блока */
.modal-specs-box {
    margin-bottom: 40px; /* Увеличили отступ снизу */
    padding: 25px;
    background: #f9f6f3;
    border-radius: 12px;
}

.spec-item {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 15px;
    color: #4a3525;
}

/* Создаем красивую "точку" перед текстом */
.spec-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #7c5c43;
    font-weight: bold;
}

/* Галерея картинок */
.modal-gallery {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.gallery-block {
    background: #fff;
    border: 1px solid #735943; /* Твоя коричневая рамка */
    border-radius: 12px;
    padding: 15px;
    width: max-content;       /* Рамка сжимается под размер картинки */
    max-width: 48%;           /* Чтобы две карточки идеально помещались в одну строку */
    display: flex;
    flex-direction: column;
    align-items: center;
}




.gallery-block p {
    font-size: 12px;
    text-transform: uppercase;
    color: #7c5c43;
    margin-bottom: 8px;
    font-weight: 600;
    margin: 0 0 10px 0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.modal-gallery img {
    max-height: 380px;        /* Максимальная высота на ПК, чтобы вертикалки не были гигантскими */
    width: auto !important;   /* Сохраняем родные пропорции */
    height: auto !important;  
    max-width: 100%;          /* Защита от вылезания */
    display: block;
    border-radius: 6px;
    object-fit: contain;
}


/* Стили для самих изображений */
.modal-gallery img {
    width: 100%;
    height: 250px;
    object-fit: contain; /* Картинка будет видна вся, без обрезания */
    background-color: #fcfbf9; /* Цвет фона твоего сайта */
    border-radius: 12px;
}

/* Центрируем текст над картинками */
.gallery-block p {
    text-align: center; /* Это выровняет текст по центру */
    font-size: 12px;
    text-transform: uppercase;
    color: #7c5c43;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Убедимся, что контейнер картинки тоже не мешает */
.gallery-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрирует картинку по горизонтали, если она уже контейнера */
}

.portfolio-section .section-title {
    text-align: center; /* Центрирует текст */
    margin-bottom: 40px; /* Добавит воздуха между заголовком и сеткой карточек */
}



/* Основной контейнер */
.workflow-section {
    padding: 60px 20px;
    background-color: #fcfaf7; /* Твой фирменный цвет фона */
}

/* Заголовок по центру */
.workflow-section .section-title {
    text-align: center;
    margin-bottom: 60px;
    color: #2c1a11;
}

/* Контейнер для шагов */
.workflow-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    padding-top: 20px;
}

/* ВОЗВРАЩАЕМ ЛИНИЮ */
.workflow-container::before {
    content: '';
    position: absolute;
    top: 45px; /* Линия проходит через центры кружочков */
    left: 5%;
    right: 5%;
    height: 2px;
    background: #dcd0c5; /* Цвет линии (светло-коричневый) */
    z-index: 1;
}

/* Карточка шага */
.workflow-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 10px;
}

/* ВЕРНУЛИ КОРИЧНЕВЫЕ КРУЖКИ */
.step-number {
    width: 50px;
    height: 50px;
    background: #7c5c43; /* Твой коричневый */
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: 700;
    font-size: 18px;
    border: 4px solid #fcfaf7; /* Обводка под цвет фона, чтобы создать "дырку" */
    box-shadow: 0 0 0 2px #dcd0c5; /* Доп. контур для красоты */
}

.workflow-step h3 {
    margin-bottom: 10px;
    color: #2c1a11;
    font-size: 16px;
}

.workflow-step p {
    font-size: 13px;
    color: #4a3525;
    line-height: 1.4;
}

/* Адаптив: когда шагов много, на планшетах ставим в 2 ряда */
@media (max-width: 992px) {
    .workflow-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    .workflow-container::before { display: none; }
}


/* Отзывы */
/* Общий фон секции (оставляем светлым) */
.feedback-section {
    padding: 60px 20px;
    background-color: #fcfaf7; 
    text-align: center;
}

/* Поля ввода сделаем чисто белыми, чтобы они контрастировали с фоном карточки */
.feedback-section input, 
.feedback-section textarea {
    width: 100%;
    margin-bottom: 20px;
    padding: 15px;
    background: #ffffff; /* Белые поля на фоне #f5f0eb */
    border: 1px solid #dcd0c5;
    border-radius: 10px;
    font-family: inherit;
    box-sizing: border-box;
}

/* Карточка с «коричневым свечением» */
.form-wrapper {
    max-width: 600px;
    margin: 30px auto;
    background: #f5f0eb;
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #eaddd3;
    
    /* Свечение: добавили мягкий коричневый оттенок вокруг карточки */
    box-shadow: 0 0 20px rgba(124, 92, 67, 0.25);
    transition: box-shadow 0.3s ease; /* Плавный переход при изменении */
}

/* Эффект свечения при наведении на карточку (по желанию) */
.form-wrapper:hover {
    box-shadow: 0 0 30px rgba(124, 92, 67, 0.4);
}

/* Кнопка с анимацией */
.submit-btn {
    background: #7c5c43;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    
    /* Анимация увеличения и цвета */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit-btn:hover {
    background: #5e4633; /* Становится темнее */
    transform: scale(1.05); /* Увеличивается на 5% */
    box-shadow: 0 5px 15px rgba(124, 92, 67, 0.3); /* Добавляем тень при наведении */
}

#reviews-list {
    max-height: 500px; /* Например, высота на 3-4 отзыва */
    overflow-y: auto;  /* Появится скролл, если отзывов много */
    margin: 20px auto;
    padding-right: 10px;
    /* Стиль скроллбара (чтобы он был красивым) */
    scrollbar-width: thin;
    scrollbar-color: #7c5c43 #f5f0eb;
}

.feedback-section {
    padding-top: 40px;
    padding-bottom: 40px;
}

.section-title {
    margin-bottom: 10px; /* Прижимаем заголовок к форме */
}

.form-wrapper {
    margin-bottom: 0px !important; /* Убираем нижний отступ у формы */
}

#reviews-list {
    margin-top: 5px; /* Минимальный отступ между формой и отзывами */
}


#reviews-list {
    max-height: 400px;        /* Максимальная высота блока (влезет 3-4 отзыва) */
    overflow-y: auto;         /* Включает скролл, если контента больше */
    margin: 20px auto;        /* Отступ сверху/снизу */
    max-width: 600px;         /* Такая же ширина, как у формы */
    padding: 0 10px;          /* Чтобы текст не прилипал к краям */
    
    /* Стилизация скроллбара для Chrome, Safari и Edge */
    scrollbar-width: thin;    /* Для Firefox */
    scrollbar-color: #7c5c43 #f5f0eb; /* Коричневый ползунок на светлом фоне */
}

/* Стилизация самого скролла для Chrome/Safari */
#reviews-list::-webkit-scrollbar {
    width: 8px;               /* Ширина скролла */
}

#reviews-list::-webkit-scrollbar-track {
    background: #f5f0eb;      /* Цвет фона скролла */
    border-radius: 10px;
}

#reviews-list::-webkit-scrollbar-thumb {
    background-color: #7c5c43; /* Цвет ползунка (твой коричневый) */
    border-radius: 10px;
}


/* CV */
/* Линия-разделитель */
.section-divider {
    border: 0;
    height: 2px;
    background: #8b5e3c;
    
    /* Первое число (40px) — это отступ сверху
       Второе число (120px) — это отступ СНИЗУ (увеличь это число, сколько нужно)
       Третье (0) — отступы по бокам 
    */
    margin: 40px 0 120px 0; 
    
    width: 100%;
    opacity: 0.3;
}

/* Карточка резюме */
.cv-card {
    display: flex;
    flex-direction: row;
    gap: 40px;
    padding: 40px;
    border: 3px solid #8b5e3c;
    border-radius: 20px;
    background-color: #f5ede6;
    width: 100%;          /* Растягиваем на всю ширину секции */
    max-width: 950px;     /* Ограничиваем, чтобы не было слишком широким */
    margin: 40px auto;
    align-items: flex-start; /* Выравниваем по верхнему краю */
}

/* Левый блок: картинка и кнопка */
.cv-left {
    flex: 0 0 280px;      /* Жесткая ширина для левой части */
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

/* Квадратная рамочка для картинки */
.image-frame {
    width: 250px;
    height: 250px;
    border: 3px solid #8b5e3c;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
}

/* Правый блок: текст */
.cv-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Текст будет заполнять пространство сверху вниз */
    padding-top: 10px;
    height: auto;             /* Позволяет блоку расти вместе с текстом */
    overflow: visible;        /* Гарантирует, что текст не будет скрываться */
}

.cv-right h3 {
    font-size: 32px;          /* Увеличили размер заголовка */
    margin-bottom: 25px;      /* Добавили "воздуха" между заголовком и текстом */
    color: #8b5e3c;
}

.cv-right p {
    font-size: 18px;          /* Увеличили размер основного текста */
    line-height: 1.7;         /* Добавили межстрочный интервал для читаемости */
    color: #4a3628;
}


/* Исправление некрасивой обводки */
.cv-download-btn, .cv-download-btn:focus, .cv-download-btn:active {
    outline: none; /* Убирает обводку при нажатии */
    border: none;  /* Убирает стандартную рамку */
    box-shadow: none;
}


/* АДАПТИВНОСТЬ ДЛЯ ТЕЛЕФОНОВ */
@media (max-width: 768px) {
    .cv-card {
        flex-direction: column; /* Ставим в столбик */
        align-items: center;    /* Центрируем содержимое */
        text-align: center;
    }

    .cv-left {
        flex: 0 0 auto; /* Убираем фикс. ширину */
        width: 100%;
    }

    .cv-right {
        width: 100%;
    }
}



/* 1. Фон модального окна (затемнение) */
.modal {
    display: none; /* Или flex, если используешь JS для отображения */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #f5ede6;
    width: 95%;          /* Используем почти всю ширину экрана */
    max-width: 1500px;   /* Делаем окно шире, чтобы текст читался лучше */
    height: 90vh;
    padding: 20px;
    border: 4px solid #8b5e3c;
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;    /* Важно: скрываем всё, что выходит за рамки окна */
}
.cv-scroll-container {
    width: 100%;
    flex-grow: 1;
    overflow-y: auto;    /* Включаем скролл только по вертикали */
    overflow-x: hidden;  /* ЗАПРЕЩАЕМ горизонтальный скролл навсегда */
    border: 3px solid #8b5e3c;
    border-radius: 15px;
    background: #fff;
    margin-top: 10px;
    
    /* Красивый скролл для Chrome/Edge */
    scrollbar-width: thin;
    scrollbar-color: #8b5e3c #f5ede6;
}
/* Сама картинка: здесь магия */
.cv-image-full {
    width: 100%;         /* Картинка подстраивается под ширину контейнера */
    height: auto;        /* Сохраняет пропорции */
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Чтобы скролл был красивым в Chrome/Safari */
.cv-scroll-container::-webkit-scrollbar {
    width: 12px;
}
.cv-scroll-container::-webkit-scrollbar-track {
    background: #f5ede6;
}
.cv-scroll-container::-webkit-scrollbar-thumb {
    background-color: #8b5e3c;
    border-radius: 6px;
    border: 3px solid #f5ede6;
}

/* Рамка для картинки - делаем её доминирующей */
.cv-image-preview {
    width: 100%;
    height: 100%;       /* Растягиваем высоту */
    max-height: 72vh;   /* Увеличили предел высоты (было 60vh), чтобы убрать пустоту */
    object-fit: contain;
    border: 3px solid #8b5e3c;
    border-radius: 15px;
    margin-top: 10px;
    background: #fff;
    flex-grow: 1;       /* Позволяет картинке заполнять доступное пространство */
}

/* Кнопка "Скачать" - прижимаем к низу */
.cv-download-btn {
    /* Добавляем отступ сверху, чтобы отодвинуть кнопку от картинки */
    margin-top: 30px; 
    
    padding: 15px 50px;
    background-color: #8b5e3c;
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    /* Убираем лишние отступы снизу, если они есть */
    margin-bottom: 10px; 
}

.cv-download-btn:hover {
    background-color: #6e4a2f;
}

/* 5. Кнопка закрытия (крестик) */
/* 1. Настраиваем сам крестик */
.close {
    position: absolute; /* Делаем его независимым от других элементов */
    top: 10px;          /* Отступ от верхнего края модального окна */
    right: 20px;        /* Отступ от правого края */
    font-size: 40px;    /* Делаем его крупным и заметным */
    color: #8b5e3c;     /* Твой фирменный коричневый цвет */
    cursor: pointer;
    z-index: 100;       /* Гарантируем, что он будет поверх всего */
    line-height: 1;     /* Убираем лишние невидимые отступы вокруг иконки */
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Эффект при наведении на крестик */
.close:hover {
    color: #5a3d27;     /* Делаем темнее */
    transform: scale(1.1); /* Слегка увеличиваем при наведении (по желанию) */
}

/* 2. Даем крестику "воздух" */
/* Убедись, что у твоего контейнера с картинкой есть отступ сверху */
.cv-scroll-container {
    margin-top: 35px; /* Сдвигаем рамку с картинкой чуть ниже, чтобы крестику было место */
    /* ... остальные твои стили для этого класса оставляем как есть ... */
}




/* 1. Убираем все возможные отступы у блока резюме */
.cv-section {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* 2. Убираем отступы у блока "СВЯЗАТЬСЯ СО МНОЙ" */
/* Замени '.contact-section' на реальный класс твоего блока контактов */
.contact-section, 
.footer-container, 
#contacts { 
    margin-top: 20px !important; 
    padding-top: 0 !important;
}

/* 3. Убираем отступ у самой линии, если она отдельный элемент */
hr {
    margin: 10px 0 !important;
}
/* Делаем блок более заметным и крупным */
.cv-preview-card {
    border: 2px solid #8b5e3c;
    border-radius: 20px;
    padding: 30px 50px; /* Увеличиваем внутренние отступы для объема */
    width: 350px;       /* Задаем фиксированную ширину */
    min-height: 200px;  /* Задаем МИНИМАЛЬНУЮ высоту, чтобы блок стал выше */
    margin: 10px auto;  /* Центрируем блок */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Центрируем контент внутри по вертикали */
    align-items: center;
    background: #fdfaf7;
}

/* Красивая кнопка "Открыть резюме" */
.cv-open-btn {
    background-color: #8b5e3c;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    width: 100%; /* Кнопка растянется по ширине карточки */
}

.cv-open-btn:hover {
    background-color: #6e4a2f;
}

/* Место под картинку (превью) */
.cv-preview-img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
}


.contact-section {
    margin-top: 20px !important; /* Было, скорее всего, 100px или больше */
}


/* Контейнер для ссылок */
.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px; /* Расстояние между карточками */
    margin: 30px 0;
}

/* Квадратные карточки */
.contact-card {
    width: 120px;
    height: 120px;
    border: 2px solid #8b5e3c;
    border-radius: 20px; /* Закругленные края */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #8b5e3c;
    font-weight: 600;
    transition: all 0.3s;
    background-color: transparent;
}

.contact-card:hover {
    background-color: #8b5e3c;
    color: white;
}


/* Полностью убираем любые отступы, которые создают "зазоры" */
/* Принудительно отталкиваем футер от всего, что выше */
footer#contacts-section {
    display: block !important;
    margin-top: 50px !important; /* Увеличивай это число, чтобы отодвинуть блок целиком */
    padding-top: 80px !important; /* Увеличивай это, чтобы сдвинуть текст внутри блока */
    background-color: #ffffff;
    padding-bottom: 40px; /* Отступ внутри белого блока до его границы */
}

/* Настройка отступов для самого футера */
#contacts-section {
    text-align: center;
    margin: 40px auto;
    padding-bottom: 20px;
}

/* Копирайт внизу */
.copyright {
    font-size: 0.9em;
    color: #888;
    margin-top: 40px; /* Отделяет копирайт от кнопок */
}




/* Общая рамочка вокруг всего блока */
.contact-container {
    margin-top: 40px;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1; /* Позволяет контейнеру занимать всё доступное место */
}

/* Список ссылок: меняем column на row */
.contact-links-list {
    display: flex;
    flex-direction: row; /* Ставим в ряд */
    justify-content: center; /* Центрируем по горизонтали */
    gap: 20px; /* Расстояние между кнопками */
    margin-top: 30px;
    flex-wrap: wrap; /* Позволит им переноситься на новую строку на узких экранах */
}

/* Прямоугольные кнопки: убираем растяжение на всю ширину */
.contact-item {
    background-color: #6d5445; /* Твой коричневый цвет */
    color: white;             /* Белый текст */
    border: 2px solid #6d5445; /* Коричневая рамка */
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease; /* Плавный переход */
    display: flex;
    align-items: center;
    gap: 10px;
}


.contact-item:hover {
    background-color: rgba(255, 255, 255, 0.8); /* Полупрозрачный белый */
    color: #6d5445; /* Цвет текста становится коричневым */
    border-color: #6d5445; /* Рамка остается коричневой */
}

/* Иконка слева */
.contact-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    
}


/* Убери фиолетовый цвет для всех состояний ссылок */
nav a, 
nav a:visited, 
nav a:active {
    color: #4a3628; /* Твой основной цвет текста (поставь здесь свой HEX-код) */
    text-decoration: none; /* Убирает подчеркивание, если оно есть */
}

/* Эффект при наведении (если хочешь оставить) */
nav a:hover {
    color: #8b5e3c; /* Немного другой оттенок при наведении */
}



.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 400px;
}

.contact-form input, 
.contact-form textarea {
    padding: 12px;
    border: 1px solid #6d5445; /* Твой коричневый цвет */
    border-radius: 8px;
    background: transparent;
    color: #6d5445;
    font-family: inherit;
}

.contact-form textarea {
    height: 120px;
    resize: vertical;
}

/* Кнопка отправки будет выглядеть как твои старые кнопки */
.contact-form button {
    background-color: #6d5445;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    background-color: rgba(109, 84, 69, 0.8);
}





.contact-wrapper {
    display: flex;
    gap: 30px;                   /* Отступ между кнопками и формой */
    align-items: flex-start;
    justify-content: center;
    max-width: 900px;            /* Ограничиваем общую ширину блока */
    margin: 0 auto;
    width: 100%;
}

/* Фиксируем ширину кнопки Telegram */
.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px; /* Фиксируем ширину кнопки */
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    /* ... остальные твои стили для кнопки ... */
}

/* Настройка формы */
.custom-contact-form {
    width: 350px; /* Фиксируем ширину формы */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Убираем растягивание у textarea и добавляем скролл */
.custom-contact-form textarea {
    resize: none;          /* ЗАПРЕЩАЕМ растягивание мышкой */
    overflow-y: auto;      /* Появляется скролл, если текста много */
    height: 120px;         /* Фиксируем высоту */
    font-family: inherit;
}
/* Стили для всех полей ввода */
.custom-contact-form input, 
.custom-contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px; /* Отступ между полями */
    border: 2px solid #6d5445; /* Коричневая рамка */
    border-radius: 8px;        /* Скругление углов */
    background-color: #fcfaf8; /* Очень светлый фон, чтобы поля выделялись */
    color: #6d5445;            /* Цвет текста */
    box-sizing: border-box;    /* Чтобы padding не увеличивал ширину */
}

/* Стили для кнопки отправки */
.custom-contact-form button {
    width: 100%;
    padding: 12px;
    background-color: #6d5445; /* Коричневый фон */
    color: white;              /* Белый текст */
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.custom-contact-form button:hover {
    background-color: #5a4639; /* Чуть темнее при наведении */
}


/* Стили для блока почты */
.contact-item.contact-email-block {
    display: flex;
    align-items: center;
    background-color: #f5ede6;   /* Твой фирменный бежевый фон */
    border: 3px solid #8b5e3c;     /* Коричневая рамка */
    border-radius: 12px;           /* Скругление под стиль кнопок */
    padding: 10px 12px;            /* Уменьшили отступы, чтобы дать тексту больше места внутри */
    margin-top: 15px;              /* ОТСТУП СВЕРХУ: отодвигаем блок от кнопки Telegram */
    cursor: default;               /* Курсор-стрелка, показываем, что это не ссылка */
    user-select: text;             /* Разрешаем копировать почту */
    box-sizing: border-box;        /* Чтобы рамка не раздувала блок */
    width: 100%;
}

/* Обертка для текста */
.contact-item.contact-email-block .email-text-wrapper {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-left: 0;                /* Обнуляем отступ, так как слева нет картинки */
}

/* Маленькая надпись EMAIL: сверху */
.contact-item.contact-email-block .email-label {
    font-size: 10px;
    color: #8b5e3c;
    text-transform: uppercase;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2px;
}

/* Сам адрес твоей почты */
.contact-item.contact-email-block .email-value {
    font-size: 13px;              /* Текст отлично сидит внутри границ */
    color: #5a3d27;
    font-weight: 600;
    line-height: 1.1;
}

/* Обертка для текста внутри блока */
.email-text-wrapper {
    display: flex;
    flex-direction: column;      /* Делаем текст в две строки для аккуратности */
    margin-left: 15px;           /* Отступ от иконки до текста */
    text-align: left;
}

/* Подпись "Email:" сверху мелким шрифтом */
.email-label {
    font-size: 12px;
    color: #8b5e3c;
    text-transform: uppercase;   /* Делаем буквы заглавными */
    font-weight: bold;
    margin-bottom: 2px;
    line-height: 1;
}

/* Сам адрес почты */
.email-value {
    font-size: 18px;
    color: #5a3d27;              /* Темно-коричневый цвет для отличной читаемости */
    font-weight: 600;
}





/* Адаптация для мобильных устройств (экраны меньше 768px) */
@media (max-width: 768px) {
    
    /* Общий контейнер секции: добавляем боковые отступы, чтобы контент не лип к экрану */
    .contact-container {
        padding: 0 16px;
        box-sizing: border-box;
    }

    /* Перестраиваем обертку: вместо строки (десктоп) делаем колонку (мобилка) */
    .contact-wrapper {
        display: flex;
        flex-direction: column;   /* Кнопки теперь будут СВЕРХУ, форма СНИЗУ */
        align-items: center;      /* Центрируем оба блока */
        gap: 30px;                /* Красивый отступ между кнопками и формой */
        width: 100%;
        box-sizing: border-box;
    }

    /* Колонка с кнопками Telegram и Email */
    .contact-buttons-column {
        display: flex;
        flex-direction: column;
        gap: 12px;                /* Расстояние между кнопкой Telegram и Email */
        width: 100%;              /* Растягиваем на всю ширину */
        max-width: 340px;         /* Но ограничиваем, чтобы на планшетах кнопки не были гигантскими */
    }

    /* Кнопка Telegram и блок Почты на мобилке */
    .contact-item {
        width: 100% !important;   /* Жестко заставляем их быть одинаковой ширины */
        max-width: 100%;
        box-sizing: border-box;
        justify-content: center;  /* Центрируем контент внутри кнопок для аккуратности */
    }

    /* Сама форма */
    .custom-contact-form {
        display: flex;
        flex-direction: column;
        gap: 12px;                /* Отступы между полями ввода */
        width: 100%;              /* Форма берет всю ширину */
        max-width: 340px;         /* Выравниваем максимальную ширину строго по кнопкам */
        box-sizing: border-box;
    }

    /* Поля ввода (Имя, Почта, Сообщение) и кнопка отправки */
    .custom-contact-form input,
    .custom-contact-form textarea,
    .custom-contact-form button {
        width: 100% !important;   /* Запрещаем им сжиматься или вылезать за рамки */
        max-width: 100%;
        box-sizing: border-box;   /* Чтобы внутренние отступы не взрывали ширину */
    }
    
    /* Слегка уменьшаем размер шрифта почты на совсем маленьких экранах (типа 320px) */
    .contact-item.contact-email-block .email-value {
        font-size: 13px;
    }



    /* === АДАПТАЦИЯ БЛОКА WORKFLOW === */

    /* Переводим контейнер из горизонтальной строки в вертикальный столбец */
    .workflow-container {
        display: flex;
        flex-direction: column;   /* Строго друг под другом */
        align-items: center;      /* Центрируем карточки по экрану */
        gap: 25px;                /* Удобный отступ между шагами */
        width: 100%;
        padding: 0 20px;          /* Защитные отступы по бокам страницы */
        box-sizing: border-box;
    }

    /* Настройка самой карточки этапа на мобилке */
    .workflow-step {
        width: 100% !important;   /* Карточка занимает всю ширину... */
        max-width: 300px;         /* ...но не шире 300px, чтобы текст сидел плотно и аккуратно */
        text-align: center;       /* Центрируем текст внутри карточки */
        box-sizing: border-box;
        margin: 0 auto;           /* Дополнительное центрирование */
    }

    /* Если у тебя у номеров (01, 02...) или заголовков были жесткие сдвиги влево, */
    /* центрируем их, чтобы на мобилке всё смотрелось симметрично */
    .workflow-step .step-number {
        margin: 0 auto 10px auto; /* Центрируем кружочек/номер и даем отступ снизу */
    }

    .workflow-step h3 {
        margin-bottom: 8px;
        font-size: 18px;          /* Чуть-чуть уменьшаем размер для аккуратности */
    }

    .workflow-step p {
        font-size: 14px;
        line-height: 1.4;
    }




    /* === АДАПТАЦИЯ МОДАЛЬНОГО ОКНА (CV) === */

    /* Само белое окошко */
    .modal-content {
        width: 90% !important;       /* Делаем аккуратные отступы от краев экрана телефона */
        max-width: 400px;            /* Чтобы на планшетах окно не растягивалось слишком сильно */
        padding: 30px 15px 20px 15px;/* Снижаем внутренние отступы (сверху место для крестика) */
        height: auto !important;     /* СБРАСЫВАЕМ фиксированную высоту, окно сожмется по контенту */
        box-sizing: border-box;
    }

    /* Контейнер, в котором лежит картинка */
    .cv-scroll-container {
        width: 100% !important;
        height: auto !important;     /* Убираем фиксированную высоту десктопа */
        max-height: 60vh;            /* Ограничиваем, чтобы картинка не улетела вниз за экран */
        overflow-y: auto;            /* Если картинка длинная, её можно будет скроллить внутри */
        margin-bottom: 15px;         /* Отступ до кнопки "Скачать PDF" */
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch; /* Плавный скролл на айфонах */
    }

    /* Сама картинка резюме */
    .cv-image-full {
        width: 100% !important;      /* Растягиваем строго по ширине контейнера */
        height: auto !important;     /* Пропорции сохраняются идеально */
        display: block;
    }

    /* Кнопка "Скачать PDF" внутри модалки */
    .cv-download-btn {
        width: 100% !important;      /* Делаем кнопку широкой и удобной для нажатия пальцем */
        max-width: 280px;            /* Но держим в аккуратных пределах */
        margin: 0 auto;              /* Центрируем её */
        display: block;
        text-align: center;
        box-sizing: border-box;
    }

    /* Кнопка закрытия (крестик) */
    .modal-content .close {
        top: 5px;
        right: 12px;
        font-size: 28px;             /* Чуть увеличиваем, чтобы на мобилке было легче попасть пальцем */
    }
}



