* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', sans-serif;
    background: #fff;
    color: #111827;
    line-height: 1.5;
}
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
/* Header – строгое разделение: логотип слева, навигация по центру, действия справа */
.header {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #eef2f6;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    gap: 20px;
}
.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #1E3A8A, #3B82F6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    letter-spacing: -0.3px;
    flex-shrink: 0;
}
/* Навигация – центрируется, занимает всё доступное пространство */
.mega-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}
.nav-list {
    display: flex;
    list-style: none;
    gap: 32px;
    margin: 0;
    padding: 0;
}
.nav-link {
    text-decoration: none;
    font-weight: 600;
    color: #1e293b;
    padding: 8px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    position: relative;
}
.nav-link:hover {
    color: #2563eb;
}
/* Улучшенное выпадающее меню – не исчезает при перемещении мыши */
.mega-dropdown {
    position: relative;
}
/* Псевдоэлемент-мостик, предотвращающий закрытие меню при движении мыши */
.mega-dropdown::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}
.mega-menu {
    position: absolute;
    top: calc(100% - 5px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.15);
    border-radius: 24px;
    padding: 28px;
    min-width: 640px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1001;
    border: 1px solid #eef2f8;
    pointer-events: none;
    margin-top: 0;
}
.mega-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.mega-row {
    display: flex;
    gap: 48px;
}
.mega-col h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #0f172a;
}
.mega-col ul {
    list-style: none;
}
.mega-col ul li {
    margin-bottom: 10px;
}
.mega-col ul li a {
    text-decoration: none;
    color: #4b5563;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.mega-col ul li a:hover {
    color: #2563eb;
}
/* Правая группа действий */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
/* Language switcher (без изменений) */
.language-switcher { position: relative; }
.lang-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
.lang-btn:hover { background: #f1f5f9; }
.lang-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    min-width: 160px;
    display: none;
    z-index: 1002;
    border: 1px solid #edf2f7;
}
.lang-dropdown a { display: block; padding: 10px 18px; text-decoration: none; color: #1e293b; }
.lang-dropdown a:hover { background: #f1f5f9; }
.language-switcher.active .lang-dropdown { display: block; }
/* Кнопки */
.btn-outline, .btn-primary {
    padding: 8px 18px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}
.btn-outline { border: 1px solid #cbd5e1; color: #1f2937; background: white; }
.btn-outline:hover { background: #f8fafc; }
.btn-primary { background: #0f172a; color: white; }
.btn-primary:hover { background: #1e3a8a; }
/* On Top button */
.on-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    z-index: 99;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.on-top-btn.show { opacity: 1; visibility: visible; }
/* Hero, generator, etc. (стили без изменений) */
.hero { padding: 120px 0 48px; text-align: center; }
.hero-badge { background: #eff6ff; display: inline-block; border-radius: 40px; padding: 6px 16px; margin-bottom: 24px; font-weight: 600; }
h1 { font-size: 3.5rem; font-weight: 800; max-width: 900px; margin: 0 auto 24px; background: linear-gradient(145deg, #0F172A, #2563EB); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-desc { font-size: 1.25rem; color: #4b5563; max-width: 700px; margin: 0 auto 40px; }
.generator-card { background: #f9fafb; border-radius: 48px; padding: 32px; max-width: 800px; margin: 0 auto; }
.input-group { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.input-group input { flex: 2; padding: 16px 20px; border-radius: 60px; border: 1px solid #d1d5db; font-size: 1rem; }
.input-group button { background: #2563eb; border: none; padding: 0 32px; border-radius: 60px; color: white; font-weight: 700; cursor: pointer; }
.demo-hint { margin-top: 16px; font-size: 0.85rem; color: #6b7280; }
.stats { margin-top: 24px; font-size: 0.9rem; color: #4b5563; }
.features, .how-it-works, .experts { padding: 64px 0; }
.section-title { text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.feature-card { background: #f9fafb; padding: 32px 24px; border-radius: 32px; text-align: center; }
.feature-icon { font-size: 2.5rem; margin-bottom: 20px; color: #2563eb; }
.feature-card h3 { font-size: 1.5rem; margin-bottom: 12px; }
.steps { display: flex; flex-wrap: wrap; gap: 24px; }
.step { flex: 1; background: white; border-radius: 28px; padding: 32px 24px; text-align: center; border: 1px solid #eef2f8; }
.step-number { width: 48px; height: 48px; background: #eff6ff; color: #2563eb; border-radius: 60px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-weight: 800; font-size: 1.5rem; }
.dual-buttons { display: flex; gap: 20px; justify-content: center; margin-top: 32px; }
.btn-secondary { background: white; border: 1px solid #2563eb; color: #2563eb; padding: 12px 32px; border-radius: 60px; font-weight: 600; text-decoration: none; }
.expert-note { margin-top: 32px; font-size: 0.9rem; color: #4b5563; }
.footer { background: #0f172a; color: #cbd5e1; padding: 48px 0 24px; margin-top: 40px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-grid a { color: #94a3b8; text-decoration: none; }
.footer-bottom { text-align: center; margin-top: 40px; border-top: 1px solid #334155; padding-top: 24px; }
/* RTL правки */
[dir="rtl"] .mega-menu { left: auto; right: 50%; transform: translateX(50%); }
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
[dir="rtl"] .nav-list { gap: 24px; }
[dir="rtl"] .header-actions { margin-left: 0; margin-right: auto; }
/* Мобильная адаптация */
@media (max-width: 900px) {
    .header-inner { flex-wrap: wrap; justify-content: space-between; }
    .mega-nav { order: 3; width: 100%; justify-content: center; margin-top: 8px; }
    .nav-list { justify-content: center; flex-wrap: wrap; gap: 20px; }
    .header-actions { order: 2; }
    .logo { order: 1; }
    .mega-menu { display: none; } /* на мобильных мега-меню упрощённо */
    h1 { font-size: 2rem; }
}