/*
 * =================================
 * ОСНОВНЫЕ СТИЛИ ДЛЯ AXO-LAB (style.css)
 * v1.6 - Добавлен Toast
 * =================================
 */

:root {
    --bg-color: #161B22;
    --surface-color: #1C2128;

    --border-color: #30363D;
    --text-primary: #E6EDF3;
    --text-secondary: #9DA8B5;

    --accent-color: #2DA44E; /* Зеленый акцент */
    --accent-hover: #35BC59;
    --link-color: #4C9BFF; /* Синий цвет для ссылок */

    --hero-glow-color: rgba(45, 164, 78, 0.1);

    --hero-blob-1-color: rgba(45, 212, 191, 0.5); /* Яркий Бирюзовый */
    --hero-blob-2-color: rgba(236, 72, 153, 0.4); /* Яркий Розовый */

    --visual-glow-1: rgba(45, 212, 191, 0.4);
    --visual-glow-2: rgba(236, 72, 153, 0.3);

    --glass-bg: rgba(230, 237, 243, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);

    --font-family: 'Inter', -apple-system, sans-serif;
    --border-radius-main: 10px;
    --border-radius-small: 6px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--link-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}


/* ★★★ Навигация (Шапка) ★★★ */
.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: opacity 0.2s;
}
.nav-logo:hover {
    text-decoration: none;
    opacity: 0.8;
}
.nav-logo img {
    height: 32px;
    width: auto;
    display: block;
    animation: logo-glow 3s infinite alternate ease-in-out;
}
.nav-logo span {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

@keyframes logo-glow {
    from {
        opacity: 0.8;
        filter: drop-shadow(0 0 3px rgba(45, 164, 78, 0.3));
    }
    to {
        opacity: 1;
        filter: drop-shadow(0 0 6px rgba(45, 164, 78, 0.7));
    }
}


.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}
.nav-links a:not(.nav-button):hover {
    color: var(--text-primary);
    text-decoration: none;
}
.nav-button {
    background-color: var(--accent-color);
    color: #FFF !important;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-small);
    font-weight: 500;
    transition: background-color 0.2s;
}
.nav-button:hover {
    background-color: var(--accent-hover);
    color: #FFF !important;
    text-decoration: none;
}

/* ★★★ Главный экран (Hero) ★★★ */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 80vh;
    padding: 4rem 2rem;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-color);
    background-image: radial-gradient(ellipse 60% 50% at 50% 110%, var(--hero-glow-color), transparent 70%);
}

.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    filter: blur(100px);
    z-index: -1;
    will-change: transform;
}

.hero-section::before {
    width: 600px;
    height: 600px;
    background-color: var(--hero-blob-1-color);
    top: 0%;
    left: 0%;
    animation: float-blob-1 15s infinite alternate ease-in-out;
}

.hero-section::after {
    width: 500px;
    height: 500px;
    background-color: var(--hero-blob-2-color);
    bottom: 0%;
    right: 0%;
    animation: float-blob-2 18s infinite alternate ease-in-out;
}

@keyframes float-blob-1 {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(50px, 30px) scale(1.1); }
}
@keyframes float-blob-2 {
    from { transform: translate(0, 0) scale(1.1); }
    to { transform: translate(-30px, -50px) scale(1); }
}


.hero-visual {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}
.hero-globe {
    width: 300px;
    height: 300px;
    position: relative;
    background: radial-gradient(circle at 30% 30%, var(--surface-color), var(--bg-color) 70%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5),
                inset 0 0 30px rgba(45, 164, 78, 0.2),
                0 0 80px var(--hero-blob-1-color);
}

.hero-globe-core {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 60%);
    animation: pulse-core 3s infinite ease-in-out;
    opacity: 0;
    z-index: -1;
}
@keyframes pulse-core {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.6; transform: scale(1); }
}


.globe-ring {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    opacity: 0.3;
    animation: rotate-ring 10s linear infinite;
}
.globe-ring:nth-child(2) {
    transform: rotateY(70deg);
    animation-duration: 8s;
    border-color: var(--accent-color);
    opacity: 0.5;
}
.globe-ring:nth-child(3) {
    transform: rotateX(70deg);
    animation-duration: 12s;
    border-color: var(--link-color);
}

@keyframes rotate-ring {
    from { transform: rotateY(0deg) rotateX(20deg); }
    to { transform: rotateY(360deg) rotateX(20deg); }
}


.hero-content {
    max-width: 500px;
    position: relative;
    z-index: 2;
    text-align: left;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 0 2rem 0;
}

.hero-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center; /* Выравнивание кнопок по центру вертикально */
}
/* Стандартная кнопка */
.cta-button {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-small);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    display: inline-block; /* Для корректного выравнивания */
}
.cta-button.primary {
    background-color: var(--accent-color);
    color: #FFF;
}
.cta-button.primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.cta-button.secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}
.cta-button.secondary:hover {
    background-color: var(--surface-color);
    color: var(--text-primary);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}


/*
 * =================================
 * ★ Общие заголовки секций
 * =================================
 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}
.visual-section .section-title,
.visual-section .section-subtitle {
    text-align: center;
}
.visual-section .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}


/*
 * =================================
 * ★ СТИЛИ: Секция с Мокапом
 * =================================
 */
.visual-section {
    padding: 6rem 2rem;
    background-color: var(--bg-color);
    position: relative;
    z-index: 5;
    overflow: hidden;

    background:
        radial-gradient(ellipse 40% 50% at 20% 30%, var(--visual-glow-1), transparent 80%),
        radial-gradient(ellipse 40% 50% at 80% 70%, var(--visual-glow-2), transparent 80%),
        var(--bg-color);
}

.mockup-window {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-main);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    animation: float-mockup 6s infinite alternate ease-in-out;
}

@keyframes float-mockup {
    from {
        transform: translateY(-5px) scale(1.00);
        box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
    }
    to {
        transform: translateY(10px) scale(1);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    }
}


.mockup-header {
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.mockup-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.mockup-content {
    padding: 3rem 2rem;
    text-align: center;
    background-color: transparent;
}
.mockup-project-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    margin-bottom: 1rem;
}
.mockup-content h3 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}
.mockup-content p {
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
    font-size: 0.95rem;
}

/* ★ ВОЗВРАЩЕНЫ СТИЛИ: Для зеленой кнопки в мокапе ★ */
.mockup-cta-button {
    display: inline-block; /* Для margin auto */
    background-color: var(--accent-color);
    color: #FFF;
    border: none;
    padding: 0.7rem 1.4rem; /* Чуть меньше основной кнопки */
    border-radius: var(--border-radius-small);
    font-size: 0.9rem; /* Чуть меньше основной кнопки */
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    margin: 0 auto;
}
.mockup-cta-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}


/*
 * =================================
 * ★ СТИЛИ: Финальная CTA Секция
 * =================================
 */
.cta-section {
    padding: 5rem 2rem;
    text-align: center;
    background-color: var(--surface-color);
    position: relative;
    z-index: 5;
}
.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}
.cta-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin: 0 auto 2rem auto;
    max-width: 500px;
}
.cta-section .cta-button.primary {
    padding: 0.9rem 1.8rem;
    font-size: 1.1rem;
}

/* ★★★ Расширенный футер ★★★ */
.extended-footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 5;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}

.footer-section h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Социальные ссылки */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--text-primary);
    border-color: var(--accent-color);
    background: rgba(45, 164, 78, 0.1);
    text-decoration: none;
    transform: translateY(-2px);
}

/* Сетка сервисов */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.service-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.service-button:hover {
    background: rgba(45, 164, 78, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(45, 164, 78, 0.2);
}

.service-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-icon img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.service-button span {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Полезные ссылки */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text-primary);
    text-decoration: none;
}

/* Нижняя часть футера */
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--text-primary);
    text-decoration: none;
}

/*
 * =================================
 * АНИМАЦИИ ПРИ ЗАГРУЗКЕ
 * =================================
 */

.fade-in {
    opacity: 0;
    animation: fade-in 0.6s ease-out forwards;
}
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fade-in-up 0.6s ease-out forwards;
}
@keyframes fade-in {
    to { opacity: 1; }
}
@keyframes fade-in-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Старые задержки нужны только для Hero */
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }


/*
 * =================================
 * АНИМАЦИИ ПРИ ПРОКРУТКЕ
 * =================================
 */

/* Базовое состояние: элементы невидимы */
.js-scroll-reveal {
    opacity: 0;
    will-change: transform, opacity; /* Оптимизация */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: 0s; /* По умолчанию без задержки */
}

/* Анимация Fade Up */
.js-scroll-reveal[data-animation="fade-up"] {
    transform: translateY(30px);
}

/* Анимация Flip In (Переворот) */
.js-scroll-reveal[data-animation="flip-in"] {
    transform: perspective(1000px) rotateX(-70deg) translateY(50px);
    transform-origin: top center; /* Точка вращения */
    transition-duration: 0.8s; /* Чуть дольше для flip */
}

/* Состояние, когда элемент виден */
.js-scroll-reveal.is-visible {
    opacity: 1;
    transform: none; /* Возвращаем в нормальное положение */
}

/* ★★★ Адаптация ★★★ */
@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content {
        text-align: center;
        max-width: 600px;
    }
    .hero-title {
        font-size: 3rem;
    }
     .hero-subtitle {
        font-size: 1.15rem;
        margin: 0 auto 2rem auto;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-visual {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }

    .nav-links {
        gap: 0.5rem;
    }
    .nav-links a {
        font-size: 0.9rem;
    }
    .nav-button {
        padding: 0.4rem 0.8rem;
    }

    .nav-logo img {
        height: 28px;
    }
    .nav-logo span {
        font-size: 1rem;
    }

    .hero-section::before,
    .hero-section::after {
        width: 200px;
        height: 200px;
        filter: blur(70px);
    }

    .section-title {
        font-size: 2rem;
    }
    .section-subtitle {
        font-size: 1rem;
    }
    .visual-section, .cta-section {
        padding: 3rem 1.5rem;
    }

    .mockup-window {
        animation: none;
        backdrop-filter: none;
        background-color: var(--surface-color);
        border: 1px solid var(--border-color);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    }

    .mockup-header {
        background-color: #0D1117;
        border-bottom: 1px solid var(--border-color);
    }

    .mockup-content {
        padding: 2rem 1.5rem;
        background-color: var(--surface-color);
    }
    .cta-section .cta-button.primary {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-legal {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* --- СТИЛИ ДЛЯ АВАТАРА В ШАПКЕ --- */

.nav-user-link {
    display: flex;
    align-items: center;
    gap: 0.6rem; /* Расстояние между аватаркой и ником */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary); /* Белый текст */
    transition: opacity 0.2s;
    padding: 2px; /* Небольшой отступ, чтобы выглядело аккуратно */
    cursor: pointer;
}
.nav-user-link:hover {
    text-decoration: none;
    opacity: 0.8;
}
.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color); /* Рамка из твоих стилей */
}

/* --- НОВЫЕ СТИЛИ ДЛЯ ВЫПАДАЮЩЕГО МЕНЮ --- */
.nav-user-menu {
    position: relative; /* Родитель для позиционирования */
    display: inline-block;
}

.dropdown-menu {
    display: none; /* Скрыто по умолчанию */
    position: absolute;
    
    /* ★★★ ВОТ ИЗМЕНЕНИЕ (убрали пробел) ★★★ */
    top: 100%; 
    padding-top: 8px; /* Добавим 8px отступа СВЕРХУ, чтобы меню не прилипало */
    
    right: 0;
    min-width: 160px; /* Минимальная ширина */
    background: transparent; /* Фон теперь прозрачный */
    border: none; /* Убираем рамку */
    box-shadow: none; /* Убираем тень */
    z-index: 100;
    
    /* Анимация появления */
    opacity: 0;
    visibility: hidden;
    transform: translateY(0); /* Убрали сдвиг */
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* ★★★ НОВЫЙ БЛОК: Обертка для меню, чтобы можно было навести ★★★ */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: 0; /* Начинается от самого верха */
    left: 0;
    right: 0;
    height: 8px; /* Тот самый "мост" в 8px */
    background: transparent; /* Он невидимый */
}

/* ★★★ НОВЫЙ БЛОК: Стили самого блока меню ★★★ */
.dropdown-menu-content {
    background: #1C1E2A; /* Темный фон */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0; /* Отступы сверху/снизу */
    overflow: hidden; /* Чтобы рамка была красивой */
}


/* Показываем меню при наведении на родителя */
.nav-user-menu:hover .dropdown-menu {
    display: block; /* Включаем, чтобы анимация сработала */
    opacity: 1;
    visibility: visible;
    transition-delay: 0s; /* Появляется сразу */
}

/* Ссылки в меню */
.dropdown-menu a {
    display: block; /* Каждая ссылка на новой строке */
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1.25rem; /* Отступы */
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap; /* Не переносить текст */
}
.dropdown-menu a:hover {
    background-color: #2A2D3E; /* Фон при наведении */
    color: var(--text-primary); /* Белый текст */
    text-decoration: none;
}


/* ★★★ НОВЫЙ БЛОК: Стили для Toast-уведомления (Поддержка) ★★★ */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 120px); /* Начинается под экраном */
    
    /* Используем переменные из этого файла */
    background: var(--surface-color); 
    color: var(--text-secondary);
    border: 1px solid var(--border-color);

    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-main);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 90%;
    width: 500px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.toast-notification.show {
    transform: translate(-50%, 0); /* Выезжает вверх */
    opacity: 1;
    visibility: visible;
}

/* Адаптивность для уведомления */
@media (max-width: 600px) {
    .toast-notification {
        width: 90%;
        bottom: 15px;
        padding: 1rem;
        font-size: 0.9rem;
    }
}