body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #f0f0f0; /* Более светлый текст для лучшей контрастности на темном */
    line-height: 1.7;
    background-color: #0d0d0d; /* Еще более темный, глубокий фон */
}

/* Универсальная модель коробки для всех элементов как на страницах услуг */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body { overflow-x: hidden; }

.container {
    width: 90%;
    max-width: 1300px; /* Увеличить максимальную ширину контейнера */
    margin: 0 auto;
    padding: 20px 0;
}

header {
    background-color: #1a1a1a; /* Темнее для шапки */
    border-bottom: 1px solid #333;
    padding: 18px 0; /* Немного больше padding */
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    color: #e0e0e0;
}

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

.header-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 35px;
}

.logo img {
    height: 100px;
    width: 100px;
    margin-right: 15px;
    object-fit: contain;
    filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.5)); /* Чуть ярче тень лого */
}

.logo span {
    font-size: 1.8em;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255,255,255,0.7);
}

.contact-info {
    display: none;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    margin-left: auto;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: #00b0ff;
    font-weight: 700;
    font-size: 1.1em;
    transition: color 0.3s ease, transform 0.2s ease, text-shadow 0.3s ease;
}

nav ul li a:hover {
    color: #80d8ff;
    transform: translateY(-4px) scale(1.08);
    text-shadow: 0 0 15px rgba(128,216,255,0.8);
}

main section {
    padding: 75px 0; /* Немного увеличить padding для всех секций */
    text-align: center;
    margin-bottom: 30px; /* Увеличить отступ между секциями */
    background: linear-gradient(145deg, #222222, #1a1a1a); /* Слегка более темный и насыщенный фон */
    border-radius: 15px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

main section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 70%); /* Более заметный ripple */
    animation: section-ripple 25s infinite linear;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes section-ripple {
    from { transform: scale(0.9); opacity: 0.7; }
    to { transform: scale(1.2); opacity: 0; }
}

main section:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,1);
}

#hero {
    background: linear-gradient(135deg, #052a6b 0%, #0f4b9a 100%); /* Еще более насыщенный синий градиент */
    color: #ffffff;
    padding: 120px 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    animation: hero-appear 1.2s ease-out;
}

@keyframes hero-appear {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%); /* Еще более яркое свечение */
    animation: hero-glow 25s infinite alternate;
    pointer-events: none;
}

@keyframes hero-glow {
    from { transform: rotate(0deg) scale(0.85); opacity: 0.7; }
    to { transform: rotate(360deg) scale(1.15); opacity: 1; }
}

#hero h1 {
    font-size: 4.2em;
    margin-bottom: 35px;
    color: #ffffff;
    font-weight: 900;
    text-shadow: 0 0 25px rgba(255,255,255,1);
    letter-spacing: 2px;
}

#hero p {
    font-size: 1.6em;
    margin-bottom: 60px;
    color: #f0f0f0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

#about-us h2,
#hr-wgp h2, #masters-wgp h2, #service-wgp h2,
#call-to-action h2 {
    font-size: 3.2em;
    margin-bottom: 28px;
    color: #00e676; /* Единый, яркий зеленый акцент для заголовков */
    font-weight: 800;
    text-shadow: 0 0 18px rgba(0,230,118,0.7);
}

#about-us p,
#hr-wgp p, #masters-wgp p, #service-wgp p,
#call-to-action p {
    font-size: 1.3em;
    margin-bottom: 40px;
    color: #e0e0e0;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.directions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px; /* Уменьшить зазор между карточками еще больше */
    margin-top: 35px;
    padding: 0;
    margin-bottom: 45px;
}

.direction-card {
    background: linear-gradient(160deg, #252525 0%, #1e1e1e 100%);
    border-radius: 18px;
    padding: 50px 30px; /* Скорректировать внутренние отступы для более квадратного вида */
    box-shadow: 0 12px 35px rgba(0,0,0,0.8);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 0;
}

.direction-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,176,255,0.1) 0%, rgba(0,176,255,0) 70%); /* Более заметное свечение */
    animation: card-glow 15s infinite alternate;
    pointer-events: none;
}

@keyframes card-glow {
    from { transform: rotate(0deg) scale(0.8); opacity: 0.5; }
    to { transform: rotate(360deg) scale(1.2); opacity: 0.8; }
}

.direction-card:hover {
    transform: translateY(-15px) scale(1.05); /* Более выраженный эффект поднятия */
    box-shadow: 0 25px 60px rgba(0,0,0,1);
    z-index: 1;
}

.direction-card h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #00e676;
    font-weight: 800;
    text-shadow: 0 0 12px rgba(0,230,118,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.direction-card h2 span {
    font-size: 0.45em;
    font-weight: 500;
    color: #a0a0a0;
    margin-top: 8px;
}

.direction-card p {
    font-size: 1.15em;
    margin-bottom: 30px;
    color: #cccccc;
}

.direction-card .btn {
    padding: 15px 30px; /* Увеличить padding кнопки */
    font-size: 1.1em;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0,230,118,0.5);
    background: linear-gradient(90deg, #00c853 0%, #69f0ae 100%); /* Более насыщенный зеленый */
}

.direction-card .btn:hover {
    background: linear-gradient(90deg, #69f0ae 0%, #00c853 100%);
    transform: translateY(-8px) scale(1.08);
    box-shadow: 0 12px 30px rgba(0,230,118,0.7);
}

.btn {
    display: inline-block;
    background: linear-gradient(90deg, #00e676 0%, #69f0ae 100%);
    color: #1a1a1a;
    padding: 20px 45px; /* Увеличить padding */
    text-decoration: none;
    border-radius: 40px;
    transition: background 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 800;
    font-size: 1.4em;
    letter-spacing: 1.2px;
    box-shadow: 0 10px 25px rgba(0,230,118,0.6);
    text-transform: uppercase; /* Сделать текст кнопок заглавными */
}

.btn:hover {
    background: linear-gradient(90deg, #69f0ae 0%, #00e676 100%);
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 35px rgba(0,230,118,0.8);
}

#call-to-action {
    background: linear-gradient(90deg, #052a6b 0%, #0f4b9a 100%); /* Более насыщенный градиент */
    color: #ffffff;
    padding: 80px 0; /* Увеличить padding */
    margin-top: 50px;
    border-radius: 15px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.8);
}

#call-to-action h2 {
    font-size: 3.5em;
    margin-bottom: 30px;
    font-weight: 900;
    text-shadow: 0 0 25px rgba(255,255,255,1);
}

#call-to-action p {
    font-size: 1.4em;
    margin-bottom: 45px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#call-to-action .btn {
    background: linear-gradient(90deg, #80d8ff 0%, #00b0ff 100%);
    color: #1a1a1a;
    box-shadow: 0 10px 25px rgba(128,216,255,0.6);
    padding: 20px 45px;
    font-size: 1.4em;
}

#call-to-action .btn:hover {
    background: linear-gradient(90deg, #00b0ff 0%, #80d8ff 100%);
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 35px rgba(0,176,255,0.8);
}

footer {
    background-color: #0a0a0a;
    color: #999;
    text-align: left;
    padding: 45px 0;
    margin-top: 60px;
    border-top: 1px solid #222;
    box-shadow: 0 -8px 20px rgba(0,0,0,0.7);
}

footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 35px; /* Немного увеличить зазор */
}

.footer-column {
    flex: 1;
    min-width: 200px; /* Слегка увеличить min-width */
}

.footer-column h3 {
    color: #ffffff;
    font-size: 1.4em;
    margin-bottom: 22px;
    border-bottom: 2px solid #00e676;
    padding-bottom: 12px;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer-column ul li a:hover {
    color: #00e676;
    text-shadow: 0 0 10px rgba(0,230,118,0.8);
}

.social-icons a {
    color: #b0b0b0;
    font-size: 2em;
    margin-right: 20px;
    transition: color 0.3s ease, transform 0.2s ease, filter 0.3s ease;
}

.social-icons a:hover {
    color: #00e676;
    transform: scale(1.25);
    filter: drop-shadow(0 0 15px rgba(0,230,118,0.9));
}

.footer-bottom {
    text-align: center;
    width: 100%;
    border-top: 1px solid #222;
    padding-top: 25px;
    margin-top: 35px;
    font-size: 0.95em;
    color: #888;
}

#hr-wgp, #masters-wgp, #service-wgp {
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
}

/* ЕДИНЫЕ МОБИЛЬНЫЕ ФИКСЫ ДЛЯ ГЛАВНОЙ, как на страницах услуг */
@media (max-width: 420px) {
    /* Контейнер и секции не должны вылезать по горизонтали */
    .container { width: 100% !important; max-width: 100% !important; padding-left: 10px !important; padding-right: 10px !important; }
    main section { width: 100% !important; max-width: 100% !important; overflow-x: hidden !important; }

    /* Блок hero */
    #hero { padding: 60px 0 !important; }
    #hero h1 { font-size: 2.2em !important; padding: 0 8px !important; }
    #hero p { font-size: 1.1em !important; padding: 0 8px !important; }

    /* Кнопки — уменьшить, чтобы не давали горизонтальный скролл */
    .btn { padding: 14px 28px !important; font-size: 1.1em !important; }

    /* Карточки направлений — 100% ширины без лишних отступов */
    .directions-grid { gap: 16px !important; }
    .direction-card { padding: 28px 16px !important; }
}

/* НОВЫЕ СТИЛИ ДЛЯ ШАХМАТНОГО ПОРЯДКА */
.direction-row {
    display: flex;
    align-items: center;
    margin-bottom: 40px; /* Отступ между строками */
    background: linear-gradient(145deg, #181818, #0f0f0f); /* Фон для всей строки */
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.9);
    overflow: hidden;
    transition: box-shadow 0.4s ease;
}

.direction-row:hover {
    box-shadow: 0 25px 70px rgba(0,0,0,1);
}

.direction-chess-card {
    flex: 1; /* Займет половину ширины */
    position: relative;
    padding: 60px;
    text-align: center;
    background: linear-gradient(160deg, #1a1a1a 0%, #0d0d0d 100%); /* Более темный фон */
    color: #ffffff;
    border-radius: 20px;
    box-shadow: inset 0 0 15px rgba(255,255,255,0.05), 0 5px 20px rgba(0,0,0,0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1; /* Делаем блок квадратным */
    min-height: 350px; /* Минимальная высота для квадратности */
}

.direction-chess-card:hover {
    transform: scale(1.02);
    box-shadow: inset 0 0 25px rgba(255,255,255,0.1), 0 10px 30px rgba(0,0,0,0.7);
}

.direction-chess-card h2 {
    font-size: 3.5em; /* Большой заголовок */
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255,255,255,0.8);
    line-height: 1.1;
}

.direction-chess-card .btn {
    padding: 18px 40px;
    font-size: 1.2em;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #00e676 0%, #69f0ae 100%);
    color: #1a1a1a;
    box-shadow: 0 8px 20px rgba(0,230,118,0.5);
}

.direction-chess-card .btn:hover {
    background: linear-gradient(90deg, #69f0ae 0%, #00e676 100%);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0,230,118,0.7);
}

/* АНИМАЦИИ ДЛЯ КАЖДОГО БЛОКА - НОВЫЕ */

/* HR WGP - Потоки связей */
#hr-wgp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 15% 30%, rgba(0,176,255,0.25) 0%, transparent 40%),
                radial-gradient(circle at 85% 70%, rgba(0,230,118,0.25) 0%, transparent 40%);
    background-size: 150px 150px, 200px 200px;
    background-repeat: no-repeat;
    opacity: 0;
    animation: connecting-flow 25s infinite ease-in-out;
    pointer-events: none;
}

@keyframes connecting-flow {
    0% { background-position: 0% 0%, 100% 100%; opacity: 0; transform: scale(0.8); }
    25% { background-position: 20% 80%, 70% 20%; opacity: 0.7; transform: scale(1); }
    50% { background-position: 50% 50%, 50% 50%; opacity: 0.5; transform: scale(0.9); }
    75% { background-position: 80% 10%, 30% 90%; opacity: 0.7; transform: scale(1.1); }
    100% { background-position: 0% 0%, 100% 100%; opacity: 0; transform: scale(0.8); }
}

/* Мастера WGP - Энергетические кольца */
#masters-wgp-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(0,176,255,0.3),
                0 0 0 0 rgba(0,230,118,0.3);
    opacity: 0;
    animation: energetic-rings 20s infinite ease-out;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

@keyframes energetic-rings {
    0% { width: 0; height: 0; opacity: 0; box-shadow: 0 0 0 0 rgba(0,176,255,0.3), 0 0 0 0 rgba(0,230,118,0.3); }
    10% { width: 50px; height: 50px; opacity: 0.5; box-shadow: 0 0 0 10px rgba(0,176,255,0.3), 0 0 0 0 rgba(0,230,118,0.3); }
    20% { width: 100px; height: 100px; opacity: 0.7; box-shadow: 0 0 0 20px rgba(0,176,255,0.3), 0 0 0 10px rgba(0,230,118,0.3); }
    30% { width: 150px; height: 150px; opacity: 0.8; box-shadow: 0 0 0 30px rgba(0,176,255,0.3), 0 0 0 20px rgba(0,230,118,0.3); }
    40% { width: 200px; height: 200px; opacity: 0.9; box-shadow: 0 0 0 40px rgba(0,176,255,0.3), 0 0 0 30px rgba(0,230,118,0.3); }
    50% { width: 250px; height: 250px; opacity: 0.8; box-shadow: 0 0 0 50px rgba(0,176,255,0.3), 0 0 0 40px rgba(0,230,118,0.3); }
    60% { width: 300px; height: 300px; opacity: 0.7; box-shadow: 0 0 0 60px rgba(0,176,255,0.3), 0 0 0 50px rgba(0,230,118,0.3); }
    70% { width: 350px; height: 350px; opacity: 0.5; box-shadow: 0 0 0 70px rgba(0,176,255,0.3), 0 0 0 60px rgba(0,230,118,0.3); }
    80% { width: 400px; height: 400px; opacity: 0.3; box-shadow: 0 0 0 80px rgba(0,176,255,0.3), 0 0 0 70px rgba(0,230,118,0.3); }
    90% { width: 450px; height: 450px; opacity: 0.1; box-shadow: 0 0 0 90px rgba(0,176,255,0.3), 0 0 0 80px rgba(0,230,118,0.3); }
    100% { width: 500px; height: 500px; opacity: 0; box-shadow: 0 0 0 100px rgba(0,176,255,0.3), 0 0 0 90px rgba(0,230,118,0.3); }
}

/* Сервис WGP - Мерцающие волны */
#service-wgp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 25%, rgba(0,176,255,0.2) 50%, transparent 75%),
                linear-gradient(-45deg, transparent 25%, rgba(0,230,118,0.2) 50%, transparent 75%);
    background-size: 200% 200%;
    background-position: 0% 0%;
    opacity: 0;
    animation: shimmering-waves 30s infinite linear;
    pointer-events: none;
}

@keyframes shimmering-waves {
    0% { background-position: 0% 0%; opacity: 0; }
    25% { background-position: 50% 50%; opacity: 0.6; }
    50% { background-position: 100% 100%; opacity: 0.4; }
    75% { background-position: 50% 50%; opacity: 0.6; }
    100% { background-position: 0% 0%; opacity: 0; }
}

.direction-description {
    flex: 1; /* Займет вторую половину ширины */
    padding: 60px;
    color: #e0e0e0;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.direction-description h3 {
    font-size: 2.2em;
    font-weight: 700;
    color: #00b0ff;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0,176,255,0.3);
}

.direction-description p {
    font-size: 1.15em;
    line-height: 1.8;
    margin-bottom: 30px;
}

.reverse-order .direction-chess-card {
    order: 2; /* Меняем порядок для шахматного расположения */
    border-radius: 20px;
}

.reverse-order .direction-description {
    order: 1;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: center;
    }

    .logo {
        margin-bottom: 20px;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    nav ul li {
        margin-bottom: 12px;
    }

    #hero h1 {
        font-size: 3.2em;
    }

    #hero p {
        font-size: 1.4em;
    }

    main section {
        padding: 60px 0;
        margin-bottom: 20px;
    }

    #about-us h2,
    #hr-wgp h2, #masters-wgp h2, #service-wgp h2,
    #call-to-action h2 {
        font-size: 2.5em;
    }

    #about-us p,
    #hr-wgp p, #masters-wgp p, #service-wgp p,
    #call-to-action p {
        font-size: 1.2em;
        margin-bottom: 30px;
    }

    .directions-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }

    .direction-card {
        padding: 35px 20px; /* Скорректировать padding для мобильных */
    }

    .direction-card h2 {
        font-size: 2.2em;
    }

    .direction-card h2 span {
        font-size: 0.4em;
    }

    .direction-card p {
        font-size: 1.05em;
    }

    .direction-card .btn {
        padding: 12px 25px;
        font-size: 1.05em;
    }

    /* Адаптивность для нового макета */
    .direction-row {
        flex-direction: column; /* На мобильных устройствах блоки идут вертикально */
        border-radius: 12px;
        margin-bottom: 25px;
    }

    .direction-row.reverse-order .direction-chess-card {
        order: unset;
    }

    .direction-row.reverse-order .direction-description {
        order: unset;
    }

    .direction-chess-card {
        width: 100%;
        border-radius: 12px;
        padding: 40px;
        min-height: unset; /* Убрать min-height для мобильных */
        aspect-ratio: unset; /* Убрать квадратные пропорции для мобильных */
    }

    .direction-chess-card h2 {
        font-size: 2.5em;
    }

    .direction-chess-card .btn {
        padding: 15px 30px;
        font-size: 1.2em;
    }

    .direction-description {
        width: 100%;
        padding: 40px;
        text-align: center;
        align-items: center;
    }

    .direction-description h3 {
        font-size: 2em;
    }

    .direction-description p {
        font-size: 1.1em;
    }

    #call-to-action {
        padding: 60px 0;
        margin-top: 30px;
    }

    #call-to-action h2 {
        font-size: 2.8em;
    }

    #call-to-action p {
        font-size: 1.3em;
    }

    #call-to-action .btn {
        padding: 18px 40px;
        font-size: 1.3em;
    }

    .btn {
        padding: 18px 40px;
        font-size: 1.3em;
    }

    footer .container {
        gap: 25px;
    }

    .footer-bottom {
        padding-top: 20px;
        margin-top: 25px;
    }
}
