/*
Theme Name: dds_whoisaaronbloom.com
Author: Андрей Сомов
Description: Гибридный контент-хаб об инженерии комфорта, ремонте и психологии интерьеров.
Version: 1.1
Text Domain: wabloom
*/

/* ===== Переменные ===== */
:root {
    --bg: #f6f1e9;
    --surface: #ffffff;
    --ink: #2a2823;
    --muted: #6f685c;
    --line: #e2d9cb;
    --teal: #1f4d49;
    --teal-deep: #163834;
    --amber: #c5702f;
    --amber-soft: #f0e3d2;
    --shell: min(92%, 1180px);
}

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

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
    font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
    line-height: 1.25;
    color: var(--teal-deep);
    margin: 0 0 0.6em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

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

.shell {
    width: var(--shell);
    margin-inline: auto;
}

/* ===== Шапка ===== */
.site-head {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.head-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1;
}
.brand-logo, .brand svg.brand-mark {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--teal-deep);
    line-height: 1.2;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.brand-name a { color: inherit; text-decoration: none; }
.brand-desc {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0.2rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Навигация ===== */
.nav-toggle {
    display: none;
    background: var(--teal);
    color: #fff;
    border: 0;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
}
.main-nav a {
    font-family: "Trebuchet MS", sans-serif;
    font-size: 0.98rem;
    color: var(--ink);
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--teal);
    border-bottom-color: var(--amber);
    text-decoration: none;
}

/* ===== Хлебные крошки ===== */
.crumbs {
    font-size: 0.85rem;
    color: var(--muted);
    padding: 1rem 0 0;
}
.crumbs a { color: var(--teal); }
.crumbs .sep { margin: 0 0.4rem; color: var(--line); }

/* ===== Раскладки ===== */
.site-main { padding: 1.5rem 0 3rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3%;
    align-items: start;
}
.layout-single .content-area,
.layout-single {
    display: block;
}
.layout-single .content-area {
    width: 85%;
    margin-inline: auto;
}
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 2.5rem; }
    .layout-single .content-area { width: 100%; }
}

/* ===== Карточки записей ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.6rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(22, 56, 52, 0.12);
}
.card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.2rem 1.3rem;
}
.card-title { font-size: 1.18rem; margin: 0 0 0.5rem; }
.card-title a { color: var(--teal-deep); }
.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0 0 0.6rem;
}
.card-excerpt { font-size: 0.95rem; color: var(--ink); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: "Trebuchet MS", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--amber);
    padding-top: 0.7rem;
}

/* ===== Сайдбар / виджеты ===== */
.sidebar { font-size: 0.95rem; }
.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.2rem 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--ink);
}
.sidebar .widget-title {
    font-size: 1.05rem;
    color: var(--teal-deep);
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--amber-soft);
}
.sidebar .widget a { color: var(--teal); }
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--line);
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .post-date { color: var(--muted); font-size: 0.8rem; }

/* ===== Контент записи/страницы ===== */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.8rem 2rem;
}
.entry-title { font-size: 1.9rem; }
.entry-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.2rem; }
.entry-thumb { border-radius: 12px; overflow: hidden; margin: 0 0 1.4rem; }
.entry-thumb img { width: 100%; display: block; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.3em 0;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
}
.entry-content th, .entry-content td {
    padding: 0.6rem 0.8rem;
    text-align: left;
}
.entry-content th { background: var(--amber-soft); }

/* ===== Главная ===== */
.section { padding: 3rem 0; }
.section:nth-child(even) { background: var(--surface); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.2rem; }
.section-head p { color: var(--muted); }

/* Текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
    align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media img, .split-media svg {
    width: 100%;
    display: block;
    border-radius: 14px;
}
@media (max-width: 760px) {
    .split { grid-template-columns: 1fr; }
    .split.reverse .split-media { order: 0; }
}

/* Сетка преимуществ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.feature {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.6rem 1.4rem;
    min-width: 0;
}
.section:nth-child(even) .feature { background: var(--bg); }
.feature-ico {
    width: 46px; height: 46px;
    margin-bottom: 0.9rem;
    display: block;
    color: var(--amber);
}
.feature h3 { font-size: 1.1rem; }
.feature p { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* Шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    counter-reset: step;
}
.step {
    position: relative;
    padding: 1.5rem 1.4rem 1.4rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.step h3 { font-size: 1.08rem; }
.step p { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* Цитата / акцент */
.accent {
    background: var(--teal-deep);
    color: #f4ece0;
    border-radius: 18px;
    padding: 3rem 2.5rem;
    text-align: center;
}
.accent blockquote {
    margin: 0 auto;
    max-width: 760px;
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.45;
    color: #fbf6ee;
}
.accent cite {
    display: block;
    margin-top: 1.2rem;
    font-size: 0.95rem;
    font-style: normal;
    color: #c7d6d2;
}

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.4rem 1.2rem;
    margin-bottom: 0.9rem;
}
.faq summary {
    cursor: pointer;
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 700;
    color: var(--teal-deep);
    padding: 0.7rem 0;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--amber); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; }

/* Галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.gallery-grid figure {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}
.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.gallery-grid figure:hover img { transform: scale(1.05); }

/* Статистика */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    text-align: center;
}
.stat { min-width: 0; }
.stat-num {
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 700;
    font-size: 2.4rem;
    color: var(--amber);
    display: block;
}
.stat-label { color: var(--muted); font-size: 0.92rem; }

/* CTA */
.cta {
    text-align: center;
    background: var(--amber-soft);
    border-radius: 18px;
    padding: 2.8rem 2rem;
}
.btn {
    display: inline-block;
    background: var(--teal);
    color: #fff !important;
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 700;
    padding: 0.85rem 1.8rem;
    border-radius: 10px;
    margin-top: 0.6rem;
}
.btn:hover { background: var(--teal-deep); text-decoration: none; }

/* Лента «последние записи» на главной */
.latest-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.6rem;
}

/* ===== Пагинация ===== */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 2.5rem 0 0;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-family: "Trebuchet MS", sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
}
.pager a.page-numbers:hover {
    border-color: var(--teal);
    color: var(--teal);
}
.pager .page-numbers.current {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}
.pager .page-numbers.dots {
    border: 0;
    background: none;
}

/* ===== Комментарии ===== */
.comments-area { margin-top: 2.5rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 1.5rem; padding: 0; }
.comment-item { margin-bottom: 1.3rem; }
.comment-inner {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem 1.2rem;
}
.comment-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.comment-author { font-weight: 700; color: var(--teal-deep); }
.comment-date { font-size: 0.8rem; color: var(--muted); }
.comment-await { font-size: 0.85rem; color: var(--amber); }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-form input[type="search"] {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
}
.comment-form textarea { min-height: 130px; }
.comment-form .submit,
.search-form button {
    background: var(--teal);
    color: #fff;
    border: 0;
    padding: 0.75rem 1.6rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    font-family: "Trebuchet MS", sans-serif;
}

/* ===== Форма поиска ===== */
.search-form {
    display: flex;
    gap: 0.6rem;
}
.search-form input[type="search"] { flex: 1; min-width: 0; }

/* ===== Подвал ===== */
.site-foot {
    background: var(--teal-deep);
    color: #d8e0dd;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
}
@media (max-width: 760px) {
    .foot-cols { grid-template-columns: 1fr; gap: 2rem; }
}
.site-foot .widget { margin-bottom: 0; color: #d8e0dd; }
.site-foot .widget-title { color: #ffffff; font-size: 1.05rem; margin: 0 0 1rem; }
.site-foot .widget a { color: #e9c9a6; }
.site-foot .widget a:hover { color: #ffffff; }
.site-foot .widget ul { list-style: none; margin: 0; padding: 0; }
.site-foot .widget li { padding: 0.35rem 0; }
.site-foot .post-date { color: #9fb0ab; font-size: 0.8rem; }
.foot-copy {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    font-size: 0.85rem;
    color: #9fb0ab;
}

/* ===== Cookie-баннер ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 999;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 10px 40px rgba(22,56,52,0.18);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 760px;
    margin-inline: auto;
}
.cookie-banner p { margin: 0; flex: 1; min-width: 220px; font-size: 0.9rem; }
.cookie-accept {
    background: var(--teal);
    color: #fff;
    border: 0;
    padding: 0.65rem 1.4rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: "Trebuchet MS", sans-serif;
    font-size: 0.92rem;
}

/* ===== 404 ===== */
.notfound {
    text-align: center;
    padding: 3rem 0;
}
.notfound .big { font-size: 5rem; color: var(--amber); margin: 0; font-family: "Trebuchet MS", sans-serif; }
.notfound .search-form { max-width: 460px; margin: 1.5rem auto 0; }

/* ===== Контакты статичные ===== */
.contact-static a { font-weight: 700; }

/* ===== Sitemap ===== */
.sitemap-list { font-size: 1rem; }
.sitemap-list h3 { margin-top: 1.4rem; }

/* ===== Адаптив навигации ===== */
@media (max-width: 760px) {
    .nav-toggle { display: inline-block; }
    .main-nav {
        flex-basis: 100%;
        width: 100%;
    }
    .main-nav[hidden] { display: none !important; }
    .main-nav ul {
        flex-direction: column;
        gap: 0.2rem;
        padding-top: 0.8rem;
    }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav a { display: block; padding: 0.7rem 0; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    body { font-size: 17px; }
}
