/*
Theme Name: AgroWiki
Theme URI: https://agrowiki.com.ua/
Author: AgroWiki
Description: Mobile-first WordPress theme for AgroWiki — Аграрна енциклопедія України.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: agrowiki
*/

:root{
  --aw-green:#287c36;
  --aw-green-dark:#1e5f29;
  --aw-green-soft:#edf7ee;
  --aw-green-pale:#f6fbf6;
  --aw-text:#202522;
  --aw-muted:#6f7771;
  --aw-border:#e3e9e4;
  --aw-bg:#ffffff;
  --aw-radius:14px;
  --aw-shadow:0 4px 18px rgba(28,55,34,.06);
  --aw-max:1180px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--aw-bg);color:var(--aw-text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:16px;line-height:1.65}
img{max-width:100%;height:auto;display:block}
a{color:var(--aw-green);text-decoration:none}
a:hover{text-decoration:underline}
button,input{font:inherit}
.container{width:min(calc(100% - 28px),var(--aw-max));margin-inline:auto}
.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border-bottom:1px solid var(--aw-border)}
.header-inner{min-height:62px;display:flex;align-items:center;gap:12px}
.logo{font-weight:800;letter-spacing:-.03em;color:#173f20;font-size:21px;white-space:nowrap}
.logo-mark{color:var(--aw-green)}
.menu-toggle,.search-toggle{width:42px;height:42px;border:0;background:transparent;border-radius:10px;display:grid;place-items:center;color:var(--aw-text);cursor:pointer}
.menu-toggle:hover,.search-toggle:hover{background:var(--aw-green-soft)}
.menu-toggle{order:-1}
.header-search{margin-left:auto;display:none}
.header-search form{display:flex}
.header-search input{width:220px;border:1px solid var(--aw-border);border-radius:10px 0 0 10px;padding:9px 12px;outline:0}
.header-search button{border:0;background:var(--aw-green);color:#fff;border-radius:0 10px 10px 0;padding:0 13px;cursor:pointer}
.mobile-search{display:none;padding:10px 0 12px;border-top:1px solid var(--aw-border)}
.mobile-search.open{display:block}
.mobile-search form{display:flex}
.mobile-search input{flex:1;min-width:0;border:1px solid var(--aw-border);border-radius:10px 0 0 10px;padding:11px 12px}
.mobile-search button{border:0;background:var(--aw-green);color:#fff;border-radius:0 10px 10px 0;padding:0 15px}
.mobile-nav{display:none;position:fixed;inset:62px 0 0;z-index:45;background:#fff;overflow:auto;padding:20px 14px 30px;border-top:1px solid var(--aw-border)}
.mobile-nav.open{display:block}
.mobile-nav ul{list-style:none;margin:0;padding:0}
.mobile-nav li{border-bottom:1px solid var(--aw-border)}
.mobile-nav a{display:block;padding:13px 4px;color:var(--aw-text);font-weight:600}
.mobile-nav .sub-menu{padding-left:14px;background:var(--aw-green-pale)}
.bottom-nav{position:fixed;z-index:40;bottom:0;left:0;right:0;height:62px;background:#fff;border-top:1px solid var(--aw-border);display:flex;justify-content:space-around;align-items:center;padding-bottom:env(safe-area-inset-bottom)}
.bottom-nav a{font-size:11px;color:#69726b;text-align:center;min-width:58px;padding:6px 2px}
.bottom-nav svg{display:block;margin:0 auto 2px}
.bottom-nav a.active{color:var(--aw-green);font-weight:700}
main{padding-bottom:82px}
.hero{margin:18px 0 22px;border-radius:18px;overflow:hidden;background:linear-gradient(135deg,#edf7ee,#f7fbf7);position:relative}
.hero.has-image{color:#fff;background-size:cover;background-position:center}
.hero.has-image:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(9,34,14,.76),rgba(9,34,14,.28))}
.hero-content{position:relative;padding:28px 20px}
.hero h1{font-size:31px;line-height:1.12;margin:0 0 10px;letter-spacing:-.035em}
.hero p{margin:0 0 18px;max-width:680px}
.search-box{display:flex;max-width:650px}
.search-box input{flex:1;min-width:0;border:1px solid var(--aw-border);padding:13px 14px;border-radius:11px 0 0 11px;background:#fff}
.search-box button{border:0;background:var(--aw-green);color:#fff;padding:0 18px;border-radius:0 11px 11px 0;font-weight:700;cursor:pointer}
.section{margin:28px 0}
.section-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:12px}
.section-title{font-size:21px;line-height:1.25;margin:0;letter-spacing:-.02em}
.section-more{font-size:13px;font-weight:700}
.category-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.category-card{border:1px solid var(--aw-border);background:#fff;border-radius:13px;padding:14px 11px;min-height:86px;box-shadow:var(--aw-shadow);display:flex;flex-direction:column;justify-content:center}
.category-card strong{font-size:14px;color:var(--aw-text)}
.category-card span{font-size:12px;color:var(--aw-muted);margin-top:3px}
.category-card:hover{border-color:#b8d8bd;text-decoration:none;background:var(--aw-green-pale)}
.article-list{display:grid;gap:10px}
.article-card{display:grid;grid-template-columns:92px 1fr;gap:12px;border-bottom:1px solid var(--aw-border);padding:0 0 12px}
.article-thumb{width:92px;height:72px;object-fit:cover;border-radius:10px;background:var(--aw-green-soft)}
.article-card h3{font-size:15px;line-height:1.3;margin:0 0 5px}
.meta{font-size:12px;color:var(--aw-muted);display:flex;flex-wrap:wrap;gap:6px}
.tag{display:inline-block;background:var(--aw-green-soft);color:var(--aw-green-dark);border-radius:999px;padding:2px 7px;font-size:11px;font-weight:700}
.breadcrumbs{font-size:12px;color:var(--aw-muted);margin:16px 0}
.breadcrumbs a{color:var(--aw-muted)}
.page-title{font-size:30px;line-height:1.15;letter-spacing:-.03em;margin:0 0 10px}
.archive-intro{color:#4f5852;margin:0 0 20px}
.archive-cover{border-radius:16px;margin:15px 0 22px;width:100%;max-height:330px;object-fit:cover}
.child-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:16px 0 28px}
.child-card{border:1px solid var(--aw-border);border-radius:12px;padding:13px;background:var(--aw-green-pale)}
.child-card strong{display:block;font-size:14px}
.child-card span{font-size:12px;color:var(--aw-muted)}
.article-header h1{font-size:31px;line-height:1.14;letter-spacing:-.035em;margin:0 0 9px}
.article-header .meta{margin-bottom:15px}
.featured-image{width:100%;border-radius:15px;margin:16px 0 22px}
.toc{border:1px solid #dce9dd;background:var(--aw-green-pale);border-radius:14px;padding:15px 17px;margin:20px 0 26px}
.toc-title{font-weight:800;margin:0 0 7px}
.toc ol{margin:0;padding-left:20px}
.toc li{margin:4px 0}
.entry-content{font-size:17px;line-height:1.78}
.entry-content h2{font-size:25px;line-height:1.25;margin:32px 0 12px;letter-spacing:-.025em}
.entry-content h3{font-size:20px;line-height:1.3;margin:24px 0 9px}
.entry-content p{margin:0 0 18px}
.entry-content ul,.entry-content ol{padding-left:22px;margin:0 0 20px}
.entry-content li{margin:6px 0}
.entry-content table{width:100%;border-collapse:collapse;margin:20px 0;font-size:14px;display:block;overflow-x:auto}
.entry-content th,.entry-content td{border:1px solid var(--aw-border);padding:9px;text-align:left;min-width:120px}
.entry-content th{background:var(--aw-green-soft)}
.entry-content blockquote{border-left:4px solid var(--aw-green);margin:20px 0;padding:10px 16px;background:var(--aw-green-pale)}
.related{margin-top:34px}
.pagination{display:flex;gap:6px;flex-wrap:wrap;margin:24px 0}
.pagination a,.pagination span{border:1px solid var(--aw-border);border-radius:9px;padding:7px 11px;font-size:13px}
.pagination .current{background:var(--aw-green);color:#fff;border-color:var(--aw-green)}
.search-results .search-form{display:flex;margin:15px 0 22px}
.search-results .search-form input{flex:1;min-width:0;border:1px solid var(--aw-border);padding:11px 12px;border-radius:10px 0 0 10px}
.search-results .search-form button{border:0;background:var(--aw-green);color:#fff;padding:0 16px;border-radius:0 10px 10px 0}
.site-footer{background:#19301f;color:#eaf2eb;padding:30px 0 82px}
.site-footer a{color:#d8ebdb}
.footer-brand{font-size:21px;font-weight:800}
.footer-description{color:#b7c9ba;max-width:600px}
.footer-links{display:flex;flex-wrap:wrap;gap:10px 18px;font-size:13px;margin-top:15px}
.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}
@media(min-width:700px){
  .container{width:min(calc(100% - 40px),var(--aw-max))}
  .menu-toggle{display:none}
  .header-search{display:block}
  .search-toggle{display:none}
  .mobile-nav{display:none!important}
  .bottom-nav{display:none}
  main{padding-bottom:20px}
  .hero-content{padding:46px 42px}
  .hero h1{font-size:43px;max-width:800px}
  .category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .child-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .article-card{grid-template-columns:150px 1fr}
  .article-thumb{width:150px;height:96px}
  .article-card h3{font-size:17px}
  .article-header h1,.page-title{font-size:42px}
  .entry-content{font-size:18px;max-width:820px}
}
@media(min-width:1050px){
  .category-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .child-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
