/*
Theme Name: dds_oyuncekilis.com
Author: Алексей Кузнецов
Description: Многопрофильный информационно-практический портал о доме: от фундамента до умного интерьера. Тема для информационного сайта о ремонте, строительстве и интерьере.
Version: 1.1
Text Domain: oyc
*/

/* =========================================================================
   Переменные и сброс
   ========================================================================= */
:root {
    --bg:        #f6f2ec;
    --surface:   #ffffff;
    --ink:       #2b2620;
    --ink-soft:  #5c554c;
    --line:      #e2d9cc;
    --accent:    #bd6a2e;
    --accent-dk: #9c521e;
    --slate:     #34302a;
    --slate-dk:  #221f1b;
    --shell:     1180px;
    --radius:    12px;
}

* { box-sizing: border-box; }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Segoe UI", "PT Sans", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
    font-family: "Georgia", "PT Serif", "Times New Roman", serif;
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 0.5em;
}
h1 { font-size: 2.05rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

/* =========================================================================
   Контейнер ширины (единственное место ограничения)
   ========================================================================= */
.shell {
    width: min(92%, var(--shell));
    margin-inline: auto;
}

/* =========================================================================
   Шапка
   ========================================================================= */
.site-head {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-logo { display: block; height: 52px; width: auto; }
.brand-figure { flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-family: "Georgia", serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}
.brand-desc {
    display: block;
    font-size: 0.82rem;
    color: var(--ink-soft);
    max-width: 520px;
    margin-top: 2px;
}

/* Навигация */
.main-nav { min-width: 0; }
.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.95rem;
    cursor: pointer;
}
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.nav-list a {
    display: block;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.96rem;
}
.nav-list a:hover { background: var(--bg); text-decoration: none; color: var(--accent-dk); }
.nav-list .current-menu-item > a { color: var(--accent-dk); }

/* =========================================================================
   Базовая раскладка контента
   ========================================================================= */
.site-main { padding: 32px 0 56px; }

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

.crumbs {
    font-size: 0.86rem;
    color: var(--ink-soft);
    margin-bottom: 20px;
}
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--accent-dk); }
.crumbs .sep { color: var(--line); margin: 0 4px; }

/* =========================================================================
   Сайдбар
   ========================================================================= */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    color: var(--ink);
}
.sidebar .widget-title {
    font-size: 1.1rem;
    margin-bottom: 14px;
    color: var(--ink);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
}
.sidebar .widget a { color: var(--accent-dk); }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget .post-date { color: var(--ink-soft); font-size: 0.82rem; }

/* =========================================================================
   Карточки записей
   ========================================================================= */
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 26px;
    min-width: 0;
}
.card-thumb-wrap {
    display: block;
    overflow: hidden;
}
.card-thumb-wrap img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.card-thumb-wrap:hover img { transform: scale(1.04); }
.card-body {
    flex: 1;
    padding: 20px 24px 24px;
    min-width: 0;
}
.card-title { font-size: 1.3rem; margin-bottom: 8px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent-dk); text-decoration: none; }
.card-meta { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 12px; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
    color: var(--accent-dk);
}

/* =========================================================================
   Кнопки
   ========================================================================= */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}
.btn:hover { background: var(--accent-dk); color: #fff; text-decoration: none; }
.btn-ghost {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent-dk);
    padding: 10px 22px;
}
.btn-ghost:hover { background: var(--accent); color: #fff; }

/* =========================================================================
   Записи и страницы (single / page)
   ========================================================================= */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 36px;
}
.entry-title { font-size: 2rem; }
.entry-meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 20px; }
.entry-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
.entry-thumb img { width: 100%; display: block; }
.entry-content { font-size: 1.05rem; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.4em; }
.entry-content blockquote {
    border-left: 4px solid var(--accent);
    margin: 1.2em 0;
    padding: 6px 20px;
    background: var(--bg);
    border-radius: 0 8px 8px 0;
}
.entry-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.2em 0;
}
.entry-content table, .entry-content th, .entry-content td {
    border: 1px solid var(--line);
}
.entry-content th, .entry-content td { padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--bg); }

/* =========================================================================
   Главная страница
   ========================================================================= */
.home-section { padding: 46px 0; }
.home-section + .home-section { border-top: 1px solid var(--line); }
body.home .home-section .shell { width: min(85%, var(--shell)); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.section-head h2 { font-size: 1.85rem; }
.section-head p { color: var(--ink-soft); }

/* Блок: текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-text h2 { font-size: 1.9rem; }
.split-text p { color: var(--ink-soft); font-size: 1.05rem; }
.split-media img { width: 100%; display: block; border-radius: var(--radius); }
.split-actions { margin-top: 18px; display: flex; gap: 14px; flex-wrap: wrap; }

/* Блок: сетка рубрик */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px;
    text-align: center;
}
.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    color: var(--accent);
}
.feature-icon svg { width: 100%; height: 100%; display: block; }
.feature h3 { font-size: 1.12rem; }
.feature p { color: var(--ink-soft); font-size: 0.94rem; margin: 0; }

/* Блок: шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    counter-reset: step;
}
.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px 24px;
    position: relative;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-family: "Georgia", serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 14px;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--ink-soft); font-size: 0.94rem; margin: 0; }

/* Блок: FAQ */
.faq-wrap { max-width: 820px; margin: 0 auto; }
.faq {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 14px;
    overflow: hidden;
}
.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    font-weight: 700;
    font-family: "Georgia", serif;
    font-size: 1.08rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    color: var(--accent);
    font-size: 1.5rem;
    line-height: 1;
    flex: 0 0 auto;
}
.faq[open] summary::after { content: "–"; }
.faq-body { padding: 0 22px 20px; color: var(--ink-soft); }
.faq-body p { margin: 0; }

/* Блок «последние записи» на главной */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}
.latest-grid .card { margin-bottom: 0; }
.section-cta { text-align: center; margin-top: 32px; }

/* =========================================================================
   Пагинация
   ========================================================================= */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 36px;
}
.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: 8px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
}
.pager a.page-numbers:hover { border-color: var(--accent); color: var(--accent-dk); text-decoration: none; }
.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pager .page-numbers.dots { border: 0; background: none; }

/* =========================================================================
   Поиск
   ========================================================================= */
.search-form {
    display: flex;
    gap: 8px;
    max-width: 480px;
}
.search-field {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--surface);
    color: var(--ink);
}
.search-submit {
    border: 0;
    background: var(--accent);
    color: #fff;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}
.search-submit:hover { background: var(--accent-dk); }

/* =========================================================================
   Комментарии
   ========================================================================= */
.comments-area { margin-top: 40px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 28px; padding: 0; }
.comment-inner {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 16px;
}
.comment-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.comment-author { font-weight: 700; }
.comment-date { font-size: 0.8rem; color: var(--ink-soft); }
.comment-await { font-size: 0.85rem; color: var(--accent-dk); }
.comment-form-wrap { margin-top: 28px; }
.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: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
    margin-bottom: 6px;
}

/* =========================================================================
   404
   ========================================================================= */
.notfound { text-align: center; padding: 40px 0; }
.notfound .code { font-size: 5rem; font-family: "Georgia", serif; color: var(--accent); line-height: 1; }
.notfound .search-form { margin: 24px auto; }

/* =========================================================================
   Подвал
   ========================================================================= */
.site-foot {
    background: var(--slate);
    color: #d9d2c7;
    padding: 50px 0 0;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}
.site-foot .widget { margin-bottom: 0; color: #d9d2c7; }
.site-foot .widget-title { color: #fff; font-size: 1.1rem; margin-bottom: 14px; }
.site-foot .widget p { color: #c4bcae; }
.site-foot .widget a { color: #e8b07e; }
.site-foot .widget a:hover { color: #fff; }
.site-foot .widget ul { list-style: none; margin: 0; padding: 0; }
.site-foot .widget li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.site-foot .widget li:last-child { border-bottom: 0; }
.site-foot .widget .post-date { color: #a99f8f; font-size: 0.8rem; }
.foot-bottom {
    margin-top: 44px;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: var(--slate-dk);
    text-align: center;
    font-size: 0.86rem;
    color: #b3aa9b;
}

/* =========================================================================
   Cookie-баннер
   ========================================================================= */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--slate-dk);
    color: #e6e0d6;
    padding: 16px 0;
    box-shadow: 0 -4px 18px rgba(0,0,0,0.18);
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-inner p { margin: 0; font-size: 0.9rem; flex: 1; min-width: 240px; }
.cookie-inner a { color: #e8b07e; }

/* =========================================================================
   Адаптив
   ========================================================================= */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .feature-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .nav-toggle { display: block; }
    .main-nav { width: 100%; }
    .nav-list {
        display: none;
        flex-direction: column;
        margin-top: 12px;
        gap: 4px;
    }
    .nav-list.is-open { display: flex; }
    .split { grid-template-columns: minmax(0, 1fr); }
    .split.reverse .split-media { order: 0; }
    .feature-grid, .steps, .latest-grid, .foot-cols { grid-template-columns: minmax(0, 1fr); }
    .layout-single .content-area { width: 100%; }
    .entry { padding: 24px 20px; }
    h1, .entry-title { font-size: 1.6rem; }
}
