/*
Theme Name: dds_crispinteriorshome.com
Author: Анна Ветрова
Description: Тема для экспертного портала о выборе, покупке и обустройстве жилья.
Version: 1.1
Text Domain: uyut
*/

:root {
    --bg: #f7f2ea;
    --surface: #ffffff;
    --ink: #2c2722;
    --muted: #6f655b;
    --accent: #b5663a;
    --accent-dark: #97512c;
    --sage: #5f7a6b;
    --sage-soft: #e7ede8;
    --line: #e6ddd0;
    --shadow: 0 10px 30px rgba(44, 39, 34, .08);
    --footer-bg: #2a2520;
    --footer-ink: #cdc2b3;
    --footer-head: #f3ece1;
    --radius: 14px;
    --serif: Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 .5em;
    font-weight: 700;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

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

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

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: .7em 1.5em;
    border-radius: 999px;
    font-weight: 600;
    transition: background .2s ease;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }

.skip-link {
    position: absolute;
    left: -9999px;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    background: #fff;
    padding: .6em 1em;
    z-index: 1000;
    border-radius: 8px;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
}
.brand-logo, .brand-mark {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    display: block;
    line-height: 1.2;
}
.brand-name a { color: inherit; }
.brand-name a:hover { text-decoration: none; }
.brand-desc {
    font-size: .8rem;
    color: var(--muted);
    display: block;
    max-width: 46ch;
    margin-top: .25rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .5em .7em;
    cursor: pointer;
    color: var(--ink);
    font-size: 1rem;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    color: var(--ink);
    font-weight: 600;
    padding: .3em 0;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover {
    color: var(--accent-dark);
    border-bottom-color: var(--accent);
    text-decoration: none;
}
.main-nav .current-menu-item > a {
    color: var(--accent-dark);
    border-bottom-color: var(--accent);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    font-size: .85rem;
    color: var(--muted);
    padding: 1rem 0 0;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-dark); }
.breadcrumbs .sep { margin: 0 .4em; color: var(--line); }

/* ---------- Layout ---------- */
.site-main { padding: 2.2rem 0 3rem; }

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

/* ---------- Sidebar widgets ---------- */
.sidebar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    color: var(--ink);
}
.sidebar .widget { margin-bottom: 1.8rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title,
.sidebar .widgettitle {
    font-family: var(--serif);
    font-size: 1.1rem;
    margin: 0 0 .9rem;
    color: var(--ink);
    border-bottom: 2px solid var(--accent);
    padding-bottom: .4rem;
    display: inline-block;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li {
    padding: .5rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.sidebar li:last-child { border-bottom: none; }
.sidebar a { color: var(--ink); }
.sidebar a:hover { color: var(--accent-dark); }
.sidebar .post-date,
.sidebar .rss-date { color: var(--muted); font-size: .8rem; }

/* ---------- Cards ---------- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.6rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s ease;
}
.card:hover { transform: translateY(-4px); }
.card-thumb-wrap {
    position: relative;
    overflow: hidden;
}
.card-thumb-wrap a { display: block; }
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.3rem 1.4rem 1.5rem;
}
.card-title { font-size: 1.2rem; margin: 0 0 .5rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent-dark); text-decoration: none; }
.card-meta {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: .7rem;
}
.card-excerpt { color: var(--muted); font-size: .95rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: .9rem;
    font-weight: 600;
    color: var(--accent-dark);
}

/* ---------- Front page ---------- */
.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 58ch; margin-bottom: 1.8rem; }
.section-head .eyebrow {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .72rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: .6rem;
}
.section-lead { color: var(--muted); }

/* Hero (text + illustration) */
.hero {
    background: linear-gradient(180deg, #fbf7f0, var(--bg));
}
.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: center;
    padding: 3.4rem 0;
}
.hero-text h1 { margin-bottom: .6rem; }
.hero-text p { color: var(--muted); font-size: 1.08rem; }
.hero-actions { margin-top: 1.5rem; display: flex; gap: .9rem; flex-wrap: wrap; }
.hero-actions .ghost {
    background: transparent;
    color: var(--accent-dark);
    border: 1px solid var(--accent);
}
.hero-actions .ghost:hover { background: var(--sage-soft); }
.hero-media img {
    width: 100%;
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; gap: 1.8rem; }
}

/* Rubrics card grid */
.rubrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1.4rem;
}
.rubric {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    min-width: 0;
}
.rubric .ico {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--sage-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--sage);
}
.rubric h3 { margin-bottom: .4rem; }
.rubric p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Gallery / mosaic */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
    gap: 1rem;
}
.gallery-grid figure { margin: 0; min-width: 0; }
.gallery-grid figure.wide { grid-column: span 2; }
.gallery-grid figure.tall { grid-row: span 2; }
.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}
@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
    .gallery-grid figure.wide { grid-column: span 2; }
    .gallery-grid figure.tall { grid-row: span 1; }
}

/* FAQ accordion */
.faq { max-width: 820px; }
.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .2rem 1.4rem;
    margin-bottom: .9rem;
}
.faq summary {
    cursor: pointer;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.08rem;
    padding: 1rem 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    color: var(--accent);
    font-size: 1.5rem;
    line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 1rem; }

/* Latest posts wrapper on front */
.front-latest { background: var(--sage-soft); }

/* ---------- Single / page content ---------- */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 2.2rem 2.4rem;
}
.entry-header { margin-bottom: 1.4rem; }
.entry-meta { color: var(--muted); font-size: .85rem; margin-bottom: 1.2rem; }
.entry-thumb {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1.6rem;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    display: block;
}
.entry-content img { border-radius: 10px; }
.entry-content h2 { margin-top: 1.6rem; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
@media (max-width: 600px) {
    .entry { padding: 1.4rem 1.3rem 1.7rem; }
}

/* Tables */
.entry-content table,
.content-area table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
}
.entry-content table th,
.entry-content table td,
.content-area table th,
.content-area table td {
    border: 1px solid var(--line);
    padding: .7em .9em;
    text-align: left;
}
.entry-content table th,
.content-area table th { background: var(--sage-soft); }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin: 2.5rem 0 .5rem;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .7rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
}
.pagination a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* ---------- Comments ---------- */
.comments-area {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem 2rem;
    margin-top: 2rem;
}
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list li { margin-bottom: 1.4rem; }
.comment-body {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1rem 1.2rem;
}
.comment-meta { font-size: .82rem; color: var(--muted); margin-bottom: .4rem; }
.comment-respond {
    margin-top: 1.6rem;
    border-top: 1px solid var(--line);
    padding-top: 1.4rem;
}
.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%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .7em .9em;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    color: var(--ink);
}
.comment-form p { margin-bottom: 1rem; }
.comment-form input[type="submit"],
.search-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: .7em 1.6em;
    font-weight: 600;
    cursor: pointer;
}
.comment-form input[type="submit"]:hover,
.search-form button:hover { background: var(--accent-dark); }

/* ---------- Search form ---------- */
.search-form {
    display: flex;
    gap: .6rem;
}
.search-form input[type="search"] { flex: 1; min-width: 0; }

/* ---------- 404 ---------- */
.notfound {
    text-align: center;
    padding: 3rem 0;
}
.notfound .code {
    font-family: var(--serif);
    font-size: clamp(4rem, 14vw, 7rem);
    color: var(--accent);
    line-height: 1;
    margin: 0;
}
.notfound .search-form { max-width: 460px; margin: 1.8rem auto 0; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
}
.footer-col .widget-title,
.footer-col .widgettitle {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--footer-head);
    margin: 0 0 1rem;
}
.footer-col, .footer-col p { color: var(--footer-ink); }
.footer-col a { color: var(--footer-head); }
.footer-col a:hover { color: #fff; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: .35rem 0; }
.footer-contacts a { color: var(--footer-head); }
.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, .12);
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    font-size: .85rem;
    color: var(--footer-ink);
}
@media (max-width: 960px) {
    .footer-cols { grid-template-columns: 1fr; gap: 1.6rem; }
}

/* ---------- Cookie banner ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--ink);
    color: #f3ece1;
    padding: 1rem 1.2rem;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .18);
}
.cookie-banner p { margin: 0; font-size: .9rem; max-width: 70ch; }
.cookie-banner a { color: #f0c9a8; }
.cookie-banner .btn { padding: .55em 1.4em; }

/* ---------- Responsive nav ---------- */
@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;
        margin-top: .8rem;
    }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav a { display: block; padding: .8em 0; }
    .brand-desc { display: none; }
}
