/*
Theme Name: dds_glossanddirt.com
Author: Анна Зимина
Description: Информационный портал о домашнем уюте и чистоте. Советы по уходу за домом, организации быта и созданию комфортной среды, с архивом экспертных статей о жилье.
Version: 1.1
Text Domain: gnd
*/

/* ---------- Переменные ---------- */
:root {
    --bg: #faf8f4;
    --panel: #ffffff;
    --soft: #eef3ef;
    --ink: #2b3a33;
    --muted: #5d6b63;
    --brand: #4f8369;
    --brand-dark: #355a48;
    --accent: #c98a3c;
    --line: #e1ddd4;
    --foot-bg: #26342d;
    --foot-ink: #e8efe9;
    --foot-muted: #aebcb1;
    --radius: 14px;
    --shadow: 0 8px 26px rgba(43, 58, 51, 0.08);
}

/* ---------- База ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Georgia", "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.65;
    overflow-x: hidden;
}

h1, h2, h3, h4, .brand-name, .nav-toggle, .btn, .menu, .card-title, .widget-title, .page-title, .block-title {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
}

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

a { color: var(--brand-dark); }
a:hover { color: var(--brand); }

p { margin: 0 0 1em; }

.screen-reader, .search-label {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--brand);
    color: #fff;
    padding: 10px 16px;
    z-index: 1000;
}
.skip-link:focus { left: 10px; }

/* ---------- Контейнеры ---------- */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}
.shell-wide {
    width: min(85%, 1280px);
    margin-inline: auto;
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: background .2s ease;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-light {
    background: #fff;
    color: var(--brand-dark);
}
.btn-light:hover { background: var(--soft); color: var(--brand-dark); }

/* ---------- Шапка ---------- */
.site-head {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}
.head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.brand-logo-link { display: inline-flex; flex: 0 0 auto; }
.brand-logo { display: block; height: 52px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    line-height: 1.25;
    /* длинное название — ограничиваем до двух строк */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-desc {
    margin: 4px 0 0;
    font-family: "Georgia", serif;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle-bar {
    width: 26px; height: 3px;
    background: var(--ink);
    border-radius: 2px;
}

.site-nav {
    background: var(--brand-dark);
}
.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.menu li { margin: 0; }
.menu a {
    display: block;
    color: #eef3ef;
    text-decoration: none;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    transition: background .2s ease;
}
.menu a:hover,
.menu .current-menu-item > a {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.menu .sub-menu {
    list-style: none;
    margin: 0; padding: 0;
}

/* ---------- Основная зона ---------- */
.site-main { padding: 36px 0 48px; }

.page-wrap { padding: 8px 0 0; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
}
.layout-single .content-area {
    display: block;
    width: 85%;
    margin-inline: auto;
}

/* ---------- Хлебные крошки ---------- */
.crumbs {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 22px;
}
.crumbs a { color: var(--brand-dark); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: var(--line); margin: 0 4px; }

/* ---------- Заголовки страниц ---------- */
.page-title {
    font-size: 32px;
    line-height: 1.2;
    margin: 0 0 12px;
    color: var(--ink);
}
.archive-head { margin-bottom: 26px; }
.archive-intro { color: var(--muted); }

/* ---------- Карточки записей ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 26px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb-wrap {
    display: block;
    overflow: hidden;
}
.card-thumb-wrap a { display: block; }
.card-thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 22px;
    min-width: 0;
}
.card-meta {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    color: var(--muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.card-cat {
    color: var(--brand-dark);
    font-weight: 600;
}
.card-title {
    font-size: 21px;
    line-height: 1.3;
    margin: 0 0 10px;
}
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--brand-dark); }
.card-excerpt { color: var(--muted); margin-bottom: 14px; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: var(--brand-dark);
}
.card-more:hover { color: var(--brand); }

/* ---------- Пагинация (type => plain) ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 36px 0 4px;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    color: var(--ink);
    text-decoration: none;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    transition: background .2s ease, border-color .2s ease;
}
.pager a.page-numbers:hover {
    border-color: var(--brand);
    background: var(--soft);
}
.pager .page-numbers.current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 700;
}
.pager .page-numbers.dots {
    border: 0;
    background: none;
}

/* ---------- Запись / страница ---------- */
.post-single, .page-article { background: none; }
.post-head { margin-bottom: 18px; }
.post-title { font-size: 34px; line-height: 1.2; margin: 0 0 10px; }
.post-meta {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: var(--muted);
    display: flex; gap: 14px; flex-wrap: wrap;
}
.post-cat { color: var(--brand-dark); font-weight: 600; }
.post-cover {
    margin: 0 0 24px;
    border-radius: var(--radius);
    overflow: hidden;
}
.post-cover img { display: block; width: 100%; height: auto; }
.post-content { font-size: 18px; }
.post-content img { border-radius: 10px; display: block; }
.post-content h2 { font-size: 26px; margin: 1.4em 0 .5em; }
.post-content h3 { font-size: 22px; margin: 1.3em 0 .5em; }
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content blockquote {
    margin: 1.4em 0;
    padding: 4px 20px;
    border-left: 4px solid var(--brand);
    color: var(--muted);
    font-style: italic;
}
.post-tags { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    background: var(--soft);
    color: var(--brand-dark);
    padding: 5px 12px;
    border-radius: 999px;
    text-decoration: none;
}
.tag:hover { background: var(--brand); color: #fff; }
.page-links { margin-top: 18px; font-family: "Helvetica Neue", Arial, sans-serif; }

/* ---------- Таблицы в контенте ---------- */
.post-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.4em 0;
}
.post-content table, .post-content th, .post-content td {
    border: 1px solid var(--line);
}
.post-content th, .post-content td {
    padding: 10px 12px;
    text-align: left;
}
.post-content th { background: var(--soft); }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
}
.sidebar .widget {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    color: var(--ink);
}
.sidebar .widget-title {
    font-size: 17px;
    margin: 0 0 14px;
    color: var(--ink);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--soft);
}
.sidebar .widget ul {
    list-style: none;
    margin: 0; padding: 0;
}
.sidebar .widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--brand-dark); text-decoration: none; }
.sidebar .widget a:hover { color: var(--brand); text-decoration: underline; }
.sidebar .widget .post-date,
.sidebar .widget .rss-date,
.sidebar .widget time {
    display: block;
    font-size: 13px;
    color: var(--muted);
    font-family: "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Поиск ---------- */
.search-form .search-row {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}
.search-field {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
}
.search-submit {
    border: 0;
    background: var(--brand);
    color: #fff;
    padding: 0 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.search-submit:hover { background: var(--brand-dark); }

/* ---------- Комментарии ---------- */
.comments { margin-top: 44px; }
.comments-title { font-size: 24px; margin: 0 0 20px; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 26px; padding: 0; }
.comment-inner {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 16px;
}
.comment-head {
    display: flex; gap: 12px; flex-wrap: wrap;
    align-items: baseline;
    margin-bottom: 8px;
}
.comment-author { font-weight: 700; }
.comment-date { font-size: 13px; color: var(--muted); }
.comment-reply a {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.comment-pending { color: var(--accent); font-size: 14px; }
.comment-respond {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: 16px;
    margin-top: 6px;
}
.comment-form label { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 14px; }
.comment-form p { margin-bottom: 14px; }
.form-submit input {
    background: var(--brand);
    color: #fff;
    border: 0;
    padding: 12px 26px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}
.form-submit input:hover { background: var(--brand-dark); }

/* ---------- Главная: блоки ---------- */
.front .block { padding: 56px 0; }
.block-intro { padding-top: 48px; }
.block-rubrics { background: var(--soft); }
.block-steps { background: var(--soft); }
.block-quote { background: var(--brand-dark); }

.block-title { font-size: 30px; line-height: 1.2; margin: 0 0 22px; }
.block-title.center { text-align: center; }

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 44px;
    align-items: center;
}
.intro-text p { color: var(--muted); }
.intro-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.rubric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 22px;
}
.rubric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px;
    text-align: center;
    min-width: 0;
}
.rubric-ico { display: inline-flex; margin-bottom: 10px; }
.rubric h3 { font-size: 19px; margin: 0 0 8px; }
.rubric p { color: var(--muted); font-size: 16px; margin: 0; }

.block-latest { padding-bottom: 56px; }

.steps {
    list-style: none;
    counter-reset: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 22px;
}
.step {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px;
    min-width: 0;
}
.step-num {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-family: "Helvetica Neue", Arial, sans-serif;
    margin-bottom: 12px;
}
.step h3 { font-size: 18px; margin: 0 0 8px; }
.step p { color: var(--muted); font-size: 16px; margin: 0; }

.quote-inner { text-align: center; }
.big-quote {
    margin: 0 auto 26px;
    max-width: 760px;
    font-family: "Georgia", serif;
    font-size: 28px;
    line-height: 1.45;
    color: #fff;
    font-style: italic;
}

.empty { color: var(--muted); }

/* ---------- Подвал ---------- */
.site-foot {
    background: var(--foot-bg);
    color: var(--foot-ink);
    margin-top: 40px;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 32px;
    padding: 46px 0;
}
.foot-col { min-width: 0; }
.site-foot .widget { margin-bottom: 8px; color: var(--foot-ink); }
.site-foot .widget-title {
    font-size: 17px;
    color: #fff;
    margin: 0 0 14px;
}
.site-foot .widget p,
.site-foot .textwidget { color: var(--foot-muted); }
.site-foot .widget ul { list-style: none; margin: 0; padding: 0; }
.site-foot .widget li { padding: 6px 0; }
.site-foot .widget a { color: var(--foot-ink); text-decoration: none; }
.site-foot .widget a:hover { color: #fff; text-decoration: underline; }
.foot-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 18px 0;
}
.copyright {
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: var(--foot-muted);
}

/* ---------- 404 ---------- */
.error-404 .page-title { font-size: 40px; }
.back-home { margin-top: 22px; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    background: var(--ink);
    color: #fff;
    padding: 16px 0;
    box-shadow: 0 -6px 20px rgba(0,0,0,.18);
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.cookie-text { margin: 0; font-size: 15px; color: #e8efe9; min-width: 0; flex: 1; }
.cookie-accept {
    border: 0;
    background: var(--brand);
    color: #fff;
    padding: 11px 24px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-family: "Helvetica Neue", Arial, sans-serif;
    flex: 0 0 auto;
}
.cookie-accept:hover { background: var(--brand-dark); }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .intro-grid { grid-template-columns: 1fr; gap: 28px; }
    .big-quote { font-size: 24px; }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    .nav-toggle { display: flex; }
    .site-nav { display: none; }
    .site-nav.is-open { display: block; }
    .menu { flex-direction: column; gap: 0; }
    .menu a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
    .layout-single .content-area { width: 100%; }
    .shell-wide { width: 92%; }
    .page-title { font-size: 26px; }
    .post-title { font-size: 27px; }
    .block-title { font-size: 24px; }
    .front .block { padding: 40px 0; }
    .brand-desc { display: none; }
    .cookie-inner { justify-content: center; }
}
