/* ========================================
   1. КОРНЕВЫЕ ПЕРЕМЕННЫЕ
   ======================================== */
:root {
    --primary: #02182d;
    --primary-dark: #011220;
    --primary-light: #0a2a45;
    --secondary: #ff0c00;
    --dark: #0f172a;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --border: #e2e8f0;
}

/* ========================================
   2. ГЛОБАЛЬНЫЕ СТИЛИ
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   3. ШАПКА И МЕНЮ
   ======================================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.3rem;
    color: #ffad00;
}

.logo-text {
    display: inline-flex;
    gap: 4px;
}

.logo-word-1 {
    color: #ffad00;
}

.logo-word-2 {
    color: #ff0c00;
}

.logo-word-3 {
    color: #ffad00;
}

@media (max-width: 360px) {
    .logo {
        font-size: 1.4rem;
        gap: 4px;
    }
    .logo-icon {
        font-size: 1.1rem;
    }
    .logo-text {
        gap: 4px;
    }
}

.menu {
    display: flex;
    gap: 32px;
    list-style: none;
}

.menu a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    transition: color 0.3s;
}

.menu a:hover,
.menu a.active {
    color: var(--secondary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 5px;
    z-index: 1001;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
}

.burger-line {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #ff0c00;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* ========================================
   4. ГЛАВНЫЙ БАННЕР (HERO)
   ======================================== */
.hero {
    position: relative;
    background: linear-gradient(135deg, #02182d 0%, #0a2a45 100%);
    padding: 60px 0;
    text-align: center;
    overflow: hidden;
    min-height: 410px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
	object-fit: cover;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.4rem;
    margin-bottom: 16px;
    color: #ffd700;
}

.hero-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.5;
    color: white;
}

.hero-text:last-of-type {
    margin-bottom: 24px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s, opacity 0.3s;
    cursor: pointer;
    border: 1px solid #334155;
}

.hero-btn-search {
    background-color: #cc0000;
    color: #ffffff;
}

.hero-btn-subscribe {
    background-color: #ffd700;
    color: #0f172a;
}

.hero-btn-search:hover,
.hero-btn-subscribe:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ========================================
   5. КАРТОЧКИ СТАТЕЙ
   ======================================== */
.articles-section {
    padding: 40px 0;
}

.section-title {
    font-size: 1.7rem;
    margin-bottom: 40px;
    text-align: left;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.article-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.article-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-content {
    padding: 16px;
    flex: 1;
}

.article-card-title {
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.4;
    font-weight: 600;
    color: #02182d;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray);
    font-size: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.article-card-stars {
    display: inline-flex;
    gap: 2px;
}

.article-card-stars .star-small {
    font-size: 11px;
    color: #cbd5e1;
}

.article-card-stars .star-small.filled {
    color: #fbbf24;
}

/* Отображение лайков на карточках */
.article-likes-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
}

.no-articles {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

/* ========================================
   ГАЛЕРЕЯ (МОДАЛЬНЫЕ ОКНА ДЛЯ ФОТО)
   ======================================== */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.gallery-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 60px 20px 20px 20px;
}

.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s;
    line-height: 1;
}

.gallery-modal-close:hover {
    color: #ffd700;
}

.gallery-modal-img {
    max-width: calc(100% - 40px);
    max-height: calc(100% - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-modal-caption {
    margin-top: 18px;
    color: #fff;
    font-size: 16px;
    text-align: center;
    max-width: 90%;
    padding: 0 10px;
    word-wrap: break-word;
    line-height: 1.4;
}

.gallery-counter {
    margin-top: 10px;
    color: #bbb;
    font-size: 15px;
    text-align: center;
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    cursor: pointer;
    font-size: 32px;
    font-weight: bold;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-prev:hover,
.gallery-next:hover {
    background-color: rgba(0, 0, 0, 0.9);
    color: #ffd700;
}

.gallery-prev {
    left: 30px;
}

.gallery-next {
    right: 30px;
}

@media (max-width: 768px) {
    .gallery-prev,
    .gallery-next {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    .gallery-prev {
        left: 15px;
    }
    .gallery-next {
        right: 15px;
    }
    .gallery-modal-close {
        font-size: 35px;
        top: 15px;
        right: 20px;
    }
    .gallery-modal-img {
        max-width: calc(100% - 20px);
        max-height: calc(100% - 100px);
    }
    .gallery-modal-content {
        padding: 50px 10px 15px 10px;
    }
    .gallery-modal-caption {
        font-size: 15px;
        margin-top: 15px;
    }
    .gallery-counter {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gallery-prev,
    .gallery-next {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
    .gallery-modal-caption {
        font-size: 14px;
        margin-top: 12px;
    }
    .gallery-counter {
        font-size: 13px;
    }
}

/* ========================================
   6. ПОХОЖИЕ СТАТЬИ
   ======================================== */
.similar-articles {
    padding: 10px 0;
    background: var(--light);
}

.similar-articles .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.similar-articles .section-title {
    text-align: center;
    margin-bottom: 30px;
}

.similar-articles .articles-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.similar-articles .article-card {
    width: 280px;
    flex-shrink: 0;
}

/* ========================================
   7. ПОДВАЛ (FOOTER)
   ======================================== */
.footer {
    background: #02182d;
    color: white;
    padding: 48px 0 24px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col#contacts {
    margin-left: 70px;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 16px;
    color: #ffd700;
}

.footer-col p {
    color: white;
    opacity: 0.9;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.875rem;
    opacity: 0.8;
}

.contacts-list {
    list-style: none;
}

.contacts-list li {
    margin-bottom: 12px;
}

.contacts-list a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.contacts-list a:hover {
    color: #ffd700;
}

/* ========================================
   8. КНОПКА НАВЕРХ
   ======================================== */
.go-to-top {
    position: fixed;
    bottom: 160px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #ffad00;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.go-to-top:hover {
    background: #e69900;
    transform: translateY(-3px);
}

.go-to-top svg {
    width: 24px;
    height: 24px;
}

/* ========================================
   9. МОДАЛЬНЫЕ ОКНА
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 20px;
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--gray);
}

.modal-close:hover {
    color: var(--dark);
}

.modal-content h3 {
    margin-bottom: 20px;
}

#searchModal .modal-content h3 {
    text-align: left;
}

#subscribeModal .modal-content h3 {
    text-align: center;
}

/* Модальное окно поиска */
.search-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input-wrapper input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-input-wrapper input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

.search-suggestions {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
}

.search-suggestion-item {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.9rem;
}

.search-suggestion-item:hover {
    background: #e0f2fe;
}

.search-modal-btn {
    padding: 12px 24px;
    background: #ffd700;
    color: #02182d;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-modal-btn:hover {
    background: #e6c200;
}

/* Модальное окно подписки */
.form-group {
    margin-bottom: 20px;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

.checkbox-group {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    padding-left: 28px;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    transition: all 0.3s;
}

.checkbox-label:hover input ~ .checkmark {
    border-color: #02182d;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #02182d;
    border-color: #02182d;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label .checkmark:after {
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    flex: 1;
    line-height: 1.4;
}

.privacy-link,
.terms-link {
    color: #02182d;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.3s;
}

.privacy-link:hover,
.terms-link:hover {
    color: #ff0c00;
    text-decoration: underline;
}

.captcha-group {
    margin: 20px 0;
}

.captcha {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--light);
    padding: 12px 16px;
    border-radius: 12px;
    flex-wrap: nowrap;
}

.captcha-question {
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark);
    white-space: nowrap;
}

.captcha-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    min-width: 80px;
}

.captcha-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

.subscribe-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.subscribe-modal-btn {
    flex: 1;
    padding: 12px;
    background: #ffd700;
    color: #02182d;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.subscribe-modal-btn:hover {
    background: #e6c200;
    transform: translateY(-1px);
}

.unsubscribe-modal-btn {
    flex: 1;
    padding: 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.unsubscribe-modal-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.privacy-text {
    text-align: center;
    margin-top: 15px;
    font-size: 0.8rem;
}

/* ========================================
   10. СТРАНИЦА ПОИСКА
   ======================================== */
.search-page {
    padding: 40px 0;
    min-height: 60vh;
}

.search-header {
    text-align: center;
    margin-bottom: 40px;
}

.search-title {
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.search-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-query-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-query-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

.search-submit-btn {
    padding: 12px 24px;
    background: #ffd700;
    color: #02182d;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.search-submit-btn:hover {
    background: #e6c200;
}

.search-page-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    z-index: 100;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-page-suggestions:not(:empty) {
    display: block;
}

.search-results-header {
    margin-bottom: 30px;
    text-align: center;
}

.search-results-header h2 {
    font-size: 1.2rem;
    color: var(--gray);
    font-weight: normal;
}

.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s, opacity 0.3s;
    cursor: pointer;
    border: 2px solid #cbd5e1;
    background-color: #ffd700;
    color: #0f172a;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ========================================
   11. СТРАНИЦА СТАТЬИ
   ======================================== */
.article-page {
    padding: 20px 0;
}

.article-container {
    background: var(--white);
    border-radius: 24px;
    padding: 30px 48px 48px 48px;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
    min-height: 500px;
}

.article-title {
    font-size: 2rem;
    margin-bottom: 24px;
    line-height: 1.3;
}

.article-image-container {
    display: block;
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.article-main-image {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.article-content img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    border-radius: 12px;
    margin: 20px auto;
    transition: opacity 0.3s;
}

.article-content img:hover {
    opacity: 0.9;
}

.article-content a {
    color: #000099;
    text-decoration: none;
    transition: color 0.3s;
}

.article-content a:hover {
    color: #ff0c00;
    text-decoration: none;
}

.article-content h2 {
    font-size: 1.75rem;
    margin: 40px 0 20px;
}

.article-content h3 {
    font-size: 1.375rem;
    margin: 32px 0 16px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
    margin: 20px 0 20px 30px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    overflow-x: auto;
    display: block;
    font-size: 0.9rem;
}

.article-content th,
.article-content td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
}

.article-content th {
    background: var(--light);
    font-weight: 600;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--gray);
    font-style: italic;
}

.article-divider {
    height: 1px;
    background: var(--border);
    margin: 40px 0 30px;
}

.article-footer-signature {
    text-align: center;
    margin: 40px 0 20px;
}

.signature-divider {
    height: 1px;
    background: var(--border);
    margin-bottom: 30px;
}

.signature-text {
    font-size: 0.95rem;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.5;
}

.signature-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--dark);
    font-size: 0.8rem;
}

/* Лайки на странице статьи */
.article-likes {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    transition: transform 0.2s;
    padding: 0;
    color: #ff0c00;
}

.like-btn:hover {
    transform: scale(1.1);
}

.like-btn:disabled {
    opacity: 0.6;
    transform: none;
    cursor: default;
}

.likes-count {
    font-size: 0.7rem;
}

.article-rating-block {
    text-align: center;
    margin-bottom: 30px;
}

.rating-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1.125rem;
}

.stars-rating {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.star {
    font-size: 32px;
    cursor: pointer;
    color: #cbd5e1;
    transition: color 0.3s;
}

.star.filled {
    color: #fbbf24;
}

.star:hover {
    color: #fbbf24;
}

.rating-message {
    margin-top: 10px;
}

.rating-success {
    color: #22c55e;
    font-size: 0.875rem;
}

.rating-error {
    color: #ef4444;
    font-size: 0.875rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
}

.share-label {
    font-weight: 500;
    color: var(--gray);
}

.share-btn {
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: opacity 0.3s;
}

.share-btn:hover {
    opacity: 0.8;
}

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

/* ========================================
   12. АДМИН-ПАНЕЛЬ
   ======================================== */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.admin-header h1 {
    font-size: 1.75rem;
    margin: 0;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
}

.admin-btn-primary {
    background: var(--primary);
    color: white;
}

.admin-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.admin-btn-secondary {
    background: var(--gray);
    color: white;
}

.admin-btn-secondary:hover {
    background: #475569;
}

.admin-btn-danger {
    background: #ef4444;
    color: white;
}

.admin-btn-danger:hover {
    background: #dc2626;
}

.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table th {
    background: var(--light);
    padding: 16px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:hover {
    background: #f8fafc;
}

.admin-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.admin-status-published {
    background: #22c55e20;
    color: #16a34a;
}

.admin-status-draft {
    background: #64748b20;
    color: #475569;
}

.admin-actions {
    display: flex;
    gap: 12px;
    white-space: nowrap;
}

.admin-action-link {
    text-decoration: none;
    font-size: 1.125rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.admin-action-link:hover {
    opacity: 1;
}

.admin-action-danger {
    color: #ef4444;
}

.article-title-link {
    color: #000099;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: inline-block;
}

.article-title-link:hover {
    color: #ff0c00;
    text-decoration: none;
}

.admin-form {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.admin-form-group {
    margin-bottom: 24px;
}

.admin-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.admin-input,
.admin-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.875rem;
    transition: border 0.3s;
}

.admin-input:focus,
.admin-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.admin-hint {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--gray);
}

.admin-form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* ========================================
   13. ПРАВОВЫЕ СТРАНИЦЫ
   ======================================== */
.legal-page {
    padding: 40px 0;
    background: var(--light);
    min-height: 60vh;
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow);
}

.legal-container h1 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 8px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 16px;
}

.legal-date {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 32px;
}

.legal-container h2 {
    font-size: 1.5rem;
    margin: 32px 0 16px;
    color: var(--primary-dark);
}

.legal-container p {
    margin-bottom: 16px;
    line-height: 1.6;
    color: var(--dark);
}

.legal-container ul {
    margin: 16px 0 16px 30px;
}

.legal-container li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.legal-container a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

.legal-container a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.legal-contacts {
    background: var(--light);
    padding: 20px;
    border-radius: 16px;
    margin: 24px 0;
}

/* ========================================
   14. СТРАНИЦА 404
   ======================================== */
.error-page {
    padding: 20px 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    background: var(--white);
    border-radius: 32px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.error-number {
    color: #0033A0;
    text-shadow: 3px 3px 0 rgba(0, 51, 160, 0.2);
}

.error-zero {
    color: #ffd700;
    text-shadow: 3px 3px 0 rgba(255, 215, 0, 0.2);
}

.error-image {
    margin-bottom: 30px;
}

.error-emoji {
    font-size: 5rem;
    display: inline-block;
    animation: errorBounce 2s ease infinite;
}

@keyframes errorBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.error-title {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--dark);
}

.error-text {
    font-size: 1rem;
    color: #334155;
    margin-bottom: 12px;
    line-height: 1.6;
}

.error-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 30px 0 40px;
}

.error-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    cursor: pointer;
}

.error-btn-home {
    background: #0033A0;
    color: white;
    border: none;
}

.error-btn-home:hover {
    background: #002280;
    transform: translateY(-2px);
}

.error-btn-search {
    background: #cc0000;
    color: white;
    border: none;
}

.error-btn-search:hover {
    background: #a30000;
    transform: translateY(-2px);
}

.error-btn-subscribe {
    background: #ffd700;
    color: #02182d;
    border: none;
}

.error-btn-subscribe:hover {
    background: #e6c200;
    transform: translateY(-2px);
}

.error-suggestions {
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

/* ========================================
   15. БАННЕР COOKIE
   ======================================== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    z-index: 9999;
    padding: 12px 0;
    text-align: center;
    transform: translateY(0);
    transition: transform 0.5s ease;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
}

.cookie-consent.hidden {
    transform: translateY(100%);
}

.cookie-consent-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 15px;
    flex-wrap: wrap;
}

.cookie-consent p {
    font-size: 0.9rem;
    color: #fff;
    margin: 0;
}

.cookie-consent a {
    color: #ffd700;
    text-decoration: underline;
}

.cookie-consent a:hover {
    color: #ffd700;
    text-decoration: none;
}

.cookie-consent-btn {
    background: #ffd700;
    color: #02182d;
    border: none;
    padding: 8px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.cookie-consent-btn:hover {
    background: #e6c200;
}

/* ========================================
   16. АДАПТИВНОСТЬ (MEDIA QUERIES)
   ======================================== */
@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
    }
    .hero-title {
        font-size: 1.7rem;
    }
    .hero-text {
        font-size: 1rem;
        padding: 0 16px;
    }
    .hero-buttons {
        gap: 12px;
    }
    .hero-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 16px;
        padding: 20px 0;
    }
    .menu.show {
        display: flex;
    }
    .mobile-menu-btn {
        display: flex;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-container {
        padding: 24px;
    }
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-content h2 {
        font-size: 1.3rem;
        margin: 30px 0 15px;
    }
    .article-content h3 {
        font-size: 1.1rem;
        margin: 25px 0 12px;
    }
    .article-content p,
    .article-content li,
    .article-content blockquote {
        font-size: 1rem;
        line-height: 1.6;
    }
    .article-content table {
        font-size: 0.85rem;
    }
    .article-content th,
    .article-content td {
        padding: 8px;
    }
    
    .footer-col#contacts {
        margin-left: 0;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 12px;
    }
    .admin-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .share-buttons {
        gap: 8px;
    }
    .share-btn {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    .go-to-top {
        bottom: 140px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    .go-to-top svg {
        width: 20px;
        height: 20px;
    }
    
    .legal-container {
        padding: 24px;
    }
    .legal-container h1 {
        font-size: 1.75rem;
    }
    .legal-container h2 {
        font-size: 1.3rem;
    }
    
    .error-page {
        padding: 40px 0;
    }
    .error-container {
        padding: 40px 20px;
    }
    .error-code {
        font-size: 5rem;
        gap: 8px;
    }
    .error-title {
        font-size: 1.5rem;
    }
    .error-buttons {
        gap: 12px;
    }
    .error-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    .error-suggestions ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .cookie-consent-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .cookie-consent {
        padding: 15px 0;
    }
    
    .search-title {
        font-size: 1.6rem;
    }
    .search-title-with-query {
        font-size: 1.4rem;
    }
    .search-results-header h2 {
        font-size: 1.1rem;
    }
    .search-query-input {
        padding: 10px 14px;
        font-size: 0.9rem;

    }
    .search-submit-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 540px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .subscribe-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .subscribe-modal-btn,
    .unsubscribe-modal-btn {
        width: 100%;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 20px;
    }
    .captcha {
        gap: 8px;
        flex-wrap: wrap;
    }
    .captcha-question {
        white-space: normal;
    }
    .checkbox-text {
        font-size: 0.8rem;
    }
    .search-input-wrapper {
        flex-direction: column;
    }
    .search-modal-btn {
        width: 100%;
    }
    
    .search-title {
        font-size: 1.5rem;
    }
    .search-title-with-query {
        font-size: 1.3rem;
    }
    .search-results-header h2 {
        font-size: 1rem;
    }
    .search-form {
        gap: 8px;
    }
    .search-query-input {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    .search-submit-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* ========================================
   РУБРИКИ НА ГЛАВНОЙ
   ======================================== */
.rubric-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

.rubric-link:hover {
    opacity: 0.8;
}