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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #333;
    background-color: #fdfaf7;
}

/* ===== ОБЁРТКА ШАПКИ (прилипающая при скролле) ===== */
.site-header-wrap {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* ===== ШАПКА С ФОНОВЫМ ФОТО ===== */
header {
    background-color: #d98ea3;
    background-image: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)), url('/static/img/header-bg.jpg');
    background-size: cover;
    background-position: center 30%;
    padding: 20px 40px;
    min-height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #fff;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 32px;
    font-weight: normal;
    font-style: italic;
    letter-spacing: 1px;
    text-decoration: none;
    text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

/* Кнопка-гамбургер */
.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.burger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #fff;
    border-radius: 2px;
}

/* ===== НАВИГАЦИЯ ===== */
nav {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 0 40px;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav ul li a {
    display: block;
    padding: 15px 12px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    white-space: nowrap;
}

nav ul li a:hover {
    color: #d98ea3;
    border-bottom: 2px solid #d98ea3;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
main {
    padding: 40px;
    min-height: 60vh;
}

main h1 {
    margin-bottom: 15px;
}

.section-title {
    font-size: 22px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d98ea3;
    display: inline-block;
}

/* ===== БЛОК НОВОСТЕЙ ===== */
.news-block {
    margin-bottom: 50px;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.news-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.news-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.news-item-body {
    padding: 12px 14px;
}

.news-date {
    font-size: 12px;
    color: #d98ea3;
    font-weight: bold;
}

.news-item-body h3 {
    font-size: 15px;
    margin-top: 6px;
    line-height: 1.3;
}

/* ===== КАРТОЧКИ СТАТЕЙ ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    font-size: 17px;
    margin-bottom: 8px;
}

.card-body p {
    font-size: 14px;
    color: #666;
}

/* ===== ФУТЕР ===== */
footer {
    background-color: #333;
    color: #ccc;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

/* ===================================================
   АДАПТИВНОСТЬ ПОД МОБИЛЬНЫЕ (экран уже 768px)
   =================================================== */
@media (max-width: 768px) {

    header {
        padding: 15px 20px;
        min-height: 70px;
    }

    .logo {
        font-size: 24px;
    }

    .burger {
        display: flex;
    }

    nav {
        padding: 0 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav.open {
        max-height: 400px;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li a {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    main {
        padding: 20px;
    }
}