/*
Theme Name: Sovety Ogorodniku
Theme URI: https://sovety-ogorodniku.ru/
Author: Редакция сайта
Description: Быстрая редакционная тема для сайта о саде, огороде и цветах.
Version: 1.0.3
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: sovety-ogorodniku
*/

:root {
  --ink: #173126;
  --ink-soft: #4f655b;
  --forest: #23613f;
  --forest-dark: #17492f;
  --leaf: #77a654;
  --sun: #f1b84a;
  --cream: #f7f4e9;
  --paper: #fffef9;
  --line: #dfe7df;
  --white: #fff;
  --shadow: 0 16px 44px rgba(23, 49, 38, .08);
  --radius: 22px;
  --content: 760px;
  --wide: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--forest); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--forest-dark); }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  clip: auto !important; width: auto; height: auto; margin: 12px;
  padding: 10px 16px; background: var(--white); z-index: 9999;
}
.wrap { width: min(calc(100% - 40px), var(--wide)); margin-inline: auto; }
.narrow { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 254, 249, .96); border-bottom: 1px solid rgba(223, 231, 223, .9);
  backdrop-filter: blur(12px);
}
.header-row { min-height: 76px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 800; line-height: 1.1; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--forest); color: var(--white); }
.brand-mark svg { width: 26px; height: 26px; }
.brand-copy { display: grid; }
.brand-name { font-size: 17px; }
.brand-tag { margin-top: 4px; color: var(--ink-soft); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { display: block; padding: 10px 11px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 650; border-radius: 10px; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a { background: var(--cream); color: var(--forest); }
.forum-link { display: inline-flex; align-items: center; padding: 10px 15px; color: var(--white); background: var(--forest); border-radius: 12px; text-decoration: none; font-size: 14px; font-weight: 750; white-space: nowrap; }
.forum-link:hover { color: var(--white); background: var(--forest-dark); }
.menu-toggle { display: none; margin-left: auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font-weight: 700; }

.hero { position: relative; overflow: hidden; padding: clamp(62px, 9vw, 120px) 0; background: var(--cream); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; opacity: .5; }
.hero::before { width: 380px; height: 380px; right: -110px; top: -160px; background: #dbeacb; }
.hero::after { width: 230px; height: 230px; left: -90px; bottom: -130px; background: #f8d996; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 70px; align-items: center; }
.eyebrow { margin: 0 0 14px; color: var(--forest); font-size: 13px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero h1 { max-width: 800px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(43px, 6.5vw, 78px); line-height: 1.02; letter-spacing: -.045em; }
.hero-copy { max-width: 700px; margin: 24px 0 0; color: var(--ink-soft); font-size: clamp(18px, 2vw, 21px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 20px; border: 2px solid var(--forest); border-radius: 13px; background: var(--forest); color: var(--white); text-decoration: none; font-weight: 750; }
.button:hover { background: var(--forest-dark); color: var(--white); }
.button-secondary { background: transparent; color: var(--forest); }
.button-secondary:hover { background: var(--white); color: var(--forest-dark); }
.hero-note { padding: 26px; border: 1px solid rgba(35, 97, 63, .13); border-radius: var(--radius); background: rgba(255, 255, 255, .72); box-shadow: var(--shadow); }
.hero-note strong { display: block; margin-bottom: 8px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; }
.hero-note p { margin: 0; color: var(--ink-soft); font-size: 15px; }

.section { padding: clamp(60px, 8vw, 100px) 0; }
.section-alt { background: #f3f7f1; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -.025em; }
.section-heading p { max-width: 570px; margin: 8px 0 0; color: var(--ink-soft); }
.section-link { white-space: nowrap; font-weight: 750; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.category-tile { position: relative; min-height: 184px; padding: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.category-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.category-icon { position: relative; display: block; width: 52px; height: 52px; margin: 0 0 25px; border-radius: 16px; background: var(--cream); }
.category-icon svg { position: absolute; top: 50%; left: 50%; display: block; width: 34px; height: 34px; overflow: visible; transform: translate(-50%, -50%); }
.category-tile h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 25px; line-height: 1.2; }
.category-tile span { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 14px; }
.category-tile::after { content: "→"; position: absolute; right: 20px; bottom: 18px; color: var(--forest); font-weight: 800; }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 24px rgba(23, 49, 38, .04); }
.post-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #e8efe5; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.post-card:hover .post-card-media img { transform: scale(1.025); }
.post-card-placeholder { display: grid; place-items: center; height: 100%; color: var(--forest); font-family: Georgia, "Times New Roman", serif; font-size: 30px; }
.post-card-body { display: flex; flex: 1; flex-direction: column; padding: 23px; }
.post-card-category { margin-bottom: 9px; color: var(--forest); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.post-card h2, .post-card h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 25px; line-height: 1.23; letter-spacing: -.015em; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--forest); }
.post-card-excerpt { margin: 13px 0 20px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.post-card-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; color: #6a7c73; font-size: 13px; }

.trust-strip { background: var(--forest); color: var(--white); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; padding: 36px 0; }
.trust-item { display: grid; grid-template-columns: 38px 1fr; gap: 13px; align-items: start; }
.trust-item b { font-size: 16px; }
.trust-item p { margin: 3px 0 0; color: #dcecdf; font-size: 14px; line-height: 1.5; }
.trust-number { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.13); font-weight: 800; }

.page-header { padding: 62px 0 42px; background: var(--cream); }
.page-header h1 { max-width: 870px; margin: 8px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 5vw, 60px); line-height: 1.08; letter-spacing: -.035em; }
.archive-description { max-width: 760px; margin-top: 16px; color: var(--ink-soft); }
.archive-description p { margin: 0; }
.breadcrumbs { color: #687a70; font-size: 13px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 7px; color: #94a39b; }
.breadcrumbs a { color: inherit; }

.article-shell { padding: 45px 0 90px; }
.article-header { margin-bottom: 34px; }
.article-header h1 { margin: 14px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 5.8vw, 66px); line-height: 1.06; letter-spacing: -.04em; }
.article-deck { margin: 0 0 18px; color: var(--ink-soft); font-size: 21px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #65786e; font-size: 14px; }
.article-hero { width: min(calc(100% - 40px), 980px); margin: 0 auto 44px; overflow: hidden; border-radius: 26px; background: #edf2eb; }
.article-hero img { width: 100%; max-height: 620px; object-fit: cover; }
.article-content { font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
.article-content > *:first-child { margin-top: 0; }
.article-content h2, .article-content h3, .article-content h4 { color: var(--ink); line-height: 1.22; scroll-margin-top: 100px; }
.article-content h2 { margin: 2.3em 0 .75em; font-size: clamp(29px, 4vw, 39px); letter-spacing: -.025em; }
.article-content h3 { margin: 1.8em 0 .65em; font-size: 26px; }
.article-content p, .article-content ul, .article-content ol { margin: 0 0 1.25em; }
.article-content li + li { margin-top: .35em; }
.article-content a { overflow-wrap: anywhere; }
.article-content blockquote { margin: 2em 0; padding: 22px 26px; border-left: 5px solid var(--leaf); background: var(--cream); font-style: italic; }
.article-content img { margin: 1.7em auto; border-radius: 16px; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-family: Inter, sans-serif; font-size: 15px; }
.article-content th, .article-content td { padding: 11px 13px; border: 1px solid var(--line); text-align: left; }
.article-content th { background: var(--cream); }
.html-sitemap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; font-family: Inter, sans-serif; }
.html-sitemap section { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.html-sitemap h2 { margin: 0 0 13px; font-size: 25px; }
.html-sitemap ul { margin: 0; padding-left: 21px; }
.html-sitemap li { font-size: 15px; }
.article-content .wp-caption { max-width: 100%; }
.article-content .wp-caption-text { color: var(--ink-soft); font-family: Inter, sans-serif; font-size: 13px; text-align: center; }
.article-toc { margin: 30px 0 38px; padding: 22px 25px; border: 1px solid var(--line); border-radius: 16px; background: #f5f8f3; font-family: Inter, sans-serif; }
.article-toc strong { display: block; margin-bottom: 10px; }
.article-toc ol { margin: 0; padding-left: 22px; }
.article-toc li + li { margin-top: 5px; }
.article-toc a { text-decoration: none; }
.article-footer { margin-top: 50px; padding-top: 26px; border-top: 1px solid var(--line); }
.author-box { display: grid; grid-template-columns: 58px 1fr; gap: 18px; padding: 24px; border-radius: 18px; background: var(--cream); }
.author-avatar { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: var(--forest); color: var(--white); font-family: Georgia, serif; font-size: 26px; }
.author-box h2 { margin: 0 0 4px; font-size: 19px; }
.author-box p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.article-cta { margin: 36px 0; padding: 25px; border-radius: 18px; background: var(--forest); color: var(--white); }
.article-cta h2 { margin: 0 0 7px; font-size: 25px; }
.article-cta p { margin: 0 0 16px; color: #dcecdf; }
.article-cta .button { border-color: var(--white); background: var(--white); color: var(--forest); }

.pagination { margin-top: 44px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers { min-width: 42px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); text-align: center; text-decoration: none; }
.pagination .current { border-color: var(--forest); background: var(--forest); color: var(--white); }
.empty-state { padding: 35px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); text-align: center; }
.search-form { display: flex; gap: 9px; max-width: 620px; }
.search-field { min-width: 0; flex: 1; padding: 11px 14px; border: 1px solid #b9c8bf; border-radius: 11px; background: var(--white); }
.search-submit { padding: 10px 17px; border: 0; border-radius: 11px; background: var(--forest); color: var(--white); font-weight: 750; cursor: pointer; }

.site-footer { padding: 58px 0 28px; background: #142b21; color: #d5e1da; }
.footer-grid { display: grid; grid-template-columns: 1.25fr .75fr .75fr; gap: 60px; }
.footer-brand { color: var(--white); font-family: Georgia, serif; font-size: 25px; font-weight: 700; }
.site-footer p { max-width: 520px; margin: 12px 0 0; color: #aebfb5; font-size: 14px; }
.site-footer h2 { margin: 0 0 13px; color: var(--white); font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 8px; }
.site-footer a { color: #d5e1da; text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { margin-top: 42px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); color: #91a59a; font-size: 12px; }

@media (max-width: 980px) {
  .header-row { flex-wrap: wrap; gap: 12px; padding: 13px 0; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; order: 4; width: 100%; margin: 0; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; }
  .primary-nav a { padding: 10px 4px; }
  .forum-link { margin-left: 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 35px; }
  .hero-note { max-width: 620px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  body { font-size: 17px; }
  .wrap, .narrow { width: min(calc(100% - 28px), var(--wide)); }
  .brand-tag { display: none; }
  .forum-link { display: none; }
  .hero { padding: 52px 0; }
  .hero h1 { font-size: 43px; }
  .hero-note { padding: 20px; }
  .section { padding: 58px 0; }
  .section-heading { display: block; }
  .section-link { display: inline-block; margin-top: 12px; }
  .category-grid, .post-grid, .trust-grid, .footer-grid { grid-template-columns: 1fr; }
  .category-tile { min-height: 155px; }
  .trust-grid { gap: 23px; }
  .page-header { padding: 44px 0 30px; }
  .article-shell { padding-top: 32px; }
  .article-header h1 { font-size: 39px; }
  .article-deck { font-size: 18px; }
  .article-content { font-size: 18px; }
  .article-hero { width: calc(100% - 28px); margin-bottom: 30px; border-radius: 17px; }
  .author-box { grid-template-columns: 1fr; }
  .html-sitemap { grid-template-columns: 1fr; }
  .search-form { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
