/* ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ */
:root {
    --bg-color: #F8F9FA; 
    --text-main: #333333; 
    --accent-teal: #234C58; 
    --accent-brown: #5E524B; 
    --accent-burgundy: #7C2A31; 
    --sub-beige: #E6DCD3; 
    --sub-blue: #D0E1E8; 
    --sub-ochre: #E8D5B5; 
    --radius: 12px; 
}

/* БАЗОВЫЕ НАСТРОЙКИ И ФИКС ОТТЯЖКИ IOS */
html { 
    background-color: var(--accent-teal); 
    overflow-x: hidden; /* Блокируем скролл вправо */
}
body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;              
    flex-direction: column;     
    overflow-x: hidden; /* Блокируем скролл вправо */
    width: 100%;
}

/* ГЛАВНЫЙ ЭКРАН (Hero) */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
    isolation: isolate; /* Защита видео от проваливания */
}
#bg-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: -2;
    background-color: var(--accent-teal);
}
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5) !important; /* Темный фон для контраста */
    z-index: -1;
}
.hero-content { z-index: 1; max-width: 800px; padding: 20px; }
.hero-content h1 { font-size: 4.5rem !important; margin-bottom: 20px; }
.hero-content p { font-size: 1.5rem !important; margin-bottom: 40px; }

/* КНОПКИ */
.cta-button {
    background-color: var(--accent-teal);
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.hero-content .cta-button { font-size: 20px; padding: 20px 45px; }
.cta-button:hover { background-color: var(--accent-brown); }
.cta-button-alt { background-color: var(--accent-brown); }
.cta-button-alt:hover { background-color: var(--text-main) !important; }
.cta-button:disabled { background-color: #ccc; cursor: not-allowed; }

/* СЕТКИ (Команда, Портфолио, Услуги) */
.team-container, .portfolio-container, .services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
section h2 { text-align: center; font-size: 2.5rem; color: var(--accent-teal); margin-top: 80px; margin-bottom: 20px; }

/* КАРТОЧКИ */
.team-card, .service-card {
    background-color: #ffffff;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0, 0.05);
}
.service-card { text-align: left; transition: transform 0.3s, box-shadow 0.3s; border: 1px solid var(--sub-beige); padding: 30px; }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(35, 76, 88, 0.1); border-color: var(--sub-blue); }
.service-icon { 
    margin-bottom: 20px; 
    color: var(--accent-teal); /* Красим SVG в фирменный бирюзовый */
    display: flex;
}

.service-icon svg {
    transition: transform 0.3s ease; /* Плавность для эффекта */
}

/* При наведении на саму карточку, SVG-иконка немного увеличивается */
.service-card:hover .service-icon svg {
    transform: scale(1.15);
}
.service-card h3 { color: var(--accent-teal); font-size: 1.3rem; margin-top: 0; margin-bottom: 15px; }
.service-card p { color: var(--text-main); font-size: 0.95rem; line-height: 1.5; margin: 0; }
.portfolio-card { background-color: #ffffff; border: 1px solid var(--sub-beige); border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0, 0.05); transition: transform 0.3s ease; }
.portfolio-card:hover { transform: translateY(-10px); }

/* ОСНОВАТЕЛИ */
.founders-container {
    display: flex; justify-content: center; gap: 40px; max-width: 900px; margin: 0 auto; padding: 20px; flex-wrap: wrap;
}
.founder-card { text-align: center; padding: 20px; background-color: #ffffff; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0, 0.05); max-width: 260px; width: 100%; }

/* ФОРМА ЗАЯВКИ */
.final-cta { background-color: var(--sub-blue); text-align: center; padding: 80px 20px; margin-top: 60px; }
.final-cta h2 { margin-top: 0; color: var(--accent-teal); }
.final-cta p { font-size: 1.2rem; color: var(--text-main); margin-bottom: 30px; max-width: 600px; margin: 0 auto 30px auto; }
.contact-form { display: flex; flex-direction: column; gap: 15px; max-width: 450px; margin: 0 auto; }
.contact-form input, .contact-form textarea { width: 100%; padding: 16px; border: 1px solid var(--sub-beige); border-radius: var(--radius); font-family: inherit; font-size: 1rem; box-sizing: border-box; background-color: #ffffff; transition: border-color 0.3s, box-shadow 0.3s; }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent-teal); box-shadow: 0 0 0 3px rgba(35, 76, 88, 0.15); }

/* =========================================
   ПОДВАЛ САЙТА И КОНТАКТЫ
   ========================================= */
.site-footer {
    background-color: var(--accent-teal);
    color: #ffffff;
    padding: 60px 20px 20px 20px;
    text-align: center;
}

.site-footer {
    background-color: var(--accent-teal);
    color: #ffffff;
    padding: 60px 20px 20px 20px;
    text-align: center;
    margin-top: auto;           /* Новое магия: автоматически отталкивает подвал в самый низ */
    width: 100%;                /* Защита от сдвигов */
    box-sizing: border-box;
}
/* Общий фикс для центрирования всех иконок в подвале */
.contact-link {
    display: inline-flex;
    align-items: center; /* Центрирует иконку и текст по вертикали */
    gap: 10px; /* Отступ между иконкой и текстом */
    text-decoration: none;
}

.contact-link svg {
    flex-shrink: 0; /* Не дает иконке сжиматься */
    display: block; /* Убирает базовые отступы инлайновых элементов */
}

/* Специфичный фикс для твоей иконки ВК с большими полями */
.contact-link .vk-icon {
    /* Твой рисунок съехал вправо-вниз внутри viewBox, 
       мы компенсируем это отрицательными маргинами */
    margin-left: -3px; 
    margin-right: -3px;
}

.footer-column h3 {
    color: var(--sub-ochre);
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 600;
}

.footer-column p {
    margin: 15px 0;
}

.contact-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.05rem;
    opacity: 0.8;
    transition: opacity 0.2s, color 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.contact-link:hover {
    opacity: 1;
    color: var(--sub-ochre);
    transform: translateX(5px); /* Легкое смещение вправо при наведении (эффект интерактива) */
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Тонкая линия разделитель */
    padding-top: 25px;
    font-size: 0.9rem;
    opacity: 0.5;
}

/* Адаптация под телефоны */
@media (max-width: 768px) {
    .portfolio-container {
        display: grid;
        grid-template-columns: 1fr; /* Одна колонка на телефоне */
        gap: 20px;
        height: auto; /* Снимаем любые ограничения по высоте */
        overflow: visible; /* Разрешаем контенту выходить вниз */
    }
}

/* ОКНА ПОРТФОЛИО (МОДАЛКИ) */
.modal { display: none; position: fixed; z-index: 100; left: 0; top: 0; width: 100%; height: 100%; overflow-y: auto; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); }
.modal-content { background-color: #ffffff; border-radius: var(--radius); position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.3); box-sizing: border-box !important; width: 92% !important; padding: 30px 20px !important; margin: 40px auto !important; max-width: 1400px; }
#modal-title { padding-right: 40px; line-height: 1.3; }
.close-modal, .close-lightbox { position: absolute; color: #999; font-size: 40px; font-weight: 300; cursor: pointer; transition: color 0.2s; }
.close-modal { right: 15px !important; top: 15px !important; z-index: 10; }
.close-lightbox { right: 30px; top: 20px; color: #ffffff; font-size: 50px; }
.close-modal:hover, .close-lightbox:hover { color: var(--accent-burgundy); }
.modal-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.gallery-thumb { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: calc(var(--radius) / 2); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; border: 1px solid var(--sub-beige); }
.gallery-thumb:hover { transform: scale(1.02); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.gallery-thumb:first-child { grid-column: 1 / -1; aspect-ratio: 16/9; max-height: 75vh; cursor: zoom-in; }

/* ПОЛНОЭКРАННЫЙ ЛАЙТБОКС */
.lightbox { display: none; position: fixed; z-index: 200; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.95); align-items: center; justify-content: center; }
.lightbox-content { max-width: 85%; max-height: 85%; display: flex; align-items: center; justify-content: center; }
.lightbox-content img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.lightbox-arrow { position: absolute; background: rgba(255, 255, 255, 0.08); color: white; border: none; font-size: 35px; cursor: pointer; border-radius: 50%; transition: background 0.2s, transform 0.2s; user-select: none; top: 50%; transform: translateY(-50%); width: 65px; height: 65px; padding: 0; display: flex; align-items: center; justify-content: center; }
.lightbox-arrow:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-50%) scale(1.1); }
.prev-arrow { left: 40px; }
.next-arrow { right: 40px; }

/* АДАПТИВНОСТЬ ДЛЯ ТЕЛЕФОНОВ */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem !important; }
    .hero-content p { font-size: 1.2rem !important; }
    .hero-content .cta-button { font-size: 16px; padding: 16px 32px; }
    .lightbox-arrow { width: 45px; height: 45px; font-size: 22px; }
    .prev-arrow { left: 15px; }
    .next-arrow { right: 15px; }
    .gallery-thumb:first-child { aspect-ratio: 4/3; max-height: 50vh; }
}
@media (max-width: 380px) {
    #modal-title { font-size: 1.3rem; }
}

/* =========================================
   БЕГУЩАЯ СТРОКА С ЛОГОТИПАМИ СОФТА
   ========================================= */
.software-ticker {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px 0;
    overflow: hidden;
    margin: 40px 0 60px 0;
    display: flex;
}

.ticker-wrap {
    display: flex;
    width: max-content;
}

/* Настраиваем каждую группу */
.ticker-group {
    display: flex;
    gap: 80px;
    padding-right: 80px; /* Отступ после группы, чтобы соединение было ровным */
    animation: tickerAnimation 15s linear infinite; /* 15 секунд на пролет одной группы */
}

/* Остановка всех групп при наведении мыши на ленту */
.software-ticker:hover .ticker-group {
    animation-play-state: paused;
}

.ticker-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Настройка внешнего вида логотипов */
.ticker-item img {
    height: 32px;
    width: auto;
    filter: grayscale(1) brightness(1.5);
    opacity: 0.4;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Эффект при наведении */
.ticker-item:hover img {
    filter: grayscale(0) brightness(1);
    opacity: 1;
}

/* Магия бесконечного сдвига: сдвигаем ровно на 100% ширины одной группы */
@keyframes tickerAnimation {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}
.partners-section {
    padding: 60px 20px;
    text-align: center;
}

.partners-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 40px auto 0;
}

.partner-logo-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    width: 200px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    
    /* УМНОЕ ВЫРАВНИВАНИЕ */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Центрирует картинку по вертикали, если нет текста */
    align-items: center;
    gap: 15px; /* Расстояние между картинкой и текстом, если текст есть */
}

.partner-logo-card img {
    max-width: 100%;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0; /* Обнуляем жесткий отступ, теперь им управляет gap */
    filter: grayscale(1) brightness(1.5);
    transition: filter 0.3s ease;
}
/* Специальное увеличение для квадратных/вертикальных логотипов */
.partner-logo-card img.square-logo {
    height: 100px; /* Увеличили высоту почти в два раза */
    max-height: 120px; 
}

.partner-logo-card h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
}

.partner-logo-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-teal);
}

.partner-logo-card:hover img {
    filter: grayscale(0) brightness(1);
}
/* =========================================
   СПЛИТ-ЭКРАН (Главная страница): ОСНОВАТЕЛИ + КЕЙСЫ
   ========================================= */
.desktop-split-layout {
    display: flex;
    flex-direction: column;
    gap: 60px;
    max-width: 1500px; /* РАСШИРИЛИ КОНТЕЙНЕР: забираем пустое место по краям монитора */
    margin: 80px auto;
    padding: 0 20px;
}

.split-left, .split-right {
    width: 100%;
}

/* Левая колонка (Основатели) */
.split-left h2 {
    color: var(--accent-teal);
    font-size: 2.5rem;
    margin-top: 0;
    /* Увеличиваем нижний отступ, чтобы текст опустился вровень с карточками справа */
    margin-bottom: 65px; 
    text-align: left;
}

.split-left p {
    font-size: 1.2rem;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 15px; /* Воздух между самими абзацами */
    text-align: left;
}

/* Делаем так, чтобы после последнего абзаца был правильный отступ до фотографий */
.split-left p:last-of-type {
    margin-bottom: 40px;
}

/* Сетка основателей (ДЛЯ ТЕЛЕФОНОВ) */
.split-left #founders-container {
    display: grid;
    grid-template-columns: 1fr; /* На телефонах выстраиваем вас ДРУГ ПОД ДРУГОМ */
    gap: 30px; /* Аккуратный отступ */
    width: 100%;
    padding: 0; 
    margin: 0;
}

/* ПРИНУДИТЕЛЬНОЕ ВЫРАВНИВАНИЕ САМИХ КАРТОЧЕК */
.split-left #founders-container > div {
    margin: 0 !important; 
    width: 100% !important; 
    max-width: none; 
    box-sizing: border-box; /* Запрещаем карточке расширяться из-за внутренних отступов */
}

/* Правая колонка (Кейсы) */
.split-right h2 {
    color: var(--accent-teal);
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
}

.cases-btn {
    margin-top: 40px;
    text-align: center;
}

/* Прячем 4-ю карточку на телефонах */
#portfolio-preview-container > div:nth-child(4) {
    display: none;
}

/* =========================================
   АДАПТИВ ДЛЯ ШИРОКИХ ЭКРАНОВ (ПК и ноутбуки)
   ========================================= */
@media (min-width: 1024px) {
    .desktop-split-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 120px; /* УВЕЛИЧИЛИ ВОЗДУХ: теперь между текстом и кейсами большая свободная зона */
    }

    .split-left {
        flex: 0 0 47%; /* СДЕЛАЛИ ТЕКСТ ШИРЕ: левая колонка занимает почти половину экрана */
    }

    .split-right {
        flex: 1; /* Правая занимает всё оставшееся место */
    }

    /* Увеличиваем расстояние между Никитой и Варей ТОЛЬКО НА ПК */
    .split-left #founders-container {
        grid-template-columns: 1fr 1fr; /* Возвращаем 2 колонки рядом */
        gap: 60px; /* Тот самый большой воздух */
    }

    .split-right .portfolio-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Возвращаем 4-ю карточку на ПК */
    #portfolio-preview-container > div:nth-child(4) {
        display: block;
    }
}
.hidden-honeypot {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
    pointer-events: none;
}