/*
===========================================
СТИЛИ САЙТА АО "ЦИФРОВЫЕ РЕШЕНИЯ"
===========================================

Описание: Основные стили корпоративного сайта
Версия: 1.8
Дата: 26.09.2025
Автор: Веб-разработчик

Содержание:
1. Глобальные стили и сброс
2. Заголовок и навигация
3. Hero-секция с анимациями
4. Секции контента
5. Подвал сайта
6. Адаптивность и медиа-запросы

Технологии:
- CSS3 (Flexbox, Grid)
- CSS Custom Properties
- Media Queries
- Keyframe Animations
- Modern CSS features

Поддержка браузеров:
- Chrome 60+
- Firefox 55+
- Safari 12+
- Edge 79+

Брейкпоинты:
- Mobile: < 480px
- Tablet: 768px - 1024px
- Desktop: > 1024px
===========================================
*/

/* ===================================
   ГЛОБАЛЬНЫЕ СТИЛИ И СБРОС
   ================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    font-size: 16px;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === ЗАГОЛОВОК === */
.header {
    background: #ffffff;
    color: #1a1a1a;
    padding: 1.5rem 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
    /* Оптимизация для SVG */
    max-width: 200px;
    transition: transform 0.3s ease;
}

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

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #1a1a1a;
    margin: 0;
}

.navigation {
    position: relative;
}

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

.navigation .nav-menu a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap; /* Задача 1: меню "О нас" в одну строку */
}

.navigation .nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #007acc;
    transition: width 0.3s ease;
}

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

.navigation .nav-menu a:hover {
    color: #007acc;
}

/* Мобильное меню */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle:focus {
    outline: 2px solid #007acc;
    outline-offset: 2px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #1a1a1a;
    transition: 0.3s;
}

/* === ОСНОВНОЙ КОНТЕНТ === */
.main-content {
    margin-top: 80px;
}

/* Секция Hero */
.hero {
    background: #ffffff;
    color: #1a1a1a;
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 204, 0.03) 0%, rgba(0, 122, 204, 0.08) 100%);
    z-index: 1;
}

/* Независимый блок для анимации заголовка */
.hero-title-section {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-bottom: 4rem;
}

.hero-title-wrapper {
    position: relative;
    height: 10rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Независимый блок для typewriter */
.hero-typewriter-section {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: static;
    height: auto;
    transform: none;
    animation: none;
}

.hero-word {
    display: block;
    opacity: 0;
    position: static;
    transform: none;
}

.hero-word-left {
    animation: slideInFromLeft 1.2s ease-out 0.5s forwards;
    position: static;
    display: block;
    text-align: left;
    padding-left: 2rem;
    transform: translateX(0);
    will-change: auto;
}

.hero-word-right {
    animation: slideInFromRight 1.2s ease-out 1s forwards;
    position: static;
    display: block;
    text-align: right;
    padding-right: 2rem;
    transform: translateX(0);
    will-change: auto;
}

/* Typewriter эффект для заголовков кейсов */
.typewriter-container {
    position: relative;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    max-width: 600px;
}

.typewriter-text {
    font-size: 1.2rem;
    font-weight: 400;
    color: #666;
    margin: 0;
    line-height: 1.6;
    min-height: 1.2rem;
}

.typewriter-cursor {
    display: inline-block;
    color: #007acc;
    font-size: 1.2rem;
    font-weight: bold;
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Широкие экраны */
@media (min-width: 1400px) {
    .hero-word-left {
        left: -200px;
    }

    .hero-word-right {
        right: -200px;
    }
}

/* Анимации */
@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100vw);
    }
    70% {
        transform: translateX(10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100vw);
    }
    70% {
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}





/* Секция Компетенции */
.competencies {
    padding: 6rem 0;
    background: #f8f9fa;
}

.competencies h2 {
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: 0.05em;
    color: #1a1a1a;
}

.competencies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.competency-item {
    background: #ffffff;
    padding: 1.5rem;
    text-align: center;
    font-weight: 500;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: default;
}

.competency-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 122, 204, 0.15);
    color: #007acc;
}



.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #5a6c7d;
    text-align: justify; /* Задача 3: выравнивание по краям */
}

.about-content {
    font-size: 1.1rem;
    color: #5a6c7d;
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.about-features {
    display: grid;
    gap: 1.5rem;
}

.feature {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature h3 {
    color: #5a8fb0;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.feature p {
    color: #5a6c7d;
}

/* Секция Услуги */
.services {
    padding: 6rem 0;
    background: #ffffff;
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 4rem;
    letter-spacing: 0.05em;
    color: #1a1a1a;
}

.services-content {
    max-width: 1200px;
    margin: 0 auto;
}

.service-category {
    margin-bottom: 4rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #007acc;
}

.service-category-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    letter-spacing: 0.05em;
}

.service-category-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    font-style: italic;
}

.service-section {
    margin-bottom: 2rem;
}

.service-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #007acc;
    letter-spacing: 0.03em;
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    padding-left: 2rem;
    color: #444;
    line-height: 1.6;
}

.service-list li::before {
    content: counter(item);
    counter-increment: item;
    position: absolute;
    left: 0;
    top: 0.75rem;
    background: #007acc;
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.service-list {
    counter-reset: item;
}

.service-list li:last-child {
    border-bottom: none;
}

/* Секция Кейсы */
.cases {
    padding: 6rem 0;
    background: #f8f9fa;
}

.cases h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 4rem;
    letter-spacing: 0.05em;
    color: #1a1a1a;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.case-card {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid #007acc;
}

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 122, 204, 0.15);
}

.case-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    letter-spacing: 0.03em;
}

.case-location {
    font-size: 0.9rem;
    color: #007acc;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.case-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.case-solution {
    color: #444;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.case-result {
    color: #007acc;
    font-weight: 500;
    line-height: 1.6;
}

/* Секция Преимущества */
.advantages {
    background: #f8f9fa;
}

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

.advantage-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.advantage-card:hover {
    transform: translateY(-5px);
}

.advantage-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #007acc;
    letter-spacing: 0.03em;
}

.advantage-description {
    color: #666;
    line-height: 1.6;
}

/* Секция Команда */
.team {
    padding: 6rem 0;
    background: #f8f9fa;
}

.team h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 4rem;
    letter-spacing: 0.05em;
    color: #1a1a1a;
}

.team-content {
    max-width: 800px;
    margin: 0 auto;
}

.team-member {
    background: #ffffff;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.member-name {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    letter-spacing: 0.05em;
}

.member-position {
    font-size: 1.1rem;
    color: #007acc;
    font-weight: 600;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.member-experience,
.member-education,
.member-achievements {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: left;
}

.member-contact {
    display: inline-block;
    background: #007acc;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.member-contact:hover {
    background: #0056a3;
    transform: translateY(-2px);
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === НОВЫЕ РАЗДЕЛЫ === */
.about, .education, .consulting, .interactions, .advantages {
    padding: 5rem 0;
}

/* Общий стиль заголовков для новых разделов */
.about h2, .education h2, .consulting h2, .interactions h2, .advantages h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 4rem;
    letter-spacing: 0.05em;
    color: #2c3e50;
}

/* Специальный стиль для заголовка "О НАС" - более контрастный и красивый */
.about h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    text-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Добавляем подложку для поддержки браузеров без background-clip */
.about h2::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: -1;
    color: #4a5568;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.about {
    background: #f8f9fa;
}

.education {
    background: white;
}

.consulting {
    background: #f8f9fa;
}

.interactions {
    background: white;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

/* Обучение */
.education-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    justify-items: center;
}

/* Центрируем 5-й элемент на последней строке */
.education-card:nth-child(5) {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 400px;
}

.education-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
}

.education-card h3 {
    color: #007acc;
    margin-bottom: 1rem;
}

.education-card p {
    color: #444;
    line-height: 1.6;
    font-weight: 500;
}

.course-topics {
    margin-top: 1rem;
}

.topic-tag {
    background: #007acc;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0.3rem 0.2rem;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid #007acc;
}

.topic-tag:hover {
    background: white;
    color: #007acc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 122, 204, 0.2);
}

/* Дополнительные блоки образования */
/* Блок "Для кого" перенесен под заголовок, выровнен по центру с синей границей */
.education-audience-top {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #007acc;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
}

.education-audience-top h4 {
    color: #007acc;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
}

.education-audience-top ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.education-audience-top li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    color: #444;
    font-weight: 500;
}

.education-audience-top li:last-child {
    border-bottom: none;
}

.education-additional {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.education-audience,
.education-format {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.education-audience h4,
.education-format h4 {
    color: #007acc;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.education-audience ul,
.education-format ul {
    list-style: none;
    padding: 0;
}

.education-audience li,
.education-format li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    color: #444;
    font-weight: 500;
}

.education-audience li:last-child,
.education-format li:last-child {
    border-bottom: none;
}

/* Консалтинг */
.consulting-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.consulting-card {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.consulting-card:hover {
    transform: translateY(-5px);
}

.consulting-card h3 {
    color: #007acc;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.consulting-card p {
    color: #444;
    line-height: 1.6;
    font-weight: 500;
}

/* Этапы работы */
.stages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    justify-items: center;
}

.stage-item {
    display: flex;
    align-items: center; /* Задача 2: выравнивание по центру */
    flex-direction: column; /* Задача 2: вертикальное расположение */
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: background-color 0.3s ease;
    text-align: center; /* Задача 2: выравнивание по центру */
}

/* Центрируем 5-й элемент на последней строке */
.stage-item:nth-child(5) {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 400px;
}

.stage-item:hover {
    background: #e9ecef;
}

.stage-number {
    background: #007acc;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.stage-content h3 {
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    text-align: center; /* Задача 2: выравнивание по центру */
}

.stage-content p {
    color: #666;
    line-height: 1.6;
    text-align: center; /* Задача 2: выравнивание по центру */
}

/* === КОНТАКТЫ === */
.contact {
    background: #f8f9fa;
    padding: 4rem 0;
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

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

.contact .contact-info p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact .contact-info strong {
    color: #007acc;
    font-weight: 600;
}

.contact .contact-info a {
    color: #007acc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact .contact-info a:hover {
    color: #005a9e;
    text-decoration: underline;
}

/* === ПОДВАЛ === */
.footer {
    background: #1a1a1a;
    color: #ffffff;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ecf0f1;
    font-size: 1.2rem;
}

.contact-info p,
.company-details p {
    margin-bottom: 0.5rem;
    color: #bdc3c7;
}

.contact-info a {
    color: #007acc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #0056a3;
}

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

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

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-logo {
    flex-shrink: 0;
}

.footer-logo-image {
    height: 60px;
    width: auto;
    object-fit: contain;
    opacity: 0.8;
    /* Оптимизация для SVG */
    max-width: 250px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-logo-image:hover {
    opacity: 1;
    transform: scale(1.02);
}

.footer-text {
    text-align: center;
    color: #95a5a6;
}

.footer-text p {
    margin: 0.25rem 0;
}

/* === АДАПТИВНОСТЬ === */

/* Средние экраны - мобильное меню */
@media (max-width: 1024px) {
    .navigation .nav-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        min-width: 200px;
        max-width: min(280px, calc(100vw - 2rem));
        width: auto;
        background: rgba(255, 255, 255, 0.98);
        padding: 1.5rem;
        gap: 1rem;
        backdrop-filter: blur(15px);
        border-radius: 15px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        z-index: 10000;
        box-sizing: border-box;
        /* Плавное появление без дергания */
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

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

    .navigation .nav-menu a {
        display: block;
        padding: 0.75rem 1rem;
        text-align: center;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .navigation .nav-menu a:hover {
        background: rgba(0, 122, 204, 0.1);
        color: #007acc;
        transform: none;
    }

    .navigation .nav-menu.active {
        display: flex;
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        animation: fadeInDown 0.3s ease-out;
    }

    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

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

/* Планшеты */
@media (max-width: 768px) {
    .logo {
        gap: 0.5rem;
    }

    .logo-image {
        height: 32px;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-logo-image {
        height: 50px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-title {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .hero-title-section {
        margin-bottom: 3rem;
    }

    .hero-typewriter-section {
        margin-top: 2rem;
    }

    .typewriter-container {
        justify-content: center;
        margin: 0 auto;
    }

    .typewriter-text,
    .typewriter-cursor {
        font-size: 1.1rem;
    }

    .hero-word-left,
    .hero-word-right {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        transform: none !important;
        text-align: center !important;
        padding: 0 !important;
        width: auto !important;
    }



    .competencies-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .cases-grid {
        grid-template-columns: 1fr;
    }

    .advantages-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 0 15px;
    }

    /* Заголовок */
    .header-content {
        flex-wrap: wrap;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }



    /* Hero секция */
    .hero-content h2 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* О компании */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Образование */
    .education-additional {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 3rem;
    }

    .education-grid {
        grid-template-columns: 1fr;
    }

    .education-card:nth-child(5) {
        grid-column: auto;
        max-width: none;
    }

    /* Консалтинг - адаптация под мобильные устройства */
    .consulting-grid {
        grid-template-columns: 1fr;
    }

    /* Этапы взаимодействия - адаптация под мобильные устройства */
    .stages-grid {
        grid-template-columns: 1fr;
    }

    .stage-item:nth-child(5) {
        grid-column: auto;
        max-width: none;
    }

    .about h2,
    .services h2 {
        font-size: 2rem;
    }

    /* Сохраняем градиент для заголовка "О НАС" на планшетах */
    .about h2 {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    /* Услуги */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Подвал */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Планшеты среднего размера */
@media (max-width: 768px) {
    .navigation .nav-menu {
        top: 60px;
        min-width: 180px;
        max-width: min(250px, calc(100vw - 2rem));
    }
}

/* Мобильные устройства средние */
@media (max-width: 640px) {
    .navigation .nav-menu {
        top: 60px;
        min-width: 200px;
        max-width: calc(100vw - 2rem);
    }
}

/* Мобильные устройства */
@media (max-width: 480px) {
    .navigation .nav-menu {
        top: 60px;
        min-width: auto;
        max-width: calc(100vw - 1rem);
        width: calc(100vw - 1rem);
    }
}

/* Очень маленькие экраны */
@media (max-width: 375px) {
    .navigation .nav-menu {
        top: 55px;
        padding: 1rem;
        min-width: auto;
        max-width: calc(100vw - 0.5rem);
        width: calc(100vw - 0.5rem);
    }

    .main-content {
        margin-top: 70px;
    }

    .hero {
        padding: 4rem 0 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-title-wrapper {
        height: 6rem;
    }



    .hero-title {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.25rem !important;
    }

    .hero-title-section {
        margin-bottom: 2rem;
    }

    .hero-typewriter-section {
        margin-top: 1rem;
    }

    .typewriter-container {
        height: 2.5rem;
        justify-content: center;
        margin: 0 auto;
    }

    .typewriter-text,
    .typewriter-cursor {
        font-size: 1rem;
    }

    .hero-word-left,
    .hero-word-right {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        transform: none !important;
        text-align: center !important;
        padding: 0 !important;
        width: auto !important;
    }



    .competencies,
    .services,
    .cases,
    .advantages,
    .team {
        padding: 3rem 0;
    }

    .competencies h2,
    .services h2,
    .cases h2,
    .advantages h2,
    .team h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .service-category {
        padding: 1.5rem;
    }

    .case-card,
    .team-member {
        padding: 2rem;
    }
    .container {
        padding: 0 10px;
    }

    /* Hero секция */
    .hero {
        padding: 3rem 0;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

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



    /* Секции */
    .about,
    .services {
        padding: 3rem 0;
    }

    .about h2,
    .services h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    /* Сохраняем градиент для заголовка "О НАС" на мобильных */
    .about h2 {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .about-text p {
        font-size: 1rem;
    }

    .service-card,
    .feature {
        padding: 1.5rem;
    }

    /* Подвал */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-section h3 {
        font-size: 1.1rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 320px) {
    .navigation .nav-menu {
        top: 50px;
        padding: 0.75rem;
        min-width: auto;
        max-width: calc(100vw - 0.25rem);
        width: calc(100vw - 0.25rem);
        gap: 0.75rem;
    }

    .logo {
        gap: 0.25rem;
    }

    .logo-image {
        height: 28px;
    }

    .logo h1 {
        font-size: 1rem;
    }

    .footer-logo-image {
        height: 40px;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .about h2,
    .services h2 {
        font-size: 1.6rem;
    }

    /* Сохраняем градиент для заголовка "О НАС" на маленьких экранах */
    .about h2 {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .service-card,
    .feature {
        padding: 1rem;
    }
}

/* Анимации и переходы */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .feature {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Темная тема (если поддерживается системой) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    .about {
        background-color: #2a2a2a;
    }

    .feature,
    .service-card {
        background: #333;
        color: #e0e0e0;
    }

    .about-text p,
    .service-card p,
    .feature p {
        color: #b0b0b0;
    }
}