/* Базовые стили и переменные */

/* Глобальные стили и сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Цветовая палитра */
    --primary-color: #1e40af;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* Нейтральные цвета */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    /* Тени */
    --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(15 23 42 / 0.1), 0 2px 4px -2px rgb(15 23 42 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.1), 0 4px 6px -4px rgb(15 23 42 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(15 23 42 / 0.1), 0 8px 10px -6px rgb(15 23 42 / 0.1);
    
    /* Размеры и отступы */
    --sidebar-width: 320px;
    --header-height: 80px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Типографика */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    
    /* Переходы */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #f1f1f2;
    overflow: hidden; /* Убираем скролл с body */
    margin: 0;
    padding: 0;
}

/* Заголовок справочника */
.handbook-header {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--text-primary);
    padding: 2rem 0 24px 0;
    margin-bottom: 32px;
    text-align: left;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.header-content {
    padding-left: 2rem;
}

.header-content h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header-content p {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    font-weight: 400;
}

/* Основной контейнер */
.handbook-container {
    display: flex;
    height: 100vh;
    width: 100%;
    background: var(--bg-primary);
}

/* Правая область контента */
.content-area {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-primary);
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Стили для ссылок */
a {
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    text-decoration: underline;
}

/* Стили для выделения текста */
::selection {
    background: rgba(59, 130, 246, 0.2);
    color: var(--text-primary);
}

/* Анимация загрузки */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Улучшенные стили для кода */
code {
    background: var(--bg-tertiary);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

pre {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    background: none;
    padding: 0;
}

/* Стили для таблиц */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

tr:hover {
    background: var(--bg-secondary);
}

/* Дополнительные стили для улучшения UX */
.nav-link:focus {
    outline: none;
}

.search-box input:focus,
.back-to-top:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Адаптивность */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 280px;
    }
}

/* На больших экранах меню всегда слева */
@media (min-width: 769px) {
    .handbook-container {
        flex-direction: row;
    }
    
    .navigation-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        flex-shrink: 0;
    }
    
    .content-area {
        flex: 1;
        width: auto;
    }
}

/* Увеличенная ширина контента на десктопе */
@media (min-width: 1224px) {
    .content-wrapper {
        max-width: 1440px;
    }
}

@media (max-width: 768px) {
    .handbook-container {
        flex-direction: column;
    }
    
    .navigation-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        overflow: hidden;
    }
    
    .content-area {
        margin-left: 0;
        width: 100%;
    }
    
    body {
        padding-bottom: 70px;
    }
    
    .content-wrapper {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 1rem;
    }
    
    .header-content h1 {
        font-size: var(--font-size-2xl);
    }
    
    .header-content p {
        font-size: var(--font-size-base);
    }
}

/* Стили для навигационного меню */

/* Левая навигация */
.navigation-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
    overflow: hidden;
}

.nav-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary);
}

.nav-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.nav-header a {
    display: flex;
    align-items: center;
}

.nav-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-content::-webkit-scrollbar {
    display: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.nav-toggle:hover {
    color: var(--primary-color);
}

/* Поиск */
.search-box {
    position: relative;
    margin: 1rem;
    margin-bottom: 0;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    background: transparent;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: none !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
}

.search-icon-img {
    width: 16px;
    height: 16px;
}

/* Навигационное меню */
.nav-menu {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-item {
    margin: 0.125rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    text-decoration: none !important;
    color: var(--text-secondary) !important;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary) !important;
    text-decoration: none !important;
}

.nav-link.active {
    color: var(--text-primary) !important;
    font-weight: 500;
    text-decoration: none !important;
}

.nav-icon {
    margin-right: 0.75rem;
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.badge-vip {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    margin-left: 0.25rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.nav-arrow {
    transition: transform var(--transition-fast);
}

.nav-arrow .arrow-icon {
    width: 12px;
    height: 12px;
    transition: transform var(--transition-fast);
    display: block;
}

/* Подменю */
.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.nav-item.has-submenu.open .submenu {
    max-height: 400px;
}

.nav-item.has-submenu.open .nav-arrow .arrow-icon {
    transform: rotate(90deg);
}

.submenu-link {
    display: block;
    padding: 0.5rem 1.5rem 0.5rem 3.5rem;
    text-decoration: none !important;
    color: var(--text-secondary) !important;
    font-size: var(--font-size-xs);
    transition: color var(--transition-fast);
}

.submenu-link:hover {
    color: var(--text-primary) !important;
    background: var(--bg-secondary);
    text-decoration: none !important;
}

.submenu-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
    background: #eff6ff !important;
}

/* Под-подменю (третий уровень) */
.submenu-item.has-subsubmenu .submenu-link {
    position: relative;
}

.submenu-arrow {
    transition: transform var(--transition-fast);
    margin-left: auto;
}

.submenu-arrow .arrow-icon {
    width: 10px;
    height: 10px;
    transition: transform var(--transition-fast);
}

.submenu-item.has-subsubmenu.open .submenu-arrow .arrow-icon {
    transform: rotate(90deg);
}

.subsubmenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--bg-primary);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    border-left: 2px solid var(--border-color);
}

.submenu-item.has-subsubmenu.open .subsubmenu {
    max-height: 400px;
}

.subsubmenu-link {
    display: block;
    padding: 0.5rem 1.5rem 0.5rem 3.5rem;
    text-decoration: none !important;
    color: var(--text-muted) !important;
    font-size: var(--font-size-xs);
    transition: all var(--transition-fast);
    position: relative;
}

.subsubmenu-link:hover {
    color: var(--text-primary) !important;
    background: var(--bg-secondary);
    text-decoration: none !important;
}

.subsubmenu-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
    background: #eff6ff !important;
}

/* Переключение языка */
.language-switcher {
    position: fixed;
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    z-index: 1000;
}

.language-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e40af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.language-select:hover {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
}

.language-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.language-select option {
    padding: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Анимации для уведомлений о языке */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Адаптивные стили для трехуровневой навигации */
@media (max-width: 768px) {
    .subsubmenu {
        border-left: none;
        background: var(--bg-primary);
    }
    
    .subsubmenu-link {
        padding-left: 5rem;
    }
    
    .subsubmenu-link::before {
        left: 4rem;
    }
    
    .subsubmenu-link:hover {
        padding-left: 5.5rem;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-content {
        display: none;
    }
    
    .nav-content.open {
        display: block;
    }
    
    /* Адаптивные стили для переключателя языка */
    .language-switcher {
        padding: 0.75rem;
        width: 100%;
    }
    
    .language-select {
        font-size: var(--font-size-xs);
        padding: 0.5rem;
        padding-right: 2rem;
    }
}

/* Стили для рекламных блоков */

/* Рекламные блоки */
.ads-container {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: none;
}

.ad-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    margin: 1rem auto;
    transition: all var(--transition-normal);
}

.ad-banner:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.ad-header {
    flex: 1;
    height: 150px;
    margin: 0;
    min-width: 300px;
    max-width: none;
    width: 100%;
}

.ad-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-radius: var(--border-radius);
}

.ad-content {
    text-align: center;
    color: var(--text-secondary);
}

.ad-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-text {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.ad-description {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* Адаптивные рекламные блоки */
@media (max-width: 768px) {
    .ads-container {
        gap: 0.5rem;
        padding: 0.5rem;
        flex-direction: column;
    }
    
    .ad-header {
        width: 100%;
        height: 120px;
        min-width: auto;
        max-width: none;
        flex: 1 1 100%;
    }
    
    .ad-text {
        font-size: var(--font-size-xs);
    }
    
    .ad-description {
        display: none;
    }
}

/* Стили для основного контента */

/* Хлебные крошки */
.breadcrumbs {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
    color: var(--text-secondary);
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.breadcrumb-current {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Основной контент */
.content-main {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    margin-bottom: 2rem;
}

.content-header h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.content-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    font-weight: 400;
}

.content-body {
    line-height: 1.7;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.content-section h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem;
}

.content-section p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.content-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.content-section a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.content-section a:visited {
    color: #6366f1;
}

/* Информационные блоки */
.info-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: flex-start;
}

.info-icon {
    font-size: var(--font-size-xl);
    margin-right: 1rem;
    flex-shrink: 0;
}

.info-content h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.info-content p {
    color: var(--text-secondary);
    margin: 0;
}

/* Список шагов */
.step-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    border-left: 4px solid var(--primary-color);
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-sm);
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    margin: 0;
}

/* Сетка концепций */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.concept-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-fast);
}

.concept-card:hover {
    transform: translateY(-2px);
    border-color: var(--text-primary);
}

.concept-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.concept-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.concept-card p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: 0;
}

/* Следующие шаги */
.next-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.next-step-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
}

.next-step-card:hover {
    transform: translateY(-2px);
    border-color: var(--text-primary);
}

.next-step-icon {
    font-size: var(--font-size-xl);
    margin-right: 1rem;
    flex-shrink: 0;
}

.next-step-content {
    flex: 1;
}

.next-step-content h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.next-step-content p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: 0;
}

.next-step-arrow {
    color: var(--text-primary);
}

.next-step-arrow .arrow-icon {
    width: 20px;
    height: 20px;
    filter: none;
}

/* Кнопка возврата наверх */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top .arrow-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    transform: rotate(-90deg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Адаптивные стили для контента */
@media (max-width: 1024px) {
    .concept-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .content-header h1 {
        font-size: var(--font-size-2xl);
    }
    
    .concept-grid {
        grid-template-columns: 1fr;
    }
    
    .next-steps {
        grid-template-columns: 1fr;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin: 0 0 1rem 0;
    }
}

@media (max-width: 480px) {
    .content-header h1 {
        font-size: var(--font-size-xl);
    }
    
    .step-item,
    .concept-card,
    .next-step-card {
        padding: 1rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top .arrow-icon {
        width: 16px;
        height: 16px;
    }
}

/* Стили для страницы новостей */

/* Основной макет новостей */
.news-layout {
    display: grid;
    grid-template-columns: 620px 1fr;
    gap: 32px;
    width: 100%;
}

.news-content-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 64px;
    flex: 1;
    min-width: 0;
    max-width: 608px;
    order: 0;
}

/* Правые столбцы: сетка статей + сайдбар */
.news-right-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    min-width: 0;
}

.news-sidebar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 24px;
    width: 100%;
    flex-shrink: 0;
}

/* Главная статья */
.news-article-featured {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0;
    gap: 24px;
    width: 100%;
    flex: none;
    order: 0;
}

.news-article-featured .news-article-bg {
    width: 100%;
    height: 320px;
    background: #e5e7eb;
    border-radius: 48px;
    flex: none;
    order: 0;
}

.news-article-featured .news-article-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 16px;
    width: 100%;
    flex: none;
    order: 1;
}

.news-article-featured h2 {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 34px;
    line-height: 41px;
    color: #1a1a1a;
    margin: 0;
    flex: none;
    order: 0;
}

.news-article-featured p {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 132%;
    color: #4d4d4d;
    margin: 0;
    flex: none;
    order: 1;
}

/* Сетка статей */
.news-articles-grid {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 24px;
    width: 100%;
    flex: none;
    order: 1;
}

.news-article {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 20px;
    width: 100%;
    flex: none;
    order: 0;
}

.news-article .news-article-bg {
    width: 100%;
    height: 136px;
    background: #e5e7eb;
    border-radius: 28px;
    flex: none;
    order: 0;
}

.news-article .news-article-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 8px;
    width: 100%;
    flex: none;
    order: 1;
}

.news-article h3 {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 132%;
    color: #1a1a1a;
    margin: 0;
    flex: none;
    order: 0;
}

.news-article p {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 132%;
    color: #4d4d4d;
    margin: 0;
    flex: none;
    order: 1;
}

/* Подписка */
.news-subscription {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 40px;
    gap: 24px;
    width: 100%;
    background: #ffffff;
    border-radius: 40px;
    flex: none;
    order: 2;
}

.news-subscription h3 {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 24px;
    color: #1a1a1a;
    margin: 0;
    flex: none;
    order: 0;
}

.news-subscription-form {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 0;
    gap: 8px;
    width: 100%;
    flex: none;
    order: 1;
}

.news-subscription-input {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 8px 8px 20px;
    flex: 1;
    min-width: 0;
    height: 48px;
    background: #f1f1f2;
    border-radius: 16px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 132%;
    color: #4d4d4d;
    flex: none;
    order: 0;
}

.news-subscription-input::placeholder {
    color: #a9a9a9;
}

.news-subscription-btn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    flex-shrink: 0;
    height: 48px;
    background: #0074ff;
    border-radius: 16px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    color: #ffffff;
    cursor: pointer;
    flex: none;
    order: 1;
}

.news-subscription-privacy {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    color: #4d4d4d;
    margin: 0;
    flex: none;
    order: 2;
}

/* Элементы сайдбара */
.news-sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 20px;
    width: 100%;
    flex: none;
    align-self: stretch;
}

.news-sidebar-item .news-article-bg {
    width: 100%;
    height: 136px;
    background: #e5e7eb;
    border-radius: 28px;
    flex: none;
    order: 0;
}

.news-sidebar-item .news-article-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 8px;
    width: 100%;
    flex: none;
    order: 1;
    align-self: stretch;
}

.news-sidebar-item h4 {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 132%;
    color: #1a1a1a;
    margin: 0;
    flex: none;
    order: 0;
    align-self: stretch;
}

.news-sidebar-item p {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 132%;
    color: #4d4d4d;
    margin: 0;
    flex: none;
    order: 1;
    align-self: stretch;
}

/* Адаптивность */
@media (max-width: 1223px) {
    .news-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .news-right-columns {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 1024px) {
    .news-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .news-content-main {
        width: 100%;
        max-width: 608px;
    }

    .news-right-columns {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .news-sidebar {
        width: 100%;
        max-width: 608px;
    }

    .news-articles-grid {
        width: 100%;
    }

    .news-article-featured,
    .news-article-featured .news-article-bg,
    .news-article-featured .news-article-content {
        width: 100%;
    }

    .news-article-featured h2,
    .news-article-featured p {
        width: 100%;
    }

    .news-subscription {
        width: 100%;
    }

    .news-subscription-form,
    .news-subscription-privacy {
        width: 100%;
    }

    .news-subscription-input {
        width: 100%;
    }

    .news-subscription-btn {
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .news-right-columns {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .news-articles-grid {
        flex-direction: column;
        gap: 24px;
    }

    .news-article,
    .news-sidebar-item {
        width: 100%;
    }

    .news-article .news-article-bg,
    .news-sidebar-item .news-article-bg {
        width: 100%;
    }

    .news-article .news-article-content,
    .news-sidebar-item .news-article-content,
    .news-article h3,
    .news-article p,
    .news-sidebar-item h4,
    .news-sidebar-item p {
        width: 100%;
    }

    .news-subscription {
        padding: 24px;
    }

    .news-subscription-form {
        flex-direction: column;
        gap: 16px;
    }

    .news-subscription-input,
    .news-subscription-btn {
        width: 100%;
    }
}

