/*
Theme Name: dds_sencillio.com
Author: Анна Бельская
Description: Онлайн-журнал о дизайне интерьеров и архитектурной эстетике, выросший из издания о французской моде и сохранивший подход глянца к деталям и стилю.
Version: 1.1
Text Domain: sencillio
*/

/* ================================================================
   Переменные и база
   ================================================================ */
:root {
    --bg:          #f6f2ec;
    --surface:     #ffffff;
    --surface-alt: #efe9df;
    --ink:         #262019;
    --ink-soft:    #4b4238;
    --muted:       #766a58;
    --line:        #e2dacc;
    --accent:      #a8703f;
    --accent-deep: #855526;
    --dark:        #221e18;
    --dark-soft:   #2e2820;
    --on-dark:     #ece4d6;
    --on-dark-mut: #b3a893;
    --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
    --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --shell: min(90%, 1180px);
}

*, *::before, *::after { 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, h5, h6 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 0.6em;
    letter-spacing: 0.2px;
}
h1 { font-size: 2.3rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }

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

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

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

/* Кнопки / ссылки-действия */
.btn {
    display: inline-block;
    padding: 0.7em 1.6em;
    background: var(--accent);
    color: #fff;
    font-family: var(--sans);
    font-size: 0.95rem;
    letter-spacing: 0.4px;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.btn:hover { background: var(--accent-deep); color: #fff; text-decoration: none; }

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* Таблицы */
table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; }
table, th, td { border: 1px solid var(--line); }
th, td { padding: 0.6em 0.8em; text-align: left; }
th { background: var(--surface-alt); }

/* ================================================================
   Шапка
   ================================================================ */
.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;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo, .brand-svg { flex: 0 0 auto; }
.brand-svg { width: 46px; height: 46px; }
.brand-text { min-width: 0; }
.site-title {
    display: block;
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.25;
    color: var(--ink);
    margin: 0;
    max-width: 42ch;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.site-desc {
    display: none;
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0.2rem 0 0;
    max-width: 52ch;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
}
.main-nav a {
    font-size: 0.98rem;
    color: var(--ink-soft);
    letter-spacing: 0.3px;
    padding: 0.3em 0;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--accent-deep);
    border-bottom-color: var(--accent);
    text-decoration: none;
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 34px;
    padding: 7px 6px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 3px;
    cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

/* ================================================================
   Общий каркас содержимого
   ================================================================ */
.site-main { padding: 2.2rem 0 3rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: start;
}
.layout-single { display: block; }
.content-area { min-width: 0; }

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0 0 1.6rem;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-deep); }
.breadcrumbs .sep { margin: 0 0.35em; color: var(--line); }
.breadcrumbs span { color: var(--ink-soft); }

.page-header { margin-bottom: 1.8rem; }
.page-title { margin: 0; }

/* Проза записей и страниц */
.entry-content { max-width: 780px; }
.entry-content img { border-radius: 4px; margin: 1.4rem 0; }
.entry-content h2 { margin-top: 1.8rem; }
.entry-content blockquote {
    margin: 1.6rem 0;
    padding: 1.2rem 1.6rem;
    background: var(--surface-alt);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
    font-family: var(--serif);
    font-style: italic;
    color: var(--ink-soft);
}
.entry-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
}
.entry-thumb { margin: 0 0 1.6rem; border-radius: 6px; overflow: hidden; }
.entry-thumb img { width: 100%; height: auto; display: block; }

/* ================================================================
   Карточки записей (A8, A10)
   ================================================================ */
.post-list { display: grid; gap: 1.6rem; }

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}
.card-thumb-wrap {
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.card-thumb-wrap a { display: block; }
.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.3rem 1.4rem 1.5rem;
    min-width: 0;
}
.card-title { font-size: 1.3rem; margin: 0 0 0.5rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent-deep); text-decoration: none; }
.card-meta { font-size: 0.8rem; color: var(--muted); margin: 0 0 0.7rem; }
.card-excerpt { color: var(--ink-soft); font-size: 0.98rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--accent-deep);
}

/* Горизонтальные карточки в ленте блога/архивов */
.post-list--rows .card { flex-direction: row; }
.post-list--rows .card-thumb-wrap {
    flex: 0 0 300px;
    aspect-ratio: auto;
}
.post-list--rows .card-thumb-wrap a {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

/* ================================================================
   Пагинация (D5) — type: plain, стили на .page-numbers
   ================================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 2.4rem 0 0;
}
.pagination .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: 4px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 0.95rem;
    text-decoration: none;
}
.pagination a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent-deep);
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: 0;
    background: transparent;
}

/* ================================================================
   Главная
   ================================================================ */
.front-section { padding: 3rem 0; }
.section-head { max-width: 60ch; margin: 0 0 1.8rem; }
.section-head .eyebrow {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-deep);
    margin-bottom: 0.6rem;
}
.section-title { margin: 0 0 0.4rem; }
.section-sub { color: var(--muted); margin: 0; }

/* Слайдер */
.hero {
    position: relative;
    background: var(--dark);
    overflow: hidden;
}
.slider { position: relative; }
.slides { position: relative; }
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.slide.is-active { position: relative; opacity: 1; }
.slide img {
    width: 100%;
    height: clamp(340px, 52vh, 620px);
    object-fit: cover;
    display: block;
}
.slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 2.4rem 2rem 2.2rem;
    background: linear-gradient(to top, rgba(20, 17, 13, 0.72), rgba(20, 17, 13, 0));
    color: #fff;
}
.slide-caption .caption-inner { width: var(--shell); margin-inline: auto; max-width: 640px; }
.slide-caption h2 { color: #fff; font-size: clamp(1.6rem, 3.5vw, 2.6rem); margin: 0 0 0.4rem; }
.slide-caption p { color: rgba(255, 255, 255, 0.86); margin: 0; max-width: 46ch; }

.slider-dots {
    position: absolute;
    left: 0; right: 0; bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 3;
}
.slider-dots button {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
}
.slider-dots button.is-active { background: #fff; }
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 0;
    background: rgba(20, 17, 13, 0.4);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 3;
}
.slider-arrow:hover { background: rgba(20, 17, 13, 0.7); }
.slider-arrow.prev { left: 1rem; }
.slider-arrow.next { right: 1rem; }

/* Текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: center;
}
.split.reverse .split-media { order: -1; }
.split-media img { width: 100%; border-radius: 8px; }
.split-body p { color: var(--ink-soft); }

/* Сетка рубрик */
.rubrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}
.rubric {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.6rem 1.5rem;
    min-width: 0;
}
.rubric .rubric-icon { color: var(--accent); margin-bottom: 0.8rem; }
.rubric h3 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.rubric p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* CTA (A14 — фон + горизонтальный padding) */
.cta {
    background: var(--dark);
    color: var(--on-dark);
    border-radius: 12px;
    padding: 2.8rem 2.6rem;
    text-align: center;
}
.cta h2 { color: #fff; margin: 0 0 0.6rem; }
.cta p { color: var(--on-dark-mut); max-width: 52ch; margin: 0 auto 1.4rem; }

/* Блок последних записей на главной */
.latest .post-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ================================================================
   Сайдбар и виджеты
   ================================================================ */
.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.4rem 1.4rem 1.5rem;
    margin: 0 0 1.6rem;
    color: var(--ink-soft);
}
.sidebar .widget-title {
    font-size: 1.1rem;
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--ink-soft); }
.sidebar .widget a:hover { color: var(--accent-deep); }
.sidebar .widget .post-date { display: block; font-size: 0.78rem; color: var(--muted); }

/* ================================================================
   Хлебные крошки на 404 / поиске уже покрыты выше
   404
   ================================================================ */
.error-404 { text-align: center; padding: 2rem 0 3rem; }
.error-404 .code { font-family: var(--serif); font-size: 5rem; color: var(--accent); line-height: 1; }
.error-404 .search-wrap { max-width: 460px; margin: 1.6rem auto 0; }

/* ================================================================
   Форма поиска
   ================================================================ */
.search-form { display: flex; gap: 0.5rem; }
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 0.65em 0.9em;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    font-size: 0.95rem;
    color: var(--ink);
}
.search-form .search-submit { white-space: nowrap; }

/* ================================================================
   Комментарии
   ================================================================ */
.comments-area { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 1.4rem; padding: 1rem 0 0; }
.comment-body {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.1rem 1.3rem 1.2rem;
    margin-bottom: 1rem;
}
.comment-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.comment-author { font-weight: 600; }
.comment-date { font-size: 0.8rem; color: var(--muted); }
.comment-await { font-size: 0.85rem; color: var(--accent-deep); }
.comment-reply a { font-size: 0.85rem; font-weight: 600; }
.comment-respond {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.5rem 1.6rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6em 0.8em;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg);
    font-family: inherit;
    font-size: 0.95rem;
    margin-top: 0.3rem;
}
.comment-form p { margin-bottom: 0.9rem; }

/* ================================================================
   Cookie-баннер (D6, A11) — правило [hidden] ДО основного блока
   ================================================================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 960px;
    margin-inline: auto;
    padding: 1rem 1.4rem;
    background: var(--dark);
    color: var(--on-dark);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(20, 17, 13, 0.25);
    font-size: 0.9rem;
}
.cookie-banner p { margin: 0; flex: 1; min-width: 220px; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner .cookie-accept { flex: 0 0 auto; }

/* ================================================================
   Подвал (E2) — тёмный фон, светлый текст виджетов
   ================================================================ */
.site-footer { background: var(--dark); color: var(--on-dark); margin-top: 2rem; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
    padding: 3rem 0 2.4rem;
}
.site-footer .widget { color: var(--on-dark-mut); margin: 0; }
.site-footer .widget-title {
    font-size: 1.05rem;
    color: var(--on-dark);
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.site-footer .widget p { color: var(--on-dark-mut); }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: 0.35rem 0; }
.site-footer .widget a { color: var(--on-dark); }
.site-footer .widget a:hover { color: #fff; }
.site-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.2rem 0;
    font-size: 0.82rem;
    color: var(--on-dark-mut);
    text-align: center;
}

/* ================================================================
   Адаптив
   ================================================================ */
@media (min-width: 960px) {
    .site-desc { display: block; }
}

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .split { grid-template-columns: minmax(0, 1fr); }
    .split.reverse .split-media { order: 0; }
    .rubrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .latest .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }

    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        left: 0; right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        padding: 0.6rem 0;
        z-index: 50;
    }
    .site-header { position: relative; }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; width: var(--shell); margin-inline: auto; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav li:last-child { border-bottom: 0; }
    .main-nav a { display: block; padding: 0.7em 0; border-bottom: 0; }

    .rubrics { grid-template-columns: minmax(0, 1fr); }
    .latest .post-list { grid-template-columns: minmax(0, 1fr); }

    .cta { padding: 2rem 1.4rem; }

    /* Горизонтальные карточки → вертикальные (A10) */
    .post-list--rows .card { flex-direction: column; }
    .post-list--rows .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
        aspect-ratio: 16 / 9;
    }
    .post-list--rows .card-thumb-wrap a { position: static; }
    .post-list--rows .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .slider-arrow { display: none; }
}
