/*
Theme Name: dds_shbetoz.com
Author: Симонова Эмилия
Description: Тема для сайта о планировках квартир и ремонте — практичный дизайн с отсылками к архитектурным чертежам.
Version: 1.1
Text Domain: dds_shbetoz
*/

/* ==========================================================================
   Базовые переменные
   ========================================================================== */
:root {
    --c-bg: #F9F6F0;
    --c-panel: #F0EBE1;
    --c-line: #E2DBD1;
    --c-accent: #C26A4A;
    --c-accent-dark: #A85738;
    --c-secondary: #8DA39A;
    --c-text: #2E2B29;
    --c-muted: #6A675E;
    --c-white: #FFFFFF;
    --font-head: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-body: Georgia, 'Times New Roman', serif;
    --font-mono: 'Courier New', Courier, monospace;
    --maxw: 1240px;
}

/* ==========================================================================
   Сброс и базовые стили
   ========================================================================== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--c-text);
    background-color: var(--c-bg);
    background-image:
        linear-gradient(to right, rgba(141,163,154,0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(141,163,154,0.08) 1px, transparent 1px);
    background-size: 24px 24px;
}

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

a {
    color: var(--c-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
a:hover { color: var(--c-accent-dark); border-bottom-color: var(--c-accent-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--c-text);
    line-height: 1.25;
    margin: 1.4em 0 0.6em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

blockquote {
    margin: 1.5em 0;
    padding: 1em 1.2em;
    border-left: 3px solid var(--c-secondary);
    background: var(--c-panel);
    color: var(--c-muted);
    font-style: italic;
}

code, pre {
    font-family: var(--font-mono);
    background: var(--c-panel);
    border-radius: 4px;
}
code { padding: 0.1em 0.4em; font-size: 0.92em; }
pre { padding: 1em; overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid var(--c-line);
}
th, td {
    padding: 0.6em 0.8em;
    border: 1px solid var(--c-line);
    text-align: left;
}
th {
    background: var(--c-panel);
    font-family: var(--font-head);
    font-weight: 600;
}

hr {
    border: 0;
    border-top: 1px solid var(--c-line);
    margin: 2em 0;
}

/* ==========================================================================
   Контейнер
   ========================================================================== */
.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Шапка
   ========================================================================== */
.site-header {
    background: var(--c-white);
    border-bottom: 1px solid var(--c-line);
    padding: 18px 0;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    border-bottom: none;
}
.brand:hover { border-bottom: none; }
.brand-logo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: block;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--c-text);
    line-height: 1.2;
}
.brand-tag {
    font-size: 0.82rem;
    color: var(--c-muted);
    margin-top: 2px;
}

.primary-nav { margin-left: auto; }
.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}
.primary-nav a {
    font-family: var(--font-head);
    font-size: 0.96rem;
    color: var(--c-text);
    border-bottom: none;
    padding: 6px 0;
    display: inline-block;
}
.primary-nav a:hover {
    color: var(--c-accent);
    border-bottom: 2px solid var(--c-accent);
}
.primary-nav .current-menu-item > a {
    color: var(--c-accent);
    border-bottom: 2px solid var(--c-accent);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--c-line);
    padding: 8px 12px;
    font-family: var(--font-head);
    font-size: 0.92rem;
    color: var(--c-text);
    cursor: pointer;
    border-radius: 4px;
    margin-left: auto;
}

/* ==========================================================================
   Кнопки
   ========================================================================== */
.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.3;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn-primary {
    background: var(--c-accent);
    color: var(--c-white);
    box-shadow: 0 2px 0 rgba(0,0,0,0.07);
}
.btn-primary:hover {
    background: var(--c-accent-dark);
    color: var(--c-white);
    border-bottom-color: transparent;
}
.btn-secondary {
    background: transparent;
    color: var(--c-text);
    border: 1px solid var(--c-secondary);
}
.btn-secondary:hover {
    background: rgba(141,163,154,0.1);
    color: var(--c-text);
    border-bottom: 1px solid var(--c-secondary);
}
.btn-micro {
    font-family: var(--font-head);
    font-size: 0.86rem;
    color: var(--c-secondary);
    border: none;
    background: transparent;
    padding: 4px 0;
    text-decoration: none;
}
.btn-micro:hover { text-decoration: underline; color: var(--c-secondary); border-bottom-color: transparent; }

/* ==========================================================================
   Хлебные крошки
   ========================================================================== */
.crumbs {
    font-size: 0.88rem;
    color: var(--c-muted);
    padding: 14px 0;
    font-family: var(--font-head);
}
.crumbs a {
    color: var(--c-muted);
    border-bottom: none;
}
.crumbs a:hover { color: var(--c-accent); }
.crumbs .sep { margin: 0 8px; color: var(--c-line); }

/* ==========================================================================
   Контент / Сайдбар сетка
   ========================================================================== */
.layout {
    display: flex;
    gap: 40px;
    padding: 30px 0 60px;
    align-items: flex-start;
}
.layout-with-sidebar .content { flex: 0 0 67%; max-width: 67%; }
.layout-with-sidebar .sidebar { flex: 0 0 27%; max-width: 27%; }
.layout-full .content { flex: 0 0 85%; max-width: 85%; margin: 0 auto; }

/* ==========================================================================
   Сайдбар
   ========================================================================== */
.sidebar {
    background: var(--c-panel);
    padding: 22px 22px;
    border-radius: 6px;
    position: sticky;
    top: 20px;
}
.widget {
    margin-bottom: 26px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--c-line);
}
.widget:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.widget-title {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 14px;
    color: var(--c-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget li {
    padding: 6px 0;
    border-bottom: 1px dashed var(--c-line);
}
.widget li:last-child { border-bottom: 0; }
.widget a {
    color: var(--c-text);
    border-bottom: none;
    font-family: var(--font-body);
    font-size: 0.96rem;
}
.widget a:hover { color: var(--c-accent); }

.idea-box {
    background: var(--c-white);
    border: 1px dashed var(--c-secondary);
    padding: 16px;
    border-radius: 6px;
    margin-top: 18px;
}
.idea-box-title {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--c-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.idea-box-text {
    font-size: 0.94rem;
    color: var(--c-text);
    margin: 0;
}

/* ==========================================================================
   Карточки записей
   ========================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 20px 0 30px;
}
.card {
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
    box-shadow: 0 6px 20px rgba(46,43,41,0.08);
    transform: translateY(-2px);
}
.card-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--c-line);
}
.card-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--c-panel);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-secondary);
    font-family: var(--font-head);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--c-line);
}
.card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.3;
}
.card-title a {
    color: var(--c-text);
    border-bottom: none;
}
.card-title a:hover { color: var(--c-accent); }
.card-meta {
    font-size: 0.82rem;
    color: var(--c-muted);
    margin-bottom: 10px;
    font-family: var(--font-head);
}
.card-meta a { color: var(--c-secondary); border-bottom: none; }
.card-meta a:hover { color: var(--c-accent); }
.card-excerpt {
    flex: 1;
    color: var(--c-text);
    font-size: 0.96rem;
    line-height: 1.55;
    margin-bottom: 14px;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-more {
    align-self: flex-start;
    font-family: var(--font-head);
    font-size: 0.9rem;
    color: var(--c-accent);
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
}
.card-more:hover { border-bottom-color: var(--c-accent); }

/* ==========================================================================
   Главная страница
   ========================================================================== */
.front-section {
    margin: 40px 0;
    padding: 30px 0;
}
.front-section-head {
    margin-bottom: 24px;
    border-left: 4px solid var(--c-accent);
    padding-left: 16px;
}
.front-section-head h2 {
    margin: 0 0 4px;
    font-size: 1.7rem;
}
.front-section-head .lead {
    color: var(--c-muted);
    font-size: 1rem;
    margin: 0;
}

.feature-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}
.feature-block {
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: 6px;
    padding: 22px;
}
.feature-block h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    color: var(--c-accent);
}
.feature-block p {
    margin: 0 0 8px;
    font-size: 0.96rem;
    color: var(--c-text);
}

.plan-card {
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: 6px;
    padding: 24px;
    position: relative;
}
.plan-card::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px dashed var(--c-line);
    border-radius: 4px;
    pointer-events: none;
}
.plan-card h3 {
    margin: 0 0 12px;
    font-size: 1.2rem;
    position: relative;
}
.plan-rooms {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
    position: relative;
}
.plan-room {
    background: var(--c-panel);
    border: 1px solid var(--c-line);
    padding: 14px 10px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--c-text);
}
.plan-room span { display: block; color: var(--c-muted); font-size: 0.78rem; }

/* ==========================================================================
   Запись и страница
   ========================================================================== */
.entry-header {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--c-line);
}
.entry-title {
    margin: 0 0 12px;
    font-size: 2.1rem;
    line-height: 1.2;
}
.entry-meta {
    font-size: 0.88rem;
    color: var(--c-muted);
    font-family: var(--font-head);
}
.entry-meta a { color: var(--c-secondary); border-bottom: none; }
.entry-meta .meta-sep { margin: 0 8px; color: var(--c-line); }

.entry-thumb {
    margin: 0 0 24px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--c-line);
}
.entry-thumb img { display: block; width: 100%; }

.entry-content { font-size: 1rem; line-height: 1.75; }
.entry-content img { border-radius: 6px; margin: 1.2em 0; }
.entry-content figure { margin: 1.4em 0; }
.entry-content figure figcaption {
    font-size: 0.85rem;
    color: var(--c-muted);
    text-align: center;
    margin-top: 6px;
}
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.4em; }

.practical-trace {
    background: var(--c-panel);
    border: 1px solid var(--c-line);
    border-radius: 6px;
    padding: 20px 24px;
    margin: 30px 0;
}
.practical-trace-title {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--c-accent);
    margin-bottom: 12px;
    text-transform: uppercase;
    font-size: 0.92rem;
    letter-spacing: 0.05em;
}
.practical-trace ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.94rem;
}
.practical-trace li {
    padding: 4px 0 4px 28px;
    position: relative;
    color: var(--c-text);
}
.practical-trace li::before {
    content: '☐';
    position: absolute;
    left: 0;
    color: var(--c-secondary);
    font-size: 1.1rem;
    line-height: 1.2;
}

.entry-footer {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--c-line);
    font-size: 0.9rem;
    color: var(--c-muted);
}
.entry-tags { margin-top: 8px; }
.entry-tags a {
    display: inline-block;
    margin: 4px 6px 0 0;
    padding: 4px 10px;
    background: var(--c-panel);
    color: var(--c-text);
    border-radius: 4px;
    font-size: 0.86rem;
    border-bottom: none;
    font-family: var(--font-head);
}
.entry-tags a:hover { background: var(--c-secondary); color: var(--c-white); }

/* ==========================================================================
   Пагинация
   ========================================================================== */
.pagination {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--c-line);
    background: var(--c-white);
    color: var(--c-text);
    border-radius: 4px;
    font-family: var(--font-head);
    font-size: 0.94rem;
    text-decoration: none;
    border-bottom: 1px solid var(--c-line);
}
.pagination .page-numbers:hover {
    background: var(--c-panel);
    color: var(--c-accent);
    border-color: var(--c-secondary);
}
.pagination .page-numbers.current {
    background: var(--c-accent);
    color: var(--c-white);
    border-color: var(--c-accent);
}
.pagination .dots { border-color: transparent; background: transparent; }

/* ==========================================================================
   Комментарии
   ========================================================================== */
.comments-area {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--c-line);
}
.comments-title {
    font-size: 1.4rem;
    margin: 0 0 18px;
}
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list li { margin-bottom: 18px; }
.comment-body {
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: 6px;
    padding: 14px 18px;
}
.comment-meta {
    font-size: 0.85rem;
    color: var(--c-muted);
    margin-bottom: 6px;
    font-family: var(--font-head);
}
.comment-author { font-weight: 600; color: var(--c-text); }
.comment-list .children { list-style: none; padding-left: 28px; margin-top: 14px; }

.comment-respond { margin-top: 28px; }
.comment-respond label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.92rem;
    margin: 10px 0 4px;
    color: var(--c-text);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--c-line);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.96rem;
    background: var(--c-white);
    color: var(--c-text);
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form .form-submit { margin-top: 14px; }

/* ==========================================================================
   Поиск
   ========================================================================== */
.searchform {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}
.searchform input[type="search"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--c-line);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.96rem;
    background: var(--c-white);
    color: var(--c-text);
}
.searchform button {
    padding: 10px 18px;
    background: var(--c-accent);
    color: var(--c-white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-head);
    font-size: 0.94rem;
}
.searchform button:hover { background: var(--c-accent-dark); }

/* ==========================================================================
   404 страница
   ========================================================================== */
.error-404 {
    text-align: center;
    padding: 60px 0;
}
.error-404 h1 {
    font-size: 2.4rem;
    margin: 0 0 16px;
    color: var(--c-accent);
}
.error-404 .room-sketch {
    max-width: 320px;
    margin: 24px auto;
}
.error-404 p { color: var(--c-muted); }

/* ==========================================================================
   Подвал
   ========================================================================== */
.site-footer {
    background: var(--c-panel);
    border-top: 1px solid var(--c-line);
    padding: 40px 0 20px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
}
.footer-col .widget { border-bottom: 0; padding-bottom: 0; margin-bottom: 18px; }
.footer-col .widget-title { color: var(--c-text); }
.footer-col a { color: var(--c-text); border-bottom: none; }
.footer-col a:hover { color: var(--c-accent); }
.footer-col .widget li { border-bottom: 1px dashed var(--c-line); padding: 6px 0; }

.site-credit {
    text-align: center;
    padding-top: 22px;
    margin-top: 26px;
    border-top: 1px solid var(--c-line);
    font-size: 0.86rem;
    color: var(--c-muted);
    font-family: var(--font-head);
}

/* ==========================================================================
   Cookie-баннер
   Правило A11: явное !important до основного блока стилей
   ========================================================================== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    background: var(--c-text);
    color: var(--c-white);
    padding: 16px 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    z-index: 9999;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}
.cookie-banner p { margin: 0; flex: 1; min-width: 220px; font-size: 0.92rem; }
.cookie-banner button {
    background: var(--c-accent);
    color: var(--c-white);
    border: none;
    padding: 9px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-head);
    font-size: 0.92rem;
}
.cookie-banner button:hover { background: var(--c-accent-dark); }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 960px) {
    .layout { flex-direction: column; gap: 30px; }
    .layout-with-sidebar .content,
    .layout-with-sidebar .sidebar,
    .layout-full .content {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
    .sidebar { position: static; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1, .entry-title { font-size: 1.65rem; }
    h2 { font-size: 1.35rem; }
    .header-inner { gap: 12px; }
    .menu-toggle { display: inline-block; }
    .primary-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--c-white);
        border-top: 1px solid var(--c-line);
        padding: 16px;
        margin: 0;
        transform: translateY(100%);
        transition: transform 0.25s ease;
        z-index: 999;
        box-shadow: 0 -8px 24px rgba(0,0,0,0.1);
    }
    .primary-nav.is-open { transform: translateY(0); }
    .primary-nav ul {
        flex-direction: column;
        gap: 4px;
    }
    .primary-nav li {
        border-bottom: 1px dashed var(--c-line);
    }
    .primary-nav li:last-child { border-bottom: 0; }
    .primary-nav a {
        display: block;
        padding: 12px 8px;
        font-size: 1.05rem;
    }
    .footer-grid { grid-template-columns: 1fr; }
    .cards-grid { grid-template-columns: 1fr; }
    .wrap { padding: 0 16px; }
    .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
}
