/*
Theme Name: Коммунальник 1
Theme URI: https://example.org/kommunalnik-1
Author: СТ «Коммунальник 1»
Description: Простая и удобная тема для сайта садоводческого товарищества: новости, объявления и библиотека документов.
Version: 1.2.0
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: kommunalnik-1
*/

:root {
  --ink: #17352d;
  --muted: #64756f;
  --green: #236b4e;
  --green-dark: #174a37;
  --lime: #ddebaf;
  --cream: #f5f1e7;
  --paper: #fffdfa;
  --line: #dfe6df;
  --shadow: 0 18px 45px rgba(23, 53, 45, .1);
  --radius: 22px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--green-dark); }
button, input, select, textarea { font: inherit; }
.wrap { width: min(calc(100% - 40px), var(--wrap)); margin-inline: auto; }
.site-main { min-height: 60vh; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { z-index: 999; top: 10px; left: 10px; padding: 10px 16px; background: #fff; }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(35, 107, 78, .12);
  background: rgba(255, 253, 250, .95);
  backdrop-filter: blur(16px);
}
.header-row { display: flex; align-items: center; min-height: 82px; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark {
  display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%;
  color: #fff; background: var(--green); font-size: 24px;
}
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-size: 17px; }
.brand-text small { margin-top: 4px; color: var(--muted); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.primary-nav a:hover { color: var(--green); }
.menu-toggle { display: none; margin-left: auto; border: 0; background: transparent; color: var(--ink); font-size: 28px; cursor: pointer; }

.hero {
  overflow: hidden;
  padding: 78px 0 88px;
  background:
    radial-gradient(circle at 88% 15%, rgba(221, 235, 175, .8) 0 15%, transparent 15.2%),
    linear-gradient(135deg, #edf5ed 0%, var(--cream) 72%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); align-items: center; gap: 72px; }
.eyebrow { margin: 0 0 15px; color: var(--green); font-size: 13px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.12; letter-spacing: -.03em; }
.hero h1 { max-width: 780px; margin-bottom: 24px; font-family: Georgia, serif; font-size: clamp(43px, 6vw, 78px); font-weight: 500; }
.hero-lead { max-width: 670px; margin-bottom: 32px; color: #475e56; font-size: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button, .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 49px; padding: 0 22px;
  border: 1px solid var(--green); border-radius: 999px; color: #fff; background: var(--green);
  font-size: 15px; font-weight: 800; text-decoration: none; transition: .2s ease;
}
.button:hover { color: #fff; background: var(--green-dark); transform: translateY(-2px); }
.button.secondary { color: var(--green); background: transparent; }
.button.secondary:hover { color: #fff; background: var(--green); }
.hero-card { padding: 30px; border: 1px solid rgba(255,255,255,.8); border-radius: var(--radius); background: rgba(255,255,255,.72); box-shadow: var(--shadow); }
.hero-card h2 { margin-bottom: 18px; font-size: 25px; }
.hero-card dl { margin: 0; }
.hero-card div { padding: 12px 0; border-top: 1px solid var(--line); }
.hero-card dt { color: var(--muted); font-size: 13px; }
.hero-card dd { margin: 3px 0 0; font-weight: 750; }

.section { padding: 82px 0; }
.section.tint { background: #f2f6f0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.section-head h2 { margin-bottom: 0; font-family: Georgia, serif; font-size: clamp(34px, 4vw, 50px); font-weight: 500; }
.section-head a { font-size: 15px; font-weight: 800; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  display: flex; flex-direction: column; overflow: hidden; min-height: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 30px rgba(23, 53, 45, .05);
}
.card-image { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--green), #69a078); object-fit: cover; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 25px; }
.meta { margin-bottom: 10px; color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.card h3 { margin-bottom: 12px; font-size: 23px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card p { margin-top: 0; color: var(--muted); }
.card .more { margin-top: auto; font-weight: 800; }

.document-list { display: grid; gap: 12px; }
.document-row {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 18px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #fff; text-decoration: none;
}
.document-row:hover { border-color: #9db8a9; box-shadow: 0 8px 25px rgba(23, 53, 45, .07); }
.file-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 12px; color: var(--green); background: #eaf2e9; font-size: 13px; font-weight: 900; }
.document-row strong { display: block; }
.document-row small { color: var(--muted); }
.document-action { color: var(--green); font-weight: 800; }

.info-band { padding: 50px 0; color: #fff; background: var(--green-dark); }
.info-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 70px; align-items: center; }
.info-grid h2 { margin-bottom: 12px; font-family: Georgia, serif; font-size: 38px; font-weight: 500; }
.info-grid p { margin: 0; color: #cee0d6; }
.contact-items { display: grid; gap: 8px; }
.contact-items a, .contact-items span { color: #fff; font-weight: 750; }

.content-wrap { width: min(calc(100% - 40px), 860px); margin-inline: auto; padding: 70px 0 90px; }
.page-title { margin-bottom: 14px; font-family: Georgia, serif; font-size: clamp(38px, 5vw, 60px); font-weight: 500; }
.entry-content { font-size: 18px; }
.entry-content h2 { margin-top: 2em; }
.entry-content > * { max-width: 100%; }
.archive-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0; }
.archive-tools input, .archive-tools select {
  min-height: 48px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.archive-tools input { flex: 1; min-width: 240px; }
.pagination { margin-top: 35px; }
.pagination .nav-links { display: flex; gap: 8px; }
.pagination a, .pagination span { padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; }

.site-footer { padding: 55px 0 25px; color: #dce9e2; background: #102d25; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 45px; }
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer h2 { font-family: Georgia, serif; font-weight: 500; }
.site-footer a { color: #fff; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.footer-bottom { margin-top: 42px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: #9eb6ab; font-size: 13px; }
.empty-state { padding: 35px; border: 1px dashed #aac0b2; border-radius: var(--radius); text-align: center; }
.contacts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 34px 0 55px; }
.contact-card { padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 30px rgba(23, 53, 45, .05); }
.contact-card h2 { margin-bottom: 7px; font-size: 25px; }
.contact-role { margin: 0 0 18px; color: var(--muted); }
.contact-lines { display: grid; gap: 7px; }
.contact-lines a { font-weight: 800; }
.map-section { margin-top: 50px; }
.map-frame { overflow: hidden; margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #edf2ed; box-shadow: var(--shadow); }
.map-frame iframe { display: block; width: 100%; height: 460px; border: 0; }
.route-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.address-card { padding: 22px; border-left: 5px solid var(--green); border-radius: 0 14px 14px 0; background: #f2f6f0; }

@media (max-width: 900px) {
  .hero-grid, .info-grid { grid-template-columns: 1fr; gap: 38px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .primary-nav { display: none; position: absolute; top: 82px; right: 20px; left: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 13px; }
  .menu-toggle { display: block; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap, .content-wrap { width: min(calc(100% - 28px), var(--wrap)); }
  .hero { padding: 50px 0 60px; }
  .hero h1 { font-size: 43px; }
  .section { padding: 58px 0; }
  .card-grid, .footer-grid { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .map-frame iframe { height: 360px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .document-row { grid-template-columns: 48px minmax(0, 1fr); padding: 15px; }
  .document-action { display: none; }
  .brand-text small { display: none; }
}
