/* CSS Variables for Theming */
:root {
    --bg-color: #f4f6f8;
    --text-color: #333333;
    --text-muted: #666666;
    --card-bg: #ffffff;
    --header-bg: #f4f6f8;
    --accent-blue: #0033ff;
    --nav-bg: #0033ff;
    --nav-text: #ffffff;
    --border-color: #e0e0e0;
    --footer-bg: #111111;
    --footer-text: #aaaaaa;
    --modal-bg: #ffffff;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --text-muted: #999999;
    --card-bg: #1e1e1e;
    --header-bg: #121212;
    --accent-blue: #3366ff;
    --nav-bg: #3366ff;
    --nav-text: #ffffff;
    --border-color: #333333;
    --modal-bg: #2a2a2a;
    --shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.2s;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.tag {
    background-color: var(--accent-blue);
    color: white;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 8px;
    margin-right: 5px;
}

/* Header */
.site-header {
    background-color: var(--header-bg);
    padding-top: 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    border-radius: 5px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    background-color: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

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

.main-nav {
    background-color: var(--nav-bg);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.main-nav a {
    color: var(--nav-text);
    font-weight: 600;
    padding: 15px 0;
    display: block;
    font-size: 0.95rem;
}

/* Hero Section */
.hero {
    margin-top: 30px;
    position: relative;
}

.hero-slide {
    height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.8));
}

/*.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 20px;
}*/

.hero-content h2 {
    font-size: 2.5rem;
    margin: 15px 0;
    line-height: 1.2;
}

.meta {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    display: flex;
    justify-content: center;
    gap: 15px;
}

.list-card .meta {
    color: var(--text-muted);
    justify-content: flex-start;
    margin-bottom: 10px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 2;
}

.prev-btn { left: 30px; }
.next-btn { right: 30px; }

/* Layout */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Articles List */
.list-card {
    display: flex;
    background-color: var(--card-bg);
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.list-card .card-img {
    flex: 0 0 300px;
}

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

.list-card .card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.list-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.list-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Sidebar */
.widget {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.widget h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-blue);
    display: inline-block;
}

.search-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    border-radius: 4px;
    margin-bottom: 10px;
}

.search-form button {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

/* Grid Section (You Missed) */
.missed-section {
    margin-bottom: 50px;
}

.section-header {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.section-header h2 {
    border-bottom: 2px solid var(--accent-blue);
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: -1px;
}

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

.grid-card {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    color: white;
}

.grid-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.8));
    z-index: 1;
}

.grid-card > * {
    position: relative;
    z-index: 2;
}

.grid-card h4 {
    font-size: 1.1rem;
    line-height: 1.3;
    margin-top: 5px;
}

/* Welcome Text */
.welcome-text {
    background-color: var(--card-bg);
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.welcome-text h2 {
    margin-bottom: 20px;
    font-size: 2rem;
}

.welcome-text p {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.site-footer h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.disclaimer {
    font-size: 0.9rem;
    line-height: 1.8;
}

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

.site-footer ul li {
    margin-bottom: 10px;
}

.site-footer a {
    color: var(--accent-blue);
}

.site-footer a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--footer-text);
    margin-left: 15px;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    background-color: var(--modal-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.4s ease-in-out;
    border: 1px solid var(--border-color);
}

.cookie-modal.show {
    transform: translateX(0);
}

.cookie-modal h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.cookie-modal p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

.cookie-actions button {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    border: none;
}

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

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color) !important;
    color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    .grid-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    .main-nav ul {
        flex-wrap: wrap;
        gap: 15px;
    }
    .hero-content h2 {
        font-size: 1.8rem;
    }
    .list-card {
        flex-direction: column;
    }
    .list-card .card-img {
        flex: 0 0 200px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .grid-cards {
        grid-template-columns: 1fr;
    }
    .cookie-modal {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 20px;
    }
}

/* --- Стили для внутренней страницы --- */
/* =========================================
   NEW STYLES FOR INNER ARTICLE PAGE 
   ========================================= */

/* Article Container */
.single-article {
    background-color: var(--card-bg);
    padding: 35px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.article-header {
    margin-bottom: 25px;
}

.article-title {
    font-size: 2.4rem;
    line-height: 1.25;
    margin: 15px 0;
    color: var(--text-color);
    font-weight: 700;
}

.article-meta {
    color: var(--text-muted);
    justify-content: flex-start;
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

/* Responsive Images */
.article-hero-img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 35px;
    box-shadow: var(--shadow);
}

.article-inline-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin: 30px 0;
}

/* Article Typography (h1-h6, p, span) */
.article-content {
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text-color);
    margin: 35px 0 15px 0;
    font-weight: 700;
    line-height: 1.3;
}

.article-content h1 { font-size: 2rem; }
.article-content h2 { font-size: 1.8rem; border-bottom: 2px solid var(--accent-blue); display: inline-block; padding-bottom: 5px; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.3rem; }
.article-content h5 { font-size: 1.15rem; }
.article-content h6 { font-size: 1rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; }

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

.article-content span.dropcap {
    float: left;
    font-size: 3.5rem;
    line-height: 0.8;
    font-weight: 700;
    margin-right: 10px;
    margin-top: 5px;
    color: var(--accent-blue);
}

.article-content span.highlight-text {
    background-color: rgba(0, 51, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--accent-blue);
}

body.dark-mode .article-content span.highlight-text {
    background-color: rgba(51, 102, 255, 0.2);
    color: #88aaff;
}

/* Lists (ul, ol) */
.article-content ul,
.article-content ol {
    margin-bottom: 25px;
    padding-left: 25px;
}

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

.article-content ul li::marker {
    color: var(--accent-blue);
}

.article-content ol li::marker {
    color: var(--text-muted);
    font-weight: 700;
}

/* Table */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

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

.article-content th {
    background-color: rgba(0, 51, 255, 0.05);
    font-weight: 600;
    color: var(--text-color);
}

body.dark-mode .article-content th {
    background-color: #2a2a2a;
}

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

/* Comments & Contact Form */
.comments-section {
    background-color: var(--card-bg);
    padding: 35px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.comments-section h3 {
    font-size: 1.6rem;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--accent-blue);
    display: inline-block;
    padding-bottom: 8px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 51, 255, 0.1);
}

.contact-form button {
    align-self: flex-start;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.1s;
    margin-top: 10px;
}

.contact-form button:hover {
    opacity: 0.9;
}

.contact-form button:active {
    transform: scale(0.98);
}

/* Responsive adjustments for inner page */
@media (max-width: 768px) {
    .single-article {
        padding: 20px;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .comments-section {
        padding: 25px 20px;
    }

    .article-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
.hero {
    position: relative;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    height: 500px;
    border-radius: 12px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: none;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
}

.hero-slide.active {
    display: block;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,.15));
    border-radius: 12px;
    z-index: 1;
}

.hero-slide-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 850px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 30px;
    text-align: center;
    color: #fff;
}

.hero-content h2 {
    margin: 0 0 16px;
    color: #fff;
    line-height: 1.15;
}

.hero-content .meta {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}