/*
Theme Name: dds_clipscandal18.com
Author: Симонова Виктория
Description: Практические советы риелтора по сделкам с недвижимостью, аренде и продаже квартир без рисков.
Version: 1.1
Text Domain: dds_clipscandal18
*/

/* === Базовые сбросы и переменные === */
:root {
    --color-bg: #F7F5F0;
    --color-text: #2C2C2C;
    --color-primary: #B55A3B;
    --color-primary-dark: #934428;
    --color-secondary: #6F7E5A;
    --color-secondary-dark: #56644A;
    --color-card: #FFFFFF;
    --color-warning-bg: #E2C2C0;
    --color-warning-text: #6B1F2A;
    --color-muted: #6E6E6E;
    --color-border: #E5E0D6;
    --shadow-sm: 0 2px 6px rgba(44, 44, 44, 0.06);
    --shadow-md: 0 4px 14px rgba(44, 44, 44, 0.1);
    --shadow-lg: 0 8px 24px rgba(44, 44, 44, 0.14);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --container-width: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--color-primary-dark); text-decoration: underline; }

p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', serif;
    color: var(--color-primary);
    line-height: 1.25;
    margin: 1.4em 0 0.6em;
    font-weight: 700;
}
h1 { font-size: 2.2em; margin-top: 0; }
h2 { font-size: 1.7em; }
h3 { font-size: 1.35em; }
h4 { font-size: 1.15em; }

ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }

blockquote {
    border-left: 4px solid var(--color-secondary);
    background: rgba(111, 126, 90, 0.08);
    margin: 1.4em 0;
    padding: 0.9em 1.2em;
    color: var(--color-text);
    font-style: italic;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid var(--color-border);
    background: #fff;
}
th, td {
    border: 1px solid var(--color-border);
    padding: 0.7em 0.9em;
    text-align: left;
}
th { background: rgba(181, 90, 59, 0.08); font-weight: 700; color: var(--color-primary); }

code {
    background: rgba(44, 44, 44, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
pre {
    background: #2C2C2C;
    color: #F7F5F0;
    padding: 1em 1.2em;
    overflow-x: auto;
    border-radius: var(--radius-md);
    margin: 1.2em 0;
}
pre code { background: none; padding: 0; color: inherit; }

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

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

.btn,
.button,
input[type="submit"] {
    display: inline-block;
    padding: 12px 24px;
    background: var(--color-primary);
    color: #fff !important;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.05s ease;
    box-shadow: var(--shadow-sm);
    line-height: 1.2;
}
.btn:hover,
.button:hover,
input[type="submit"]:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: #fff !important;
}
.btn:active { transform: translateY(1px); }

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary) !important;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    box-shadow: none;
}
.btn-secondary:hover {
    background: var(--color-secondary);
    color: #fff !important;
    box-shadow: var(--shadow-sm);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1em;
    background: #fff;
    color: var(--color-text);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(181, 90, 59, 0.15);
}

/* === Шапка === */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 18px 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--color-text);
}
.brand:hover { text-decoration: none; color: var(--color-text); }
.brand-logo, .brand-logo svg {
    width: 56px;
    height: 56px;
    display: block;
    flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}
.brand-tagline {
    font-size: 0.85em;
    color: var(--color-muted);
    margin-top: 4px;
    font-style: italic;
}

.header-nav { font-family: 'Helvetica Neue', Arial, sans-serif; }
.header-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}
.header-nav li { margin: 0; }
.header-nav a {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.98em;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.header-nav a:hover,
.header-nav .current-menu-item a {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    box-shadow: none;
}
.menu-toggle:hover { background: var(--color-primary); color: #fff !important; }

/* === Хлебные крошки === */
.breadcrumbs {
    padding: 14px 0;
    font-size: 0.92em;
    color: var(--color-muted);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}
.breadcrumbs a { color: var(--color-secondary); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs .separator { margin: 0 8px; color: var(--color-border); }

/* === Основной layout === */
.site-main { padding: 28px 0 60px; }
.layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.content-area { flex: 1; min-width: 0; }
.content-area.has-sidebar { width: 67%; }
.content-area.full-width { width: 85%; margin: 0 auto; }
.sidebar { width: 27%; flex-shrink: 0; }

/* === Карточки записей === */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin: 0 0 36px;
}

.card {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
}
.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(181, 90, 59, 0.15), rgba(111, 126, 90, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 2.5em;
}

.card-body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-meta {
    font-size: 0.82em;
    color: var(--color-muted);
    margin-bottom: 8px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.card-meta a { color: var(--color-secondary); }
.card-meta a:hover { color: var(--color-primary); }

.card-title {
    font-size: 1.2em;
    margin: 0 0 12px;
    line-height: 1.3;
}
.card-title a {
    color: var(--color-primary);
    text-decoration: none;
}
.card-title a:hover { color: var(--color-primary-dark); text-decoration: underline; }

.card-excerpt {
    color: var(--color-text);
    font-size: 0.96em;
    line-height: 1.6;
    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-weight: 600;
    color: var(--color-primary);
    border-bottom: 1px dashed var(--color-primary);
    padding-bottom: 2px;
    font-size: 0.92em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.card-more:hover { color: var(--color-primary-dark); border-bottom-style: solid; text-decoration: none; }

/* === Сайдбар === */
.sidebar .widget {
    background: var(--color-card);
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.sidebar .widget-title {
    font-size: 1.08em;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-primary);
}
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}
.sidebar ul li:last-child { border-bottom: none; }
.sidebar ul li a { color: var(--color-text); }
.sidebar ul li a:hover { color: var(--color-primary); }

/* === Запись и страница === */
.entry-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}
.entry-title {
    margin: 0 0 12px;
    font-size: 2.2em;
}
.entry-meta {
    font-size: 0.9em;
    color: var(--color-muted);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}
.entry-meta a { color: var(--color-secondary); }
.entry-meta .meta-item { margin-right: 18px; }

.entry-thumbnail {
    margin: 0 0 28px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.entry-thumbnail img { display: block; width: 100%; height: auto; }

.entry-content { font-size: 1.04em; line-height: 1.75; }
.entry-content img { border-radius: var(--radius-md); margin: 1em 0; }

.entry-tags {
    margin: 30px 0 0;
    padding: 16px 0;
    border-top: 1px solid var(--color-border);
    font-size: 0.92em;
    color: var(--color-muted);
}
.entry-tags a {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 4px 10px;
    background: rgba(111, 126, 90, 0.12);
    color: var(--color-secondary-dark);
    border-radius: var(--radius-sm);
    font-size: 0.92em;
}
.entry-tags a:hover { background: var(--color-secondary); color: #fff; text-decoration: none; }

/* === Главная === */
.front-block {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}
.front-block.tinted {
    background: linear-gradient(135deg, rgba(181, 90, 59, 0.06), rgba(111, 126, 90, 0.08));
}
.front-block.olive { border-left: 5px solid var(--color-secondary); }
.front-block.terra { border-left: 5px solid var(--color-primary); }
.front-block h2 { margin-top: 0; }

.front-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}
.front-grid-item {
    background: rgba(247, 245, 240, 0.6);
    padding: 18px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}
.front-grid-item h3 { font-size: 1.08em; margin: 0 0 8px; color: var(--color-primary); }
.front-grid-item p { margin: 0; font-size: 0.96em; }

.recent-posts-section {
    margin-bottom: 32px;
}
.section-heading {
    font-size: 1.7em;
    color: var(--color-primary);
    margin: 0 0 22px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-border);
}

.steps-list {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    counter-reset: step;
}
.steps-list li {
    counter-increment: step;
    padding: 14px 18px 14px 56px;
    position: relative;
    background: rgba(247, 245, 240, 0.5);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border-left: 3px solid var(--color-secondary);
}
.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: var(--color-secondary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.warning-block {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
    padding: 22px 28px;
    border-radius: var(--radius-md);
    margin: 20px 0;
}
.warning-block h3 { color: var(--color-warning-text); margin-top: 0; }

/* === Подвал === */
.site-footer {
    background: #2C2C2C;
    color: #E5E0D6;
    padding: 50px 0 20px;
    margin-top: 60px;
}
.site-footer a { color: #E2C2C0; }
.site-footer a:hover { color: #fff; }
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    margin-bottom: 40px;
}
.footer-widgets .widget-title {
    color: #fff;
    font-size: 1.08em;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(229, 224, 214, 0.2);
}
.footer-widgets ul { list-style: none; padding: 0; margin: 0; }
.footer-widgets ul li { padding: 5px 0; border: none; }
.footer-widgets a { color: #E5E0D6; }
.footer-widgets a:hover { color: var(--color-warning-bg); text-decoration: underline; }
.site-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(229, 224, 214, 0.15);
    font-size: 0.9em;
    color: #B5AFA3;
}

/* === Пагинация === */
.pagination {
    margin: 36px 0 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 9px 14px;
    min-width: 40px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pagination .page-numbers:hover {
    background: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.pagination .dots { background: transparent; border: none; }

/* === Поиск === */
.search-form {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}
.search-form input[type="search"] { flex: 1; }
.search-form input[type="submit"] { padding: 10px 18px; }

/* === 404 === */
.not-found {
    text-align: center;
    padding: 60px 20px;
}
.not-found h1 { font-size: 4em; margin: 0 0 12px; }
.not-found p { color: var(--color-muted); margin-bottom: 20px; }

/* === Комментарии === */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}
.comments-title { margin-top: 0; }
.comment-list { list-style: none; padding: 0; margin: 0 0 30px; }
.comment-list li, .comment-list .children { list-style: none; }
.comment-list .children { padding-left: 30px; margin-top: 14px; }
.comment-body {
    background: #fff;
    padding: 18px 22px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
}
.comment-meta {
    font-size: 0.88em;
    color: var(--color-muted);
    margin-bottom: 8px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}
.comment-author { font-weight: 700; color: var(--color-primary); }
.comment-reply-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.88em;
    color: var(--color-secondary);
    font-weight: 600;
}
.comment-respond { background: #fff; padding: 24px 26px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.comment-form-comment, .comment-form-author, .comment-form-email, .comment-form-url { margin-bottom: 14px; }
.comment-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.94em; }

/* === Cookie-баннер: правило hidden — ДО основного блока стилей === */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2C2C2C;
    color: #F7F5F0;
    padding: 18px 22px;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.94em;
}
.cookie-banner p { margin: 0; flex: 1; min-width: 240px; }
.cookie-banner a { color: var(--color-warning-bg); text-decoration: underline; }
.cookie-banner .btn { padding: 10px 22px; }

/* === Адаптив === */
@media (max-width: 960px) {
    body { font-size: 16px; }
    .layout { flex-direction: column; }
    .content-area.has-sidebar,
    .content-area.full-width,
    .sidebar { width: 100%; }
    .footer-widgets { grid-template-columns: repeat(2, 1fr); }
    .front-grid { grid-template-columns: repeat(2, 1fr); }
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
    h1, .entry-title { font-size: 1.85em; }
    h2 { font-size: 1.45em; }
    .front-block { padding: 28px 26px; }
}

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .header-inner { gap: 14px; }
    .menu-toggle { display: inline-block; }
    .header-nav {
        width: 100%;
        display: none;
    }
    .header-nav.is-open { display: block; }
    .header-nav ul { flex-direction: column; gap: 0; }
    .header-nav li {
        border-bottom: 1px solid var(--color-border);
    }
    .header-nav a {
        display: block;
        padding: 12px 0;
        border-bottom: none;
    }
    .posts-grid { grid-template-columns: 1fr; gap: 18px; }
    .footer-widgets { grid-template-columns: 1fr; gap: 28px; }
    .front-grid { grid-template-columns: 1fr; }
    .front-block { padding: 22px 20px; }
    h1, .entry-title { font-size: 1.6em; }
    h2 { font-size: 1.3em; }
    .brand-logo, .brand-logo svg { width: 44px; height: 44px; }
    .brand-name { font-size: 1em; }
    .brand-tagline { font-size: 0.78em; }
    .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
    .cookie-banner .btn { width: 100%; }
    .site-main { padding: 18px 0 40px; }
    .front-block h2, .section-heading { font-size: 1.4em; }
    .pagination .page-numbers { padding: 7px 11px; min-width: 34px; font-size: 0.92em; }
}
