/* ==========================================================================
   RKN-Help.ru - Основные стили
   ========================================================================== */

/* CSS Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #fafbfc;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Переменные CSS */
:root {
    --primary-blue: #2563eb;
    --secondary-blue: #3b82f6;
    --light-blue: #eff6ff;
    --dark-blue: #1e40af;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --background-primary: #ffffff;
    --background-secondary: #f8fafc;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.2s ease-in-out;
}

/* Типографика */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.7;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--dark-blue);
    text-decoration: underline;
}

strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* Списки */
ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ==========================================================================
   Шапка сайта
   ========================================================================== */

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.logo-text a {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.logo-text a:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.tagline {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.25rem;
    letter-spacing: 0.3px;
}

.site-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    margin-left: 2rem;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__item {
    position: relative;
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.site-nav__link:hover,
.site-nav__link--active,
.site-nav__item--active .site-nav__link {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
    text-decoration: none;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

body.no-scroll {
    overflow: hidden;
}

/* ==========================================================================
   Основной контент
   ========================================================================== */

.main-content {
    padding: 2rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
}

.content-area {
    min-width: 0;
}

/* Hero секция - Современный дизайн */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #2563eb 100%);
    padding: 4rem 2rem;
    border-radius: 16px;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.3);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
    animation: fadeInUp 0.6s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

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

/* Основная статья - Улучшенный дизайн */
.main-article {
    background: var(--background-primary);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.article-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.article-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 1px;
}

.article-header h2 {
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
}

.article-meta {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta time {
    color: var(--text-light);
}

.content-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.content-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.content-section h3 {
    color: var(--primary-blue);
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-left: 1rem;
}

.content-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 2px;
}

.content-section p {
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-section li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: var(--text-primary);
}

/* Быстрая навигация - Современные карточки */
.quick-nav {
    background: var(--background-primary);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.quick-nav h3 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.quick-nav h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 2px;
}

.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.quick-nav-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

.quick-nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.quick-nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-blue);
    text-decoration: none;
}

.quick-nav-card:hover::before {
    transform: scaleX(1);
}

.quick-nav-card h4 {
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.quick-nav-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.quick-nav-card .category-count {
    display: inline-block;
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Сайдбар
   ========================================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Баннер помощи */
.help-banner {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.help-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-text h4 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.banner-text p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.banner-contacts {
    margin-top: 1.5rem;
}

.contact-item {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.contact-item a {
    color: white;
    font-weight: 600;
    text-decoration: underline;
    word-break: break-all;
}

.contact-item a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Последние статьи */
.latest-articles {
    background: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.latest-articles h3 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-item {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
    background: var(--background-primary);
    position: relative;
    overflow: hidden;
}

.article-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-blue), var(--secondary-blue));
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.article-item:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-color: var(--primary-blue);
    text-decoration: none;
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.1);
}

.article-item:hover::before {
    transform: scaleY(1);
}

.article-item h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.article-item:hover h4 {
    color: var(--primary-blue);
}

.article-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-top: 0.75rem;
}

.article-category {
    display: inline-block;
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.article-views {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-date {
    color: var(--text-light);
    font-size: 0.8125rem;
}

/* ==========================================================================
   Подвал
   ========================================================================== */

.footer {
    background: var(--text-primary);
    color: white;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 0 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.footer-pd-link a {
    text-decoration: none;
    color: inherit;
}

.disclaimer {
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

/* About page */
.about-page {
    padding: 3rem 0;
}

.about-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(99, 102, 241, 0.2));
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
}

.about-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--primary-blue);
    background: #fff;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.about-hero__content h1 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-hero__content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.about-hero__features {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.about-hero__features span {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.about-hero__card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.about-hero__card ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.about-card {
    border-radius: 18px;
    padding: 1.75rem;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 45px rgba(15, 23, 42, 0.08);
}

.about-card h3 {
    margin-bottom: 1rem;
}

.about-card ul {
    padding-left: 1.2rem;
    margin: 0;
    color: var(--text-secondary);
}

.about-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2.5rem;
    border-radius: 24px;
    background: linear-gradient(120deg, rgba(34, 197, 94, 0.1), rgba(59, 130, 246, 0.08));
    margin-bottom: 3rem;
}

.about-info__text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-info__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-info__list span {
    font-weight: 600;
    color: var(--primary-blue);
}

.about-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem;
    border-radius: 20px;
    background: #0f172a;
    color: #fff;
    margin-bottom: 3rem;
}

/* ==========================================================================
   Адаптивный дизайн
   ========================================================================== */

@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar {
        order: -1;
    }
    
    .help-banner {
        padding: 1.5rem;
    }
    
    .quick-nav-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .site-nav {
        display: none;
        width: 100%;
        order: 3;
        background: #ffffff;
        border-radius: 20px;
        padding: 1rem;
        margin-top: 1rem;
        border: 1px solid var(--border-color);
        box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    }
    
    .site-nav.active {
        display: block;
    }
    
    .site-nav__list {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }
    
    .site-nav__link {
        width: 100%;
        justify-content: flex-start;
    }
    
    .about-hero {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
    
    .about-hero__features {
        flex-direction: column;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-info {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
    
    .about-cta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero {
        padding: 3rem 1.5rem;
        border-radius: 12px;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .main-article {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }
    
    .quick-nav {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }
    
    .quick-nav-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .popular-articles {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero {
        padding: 1.5rem 0.75rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .main-article {
        padding: 1rem;
    }
    
    .quick-nav {
        padding: 1rem;
    }
    
    .help-banner {
        padding: 1rem;
    }
    
    .banner-text h4 {
        font-size: 1rem;
    }
    
    .contact-item {
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   Страница категории
   ========================================================================== */

/* Заголовок категории */
.category-header {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--background-primary) 100%);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.category-header h1 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.category-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Статистика категории */
.category-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Информация о результатах поиска */
.search-results-info {
    background: var(--light-blue);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-blue);
}

.search-results-info p {
    margin: 0;
    color: var(--text-primary);
}

.search-results-info a {
    color: var(--primary-blue);
    font-weight: 500;
}

/* Другие категории в сайдбаре */
.other-categories {
    background: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.other-categories h3 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    background: var(--background-secondary);
}

.category-item:hover {
    background: var(--light-blue);
    border-color: var(--primary-blue);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.category-item:hover h4 {
    color: var(--primary-blue);
}

.category-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-count {
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Адаптивность для страницы категории
   ========================================================================== */

@media (max-width: 968px) {
    .category-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .category-header {
        padding: 2rem 1rem;
    }
    
    .category-header h1 {
        font-size: 2rem;
    }
    
    .category-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    
    .stat-number,
    .stat-label {
        display: inline;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .search-results-info {
        padding: 1rem;
    }
    
    .other-categories {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .category-header {
        padding: 1.5rem 0.75rem;
    }
    
    .category-header h1 {
        font-size: 1.75rem;
    }
    
    .category-description {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .category-item {
        padding: 0.75rem;
    }
    
    .category-item h4 {
        font-size: 0.9rem;
    }
    
    .category-item p {
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   Страница отдельной статьи
   ========================================================================== */

/* Полная статья */
.article-full {
    background: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.yandex-rtb-block {
    margin: 2rem 0;
}

.yandex-rtb-block--top {
    margin-top: 0;
}

.yandex-rtb-block--bottom {
    margin-bottom: 0;
}

.article-full .article-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.article-full .article-category {
    margin-bottom: 1rem;
}

.article-full .article-category a {
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.article-full .article-category a:hover {
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
}

.article-full .article-title {
    color: var(--text-primary);
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    position: relative;
}

.article-full .featured-badge {
    position: absolute;
    top: -10px;
    right: 0;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-full .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-label {
    font-weight: 500;
}

/* Изображение статьи */
.article-featured-image {
    margin: 2rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

/* Выдержка статьи */
.article-excerpt {
    background: var(--light-blue);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    border-left: 4px solid var(--primary-blue);
}

.article-excerpt p {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
    font-style: italic;
    line-height: 1.6;
}

/* ==========================================================================
   СТИЛИ ОФОРМЛЕНИЯ СТАТЕЙ - Полный набор для всех элементов
   ========================================================================== */

.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    margin: 2rem 0;
}

/* Заголовки */
.article-content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-blue);
    color: var(--text-primary);
    text-align: left;
    scroll-margin-top: 100px;
}

.article-content h2 {
    font-size: 1.875rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--primary-blue);
    text-align: left;
    scroll-margin-top: 100px;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: left;
    scroll-margin-top: 100px;
}

.article-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    text-align: left;
    scroll-margin-top: 100px;
}

.article-content h5 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    text-align: left;
}

.article-content h6 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

/* Абзацы */
.article-content p {
    margin-bottom: 1.25rem;
    text-align: justify;
    line-height: 1.8;
    color: var(--text-primary);
    orphans: 3;
    widows: 3;
}

.article-content p:first-child {
    margin-top: 0;
}

.article-content p:last-child {
    margin-bottom: 0;
}

/* Списки */
.article-content ul,
.article-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    padding-left: 0.5rem;
    text-align: left;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    padding-left: 0.5rem;
    text-align: justify;
}

.article-content ul li {
    list-style-position: outside;
}

.article-content ol li {
    list-style-position: outside;
}

/* Вложенные списки */
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    margin-left: 1.5rem;
}

.article-content ul ul {
    list-style-type: circle;
}

.article-content ul ul ul {
    list-style-type: square;
}

.article-content ol ol {
    list-style-type: lower-alpha;
}

.article-content ol ol ol {
    list-style-type: lower-roman;
}

/* Таблицы */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--background-primary);
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius);
    overflow: hidden;
    text-align: left;
}

.article-content table caption {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    text-align: left;
}

.article-content thead {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
}

.article-content thead th {
    padding: 1rem 1.25rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-content tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.article-content tbody tr:hover {
    background-color: var(--light-blue);
}

.article-content tbody tr:last-child {
    border-bottom: none;
}

.article-content tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    line-height: 1.6;
}

.article-content tbody td:first-child {
    font-weight: 500;
    color: var(--text-primary);
}

/* Иконки в таблицах - уменьшенный размер */
.article-content table img {
    max-width: 32px;
    max-height: 32px;
    width: auto;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: 4px;
    box-shadow: none;
}

.article-content table td img {
    max-width: 28px;
    max-height: 28px;
    margin: 0;
}

/* Ячейки с иконками - центрирование */
.article-content table td img {
    display: inline-block;
    vertical-align: middle;
}

/* Ячейки, содержащие только иконки */
.article-content table td:only-child img,
.article-content table td:has(> img:only-child) {
    display: block;
    margin: 0 auto;
}

.article-content tfoot {
    background: var(--background-secondary);
    font-weight: 600;
}

.article-content tfoot td {
    padding: 0.75rem 1.25rem;
    border-top: 2px solid var(--border-color);
}

/* Четные/нечетные строки таблицы */
.article-content tbody tr:nth-child(even) {
    background-color: var(--background-secondary);
}

.article-content tbody tr:nth-child(even):hover {
    background-color: var(--light-blue);
}

/* Цитаты */
.article-content blockquote {
    border-left: 4px solid var(--primary-blue);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    margin-left: 0;
    background: var(--light-blue);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
    color: var(--text-secondary);
    position: relative;
    text-align: left;
}

.article-content blockquote::before {
    content: '"';
    font-size: 4rem;
    line-height: 1;
    color: var(--primary-blue);
    opacity: 0.2;
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    font-family: Georgia, serif;
}

.article-content blockquote p {
    margin-bottom: 0.5rem;
    text-align: left;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-content blockquote cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-style: normal;
    color: var(--text-secondary);
    text-align: right;
}

.article-content blockquote cite::before {
    content: '— ';
}

/* Код */
.article-content code {
    background: var(--background-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: #e83e8c;
    border: 1px solid var(--border-color);
    word-break: break-word;
}

.article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    border: 1px solid #334155;
    text-align: left;
}

.article-content pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    word-break: normal;
    white-space: pre;
}

/* Изображения */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    display: block;
}

/* Исключение для изображений в таблицах - они обрабатываются отдельно */
.article-content table img {
    max-width: 32px !important;
    max-height: 32px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    display: block;
    border-radius: 4px;
    box-shadow: none !important;
}

.article-content table td img {
    max-width: 28px !important;
    max-height: 28px !important;
    margin: 0 !important;
    display: inline-block;
    vertical-align: middle;
}

/* Для ячеек, где иконка единственный элемент */
.article-content table td:only-child img,
.article-content table td img:only-child {
    display: block;
    margin: 0 auto;
}

.article-content img[align="left"] {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.article-content img[align="right"] {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.article-content img[align="center"] {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Ссылки */
.article-content a {
    color: var(--primary-blue);
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

.article-content a:hover {
    color: var(--dark-blue);
    text-decoration-color: var(--dark-blue);
}

.article-content a:visited {
    color: #7c3aed;
}

/* Выделение текста */
.article-content strong,
.article-content b {
    font-weight: 600;
    color: var(--text-primary);
}

.article-content em,
.article-content i {
    font-style: italic;
}

.article-content mark {
    background: #fef08a;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    color: var(--text-primary);
}

.article-content u {
    text-decoration: underline;
    text-decoration-color: var(--primary-blue);
    text-underline-offset: 2px;
}

.article-content del {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.article-content ins {
    background: #dcfce7;
    padding: 0.1rem 0.3rem;
    text-decoration: none;
    border-radius: 3px;
}

/* Горизонтальная линия */
.article-content hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 2.5rem 0;
    width: 100%;
}

/* Определения */
.article-content dl {
    margin: 1.5rem 0;
}

.article-content dt {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.article-content dd {
    margin-left: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    text-align: justify;
}

/* Адреса */
.article-content address {
    font-style: normal;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--background-secondary);
    border-left: 3px solid var(--primary-blue);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    text-align: left;
}

/* Аббревиатуры */
.article-content abbr {
    border-bottom: 1px dotted var(--text-secondary);
    cursor: help;
    text-decoration: none;
}

/* Верхний и нижний индекс */
.article-content sup {
    font-size: 0.75em;
    vertical-align: super;
    line-height: 0;
}

.article-content sub {
    font-size: 0.75em;
    vertical-align: sub;
    line-height: 0;
}

/* Клавиатура */
.article-content kbd {
    background: var(--text-primary);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Переменные */
.article-content var {
    font-style: italic;
    color: var(--primary-blue);
    font-family: 'Courier New', monospace;
}

/* Вывод программы */
.article-content samp {
    font-family: 'Courier New', monospace;
    background: var(--background-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Малый текст */
.article-content small {
    font-size: 0.875em;
    color: var(--text-secondary);
}

/* Большой текст */
.article-content big {
    font-size: 1.125em;
}

/* Выделенные блоки */
.article-content .highlight-box {
    background: var(--light-blue);
    border-left: 4px solid var(--primary-blue);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    text-align: left;
}

.article-content .warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    text-align: left;
}

.article-content .error-box {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    text-align: left;
}

.article-content .success-box {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    text-align: left;
}

.article-content .info-box {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    text-align: left;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .article-content {
        font-size: 1rem;
        text-align: left;
    }
    
    .article-content h1 {
        font-size: 1.75rem;
        margin-top: 2rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
    }
    
    .article-content h4 {
        font-size: 1.125rem;
    }
    
    .article-content p {
        text-align: left;
    }
    
    .article-content table {
        font-size: 0.9rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .article-content thead th,
    .article-content tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .article-content img[align="left"],
    .article-content img[align="right"] {
        float: none;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    
    .article-content ul,
    .article-content ol {
        margin-left: 1.5rem;
    }
    
    .article-content blockquote {
        margin-left: 0;
        padding-left: 1rem;
    }
    
    .article-content pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
}

/* Печать */
@media print {
    .article-content {
        text-align: justify;
    }
    
    .article-content a {
        text-decoration: underline;
    }
    
    .article-content a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
    
    .article-content img {
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    .article-content table {
        page-break-inside: avoid;
    }
    
    .article-content h1,
    .article-content h2,
    .article-content h3 {
        page-break-after: avoid;
    }
}

/* Подвал статьи */
.article-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    margin-top: 3rem;
}

.article-tags {
    margin-bottom: 2rem;
}

.article-tags h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--background-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

.article-share h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.share-vk {
    background: #4680c2;
    color: white;
}

.share-telegram {
    background: #0088cc;
    color: white;
}

.share-whatsapp {
    background: #25d366;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: white;
}

/* Навигация между статьями */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.nav-link {
    background: var(--background-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.nav-link:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-blue);
    text-decoration: none;
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-direction {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.nav-title {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

.nav-link:hover .nav-title {
    color: var(--primary-blue);
}

/* Похожие статьи */
.related-articles {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin: 2rem 0;
}

.related-articles h3 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.related-image {
    height: 150px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-content {
    padding: 1rem;
}

.related-content h4 {
    margin-bottom: 0.5rem;
}

.related-content h4 a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.4;
}

.related-content h4 a:hover {
    color: var(--primary-blue);
}

.related-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.related-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Возврат к статьям */
.back-to-articles {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.button-secondary {
    background: var(--background-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.button-secondary:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Оглавление */
.table-of-contents {
    background: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    position: sticky;
    top: 100px;
}

.table-of-contents h4 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.table-of-contents ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.toc-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    display: block;
    padding: 0.25rem 0;
    transition: var(--transition);
}

.toc-link:hover {
    color: var(--primary-blue);
    text-decoration: none;
}

.toc-h2 {
    font-weight: 600;
}

.toc-h3 {
    padding-left: 1rem;
    font-weight: 500;
}

.toc-h4 {
    padding-left: 2rem;
    font-weight: 400;
}

/* ==========================================================================
   Адаптивность для страницы статьи
   ========================================================================== */

@media (max-width: 968px) {
    .article-navigation {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .table-of-contents {
        position: static;
    }
}

@media (max-width: 768px) {
    .article-full {
        padding: 1.5rem;
    }
    
    .article-full .article-title {
        font-size: 2rem;
    }
    
    .article-full .article-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .back-to-articles {
        flex-direction: column;
    }
    
    .article-content {
        font-size: 0.95rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .article-full {
        padding: 1rem;
    }
    
    .article-full .article-title {
        font-size: 1.75rem;
    }
    
    .article-full .featured-badge {
        position: static;
        display: inline-block;
        margin-top: 0.5rem;
    }
    
    .article-excerpt {
        padding: 1rem;
    }
    
    .nav-link {
        padding: 1rem;
    }
    
    .related-articles {
        padding: 1rem;
    }
}

/* ==========================================================================
   Страница статей и дополнительные компоненты
   ========================================================================== */

/* Хлебные крошки */
.breadcrumbs {
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--text-light);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Заголовок страницы */
.page-header {
    margin-bottom: 2rem;
    text-align: center;
}

.page-header h1 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Фильтры и поиск */
.filters-section {
    background: var(--background-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.search-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.search-button:hover {
    background: var(--dark-blue);
}

.categories-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-filter {
    padding: 0.5rem 1rem;
    background: var(--background-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.category-filter:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    text-decoration: none;
}

.category-filter.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Сетка статей */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: var(--background-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 1.5rem;
    position: relative;
}

.featured-badge {
    position: absolute;
    top: -10px;
    right: 1rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-category {
    margin-bottom: 0.75rem;
}

.article-category a {
    color: var(--primary-blue);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.article-category a:hover {
    text-decoration: underline;
}

.article-title {
    margin-bottom: 1rem;
}

.article-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.article-title a:hover {
    color: var(--primary-blue);
    text-decoration: none;
}

.article-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.views-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.read-more {
    color: var(--primary-blue);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--dark-blue);
    text-decoration: none;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination-link,
.pagination-current {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.pagination-link:hover {
    background: var(--light-blue);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    text-decoration: none;
}

.pagination-current {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--background-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.button:hover {
    background: var(--dark-blue);
    text-decoration: none;
    color: white;
}

/* Популярные статьи - Улучшенный дизайн */
.popular-articles {
    background: var(--background-primary);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.popular-articles h3 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

.popular-articles h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 2px;
}

.article-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.article-views {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ==========================================================================
   Адаптивность для страницы статей
   ========================================================================== */

@media (max-width: 968px) {
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .categories-filter {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filters-section {
        padding: 1rem;
    }
    
    .search-wrapper {
        flex-direction: column;
    }
    
    .categories-filter {
        gap: 0.5rem;
    }
    
    .category-filter {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .pagination {
        gap: 0.25rem;
        flex-wrap: wrap;
    }
    
    .pagination-link,
    .pagination-current {
        padding: 0.4rem 0.6rem;
        font-size: 0.875rem;
    }
    
    .breadcrumbs {
        font-size: 0.8rem;
    }
    
    .breadcrumb-separator {
        margin: 0 0.3rem;
    }
}

@media (max-width: 480px) {
    .article-content {
        padding: 1rem;
    }
    
    .article-title a {
        font-size: 1.125rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .page-header {
        margin-bottom: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   Утилиты и дополнительные стили
   ========================================================================== */

/* Скрытие элементов */
.hidden {
    display: none;
}

/* Визуально скрытый текст (для screen readers) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Анимации загрузки */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Стили для печати */
@media print {
    .header,
    .sidebar,
    .footer {
        display: none;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .main-article {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    a {
        color: inherit;
        text-decoration: none;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* Улучшения производительности */
.content-area,
.sidebar {
    contain: layout;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ==========================================================================
   Дополнительные стили для обновленной главной страницы
   ========================================================================== */

/* Надпись "Реклама" в баннере */
.help-banner {
    position: relative;
}

.ad-label {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 2px 6px;
    font-size: 0.7rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    font-weight: 500;
}

/* Картинка в баннере */
.banner-image {
    margin: 1rem 0;
    height: 120px;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    display: block;
}

/* Заглушка для картинки */
.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

/* Скрываем заглушку если есть картинка */
.banner-img + .image-placeholder {
    display: none;
}

/* Счетчик статей в категориях */
.category-count {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-blue);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    z-index: 5;
}

/* ==========================================================================
   СЛАЙДЕР ПОСЛЕДНИХ СТАТЕЙ
   ========================================================================== */

.latest-articles-slider {
    margin-bottom: 3rem;
}

.latest-articles-slider.hero-slider {
    margin-bottom: 3rem;
}

.latest-articles-slider.hero-slider h3 {
    display: none;
}

.articles-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.hero-slider .articles-slider-container {
    border-radius: 16px;
    overflow: hidden;
}

.articles-slider {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0;
}

.slider-item {
    flex: 0 0 100%;
    min-width: 0;
    width: 100%;
}

/* Горизонтальная карточка: слева картинка, справа текст */
.slider-article-card.horizontal {
    display: flex;
    flex-direction: row;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 30%, #2563eb 70%, #1e40af 100%);
    border: none;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 450px;
    box-shadow: 0 25px 80px rgba(37, 99, 235, 0.35);
    position: relative;
}

.slider-article-card.horizontal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 40%, rgba(255, 255, 255, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 85% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 60%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.slider-article-card.horizontal::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        transform: rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: rotate(180deg);
        opacity: 0.6;
    }
}

.slider-article-card.horizontal:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 30px 100px rgba(37, 99, 235, 0.5);
    text-decoration: none;
}

.slider-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-blue);
    text-decoration: none;
}

/* Изображение для горизонтальной карточки */
.slider-article-card.horizontal .slider-article-image {
    flex: 0 0 50%;
    width: 50%;
    height: 100%;
    min-height: 450px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
}

.slider-article-card.horizontal .slider-article-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(102, 126, 234, 0.3) 100%);
    z-index: 1;
    pointer-events: none;
}

.slider-article-card.horizontal .slider-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.95) contrast(1.05);
}

.slider-article-card.horizontal:hover .slider-article-image img {
    transform: scale(1.08);
    filter: brightness(1) contrast(1.1);
}

.slider-article-card.horizontal .slider-article-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.slider-article-card.horizontal .image-placeholder-icon {
    font-size: 5rem;
    opacity: 0.5;
    color: white;
}

.image-placeholder-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* Контент для горизонтальной карточки */
.slider-article-card.horizontal .slider-article-content {
    flex: 1;
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    color: white;
}

.slider-article-card.horizontal .slider-article-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.75rem;
    align-self: flex-start;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.slider-article-card.horizontal:hover .slider-article-category {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.slider-article-card.horizontal .slider-article-title {
    color: white;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    line-height: 1.3;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.3px;
    transition: transform 0.3s ease;
}

.slider-article-card.horizontal:hover .slider-article-title {
    transform: translateX(5px);
}

.slider-article-card.horizontal .slider-article-text {
    margin-bottom: 2.5rem;
}

.slider-article-card.horizontal .slider-article-text p {
    color: rgba(255, 255, 255, 0.98);
    font-size: 1.1875rem;
    line-height: 1.75;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: 400;
}

.slider-article-card.horizontal .slider-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 2rem;
    border-top: 2px solid rgba(255, 255, 255, 0.25);
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.slider-article-card.horizontal .slider-article-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.slider-article-card.horizontal .slider-article-date {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Статичные статьи под слайдером */
.static-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.static-article-card {
    display: flex;
    flex-direction: column;
    background: var(--background-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
}

.static-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-blue);
    text-decoration: none;
}

.static-article-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--background-secondary);
    position: relative;
}

.static-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.static-article-card:hover .static-article-image img {
    transform: scale(1.05);
}

.static-article-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-blue), var(--background-secondary));
}

.static-article-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.static-article-category {
    display: inline-block;
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

.static-article-content h4 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.static-article-card:hover .static-article-content h4 {
    color: var(--primary-blue);
}

.static-article-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.static-article-text p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.static-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-light);
}

.static-article-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.slider-article-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Кнопки слайдера */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 1.75rem;
    color: var(--primary-blue);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    font-weight: 300;
    line-height: 1;
}

.slider-btn:hover:not(:disabled) {
    background: white;
    color: var(--primary-blue);
    border-color: white;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.slider-btn:active:not(:disabled) {
    transform: translateY(-50%) scale(1.05);
}

.slider-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.9);
}

.slider-btn-prev {
    left: 20px;
}

.slider-btn-next {
    right: 20px;
}

/* Точки навигации */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.slider-dot:hover {
    border-color: var(--primary-blue);
    background: var(--light-blue);
}

.slider-dot.active {
    background: white;
    border-color: white;
    width: 32px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.5);
}

/* Изображения в популярных статьях */
.article-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.article-item-image {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--background-secondary);
}

.article-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-item:hover .article-item-image img {
    transform: scale(1.1);
}

.article-item-content {
    flex: 1;
    min-width: 0;
}

/* Адаптивность для мобильных */
@media (max-width: 968px) {
    .slider-item {
        flex: 0 0 calc(50% - 0.75rem);
    }
    
    .slider-btn-prev {
        left: 10px;
    }
    
    .slider-btn-next {
        right: 10px;
    }
    
    .static-articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 968px) {
    .slider-article-card.horizontal {
        min-height: 400px;
    }
    
    .slider-article-card.horizontal .slider-article-content {
        padding: 3rem 2.5rem;
    }
    
    .slider-article-card.horizontal .slider-article-title {
        font-size: 2.25rem;
    }
    
    .slider-article-card.horizontal .slider-article-text p {
        font-size: 1.0625rem;
    }
}

@media (max-width: 768px) {
    .latest-articles-slider {
        padding: 0;
    }
    
    .slider-item {
        flex: 0 0 100%;
    }
    
    .slider-article-card.horizontal {
        flex-direction: column;
        min-height: auto;
        border-radius: 16px;
    }
    
    .slider-article-card.horizontal .slider-article-image {
        flex: 0 0 280px;
        width: 100%;
        min-height: 280px;
    }
    
    .slider-article-card.horizontal .slider-article-content {
        padding: 2.5rem 2rem;
    }
    
    .slider-article-card.horizontal .slider-article-title {
        font-size: 1.875rem;
        margin-bottom: 1.25rem;
    }
    
    .slider-article-card.horizontal .slider-article-text {
        margin-bottom: 2rem;
    }
    
    .slider-article-card.horizontal .slider-article-text p {
        font-size: 1rem;
    }
    
    .slider-btn {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }
    
    .slider-btn-prev {
        left: 10px;
    }
    
    .slider-btn-next {
        right: 10px;
    }
    
    .static-articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .static-article-image {
        height: 160px;
    }
    
    .article-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-item-image {
        width: 100%;
        height: 200px;
        flex: none;
    }
    
    .banner-image {
        height: 100px;
    }
    
    .ad-label {
        top: 4px;
        right: 4px;
        font-size: 0.65rem;
        padding: 1px 4px;
    }
    
    .category-count {
        top: 8px;
        right: 8px;
        font-size: 0.65rem;
        padding: 1px 4px;
    }
}

/* INLINE ICON IMAGES INSIDE TEXT/LISTS */
.article-content p > img:only-child,
.article-content li > img:only-child {
    display: inline-block;
    max-width: 28px !important;
    max-height: 28px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 0.4rem -0.2rem 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

/* Any images embedded inline with text should behave like emojis */
.article-content p img,
.article-content li img {
    vertical-align: text-bottom;
}

/* If a paragraph contains only an image, treat it as an icon, not a banner */
@supports(selector(p > img:only-child)) {
    .article-content p:has(> img:only-child) {
        margin: 0.5rem 0;
    }
}
/* Фикс для sidebar: предотвращение наложения элементов */
.sidebar > * {
    margin-bottom: 2rem;
}

.table-of-contents {
    position: static !important;
    margin-bottom: 2rem;
}

.popular-articles {
    clear: both;
}

@media (min-width: 1024px) {
    .table-of-contents {
        position: sticky !important;
        top: 100px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}

/* Contact Form Section */
.contact-form-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h2 {
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.contact-info p {
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-details .contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--background-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.contact-details .contact-item strong {
    min-width: 120px;
}

.contact-details .contact-item a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.contact-details .contact-item a:hover {
    text-decoration: underline;
}

.contact-form-wrapper {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.contact-form h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group .required {
    color: #ef4444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group label {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    cursor: pointer;
}

.button-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.button-primary:hover:not(:disabled) {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    display: none;
}

.form-message--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 968px) {
    .contact-form-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* About page specific styles override */
.about-page .about-cta {
    background: transparent;
    padding: 3rem 0;
}

.about-page .contact-form-section {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.about-page .contact-info {
    padding-right: 2rem;
}

.about-page .contact-form-wrapper {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.about-page .form-group input,
.about-page .form-group select,
.about-page .form-group textarea {
    background: white;
}

@media (max-width: 968px) {
    .about-page .contact-form-section {
        padding: 2rem 1.5rem;
    }
    
    .about-page .contact-info {
        padding-right: 0;
    }
}
