/* ===== Фирменные токены для блога о филинах ===== */
:root {
    --brand: #8b6f47;
    --brand-2: #6d5638;
    --accent: #c08552;
    --bg: #faf7f2;
    --grad: linear-gradient(135deg, #8b6f47 0%, #c08552 100%);
}

/* ===== Базовые стили ===== */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4 {
    color: var(--text);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color 200ms var(--ease-out);
}

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

/* ===== Шапка ===== */
.site-header {
    background: rgba(255, 252, 245, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--brand);
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
}

.logo-icon {
    color: var(--brand);
    flex-shrink: 0;
}

.logo-text {
    letter-spacing: -0.01em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.main-nav a {
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 200ms, color 200ms;
}

.main-nav a:hover {
    background: rgba(139, 111, 71, 0.08);
    color: var(--brand);
}

.main-nav a.nav-cta {
    background: var(--brand);
    color: white;
}

.main-nav a.nav-cta:hover {
    background: var(--brand-2);
    color: white;
}

.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 200ms;
}

/* ===== Герой ===== */
.hero {
    background: 
        radial-gradient(ellipse at top left, rgba(192, 133, 82, 0.15), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 111, 71, 0.12), transparent 50%),
        linear-gradient(180deg, #f5efe5 0%, #faf7f2 100%);
    padding: 96px 0 80px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Секция статей ===== */
.articles-section {
    padding: 80px 0;
}

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

.article-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(139, 111, 71, 0.12);
}

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

.article-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #e8e0d2, #d4c8b3);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms var(--ease-out);
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 24px;
}

.article-category {
    display: inline-block;
    background: rgba(139, 111, 71, 0.1);
    color: var(--brand);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.article-title {
    font-size: 1.4rem;
    margin: 8px 0 12px;
    line-height: 1.3;
    color: var(--text);
}

.article-topic {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}

.article-author {
    font-weight: 500;
}

.article-date {
    font-variant-numeric: tabular-nums;
}

/* ===== Рубрики ===== */
.categories-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--bg) 0%, #f5efe5 100%);
}

.categories-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.category-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text);
    text-decoration: none;
    transition: all 200ms var(--ease-out);
    text-align: center;
}

.category-card:hover {
    border-color: var(--brand);
    background: linear-gradient(135deg, rgba(139, 111, 71, 0.06), rgba(192, 133, 82, 0.04));
    transform: translateY(-2px);
}

.category-card h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--brand);
}

/* ===== Подвал ===== */
.site-footer {
    background: #2d2419;
    color: #d4c8b3;
    padding: 64px 0 32px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-col h3,
.footer-col h4 {
    color: white;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.footer-col p {
    color: #a89880;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #d4c8b3;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background: var(--brand);
    color: white;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-btn:hover {
    background: var(--accent);
    color: white;
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid #3d3022;
    text-align: center;
    color: #8a7a64;
    font-size: 0.9rem;
}

/* ===== Страница отдельной статьи ===== */
.article-hero {
    width: 100%;
    aspect-ratio: 21 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #e8e0d2, #d4c8b3);
}

.article-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    padding: 64px 0;
}

.article-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.article-category-link {
    display: inline-block;
    background: rgba(139, 111, 71, 0.1);
    color: var(--brand);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-decoration: none;
}

.article-header h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    letter-spacing: -0.02em;
    margin: 16px 0 20px;
    line-height: 1.15;
}

.article-lead {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 24px;
    font-weight: 500;
}

.article-meta-full {
    display: flex;
    gap: 20px;
    color: var(--muted);
    font-size: 0.95rem;
}

.meta-author {
    font-weight: 600;
    color: var(--text);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
}

.article-content p {
    margin-bottom: 24px;
}

.article-content strong {
    color: var(--brand);
    font-weight: 600;
}

.article-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-back {
    display: inline-block;
    padding: 10px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text);
    font-size: 0.95rem;
    transition: all 200ms;
}

.btn-back:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: rgba(139, 111, 71, 0.05);
}

/* ===== Похожие статьи ===== */
.related-section {
    background: linear-gradient(180deg, var(--bg) 0%, #f5efe5 100%);
    padding: 80px 0;
}

.related-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.related-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    color: inherit;
    transition: all 200ms;
}

.related-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 111, 71, 0.1);
}

.related-category {
    display: inline-block;
    background: rgba(139, 111, 71, 0.1);
    color: var(--brand);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.related-card h3 {
    margin: 12px 0;
    font-size: 1.2rem;
    color: var(--text);
}

.related-card p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== Герой рубрики ===== */
.rubrika-hero,
.page-hero {
    padding: 64px 0 48px;
    background: linear-gradient(180deg, #f5efe5 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}

.rubrika-hero h1,
.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
    margin: 16px 0;
}

.breadcrumb {
    display: inline-block;
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 8px;
    text-decoration: none;
}

.breadcrumb:hover {
    color: var(--brand);
}

.page-subtitle {
    font-size: 1.15rem;
    color: var(--muted);
    margin-top: 16px;
    max-width: 600px;
}

/* ===== Контентные страницы ===== */
.page-content {
    padding: 80px 0;
}

.content-block {
    margin-bottom: 56px;
}

.content-block h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.content-block p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 16px;
    color: var(--text);
}

.content-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-list li {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.6;
}

.content-list li:last-child {
    border-bottom: none;
}

/* ===== Информация об авторе ===== */
.author-info {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: start;
}

.author-photo {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.author-text p {
    margin-bottom: 16px;
}

.author-text strong {
    color: var(--brand);
}

/* ===== Помощь филинам ===== */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.help-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.help-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--brand);
}

.help-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
}

/* ===== CTA блок ===== */
.cta-block {
    background: linear-gradient(135deg, rgba(139, 111, 71, 0.06), rgba(192, 133, 82, 0.04));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 48px 32px;
    text-align: center;
    margin-top: 48px;
}

.cta-block h2 {
    margin-bottom: 12px;
    font-size: 1.6rem;
}

.cta-block p {
    margin-bottom: 24px;
    color: var(--muted);
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--brand);
    color: white;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background 200ms;
}

.btn:hover {
    background: var(--brand-2);
    color: white;
}

/* ===== Контакты ===== */
.contact-section {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-info h2,
.contact-form-wrapper h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 32px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-method h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--brand);
}

.contact-method p {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
}

/* ===== Форма ===== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    transition: border-color 200ms, box-shadow 200ms;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.btn-submit {
    padding: 14px 32px;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 200ms;
}

.btn-submit:hover {
    background: var(--brand-2);
}

.form-success {
    background: rgba(139, 111, 71, 0.06);
    border: 1px solid var(--brand);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}

.form-success h3 {
    color: var(--brand);
    margin-bottom: 8px;
}

.form-error {
    background: rgba(192, 80, 77, 0.08);
    border: 1px solid #c0504d;
    border-radius: 12px;
    padding: 12px 16px;
    color: #c0504d;
    font-size: 0.95rem;
}

/* ===== Пустое состояние ===== */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--muted);
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 24px;
}

/* ===== Адаптив ===== */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .author-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .author-photo {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 720px) {
    .burger {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 4px;
        border-bottom: 1px solid var(--border);
        display: none;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 12px 16px;
        text-align: center;
    }

    .hero {
        padding: 64px 0 56px;
    }

    .articles-section,
    .categories-section,
    .related-section,
    .contact-section,
    .page-content {
        padding: 56px 0;
    }

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

@media (max-width: 480px) {
    .header-inner {
        gap: 12px;
    }

    .logo-text {
        font-size: 1.1rem;
    }

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

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