/* СНТ "Лето" — информационный сайт. Строго, читаемо, без украшательств. */
:root {
    --bg: #ffffff;
    --surface: #fbfaf6;
    --surface-2: #f4f1e9;
    --fg: #1f2e23;
    --fg-soft: #3a4d40;
    --muted: #6b7269;
    --primary: #4a7c3f;
    --primary-dark: #355a2c;
    --warn: #c47a3a;
    --warn-bg: #fff5e6;
    --warn-border: #f0d9a8;
    --warn-fg: #6b4a14;
    --info-bg: #f1f5ec;
    --info-border: #cfd8c2;
    --info-fg: #3a4d2f;
    --rule: #e6e2d6;
    --shadow: 0 1px 2px rgba(0,0,0,.04);
    --radius: 8px;
    --max: 920px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
    font-family: "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
    line-height: 1.25;
    color: var(--fg);
    letter-spacing: -0.005em;
    margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

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

/* === Header === */

.site-head {
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: 16px 0;
}
.site-head .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Iowan Old Style", Georgia, serif;
    font-weight: 600;
    font-size: 21px;
    color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand .leaf {
    width: 22px; height: 22px;
    background: var(--primary);
    border-radius: 50% 0 50% 50%;
    transform: rotate(45deg);
    flex-shrink: 0;
}

nav.site-nav {
    display: flex;
    gap: 24px;
    font-size: 15px;
    flex-wrap: wrap;
}
nav.site-nav a {
    color: var(--fg-soft);
    font-weight: 500;
}
nav.site-nav a:hover { color: var(--primary); text-decoration: none; }

/* === Hero (homepage) === */

.hero {
    padding: 44px 0 28px;
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--rule);
    margin-bottom: 24px;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 36px;
    align-items: center;
}
.hero h1 { font-size: 34px; max-width: 540px; margin-bottom: 14px; }
.hero p.lead {
    font-size: 17px;
    color: var(--fg-soft);
    max-width: 520px;
    margin: 0 0 20px;
}
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-photo {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow);
    border: 1px solid var(--rule);
    background: var(--surface);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* === Section-head with link === */

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 16px;
    flex-wrap: wrap;
}
.section-head h2 {
    margin: 0;
    font-size: 22px;
    padding-bottom: 0;
    border: none;
}
.section-head .section-link {
    font-size: 14px;
    color: var(--muted);
}

/* === Banner === */

.banner {
    margin: 4px 0 24px;
    padding: 14px 18px;
    border-radius: var(--radius);
    background: var(--warn-bg);
    border: 1px solid var(--warn-border);
    color: var(--warn-fg);
    font-size: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.banner .ico { font-size: 18px; line-height: 1.4; }
.banner strong { color: #4a3008; }
.banner a { color: var(--warn-fg); text-decoration: underline; }

/* === Post cards === */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.card.with-image {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    display: flex;
    flex-direction: column;
}
.card.with-image:hover {
    border-color: #cfd2c5;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.card.with-image .card-img {
    aspect-ratio: 16/10;
    background: var(--surface-2);
    display: block;
    overflow: hidden;
}
.card.with-image .card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.card.with-image:hover .card-img img { transform: scale(1.04); }
.card.with-image .card-body {
    padding: 18px 20px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card .tag {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
}
.card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
}
.card h3 a { color: var(--fg); }
.card h3 a:hover { color: var(--primary); text-decoration: none; }
.card p.excerpt {
    color: var(--fg-soft);
    font-size: 14px;
    margin: 0 0 12px;
    line-height: 1.55;
}
.card .meta {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
    margin-top: auto;
    padding-top: 8px;
}

/* === Documents (list of files) === */

.doc-list {
    display: grid;
    gap: 10px;
    margin: 18px 0 24px;
}
.doc-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: var(--fg);
    transition: border-color .15s, transform .15s;
}
.doc-item:hover {
    border-color: var(--primary);
    text-decoration: none;
    transform: translateY(-1px);
}
.doc-item .doc-icon {
    font-size: 22px;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}
.doc-item .doc-title {
    font-weight: 600;
    color: var(--fg);
    font-size: 15px;
}
.doc-item .doc-sub {
    color: var(--muted);
    font-size: 13px;
    margin-top: 2px;
}

/* === Article photo === */

.post-hero {
    margin: 0 0 24px;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 21/9;
    border: 1px solid var(--rule);
    background: var(--surface-2);
}
.post-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

figure.photo {
    margin: 22px 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--rule);
    background: var(--surface);
}
figure.photo img {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}
figure.photo figcaption {
    padding: 9px 16px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--rule);
    background: var(--surface-2);
}

/* === Page-head (replaces hero on home) === */

.page-head {
    padding: 36px 0 12px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 32px;
    background: var(--surface);
}
.page-head h1 {
    font-size: 30px;
    margin-bottom: 8px;
}
.page-head p.lead {
    font-size: 17px;
    color: var(--fg-soft);
    max-width: 720px;
    margin: 0;
}

/* === Article (content pages) === */

article.full-post {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 0 0;
}
article.full-post h1 { font-size: 28px; margin-bottom: 6px; }
article.full-post .post-meta {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}
article.full-post p { font-size: 16px; }
article.full-post h2 {
    font-size: 21px;
    margin-top: 1.8em;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rule);
}
article.full-post ul, article.full-post ol { padding-left: 1.4em; }
article.full-post li { margin: 0.4em 0; }

/* === Block === */

section.block { padding: 36px 0; }
section.block.tight { padding: 22px 0; }
.block-title {
    font-size: 22px;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rule);
}

/* === Notices (announcements on homepage) === */

.notice {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 20px;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    border: 1px solid;
}
.notice-warn {
    background: var(--warn-bg);
    border-color: var(--warn-border);
    color: var(--warn-fg);
}
.notice-warn .notice-date { color: #8a5a18; }
.notice-warn strong { color: #4a3008; }
.notice-warn a { color: var(--warn-fg); text-decoration: underline; }

.notice-info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: var(--info-fg);
}
.notice-info .notice-date { color: var(--primary); }
.notice-info strong { color: var(--fg); }

.notice-date {
    font-family: "Iowan Old Style", Georgia, serif;
    font-weight: 600;
    font-size: 15px;
    padding-top: 1px;
}
.notice-body { font-size: 15px; line-height: 1.55; }

/* === Links grid (homepage section navigation) === */

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.link-card {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 18px 20px;
    color: var(--fg);
    transition: border-color .15s ease, transform .15s ease;
    display: block;
}
.link-card:hover {
    border-color: var(--primary);
    text-decoration: none;
    transform: translateY(-1px);
}
.link-card h3 {
    margin: 0 0 6px;
    font-size: 17px;
    color: var(--primary);
}
.link-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

/* === Buttons === */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    margin-right: 8px;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-ghost {
    background: var(--bg);
    color: var(--fg-soft);
    border-color: var(--rule);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* === Schedule === */

.schedule {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 22px;
}
.schedule h3 {
    margin: 0;
    padding: 13px 20px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--rule);
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-weight: 600;
}
table.outage {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
table.outage th, table.outage td {
    text-align: left;
    padding: 10px 20px;
    border-bottom: 1px solid var(--rule);
}
table.outage th {
    background: var(--bg);
    color: var(--muted);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
table.outage tr:last-child td { border-bottom: none; }
table.outage td.date { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--fg-soft); }
table.outage td.kind { white-space: nowrap; }
.pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.pill.water { background: #d9ebf5; color: #2a5d7a; }
.pill.power { background: #f5e9d9; color: #7a5a2a; }
.pill.note  { background: #e9efe6; color: #45614a; }

/* === Iframe wrapper === */

.iframe-wrap {
    margin: 18px 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--rule);
    box-shadow: var(--shadow);
}
.iframe-wrap iframe {
    display: block;
    border: 0;
    width: 100%;
}

/* === Contacts list === */

.contact-list {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    margin: 14px 0 24px;
}
.contact-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--rule);
}
.contact-row:last-child { border-bottom: none; }
.contact-role {
    font-weight: 600;
    color: var(--fg);
    font-size: 15px;
}
.contact-note {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

/* === Documents === */

.doc-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    margin-bottom: 14px;
}
.doc-meta {
    color: var(--muted);
    font-size: 14px;
    padding-top: 1px;
}
.doc-body p:last-child { margin-bottom: 0; }
.doc-body p { font-size: 15px; line-height: 1.55; margin-bottom: 0.6em; }

/* === Footer === */

.site-foot {
    margin-top: 60px;
    padding: 22px 0;
    background: var(--surface-2);
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 14px;
}
.site-foot .row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: space-between;
}

/* === Responsive === */

@media (max-width: 860px) {
    .site-head .inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    nav.site-nav {
        width: 100%;
        gap: 14px;
        flex-wrap: wrap;
        font-size: 14px;
    }
}

@media (max-width: 720px) {
    body { font-size: 16px; }
    .hero { padding: 28px 0 20px; margin-bottom: 18px; }
    .hero-grid { grid-template-columns: 1fr; gap: 20px; }
    .hero h1 { font-size: 26px; }
    .hero p.lead { font-size: 15px; }
    .hero-photo { aspect-ratio: 16/10; }
    .section-head h2 { font-size: 19px; }
    .card h3 { font-size: 16px; }
    .card .card-body { padding: 14px 16px 12px; }
    .doc-item { padding: 12px 14px; gap: 12px; }
    .doc-item .doc-icon { font-size: 18px; width: 24px; }
    .doc-item .doc-title { font-size: 14px; }
    .doc-item .doc-sub { font-size: 12px; }
    .page-head { padding: 28px 0 10px; margin-bottom: 24px; }
    .page-head h1 { font-size: 24px; }
    .page-head p.lead { font-size: 15px; }
    section.block { padding: 24px 0; }
    section.block.tight { padding: 16px 0; }
    article.full-post { padding: 22px 0 0; }
    article.full-post h1 { font-size: 23px; }
    article.full-post h2 { font-size: 18px; }
    article.full-post p { font-size: 15px; }
    .container { padding: 0 16px; }
    .block-title { font-size: 19px; }

    .notice {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 14px 16px;
    }
    .notice-date { font-size: 14px; }
    .notice-body { font-size: 14px; }

    .schedule h3 { padding: 11px 16px; font-size: 14px; }
    table.outage th, table.outage td { padding: 9px 14px; font-size: 13px; }
    table.outage th { font-size: 11px; }

    .contact-row, .doc-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px 16px;
    }
    .contact-role { font-size: 14px; }
    .contact-note, .doc-body p { font-size: 14px; }
    .doc-meta { font-size: 13px; }

    .link-card { padding: 14px 16px; }
    .link-card h3 { font-size: 16px; }
    .link-card p { font-size: 13px; }

    .btn { padding: 8px 14px; font-size: 13px; }
}

@media (max-width: 420px) {
    nav.site-nav { gap: 12px; font-size: 13px; }
    .brand { font-size: 18px; }
    .brand .leaf { width: 20px; height: 20px; }
    .page-head h1 { font-size: 22px; }
    article.full-post h1 { font-size: 20px; }
}
