/* === БАЗОВЫЕ НАСТРОЙКИ СТРАНИЦЫ === */
:root {
    --bg-main: #010205;
    --bg-card: #0a0a0a;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-multi: #F2EAE0;
    --accent-power: #AACDDC;
    --accent-soft: #9B8EC7;
    --accent-default: #f6f7f7;
    --border-dark: #222;
}

html { scroll-behavior: smooth; }

/* === БЛОКИРОВКА ГОРИЗОНТАЛЬНОГО СКРОЛЛА === */
html, body {
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
}
*, *::before, *::after {
    box-sizing: border-box; /* Гарантирует, что padding и border не ломают ширину % */
}

/* === БАЗОВАЯ АДАПТИВНОСТЬ КАРТИНОК === */
img {
    max-width: 100%;
    height: auto;
}

/* === ГЛОБАЛЬНАЯ ТИПОГРАФИКА === */
.hero h1, .hero-section h1 {
    font-size: clamp(1.8rem, 8vw, 4rem);
    font-weight: 900;
    line-height: 1.2;
    margin: 0 0 20px 0;
    text-wrap: balance;
}

h2, .section-title {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 40px;
    text-align: center;
    text-wrap: balance;
}

.card h3, .module-card h3, .category-card h3, .advantage-content h3, .benefit-content h3, .equipment-card h3, .services-card h3, .card-title, .series-block h3 {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    font-weight: 700;
    margin: 0 0 15px 0;
}

.industry-card h3, .ecosystem-item h3, .brand-info h4 {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    font-weight: 700;
    margin: 0 0 10px 0;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    margin: 0; 
    padding: 0;
    font-weight: 400; 
    position: relative; 
    min-height: 100vh;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-wrap: break-word;
}

.container {
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px;
}

/* === СТРУКТУРА НАВИГАЦИОННОГО МЕНЮ === */
.navbar {
    background: rgba(1, 2, 5, 0.6);
    backdrop-filter: blur(12px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky; 
    top: 0; 
    z-index: 2000;
}

.nav-container {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    position: relative; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px;
}

/* Логотип */
.nav-logo img {
    height: 45px; 
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(0) invert(1);
}
.nav-logo:hover img { 
    transform: scale(1.05); 
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

/* Структура списков меню (десктоп) */
.nav-links, .header-nav-links {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 30px; align-items: center;
}
.nav-links a, .header-nav-links a {
    text-decoration: none; font-size: 0.95rem; font-weight: 600; color: var(--text-main);
    transition: color 0.3s, text-shadow 0.3s;
}
.nav-links a:hover, .header-nav-links a:hover {
    color: var(--accent-default);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Подсветка активного пункта меню */
.nav-links a.active, .header-nav-links a.active {
    color: var(--accent-default) !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* === ВЫПАДАЮЩЕЕ МЕНЮ (ПОДМЕНЮ) === */
.has-dropdown {
    position: relative;
}
.has-dropdown .arrow {
    font-size: 0.7em;
    margin-left: 6px;
    vertical-align: middle;
    transition: transform 0.3s;
    display: inline-block;
}
.dropdown {
    position: absolute; top: 100%; left: -15px;
    background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(12px);
    min-width: 220px; list-style: none; padding: 10px 0; margin: 0;
    border-radius: 8px; border: 1px solid var(--border-dark);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    opacity: 0; visibility: hidden; transform: translateY(15px);
    transition: all 0.3s ease; z-index: 2000;
}
.has-dropdown:hover .dropdown {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.has-dropdown:hover .arrow {
    transform: rotate(180deg);
}
.dropdown a {
    padding: 12px 20px !important; display: block; font-size: 0.9rem !important;
    font-weight: 500 !important; color: var(--text-main) !important; text-decoration: none;
}
.dropdown a:hover {
    background: rgba(255, 255, 255, 0.05); color: var(--accent-default) !important; padding-left: 25px !important;
}

/* Бургер и чекбокс для мобильных */
.menu-toggle { display: none; }
.burger { display: none; cursor: pointer; padding: 10px; z-index: 1001; }
.burger span { display: block; width: 25px; height: 3px; background: var(--text-main); margin: 5px 0; transition: 0.3s; }

/* Утилиты отображения */
@media (min-width: 769px) {
    .mobile-only { display: none !important; }
    .desktop-only { display: inline-block; }
}

/* === МОБИЛЬНОЕ МЕНЮ === */
@media (max-width: 768px) {
    .burger { display: block; }
    .desktop-only { display: none !important; }
    .mobile-only { display: block; margin-top: 15px; }
    
    .nav-links, .header-nav-links {
        position: fixed; top: 70px; left: 0; width: 100%;
        background: rgba(5, 5, 5, 0.98); backdrop-filter: blur(12px);
        flex-direction: column; align-items: center; padding: 30px 0; gap: 20px;
        transform: translateY(-150%); transition: transform 0.3s ease;
        z-index: 999; box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        border-bottom: 1px solid var(--border-dark);
    }
    .nav-links li, .header-nav-links li { width: 100%; text-align: center; }
    .nav-links a, .header-nav-links a { font-size: 1.2rem; display: block; padding: 10px; }
    
    /* Механика открытия меню без JS */
    .menu-toggle:checked ~ .nav-links, .menu-toggle:checked ~ .header-nav-links { transform: translateY(0); }
    .menu-toggle:checked + .burger span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
    .menu-toggle:checked + .burger span:nth-child(2) { opacity: 0; }
    .menu-toggle:checked + .burger span:nth-child(3) { transform: rotate(-45deg) translate(7px,-7px); }

    /* Мобильное подменю (развернуто внутри блока для удобства тапа) */
    .dropdown {
        position: relative; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: none; background: transparent;
        padding: 5px 0 0 0; min-width: 100%; left: 0;
    }
    .dropdown a { font-size: 1.05rem !important; background: rgba(255,255,255,0.03); margin: 5px 20px; border-radius: 6px; padding: 10px !important; }
    .has-dropdown .arrow { display: none; }

    /* Кнопка "Связаться с нами" в мобильном меню */
    .nav-links .nav-btn, .header-nav-links .nav-btn {
        margin: 10px auto 0;
        width: fit-content;
    }
}

/* === КНОПКА "НАВЕРХ" === */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid var(--accent-default);
    color: var(--accent-default);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
    padding: 0;
    outline: none;
}
.scroll-to-top svg { transition: transform 0.3s ease; }
.scroll-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-to-top:hover { background: var(--accent-default); color: #000; box-shadow: 0 0 15px var(--accent-default); }
.scroll-to-top:hover svg { transform: translateY(-3px); }

/* === АНИМАЦИЯ ПОЯВЛЕНИЯ ТЕКСТА === */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === ОБЩИЕ КНОПКИ === */
.btn-outline, .nav-btn, .btn-presentation {
    background: transparent;
    border: 1px solid var(--current-accent, var(--accent-default));
    color: var(--current-accent, var(--accent-default));
    border-radius: 8px;
    transition: 0.3s;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.nav-btn { padding: 10px 20px; }
.btn-outline, .btn-presentation { padding: 14px 28px; }

.btn-outline:hover, .nav-btn:hover, .btn-presentation:hover {
    background: var(--current-accent, var(--accent-default));
    color: #000 !important;
    box-shadow: 0 0 15px var(--current-accent, var(--accent-default));
    transform: translateY(-2px);
}
.btn-whatsapp:hover { --current-accent: #25D366; }
.btn-whatsapp:hover i { color: #000; }

/* === НАТИВНЫЙ БЛОК CTA === */
.cta-section-native {
    background: transparent; 
    padding: 80px 0 100px;
    text-align: center;
    border-top: 1px solid var(--border-dark);
}
.cta-section-native h2 {
    margin-bottom: 20px;
    color: #fff;
    text-transform: uppercase;
}
.cta-section-native p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 0 auto 40px;
    max-width: 800px;
    line-height: 1.6;
}
.cta-flex-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.cta-flex-btns .btn-outline {
    width: 280px;
}
.btn-outline i {
    margin-right: 8px;
    font-size: 1.2rem;
    transition: color 0.3s;
}
.cta-trust-bar { margin-top: 50px; display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.cta-trust-unit { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

/* === ФУТЕР === */
footer {
    background: #050505;
    color: var(--text-muted);
    padding: 50px 0 30px;
    font-size: 0.9rem;
    border-top: 1px solid #111;
}
.footer-grid { 
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}
.footer-info img { height: 35px; filter: brightness(0) invert(1); margin-bottom: 20px; opacity: 0.8; }
.footer-info p { margin: 5px 0; line-height: 1.5; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a, .footer-contacts a { color: var(--text-main); text-decoration: none; transition: 0.3s; }
.footer-nav a:hover, .footer-contacts a:hover { color: var(--accent-default); }
.footer-contacts { text-align: right; }
.footer-contacts strong, .footer-nav strong { color: #fff; display: block; margin-bottom: 15px; font-size: 1.1rem; }
.footer-contacts p { margin: 8px 0; }
.footer-bottom { 
    max-width: 1200px; margin: 40px auto 0; padding: 20px 0 0;
    border-top: 1px solid #111; display: flex; justify-content: space-between; flex-wrap: wrap;
}

/* === АДАПТИВНОСТЬ ДЛЯ ОБЩИХ ЭЛЕМЕНТОВ === */
@media (max-width: 768px) {
    h2, .section-title { margin-bottom: 30px; }
    .card h3, .module-card h3, .category-card h3, .advantage-content h3, .benefit-content h3, .equipment-card h3, .services-card h3, .card-title, .series-block h3 { margin-bottom: 10px; }
    
    .scroll-to-top { bottom: 20px; right: 20px; width: 45px; height: 45px; }
    
    .cta-flex-btns .btn-outline { width: 100%; max-width: 320px; }
    
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-contacts { text-align: center; }
    .footer-bottom { flex-direction: column; gap: 15px; align-items: center; text-align: center; }
}