* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: #1a1a1a;
    background-color: #ffffff;
}

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

header {
    background: #1a1a1a;
    color: white;
    padding: 1.5rem 0;
    border-bottom: 3px solid #d32f2f;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    max-height: 50px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    color: #d32f2f;
    border-bottom-color: #d32f2f;
}

.hero {
    text-align: center;
    padding: 3rem 0;
    background: #f8f8f8;
    margin: 2rem 0;
    border-top: 4px solid #d32f2f;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.3rem;
    color: #666;
    font-style: italic;
}

.articles-grid {
    margin: 3rem 0;
}

.articles-grid h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: #1a1a1a;
    font-weight: 700;
    border-bottom: 3px solid #d32f2f;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    background: white;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #d32f2f;
}

.article-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.article-content {
    padding: 1.5rem;
}

.article-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
    font-weight: 700;
    line-height: 1.3;
}

.excerpt {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.date {
    color: #999;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-detail {
    background: white;
    padding: 3rem 2rem;
    margin: 2rem 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.article-detail h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    font-weight: 700;
    line-height: 1.2;
}

.article-detail .meta {
    color: #666;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-detail .content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #333;
}

.article-detail .content h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    font-weight: 700;
    border-bottom: 2px solid #d32f2f;
    padding-bottom: 0.5rem;
}

.article-detail .content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    font-weight: 700;
}

.article-detail .content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-detail .content ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-detail .content ul li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

/* Галерея изображений статьи */
.article-images {
    margin: 2.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article-images img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Отдельные изображения в контенте */
.article-detail .content img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 3px solid #d32f2f;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #d32f2f;
}

footer p {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

.page-content {
    background: white;
    padding: 3rem 2rem;
    margin: 2rem 0;
    min-height: 400px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    font-weight: 700;
    border-bottom: 3px solid #d32f2f;
    padding-bottom: 0.5rem;
}

.page-content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    font-weight: 700;
}

.page-content p {
    margin-bottom: 1.5rem;
    line-height: 1.9;
    text-align: justify;
}

.page-content ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.page-content ul li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

/* Кнопка "Назад" */
.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #d32f2f;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: #b71c1c;
    text-decoration: underline;
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .articles {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .article-detail h1 {
        font-size: 2rem;
    }

    .article-detail {
        padding: 2rem 1rem;
    }

    .page-content {
        padding: 2rem 1rem;
    }

    .article-images {
        gap: 1.5rem;
    }
}
