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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #f5f5f0;
    color: #333;
    line-height: 1.6;
}

a {
    color: #2d5016;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #4a7c23;
    text-decoration: underline;
}

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

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

/* ===== Шапка ===== */
.site-header {
    position: relative;
    background: linear-gradient(135deg, #2d5016, #4a7c23);
    color: white;
    padding: 40px 20px;
    text-align: center;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
}

.header-content {
    position: relative;
    z-index: 1;
}

.site-title {
    font-size: 2.5em;
    letter-spacing: 2px;
    font-weight: normal;
}

.site-title a {
    color: white;
    text-decoration: none;
}

.site-title a:hover {
    color: #e8f5e0;
    text-decoration: none;
}

/* ===== Навигация ===== */
.site-nav {
    background: #1a3a0a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    color: white;
    padding: 15px 20px;
    display: inline-block;
    font-size: 1.05em;
    transition: background 0.2s;
}

.nav-link:hover {
    background: #4a7c23;
    color: white;
    text-decoration: none;
}

/* ===== Основной контент ===== */
.site-main {
    padding: 30px 0;
    min-height: 60vh;
}

.page-title {
    font-size: 1.8em;
    color: #2d5016;
    margin-bottom: 20px;
    border-bottom: 2px solid #4a7c23;
    padding-bottom: 10px;
}

/* ===== Главная: две колонки ===== */
.home-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Свежий выпуск */
.main-issue {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
}

.main-issue h2 {
    color: #2d5016;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.main-issue .cover {
    max-width: 100%;
    margin: 15px auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.main-issue .btn {
    display: inline-block;
    background: #4a7c23;
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    margin-top: 15px;
    font-size: 1.05em;
    transition: background 0.2s;
}

.main-issue .btn:hover {
    background: #2d5016;
    text-decoration: none;
    color: white;
}

/* Превью новостей */
.news-sidebar {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.news-sidebar h3 {
    color: #2d5016;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.news-preview {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.news-preview:last-child {
    border-bottom: none;
}

.news-preview:hover {
    text-decoration: none;
    color: #2d5016;
}

.news-preview:hover .news-preview-title {
    color: #4a7c23;
}

.news-preview-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.news-preview-title {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 4px;
    color: #2d5016;
    transition: color 0.2s;
}

.news-preview-date {
    font-size: 0.85em;
    color: #888;
}

/* ===== Карточки ===== */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card h2 {
    color: #2d5016;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.card .meta {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.card img {
    border-radius: 4px;
    margin: 10px 0;
}

/* ===== Форма фильтра ===== */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filter-form label {
    display: flex;
    flex-direction: column;
    font-size: 0.9em;
    color: #555;
}

.filter-form input[type="date"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 4px;
    font-size: 1em;
}

.filter-form button {
    background: #4a7c23;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
}

.filter-form button:hover {
    background: #2d5016;
}

/* ===== Подвал ===== */
.site-footer {
    background: #1a3a0a;
    color: #ccc;
    text-align: center;
    padding: 25px 0;
    margin-top: 40px;
    font-size: 0.9em;
}

/* ===== Адаптив ===== */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.6em;
    }

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

    .nav-link {
        padding: 12px 15px;
        font-size: 0.95em;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
}
