/*
Theme Name: dds_creativesintransit.com
Author: Анна Смирнова
Description: Экспертная тема о визуальном маркетинге и хоумстейджинге недвижимости — кейсы, руководства, портфолио.
Version: 1.2
Text Domain: citransit
*/

/* ==========================================================================
   Переменные
   ========================================================================== */
:root {
    --ink:        #24282c;
    --ink-soft:   #55606a;
    --cream:      #f6f1ea;
    --cream-2:    #efe7db;
    --paper:      #fffdf9;
    --deep:       #2c4a48;
    --deep-2:     #22393a;
    --clay:       #bd6f4c;
    --clay-soft:  #d9a482;
    --line:       #e0d6c7;
    --shell:      min(92%, 1180px);
    --radius:     12px;
    --shadow:     0 14px 40px rgba(34, 41, 45, 0.10);
    --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;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--cream);
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--serif);
    line-height: 1.22;
    color: var(--ink);
    margin: 0 0 0.6em;
    font-weight: 700;
}
h1 { font-size: 2.15rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

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

.btn {
    display: inline-block;
    padding: 0.72em 1.5em;
    background: var(--clay);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--sans);
    transition: background 0.2s ease;
}
.btn:hover { background: #a75d3c; text-decoration: none; }

.btn-ghost {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.75);
    color: #fff;
}
.btn-ghost:hover { background: rgba(255,255,255,0.14); }

/* ==========================================================================
   Шапка
   ========================================================================== */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.05rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}
.brand-logo { display: block; height: 52px; width: auto; }
.brand-figure { display: block; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.25;
    color: var(--ink);
    max-width: 30ch;
}
.brand-desc {
    display: block;
    font-size: 0.82rem;
    color: var(--ink-soft);
    line-height: 1.4;
    margin-top: 2px;
    max-width: 46ch;
}
.brand:hover { text-decoration: none; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    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;
    font-size: 0.98rem;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover {
    color: var(--clay);
    border-bottom-color: var(--clay);
    text-decoration: none;
}
.main-nav .current-menu-item > a {
    color: var(--deep);
    border-bottom-color: var(--deep);
}

/* ==========================================================================
   Крошки
   ========================================================================== */
.crumbs {
    font-size: 0.86rem;
    color: var(--ink-soft);
    padding: 1rem 0 0.2rem;
}
.crumbs a { color: var(--deep); }
.crumbs .sep { color: var(--clay-soft); margin: 0 0.15rem; }

/* ==========================================================================
   Раскладки
   ========================================================================== */
.site-main { padding: 1.4rem 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.4rem; }
    .layout-single .content-area { width: 100%; }
}

/* ==========================================================================
   Карточки записей (A8, A10)
   ========================================================================== */
.card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
@media (min-width: 601px) {
    .card {
        flex-direction: row;
    }
    .card-thumb-wrap {
        flex: 0 0 300px;
        position: relative;
        overflow: hidden;
    }
    .card-thumb-wrap a {
        display: block;
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
    }
    .card-thumb-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}
.card-thumb-wrap { background: var(--cream-2); }
.card-thumb-wrap img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-body {
    flex: 1;
    min-width: 0;
    padding: 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
}
.card-title {
    font-size: 1.3rem;
    margin: 0 0 0.4rem;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--clay); text-decoration: none; }
.card-meta {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-bottom: 0.6rem;
}
.card-excerpt { color: var(--ink-soft); font-size: 0.96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 0.6rem;
    font-weight: 600;
    font-size: 0.92rem;
}

@media (max-width: 600px) {
    .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-thumb-wrap a { position: static; }
    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* ==========================================================================
   Пагинация (D5)
   ========================================================================== */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 2.2rem;
    justify-content: center;
}
.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(--paper);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
}
.pager a.page-numbers:hover {
    border-color: var(--clay);
    color: var(--clay);
    text-decoration: none;
}
.pager .page-numbers.current {
    background: var(--deep);
    border-color: var(--deep);
    color: #fff;
}
.pager .page-numbers.dots {
    border: none;
    background: none;
}

/* ==========================================================================
   Записи и страницы
   ========================================================================== */
.entry {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 2.2rem;
    box-shadow: var(--shadow);
}
.entry-header { margin-bottom: 1.3rem; }
.entry-title { font-size: 2rem; }
.entry-meta {
    font-size: 0.86rem;
    color: var(--ink-soft);
    margin-top: 0.3rem;
}
.entry-thumb {
    margin: 0 0 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
}
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content { min-width: 0; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.6rem; }
.entry-content blockquote {
    margin: 1.5rem 0;
    padding: 1.2rem 1.6rem;
    background: var(--cream-2);
    border-left: 4px solid var(--clay);
    border-radius: 8px;
    font-style: italic;
}
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }

.tags-line {
    margin-top: 1.6rem;
    font-size: 0.88rem;
    color: var(--ink-soft);
}
.tags-line a {
    display: inline-block;
    background: var(--cream-2);
    color: var(--deep);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    margin: 0.2rem 0.2rem 0.2rem 0;
    font-size: 0.82rem;
}
.tags-line a:hover { text-decoration: none; background: var(--clay-soft); color: #fff; }

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 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(--cream-2); }

/* ==========================================================================
   Сайдбар (F: явный контраст)
   ========================================================================== */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.6rem;
}
.sidebar .widget-title {
    font-size: 1.1rem;
    color: var(--ink);
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--clay-soft);
}
.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: var(--ink); }
.sidebar .widget a { color: var(--deep); }
.sidebar .widget a:hover { color: var(--clay); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
}
.sidebar li:last-child { border-bottom: none; }
.sidebar .post-date {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 2px;
}

/* ==========================================================================
   Главная
   ========================================================================== */
.front .site-main { padding-top: 0; }

/* Слайдер (hero) */
.hero-slider {
    position: relative;
    overflow: hidden;
}
.slides { position: relative; }
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}
.slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}
.slide img {
    display: block;
    width: 100%;
    height: 520px;
    object-fit: cover;
}
.slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 2.4rem 0;
    background: linear-gradient(to top, rgba(24,32,32,0.82), rgba(24,32,32,0));
    color: #fff;
}
.slide-caption .shell { color: #fff; }
.slide-caption h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.4rem;
    max-width: 20ch;
}
.slide-caption p {
    color: #f1e9df;
    max-width: 52ch;
    margin-bottom: 0;
}
.slider-dots {
    position: absolute;
    bottom: 1.1rem;
    right: 0;
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}
.slider-dots .shell {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.slider-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 0;
}
.slider-dot.is-active { background: #fff; }
@media (max-width: 600px) {
    .slide img { height: 340px; }
    .slide-caption h2 { font-size: 1.4rem; }
}

/* Секции главной */
.front-section { padding: 3.2rem 0; }
.front-section.alt { background: var(--cream-2); }
.section-head { text-align: center; max-width: 62ch; margin: 0 auto 2rem; }
.section-head p { color: var(--ink-soft); }

/* Блок: текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media img,
.split-media svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.split-text h2 { margin-bottom: 0.7rem; }
.split-text p { color: var(--ink-soft); }
@media (max-width: 800px) {
    .split { grid-template-columns: 1fr; gap: 1.6rem; }
    .split.reverse .split-media { order: 0; }
}

/* Блок: сетка иконок/тезисов */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}
.feature {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.7rem 1.6rem;
    box-shadow: var(--shadow);
}
.feature-icon {
    width: 52px; height: 52px;
    display: block;
    margin-bottom: 0.9rem;
}
.feature h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.feature p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
@media (max-width: 800px) { .feature-grid { grid-template-columns: 1fr; } }

/* Блок: шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
    counter-reset: step;
}
.step {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.4rem 1.4rem;
    position: relative;
    box-shadow: var(--shadow);
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--deep);
    color: #fff;
    font-family: var(--serif);
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.step h3 { font-size: 1.08rem; margin-bottom: 0.3rem; }
.step p { color: var(--ink-soft); font-size: 0.93rem; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Блок: галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
.gallery-grid figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.gallery-grid img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-grid figure:hover img { transform: scale(1.05); }
.gallery-grid .wide { grid-column: span 2; }
@media (max-width: 800px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid .wide { grid-column: span 2; }
}
@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-grid .wide { grid-column: span 1; }
}

/* Блок: статистика */
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
    text-align: center;
}
.stat {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1rem;
}
.stat-num {
    font-family: var(--serif);
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--clay);
    line-height: 1;
}
.stat-label { color: var(--ink-soft); font-size: 0.92rem; margin-top: 0.4rem; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Блок: цитата */
.pull-quote {
    background: var(--deep);
    color: #fff;
    border-radius: var(--radius);
    padding: 3rem 2.6rem;
    text-align: center;
}
.pull-quote blockquote {
    margin: 0 auto;
    max-width: 44ch;
    font-family: var(--serif);
    font-size: 1.55rem;
    line-height: 1.4;
    color: #fff;
}
.pull-quote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-size: 0.95rem;
    color: var(--clay-soft);
    font-family: var(--sans);
}
@media (max-width: 600px) {
    .pull-quote { padding: 2rem 1.4rem; }
    .pull-quote blockquote { font-size: 1.2rem; }
}

/* Блок: CTA */
.cta {
    background: var(--deep-2);
    color: #fff;
    border-radius: var(--radius);
    padding: 2.8rem 2.4rem;
    text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #e6ded2; max-width: 56ch; margin: 0 auto 1.4rem; }
.cta-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
@media (max-width: 600px) {
    .cta { padding: 2rem 1.4rem; }
}

/* Последние записи на главной */
.front-latest .card-list { max-width: 900px; margin-inline: auto; }

/* ==========================================================================
   Комментарии
   ========================================================================== */
.comments-area {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem 2rem;
    margin-top: 1.8rem;
    box-shadow: var(--shadow);
}
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ul.children { list-style: none; margin: 0 0 0 1.6rem; padding: 0; }
.comment-item { margin-bottom: 1.2rem; }
.comment-inner {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem 1.2rem;
}
.comment-meta { font-size: 0.86rem; margin-bottom: 0.4rem; }
.comment-author { font-weight: 700; color: var(--ink); }
.comment-date { color: var(--ink-soft); margin-left: 0.6rem; }
.comment-text { color: var(--ink); }
.comment-reply a { font-size: 0.85rem; font-weight: 600; }

.comment-form label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: var(--sans);
    font-size: 0.95rem;
    background: var(--paper);
    margin-bottom: 1rem;
}
.comment-form textarea { min-height: 120px; }

/* ==========================================================================
   Форма поиска
   ========================================================================== */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 460px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--paper);
}
.search-form .search-submit {
    padding: 0.65rem 1.2rem;
    border: none;
    border-radius: 8px;
    background: var(--clay);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.search-form .search-submit:hover { background: #a75d3c; }

/* ==========================================================================
   404
   ========================================================================== */
.error-404 {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 3rem 2.2rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.error-404 .code {
    font-family: var(--serif);
    font-size: 4.5rem;
    color: var(--clay);
    line-height: 1;
    margin-bottom: 0.5rem;
}
.error-404 .search-form { margin: 1.6rem auto; }

/* ==========================================================================
   Подвал
   ========================================================================== */
.site-footer {
    background: var(--deep-2);
    color: #e8e0d4;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
    padding: 3rem 0 2rem;
}
.footer-cols .widget { margin-bottom: 0; min-width: 0; }
.footer-cols .widget-title {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.9rem;
}
.footer-cols .widget,
.footer-cols .widget p,
.footer-cols .widget li { color: #d9d0c3; }
.footer-cols .widget a { color: #f0cbb2; }
.footer-cols .widget a:hover { color: #fff; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { padding: 0.35rem 0; font-size: 0.94rem; }
.footer-cols .post-date { display: block; font-size: 0.78rem; color: #b7ad9e; }
@media (max-width: 800px) { .footer-cols { grid-template-columns: 1fr; gap: 1.8rem; } }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 1.2rem 0;
    font-size: 0.85rem;
    color: #b7ad9e;
    text-align: center;
}

/* ==========================================================================
   Cookie-баннер (A11, D6)
   ========================================================================== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--ink);
    color: #f2ece2;
    padding: 1rem 0;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.22);
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-inner p { margin: 0; font-size: 0.9rem; min-width: 0; }
.cookie-inner a { color: var(--clay-soft); }
.cookie-accept {
    padding: 0.6rem 1.4rem;
    background: var(--clay);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: #a75d3c; }

/* ==========================================================================
   Служебное
   ========================================================================== */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.page-head { margin-bottom: 1.4rem; }
.archive-desc { color: var(--ink-soft); }
.comments-title { font-size: 1.3rem; margin-bottom: 1rem; }
.no-comments { color: var(--ink-soft); }
.page-links { margin-top: 1rem; font-weight: 600; }
.page-links a { margin: 0 0.2rem; }

/* ==========================================================================
   Адаптив шапки
   ========================================================================== */
@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .main-nav {
        flex-basis: 100%;
        display: none;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0.2rem; }
    .main-nav a { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
}
