/*
Theme Name: dds_glitzbeverlyhills.com
Author: Илья Воронцов
Description: Контентно-сервисный сайт о строительстве беседок, бань и комплексном благоустройстве участка: идеи, инструкции, проекты, материалы, планирование и практические решения для владельцев частных домов.
Version: 1.1
Text Domain: glitz
*/

:root {
    --forest: #1A3B2B;
    --forest-soft: #2b4f3c;
    --sand: #F2E8CF;
    --sand-deep: #ead9b0;
    --terracotta: #C86A47;
    --oak: #D9CBB3;
    --honey: #E6B17E;
    --ink: #2a2620;
    --muted: #6b6457;
    --line: #cfc3a8;
    --white: #fbf7ec;
    --shadow: 0 6px 18px rgba(26, 59, 43, 0.12);
    --shadow-lift: 0 10px 26px rgba(26, 59, 43, 0.18);
    --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Georgia, "Playfair Display", "PT Serif", serif;
    color: var(--ink);
    background-color: var(--sand);
    background-image:
        repeating-linear-gradient(45deg, rgba(26,59,43,0.025) 0 2px, transparent 2px 6px),
        repeating-linear-gradient(-45deg, rgba(200,106,71,0.02) 0 2px, transparent 2px 7px);
    line-height: 1.65;
    font-size: 17px;
}

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

a {
    color: var(--terracotta);
    text-decoration: none;
    transition: color .2s ease, opacity .2s ease;
}
a:hover { color: var(--forest); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    font-family: "Playfair Display", Georgia, serif;
    color: var(--forest);
    line-height: 1.25;
    margin: 1.4em 0 0.6em;
    letter-spacing: 0.2px;
}
h1 { font-size: 2.2rem; margin-top: 0.2em; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

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

blockquote {
    border-left: 4px solid var(--terracotta);
    background: rgba(255,255,255,0.55);
    margin: 1.5em 0;
    padding: 0.9em 1.3em;
    font-style: italic;
    color: var(--forest);
}

code, pre {
    font-family: "SF Mono", Consolas, Monaco, monospace;
    background: rgba(26,59,43,0.07);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.92em;
}
pre { padding: 1em; overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid var(--line);
}
th, td {
    border: 1px solid var(--line);
    padding: 0.7em 0.9em;
    text-align: left;
}
th {
    background: var(--oak);
    color: var(--forest);
    font-weight: 600;
}

/* =========== LAYOUT =========== */

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main-wrap { flex: 1; padding: 38px 0 60px; }

/* =========== HEADER =========== */

.site-header {
    background: var(--forest);
    color: var(--sand);
    border-bottom: 4px solid var(--terracotta);
    background-image:
        linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.12) 100%),
        repeating-linear-gradient(135deg, rgba(242,232,207,0.04) 0 1px, transparent 1px 6px);
}

.header-top {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 22px 0 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}
.brand-logo { width: 54px; height: 54px; display: block; }
.brand svg { fill: var(--sand); }

.brand-text { line-height: 1.2; }
.brand-text a {
    color: var(--sand);
    text-decoration: none;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
}
.brand-text a:hover { color: var(--honey); text-decoration: none; }

.brand-slogan {
    display: block;
    font-size: 0.78rem;
    color: var(--honey);
    font-style: italic;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.site-tagline {
    flex: 1;
    font-size: 0.85rem;
    color: rgba(242,232,207,0.75);
    font-style: italic;
    padding-left: 18px;
    border-left: 1px solid rgba(242,232,207,0.2);
    max-width: 560px;
}

.main-nav { background: var(--forest-soft); }
.main-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}
.main-nav li { margin: 0; }
.main-nav a {
    display: block;
    padding: 14px 22px;
    color: var(--sand);
    text-decoration: none;
    font-size: 0.98rem;
    transition: background .2s, color .2s;
    border-bottom: 3px solid transparent;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
    background: rgba(200,106,71,0.22);
    color: var(--honey);
    border-bottom-color: var(--terracotta);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--sand);
    color: var(--sand);
    padding: 8px 14px;
    font-size: 0.92rem;
    cursor: pointer;
    border-radius: 6px;
    font-family: inherit;
}

/* =========== BUTTONS =========== */

.btn, .btn-primary {
    display: inline-block;
    padding: 11px 26px;
    background: var(--terracotta);
    color: #fff !important;
    border: none;
    border-radius: 40px;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(200,106,71,0.32);
    transition: all .25s ease;
    letter-spacing: 0.3px;
}
.btn:hover, .btn-primary:hover {
    background: linear-gradient(90deg, var(--terracotta), var(--honey));
    transform: translateY(-1px);
    box-shadow: var(--shadow-lift);
    color: #fff !important;
}

.btn-ghost {
    display: inline-block;
    padding: 10px 24px;
    background: rgba(26,59,43,0.05);
    color: var(--forest) !important;
    border: 1px solid var(--forest);
    border-radius: 40px;
    text-decoration: none !important;
    font-size: 0.95rem;
    transition: all .25s ease;
}
.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(26,59,43,0.1);
    box-shadow: var(--shadow);
}

/* =========== BREADCRUMBS =========== */

.breadcrumbs {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 22px;
    padding: 10px 0;
}
.breadcrumbs a { color: var(--forest); }
.breadcrumbs a:hover { color: var(--terracotta); }
.breadcrumbs .sep { margin: 0 8px; color: var(--line); }

/* =========== LAYOUT BLOCKS =========== */

.layout-with-sidebar {
    display: grid;
    grid-template-columns: 67% 27%;
    gap: 6%;
    align-items: start;
}
.layout-wide { max-width: 85%; margin: 0 auto; }

.content-area { min-width: 0; }

/* =========== SIDEBAR =========== */

.sidebar { font-size: 0.96rem; }
.widget {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}
.widget-title {
    font-size: 1.1rem;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--terracotta);
    color: var(--forest);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li {
    padding: 6px 0;
    border-bottom: 1px dashed var(--line);
}
.widget li:last-child { border-bottom: none; }

/* =========== CARDS =========== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 26px;
    margin: 30px 0;
}

.card {
    background: var(--oak);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform .3s ease, box-shadow .3s ease;
    border: 1px solid rgba(26,59,43,0.08);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.card-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--sand-deep);
}
.card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: rotate(-1.4deg) scale(1.08);
    transition: transform .4s ease;
}
.card:hover .card-thumb img {
    transform: rotate(0deg) scale(1.04);
}

.card-body {
    flex: 1;
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
}

.card-title {
    margin: 0 0 10px;
    font-size: 1.2rem;
    line-height: 1.3;
}
.card-title a { color: var(--forest); text-decoration: none; }
.card-title a:hover { color: var(--terracotta); }

.card-meta {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 10px;
}
.card-meta a { color: var(--muted); text-decoration: underline; }

.card-excerpt {
    color: var(--ink);
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-more {
    margin-top: 14px;
    align-self: flex-start;
}

/* Horizontal card variant (used on archive/search) */
.card-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    margin-bottom: 22px;
}
.card-row .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.card-row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-row .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-row .card-body { padding: 22px 26px; }

/* =========== SINGLE POST =========== */

.post-article {
    background: var(--white);
    border-radius: var(--radius);
    padding: 34px 38px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}
.post-article .post-thumb {
    margin: 0 -38px 26px;
    display: block;
}
.post-article .post-thumb img {
    width: 100%;
    display: block;
    max-height: 440px;
    object-fit: cover;
}
.post-meta-top {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}
.post-title { margin-top: 6px; }

.post-content {
    margin-top: 22px;
    font-size: 1.03rem;
}
.post-content img { border-radius: 8px; margin: 1em 0; }

.post-tags { margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--line); font-size: 0.9rem; }
.post-tags a {
    display: inline-block;
    background: var(--sand-deep);
    padding: 3px 12px;
    border-radius: 30px;
    margin-right: 6px;
    color: var(--forest);
    text-decoration: none;
}

/* =========== PAGINATION =========== */

.pagination {
    margin: 36px 0 10px;
    text-align: center;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 3px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--forest);
    text-decoration: none;
    border-radius: 6px;
    transition: all .2s;
    font-size: 0.95rem;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--terracotta);
    color: #fff;
    border-color: var(--terracotta);
}

/* =========== FRONT PAGE SECTIONS =========== */

.front-hero {
    background:
        linear-gradient(135deg, rgba(26,59,43,0.85), rgba(26,59,43,0.72)),
        radial-gradient(circle at 80% 20%, rgba(230,177,126,0.5), transparent 60%);
    color: var(--sand);
    padding: 60px 48px;
    border-radius: var(--radius);
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
}
.front-hero h1 {
    color: var(--sand);
    font-size: 2.5rem;
    margin: 0 0 14px;
    max-width: 720px;
}
.front-hero p { max-width: 680px; font-size: 1.08rem; margin-bottom: 22px; }
.front-hero .accent { color: var(--honey); font-style: italic; }

.section-block {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px 38px;
    margin-bottom: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}
.section-block h2 {
    margin-top: 0;
    border-bottom: 2px solid var(--terracotta);
    padding-bottom: 10px;
    display: inline-block;
}

.block-cols-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 18px;
}
.block-cols-3 .col {
    padding: 20px 22px;
    background: var(--sand-deep);
    border-radius: 8px;
    border-left: 4px solid var(--terracotta);
}
.block-cols-3 .col h3 { margin-top: 0; font-size: 1.1rem; }
.block-cols-3 .col p { margin-bottom: 0; font-size: 0.95rem; }

.timeline {
    border-left: 3px solid var(--terracotta);
    padding-left: 22px;
    margin-top: 18px;
}
.timeline-step {
    position: relative;
    padding: 6px 0 16px 8px;
}
.timeline-step::before {
    content: "";
    position: absolute;
    left: -33px;
    top: 12px;
    width: 16px;
    height: 16px;
    background: var(--honey);
    border: 3px solid var(--terracotta);
    border-radius: 50%;
}
.timeline-step h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--forest); }
.timeline-step p { margin: 0; font-size: 0.95rem; color: var(--ink); }

.cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.cat-chips a {
    display: inline-block;
    padding: 8px 18px;
    background: var(--oak);
    color: var(--forest);
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.92rem;
    border: 1px solid transparent;
    transition: all .2s;
}
.cat-chips a:hover {
    background: var(--terracotta);
    color: #fff;
    border-color: var(--terracotta);
}

/* =========== COMMENTS =========== */

.comments-area {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 2px solid var(--line);
}
.comment-list { list-style: none; padding: 0; margin: 0 0 30px; }
.comment-list li {
    background: var(--white);
    padding: 18px 22px;
    margin-bottom: 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
}
.comment-list li ul.children {
    list-style: none;
    margin: 16px 0 0 22px;
    padding-left: 18px;
    border-left: 2px solid var(--oak);
}
.comment-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }
.comment-author { font-weight: 600; color: var(--forest); }

.comment-form label { display: block; margin-bottom: 4px; font-weight: 600; color: var(--forest); font-size: 0.93rem; }
.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(--line);
    border-radius: 6px;
    background: var(--white);
    font-family: inherit;
    font-size: 0.98rem;
    margin-bottom: 14px;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form input[type="submit"] {
    display: inline-block;
    padding: 11px 26px;
    background: var(--terracotta);
    color: #fff;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all .25s;
}
.comment-form input[type="submit"]:hover {
    background: linear-gradient(90deg, var(--terracotta), var(--honey));
    box-shadow: var(--shadow);
}

/* =========== SEARCH FORM =========== */

.search-form {
    display: flex;
    gap: 8px;
    margin: 14px 0;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--white);
    font-family: inherit;
    font-size: 0.96rem;
}
.search-form button {
    padding: 10px 24px;
    background: var(--terracotta);
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}
.search-form button:hover { background: var(--forest); }

/* =========== 404 =========== */

.error-404 {
    text-align: center;
    padding: 40px 20px;
}
.error-404 .big {
    font-size: 6rem;
    color: var(--terracotta);
    line-height: 1;
    margin: 0;
    font-family: "Playfair Display", serif;
}

/* =========== FOOTER =========== */

.site-footer {
    background: var(--forest);
    color: var(--sand);
    padding: 46px 0 0;
    margin-top: 40px;
    background-image: repeating-linear-gradient(135deg, rgba(242,232,207,0.04) 0 1px, transparent 1px 6px);
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
}
.footer-col .widget-title {
    color: var(--honey);
    border-bottom-color: var(--terracotta);
}
.footer-col .widget {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}
.footer-col .widget li { border-bottom-color: rgba(242,232,207,0.15); }
.footer-col a { color: var(--sand); text-decoration: none; }
.footer-col a:hover { color: var(--honey); text-decoration: underline; }

.footer-bottom {
    margin-top: 36px;
    padding: 18px 0;
    border-top: 1px solid rgba(242,232,207,0.15);
    text-align: center;
    font-size: 0.88rem;
    color: rgba(242,232,207,0.7);
}

/* =========== COOKIE BANNER =========== */

.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 720px;
    margin: 0 auto;
    background: var(--forest);
    color: var(--sand);
    padding: 16px 22px;
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    z-index: 9999;
    border: 1px solid var(--terracotta);
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner p { margin: 0; font-size: 0.92rem; flex: 1; }
.cookie-banner button {
    padding: 9px 22px;
    background: var(--terracotta);
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    flex-shrink: 0;
    transition: all .25s;
}
.cookie-banner button:hover {
    background: linear-gradient(90deg, var(--terracotta), var(--honey));
}

/* =========== UTILITIES =========== */

.align-center { text-align: center; }
.mt-1 { margin-top: 1em; }
.mt-2 { margin-top: 2em; }

/* =========== RESPONSIVE =========== */

@media (max-width: 960px) {
    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.45rem; }
    .layout-with-sidebar {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .layout-wide { max-width: 100%; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
    .block-cols-3 { grid-template-columns: 1fr 1fr; }
    .front-hero { padding: 44px 28px; }
    .front-hero h1 { font-size: 2rem; }
    .post-article { padding: 26px 26px; }
    .post-article .post-thumb { margin: 0 -26px 22px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .wrap { padding: 0 16px; }
    .header-top {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 0;
    }
    .site-tagline {
        border-left: none;
        padding-left: 0;
        width: 100%;
    }
    .main-nav-inner { flex-direction: column; align-items: stretch; }
    .menu-toggle {
        display: block;
        margin: 10px 0;
        align-self: flex-end;
    }
    .main-nav ul {
        flex-direction: column;
        display: none;
    }
    .main-nav.is-open ul { display: flex; }
    .main-nav a {
        padding: 12px 18px;
        border-bottom: 1px solid rgba(242,232,207,0.12);
    }

    .posts-grid { grid-template-columns: 1fr; gap: 18px; }
    .footer-cols { grid-template-columns: 1fr; gap: 24px; }
    .block-cols-3 { grid-template-columns: 1fr; }
    .front-hero { padding: 34px 20px; }
    .front-hero h1 { font-size: 1.7rem; }
    .section-block { padding: 24px 20px; }
    .post-article { padding: 20px 18px; }
    .post-article .post-thumb { margin: 0 -18px 18px; }

    .card-row { flex-direction: column; }
    .card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-row .card-thumb-wrap a {
        position: static;
    }
    .card-row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }
}
