/* CSS Variables for Theming */
:root {
    --primary-color: #00a884;
    --primary-dark: #008f6f;
    --bg-color: #d8e2df; /* Light theme background based on reference */
    --text-color: #111111;
    --card-bg: #ffffff;
    --border-color: #000000;
    --shadow-color: #000000;
    --footer-bg: #111111;
    --footer-text: #999999;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-color: #1a1e1d;
    --text-color: #f0f0f0;
    --card-bg: #2a2f2e;
    --border-color: #333333;
    --shadow-color: #000000;
    --footer-bg: #0a0a0a;
}

/* 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 var(--transition), color var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
}

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

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

/* Neo-brutalism Utility Classes */
.neo-brutal {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 6px 6px 0px var(--shadow-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Header Styles */
.site-header {
    padding: 20px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
}

.logo img {
/*    border-radius: 50%;
    border: 2px solid var(--border-color);*/
}

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

.icon-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 2px 2px 0px var(--shadow-color);
    transition: var(--transition);
}

.icon-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px var(--shadow-color);
}

.main-nav {
    background-color: var(--primary-color);
    padding: 15px 30px;
    border-radius: 30px;
    box-shadow: 6px 6px 0px var(--shadow-color);
}

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

.main-nav a {
    color: #fff;
    font-weight: 600;
    transition: opacity 0.2s;
}

.main-nav a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    margin: 40px auto;
}

.hero-wrapper {
    position: relative;
    height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
    color: #000;
}

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

.hero-content {
    position: absolute;
    width: 80%;
    max-width: 700px;
    padding: 40px;
    text-align: center;
    z-index: 1;
}

.hero-content h1 {
    margin: 15px 0;
    font-size: 32px;
}

/* Tags & Meta */
.tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    justify-content: center;
}

.card .tags {
    justify-content: flex-start;
}

.tag {
    background-color: var(--primary-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    font-weight: 600;
    color: inherit;
    opacity: 0.8;
}

.card .meta {
    justify-content: space-between;
    margin-bottom: 15px;
}

/* Articles Grid */
.articles-section {
    margin-bottom: 60px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 2px solid var(--border-color);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
}

.card h2 {
    font-size: 20px;
    margin: 15px 0 10px;
    line-height: 1.3;
}

.card p {
    font-size: 14px;
    opacity: 0.8;
}

.card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px var(--shadow-color);
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 60px;
}

.welcome-box {
    padding: 40px;
    text-align: center;
    background-color: var(--card-bg);
}

.welcome-box h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.welcome-box p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 16px;
}

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

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

.footer-about p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 20px;
}

.site-footer h3 {
    color: #fff;
    background-color: var(--primary-color);
    display: inline-block;
    padding: 8px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 16px;
}

.footer-recent ul,
.footer-links ul {
    list-style: none;
}

.footer-recent li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.recent-info a {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.recent-info a:hover,
.footer-links a:hover {
    color: var(--primary-color);
}

.recent-info .date {
    font-size: 12px;
}

.footer-recent img {
    border-radius: 4px;
}

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

.footer-links a {
    color: var(--primary-color);
    font-size: 14px;
    text-decoration: underline;
}

.footer-bottom {
    background-color: #000;
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    border-top: 1px solid #333;
}

.disclaimer {
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    padding: 20px;
    z-index: 1000;
    display: none;
}

.cookie-modal.show {
    display: block;
    animation: slideIn 0.5s ease forwards;
}

.cookie-modal h4 {
    margin-bottom: 10px;
}

.cookie-modal p {
    font-size: 13px;
    margin-bottom: 15px;
}

.neo-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--border-color);
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 3px 3px 0px var(--shadow-color);
    transition: var(--transition);
    width: 100%;
}

.neo-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px var(--shadow-color);
}

@keyframes slideIn {
    from { transform: translateX(120%); }
    to { transform: translateX(0); }
}

/* Responsive Design */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero-wrapper {
        height: 400px;
    }
    
    .hero-content {
        width: 90%;
        padding: 20px;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }

    .slider-btn {
        display: none; /* Hide arrows on mobile for simplicity */
    }
}

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

.single-article {
    max-width: 900px;
    margin: 40px auto;
}

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

.article-header .tags {
    justify-content: center;
    margin-bottom: 15px;
}

.article-header h1 {
    font-size: 38px;
    margin: 10px 0 20px;
    line-height: 1.2;
}

/* Responsive Image - Main */
.article-main-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    margin-bottom: 40px;
}

.article-content {
    padding: 50px;
    margin-bottom: 40px;
}

/* Typography elements */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text-color);
    margin-top: 35px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-content h1 { font-size: 32px; }
.article-content h2 { font-size: 28px; }
.article-content h3 { font-size: 24px; }
.article-content h4 { font-size: 20px; }
.article-content h5 { font-size: 18px; }
.article-content h6 { font-size: 16px; }

.article-content p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.article-content span.highlight {
    background-color: var(--primary-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Lists styling */
.article-content ul,
.article-content ol {
    margin-bottom: 25px;
    padding-left: 25px;
    font-size: 16px;
}

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

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

.article-content ul li::marker,
.article-content ol li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

/* Responsive Image - Inline */
.article-inline-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 4px 4px 0px var(--shadow-color);
    margin: 35px 0;
}

/* Table styling */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 35px 0;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 4px 4px 0px var(--shadow-color);
}

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

.article-content th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

/* Form Styling (Comments & Contact) */
.comments-section {
    padding: 50px;
}

.comments-section h2 {
    margin-bottom: 10px;
    font-size: 28px;
}

.comments-section > p {
    margin-bottom: 30px;
    opacity: 0.8;
}

.custom-form .form-row {
    display: flex;
    gap: 20px;
}

.custom-form .form-group {
    flex: 1;
    margin-bottom: 20px;
}

.custom-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 14px;
}

.custom-form input,
.custom-form textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
    box-shadow: 4px 4px 0px var(--shadow-color);
}

.custom-form input:focus,
.custom-form textarea:focus {
    outline: none;
    box-shadow: 0px 0px 0px var(--shadow-color);
    transform: translate(4px, 4px);
    border-color: var(--primary-color);
}

.custom-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Responsive adjustments for internal page */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 28px;
    }
    
    .article-content,
    .comments-section {
        padding: 25px;
    }
    
    .custom-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .article-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}