/* Orchard — newogorod.ru custom garden blog theme
   Palette: forest green + terracotta + cream
   No template inheritance — clean HTML5 from scratch */

:root {
    --green-900: #1c3626;
    --green-700: #2d5a3d;
    --green-500: #4a8055;
    --green-100: #dce7dc;
    --terracotta: #c26a4a;
    --terracotta-dark: #a25334;
    --cream: #f8f4ec;
    --cream-dark: #ede7d6;
    --ink: #1e2620;
    --muted: #6b7168;
    --border: #d5cfbe;
    --white: #ffffff;
    --shadow: 0 2px 12px rgba(28, 54, 38, 0.08);
    --shadow-lg: 0 8px 32px rgba(28, 54, 38, 0.12);
    --radius: 8px;
    --serif: 'Merriweather', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--green-700);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--terracotta-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    color: var(--green-900);
    line-height: 1.25;
    font-weight: 700;
}

h1 { font-size: 2.35rem; margin-bottom: 1.25rem; }
h2 { font-size: 1.65rem; margin: 2rem 0 1rem; }
h3 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
h4 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }

p { margin-bottom: 1.1rem; }
ul, ol { margin: 0 0 1.1rem 1.5rem; }
li { margin-bottom: 0.5rem; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* === Header === */
.site-header {
    background: var(--white);
    border-bottom: 3px solid var(--green-700);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.brand {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--green-900);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    font-size: 1.35rem;
    box-shadow: var(--shadow);
}

.brand-name {
    letter-spacing: -0.5px;
}

.brand-name span {
    color: var(--terracotta);
}

.primary-nav {
    display: flex;
    gap: 1.8rem;
    font-weight: 500;
}

.primary-nav a {
    color: var(--ink);
    font-size: 0.98rem;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
}

.primary-nav a:hover, .primary-nav a.active {
    color: var(--green-700);
    border-bottom-color: var(--terracotta);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    border: none;
    background: transparent;
    font-size: 1.6rem;
    color: var(--green-900);
    cursor: pointer;
}

/* === Hero === */
.hero {
    background: linear-gradient(135deg, var(--green-700) 0%, var(--green-900) 100%);
    color: var(--cream);
    padding: 4rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(194, 106, 74, 0.25), transparent 70%);
    pointer-events: none;
}

.hero-inner {
    max-width: 780px;
    position: relative;
}

.hero h1 {
    color: var(--cream);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(248, 244, 236, 0.9);
    max-width: 640px;
    line-height: 1.5;
}

.hero-cta {
    margin-top: 2rem;
    display: inline-block;
    background: var(--terracotta);
    color: var(--white);
    padding: 0.85rem 1.9rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.15s, background 0.15s;
}

.hero-cta:hover {
    background: var(--terracotta-dark);
    text-decoration: none;
    color: var(--white);
    transform: translateY(-2px);
}

/* === Section === */
.section {
    padding: 3.5rem 0;
}

.section-alt {
    background: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--green-900);
    display: inline-block;
    position: relative;
    padding-bottom: 0.6rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--terracotta);
    border-radius: 3px;
}

.section-title p {
    color: var(--muted);
    margin-top: 0.8rem;
}

/* === Categories grid === */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.category-tile {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.6rem 1.2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
    display: block;
    color: inherit;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: inherit;
    border-color: var(--green-500);
}

.category-tile-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--green-100);
    color: var(--green-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    margin: 0 auto 0.9rem;
}

.category-tile h3 {
    font-size: 1.15rem;
    margin: 0 0 0.4rem;
    color: var(--green-900);
}

.category-tile p {
    color: var(--muted);
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.4;
}

.category-tile .count {
    display: inline-block;
    margin-top: 0.9rem;
    color: var(--terracotta);
    font-weight: 600;
    font-size: 0.9rem;
}

/* === Article cards === */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
}

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

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

.article-card-image {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--green-100), var(--cream-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-500);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

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

.article-card-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-card-cat {
    color: var(--terracotta);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.article-card h3 {
    font-size: 1.15rem;
    margin: 0 0 0.7rem;
    line-height: 1.3;
}

.article-card h3 a {
    color: var(--green-900);
}

.article-card h3 a:hover {
    color: var(--terracotta-dark);
    text-decoration: none;
}

.article-card p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 1rem;
    flex: 1;
}

.article-card-more {
    color: var(--green-700);
    font-weight: 600;
    font-size: 0.9rem;
    align-self: flex-start;
}

/* === Article page === */
.article-hero {
    background: linear-gradient(180deg, var(--green-700), var(--green-900));
    color: var(--cream);
    padding: 3rem 0 2.5rem;
}

.breadcrumb {
    font-size: 0.9rem;
    color: rgba(248, 244, 236, 0.75);
    margin-bottom: 1.25rem;
}

.breadcrumb a {
    color: rgba(248, 244, 236, 0.9);
}

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

.article-hero h1 {
    color: var(--white);
    max-width: 820px;
    font-size: 2.5rem;
}

.article-hero .lead {
    color: rgba(248, 244, 236, 0.85);
    max-width: 720px;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 3rem;
    padding: 3rem 0;
    align-items: start;
}

.article-body {
    background: var(--white);
    padding: 2.5rem 2.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 1.02rem;
    line-height: 1.75;
}

.article-body h2 {
    font-size: 1.55rem;
    margin: 2.25rem 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--green-100);
}

.article-body h3 {
    font-size: 1.2rem;
    margin: 1.6rem 0 0.7rem;
    color: var(--terracotta-dark);
}

.article-body p {
    margin-bottom: 1.15rem;
}

.article-body ul, .article-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-body blockquote {
    border-left: 4px solid var(--terracotta);
    padding: 0.5rem 0 0.5rem 1.25rem;
    color: var(--muted);
    font-style: italic;
    margin: 1.5rem 0;
    background: var(--cream);
}

.article-body img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

.author-badge {
    background: var(--cream);
    border-left: 4px solid var(--green-700);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.author-badge img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--green-500);
}

.author-badge-text {
    font-size: 0.92rem;
}

.author-badge-text strong {
    display: block;
    color: var(--green-900);
    font-family: var(--serif);
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
}

.author-badge-text span {
    color: var(--muted);
}

/* === Sidebar === */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 6rem;
}

.side-widget {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.side-widget h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--green-100);
    color: var(--green-900);
}

.side-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--cream-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side-widget li:last-child {
    border-bottom: none;
}

.side-widget a {
    color: var(--ink);
    font-size: 0.95rem;
}

.side-widget a:hover {
    color: var(--terracotta-dark);
    text-decoration: none;
}

.side-widget li .count {
    color: var(--muted);
    font-size: 0.85rem;
    background: var(--cream);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
}

/* === About page === */
.about-hero {
    background: var(--white);
    padding: 3rem 0 2.5rem;
    border-bottom: 1px solid var(--border);
}

.about-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem 1.25rem;
}

.about-author-block {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.about-author-block img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 4px solid var(--green-100);
}

.about-author-block h1 {
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.about-author-block .role {
    color: var(--terracotta-dark);
    font-weight: 500;
    margin-bottom: 1rem;
}

/* === Footer === */
.site-footer {
    background: var(--green-900);
    color: rgba(248, 244, 236, 0.85);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

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

.footer-col h4 {
    color: var(--cream);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.footer-col p {
    font-size: 0.93rem;
    line-height: 1.55;
    margin-bottom: 0.5rem;
    color: rgba(248, 244, 236, 0.75);
}

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

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(248, 244, 236, 0.85);
    font-size: 0.93rem;
}

.footer-col a:hover {
    color: var(--terracotta);
    text-decoration: none;
}

.footer-brand-name {
    font-family: var(--serif);
    font-weight: 700;
    color: var(--cream);
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    display: block;
}

.footer-bottom {
    border-top: 1px solid rgba(248, 244, 236, 0.12);
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.88rem;
    color: rgba(248, 244, 236, 0.6);
}

/* === Mobile === */
@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .sidebar {
        position: static;
    }
    .hero h1 { font-size: 2.2rem; }
    .article-hero h1 { font-size: 1.9rem; }
    .article-body { padding: 1.75rem 1.5rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
    .about-author-block { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.4rem; }
    .primary-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem 1.25rem;
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        gap: 0;
    }
    .primary-nav.open { display: flex; }
    .primary-nav a {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--cream-dark);
    }
    .menu-toggle { display: inline-flex; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero { padding: 2.5rem 0 2.25rem; }
    .hero h1 { font-size: 1.85rem; }
    .hero p { font-size: 1.05rem; }
    .article-body { padding: 1.4rem 1.15rem; }
}
