/*
Theme Name: Vip Excel Modern
Theme URI: https://vip-excel.ru/
Author: Vip Excel
Description: Современная тема для блога о Microsoft Excel — советы, таблицы и формулы.
Version: 1.0.0
Text Domain: vip-excel-modern
*/

:root {
    --color-bg: #f4f7f5;
    --color-surface: #ffffff;
    --color-text: #1a2e24;
    --color-muted: #5f7368;
    --color-accent: #217346;
    --color-accent-dark: #185c37;
    --color-accent-soft: #e8f3ec;
    --color-border: #d9e4dd;
    --shadow-sm: 0 1px 2px rgba(26, 46, 36, 0.06);
    --shadow-md: 0 10px 30px rgba(26, 46, 36, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --container: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    color: var(--color-accent-dark);
}

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

.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: inherit;
}

.brand:hover {
    color: inherit;
}

.brand__title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand__tagline {
    font-size: 0.85rem;
    color: var(--color-muted);
    max-width: 28rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    color: var(--color-accent);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-form input[type="search"] {
    width: 220px;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    font: inherit;
}

.search-form button {
    border: 0;
    background: var(--color-accent);
    color: #fff;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.search-form button:hover {
    background: var(--color-accent-dark);
}

.hero {
    padding: 2.5rem 0 1rem;
}

.hero__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.hero__text {
    margin: 0;
    max-width: 42rem;
    color: var(--color-muted);
    font-size: 1.05rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 0 2.5rem;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.post-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-accent-soft);
}

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

.post-card__placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8f3ec, #d4ebdc);
    color: var(--color-accent);
    font-size: 3rem;
    font-weight: 700;
}

.post-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.25rem;
    flex: 1;
}

.post-card__category {
    align-self: flex-start;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: var(--color-accent-soft);
    color: var(--color-accent-dark);
    font-size: 0.78rem;
    font-weight: 600;
}

.post-card__title {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.35;
}

.post-card__title a {
    color: inherit;
}

.post-card__title a:hover {
    color: var(--color-accent);
}

.post-card__excerpt {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.92rem;
}

.post-card__meta {
    margin-top: auto;
    padding-top: 0.5rem;
    color: var(--color-muted);
    font-size: 0.82rem;
}

.content-area {
    padding: 2rem 0 3rem;
}

.content-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-sm);
}

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.entry-content {
    font-size: 1.05rem;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 2rem;
    line-height: 1.3;
}

.entry-featured-image {
    margin-bottom: 1.5rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.pagination {
    padding-bottom: 2.5rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    height: 2.4rem;
    margin: 0.15rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
}

.pagination .current {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: 0.92rem;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--color-muted);
}

@media (max-width: 900px) {
    .site-header__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form input[type="search"] {
        width: 100%;
    }
}
