:root {
    --page-bg: #f0f2f5;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --accent: #1f5d75;
    --header-bg: #24576a;
    --header-text: #f8fafc;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--page-bg);
    color: var(--text);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.site-header,
.site-footer {
    background: var(--header-bg);
    color: var(--header-text);
}

.site-header__inner,
.container,
.site-footer__inner {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header__inner {
    padding: 18px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--header-text);
    text-decoration: none;
}

.container {
    padding: 30px 0 40px;
}

.section-card,
.card {
    background: var(--surface);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.section-head,
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.page-title {
    margin-bottom: 16px;
}

.meta {
    color: var(--muted);
    font-size: 13px;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.post-card {
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
    min-width: 0;
}

.post-card__title {
    margin-bottom: 8px;
    font-size: 18px;
}

.post-card__description {
    margin-bottom: 8px;
}

.post-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
    object-fit: cover;
    max-height: 220px;
}

.filters,
.pagination,
.nav {
    margin: 12px 0 18px;
}

.filters a,
.filters strong,
.pagination a,
.pagination strong,
.nav a,
.nav strong {
    margin-right: 8px;
}

.post-content {
    margin: 12px 0;
    white-space: pre-wrap;
}

.site-footer {
    margin-top: 28px;
}

.site-footer__inner {
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .site-header__inner,
    .container,
    .site-footer__inner {
        width: min(1120px, calc(100% - 28px));
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .section-head,
    .page-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .container {
        padding: 18px 0 28px;
    }

    .section-card,
    .card {
        padding: 14px;
        margin-bottom: 14px;
    }

    .page-title {
        font-size: 32px;
        line-height: 1.2;
    }

    h1 {
        font-size: 28px;
        line-height: 1.2;
    }

    h2 {
        font-size: 22px;
        line-height: 1.25;
    }

    .post-card__title {
        font-size: 30px;
        line-height: 1.25;
        word-break: break-word;
    }

    .meta {
        font-size: 17px;
        line-height: 1.5;
    }

    .filters,
    .pagination,
    .nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 12px;
        margin: 12px 0 16px;
    }

    .filters a,
    .filters strong,
    .pagination a,
    .pagination strong,
    .nav a,
    .nav strong {
        margin-right: 0;
    }

    .site-footer__inner {
        font-size: 15px;
        padding: 16px 0;
    }
}
