/*
Theme Name: dds_themagazineproject.com
Theme URI: https://themagazineproject.com
Author: Алексей Кузнецов
Author URI: https://themagazineproject.com
Description: Тема независимого онлайн-журнала о дизайне интерьера, ремонте и обустройстве жилья. Адаптивная вёрстка, лента статей, виджеты подвала и боковой колонки.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mproj
*/

/* =========================================================================
   1. Базовые переменные и сброс
   ====================================================================== */
:root {
    --bg: #f6f2ec;
    --surface: #ffffff;
    --ink: #2a2521;
    --ink-soft: #5f574e;
    --muted: #897f74;
    --line: #e3dcd1;
    --accent: #b06a4f;
    --accent-dark: #8c5037;
    --accent-soft: #f0e4dc;
    --footer-bg: #221f1d;
    --footer-ink: #e8e1d6;
    --footer-muted: #b3a99b;
    --footer-line: #3a3531;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(42, 37, 33, 0.08);
    --shell: min(92%, 1180px);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: "Helvetica Neue", Arial, sans-serif;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 0.6em;
    font-weight: 700;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
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: var(--shell);
    margin-inline: auto;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* =========================================================================
   2. Шапка
   ====================================================================== */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.brand-logo,
.brand-mark {
    flex: 0 0 auto;
    display: block;
}

.brand-mark {
    width: 52px;
    height: 52px;
}

.brand-text {
    min-width: 0;
}

.brand-name {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    color: var(--ink);
    line-height: 1.3;
    display: block;
    max-width: 540px;
    text-decoration: none;
}

.brand-name:hover {
    text-decoration: none;
    color: var(--accent-dark);
}

.brand-desc {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
    margin-top: 4px;
    max-width: 560px;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

/* Навигация */
.main-nav {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
    color: var(--ink);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 26px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-list a {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.98rem;
    color: var(--ink);
    font-weight: 600;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.nav-list a:hover,
.nav-list .current-menu-item > a {
    color: var(--accent-dark);
    border-bottom-color: var(--accent);
    text-decoration: none;
}

/* =========================================================================
   3. Каркас контента
   ====================================================================== */
.site-main {
    padding: 36px 0 56px;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 48px;
    align-items: start;
}

.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

/* Хлебные крошки */
.breadcrumbs {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 22px;
}

.breadcrumbs a {
    color: var(--ink-soft);
}

.breadcrumbs .sep {
    margin: 0 6px;
    color: var(--muted);
}

/* =========================================================================
   4. Карточки записей
   ====================================================================== */
.card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card-thumb-wrap {
    display: block;
    overflow: hidden;
}

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

.card-thumb-ph {
    background: linear-gradient(135deg, var(--accent-soft), #e7d9cd);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-dark);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px 24px 24px;
    min-width: 0;
}

.card-meta {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-dark);
    margin-bottom: 8px;
}

.card-title {
    font-size: 1.35rem;
    margin: 0 0 10px;
}

.card-title a {
    color: var(--ink);
}

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

.card-excerpt {
    color: var(--ink-soft);
    font-size: 1rem;
    margin-bottom: 16px;
}

.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;
    font-size: 0.92rem;
    color: var(--accent-dark);
    border-bottom: 2px solid var(--accent-soft);
    padding-bottom: 2px;
}

.card-more:hover {
    border-bottom-color: var(--accent);
    text-decoration: none;
}

/* =========================================================================
   5. Одиночная запись и страница
   ====================================================================== */
.entry-header {
    margin-bottom: 24px;
}

.entry-title {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.entry-meta {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
}

.entry-featured {
    margin: 0 0 28px;
    border-radius: var(--radius);
    overflow: hidden;
}

.entry-featured img {
    display: block;
    width: 100%;
    object-fit: cover;
}

.entry-content {
    font-size: 1.08rem;
}

.entry-content img {
    border-radius: 8px;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 1.4em;
}

.entry-content blockquote {
    margin: 1.4em 0;
    padding: 14px 24px;
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
    color: var(--ink);
    font-style: italic;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
}

.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
}

.entry-content th,
.entry-content td {
    padding: 10px 14px;
    text-align: left;
}

.entry-content th {
    background: var(--accent-soft);
}

/* =========================================================================
   6. Боковая колонка (светлый фон — тёмный текст)
   ====================================================================== */
.sidebar {
    min-width: 0;
}

.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 22px 24px;
    margin-bottom: 26px;
    color: var(--ink);
}

.sidebar .widget-title {
    font-size: 1.05rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-soft);
    color: var(--ink);
}

.sidebar .widget a {
    color: var(--ink);
}

.sidebar .widget a:hover {
    color: var(--accent-dark);
}

.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar li {
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.96rem;
}

.sidebar li:last-child {
    border-bottom: none;
}

.sidebar .post-date {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 3px;
}

/* =========================================================================
   7. Главная страница
   ====================================================================== */
.home-section {
    padding: 56px 0;
}

.home-section + .home-section {
    border-top: 1px solid var(--line);
}

.section-head {
    max-width: 720px;
    margin-bottom: 32px;
}

.section-kicker {
    font-family: "Helvetica Neue", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: var(--accent-dark);
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2rem;
}

/* Слайдер */
.slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.slider-track {
    position: relative;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.slide.is-active {
    position: relative;
    opacity: 1;
}

.slide img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 32px;
    background: linear-gradient(to top, rgba(20, 17, 15, 0.78), rgba(20, 17, 15, 0));
    color: #fff;
}

.slide-caption h3 {
    color: #fff;
    margin: 0 0 6px;
    font-size: 1.5rem;
}

.slide-caption p {
    color: #f1e8df;
    margin: 0;
    max-width: 560px;
    font-size: 1rem;
}

.slider-dots {
    position: absolute;
    bottom: 16px;
    right: 24px;
    display: flex;
    gap: 8px;
}

.slider-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
}

.slider-dot.is-active {
    background: #fff;
}

/* Текст + иллюстрация */
.feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.feature.reverse .feature-media {
    order: 2;
}

.feature-media img,
.feature-media svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.feature-body {
    min-width: 0;
}

/* Сетка рубрик */
.tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.tile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 26px;
    box-shadow: var(--shadow);
    min-width: 0;
}

.tile-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 16px;
}

.tile h3 {
    margin-bottom: 8px;
}

.tile p {
    color: var(--ink-soft);
    font-size: 0.98rem;
    margin: 0;
}

/* Пошаговый блок */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    counter-reset: step;
}

.step {
    min-width: 0;
}

.step-num {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--accent);
    border-bottom: 3px solid var(--accent-soft);
    padding-bottom: 10px;
    margin-bottom: 14px;
    display: inline-block;
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.step p {
    color: var(--ink-soft);
    font-size: 0.96rem;
    margin: 0;
}

/* Лента последних записей на главной */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.section-cta {
    margin-top: 32px;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    font-size: 0.98rem;
    padding: 13px 26px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent-dark);
    color: #fff;
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--accent-dark);
    border: 2px solid var(--accent);
}

.btn-ghost:hover {
    background: var(--accent);
    color: #fff;
}

/* =========================================================================
   8. Пагинация (type => plain, .page-numbers)
   ====================================================================== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    justify-content: center;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
}

.pagination a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* =========================================================================
   9. Комментарии и форма поиска
   ====================================================================== */
.comments-area {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .children {
    list-style: none;
    margin-left: 28px;
    padding-left: 20px;
    border-left: 2px solid var(--line);
}

.comment-item {
    margin-bottom: 22px;
}

.comment-inner {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.85rem;
}

.comment-author {
    font-weight: 700;
    color: var(--ink);
}

.comment-date {
    color: var(--muted);
}

.search-form {
    display: flex;
    gap: 10px;
    max-width: 480px;
}

.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--surface);
    color: var(--ink);
}

.search-form .search-submit {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    cursor: pointer;
}

.search-form .search-submit:hover {
    background: var(--accent-dark);
}

/* =========================================================================
   10. Подвал (тёмный фон — светлый текст виджетов)
   ====================================================================== */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 52px 0 28px;
    margin-top: 40px;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}

.footer-cols .widget {
    color: var(--footer-ink);
    margin-bottom: 0;
}

.footer-cols .widget-title {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 1.02rem;
    color: #fff;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--footer-line);
}

.footer-cols .widget,
.footer-cols .widget p {
    font-size: 0.96rem;
    color: var(--footer-ink);
}

.footer-cols .widget a {
    color: var(--footer-ink);
}

.footer-cols .widget a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-cols ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-cols li {
    padding: 7px 0;
    border-bottom: 1px solid var(--footer-line);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
}

.footer-cols li:last-child {
    border-bottom: none;
}

.footer-cols .post-date {
    display: block;
    color: var(--footer-muted);
    font-size: 0.78rem;
    margin-top: 3px;
}

.footer-bottom {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--footer-line);
    color: var(--footer-muted);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.85rem;
    text-align: center;
}

/* =========================================================================
   11. Cookie-баннер
   ====================================================================== */
.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 999;
    background: var(--footer-bg);
    color: var(--footer-ink);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.cookie-banner p {
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.92rem;
    color: var(--footer-ink);
    flex: 1;
    min-width: 220px;
}

.cookie-banner a {
    color: #fff;
    text-decoration: underline;
}

.cookie-accept {
    flex: 0 0 auto;
}

/* =========================================================================
   12. 404
   ====================================================================== */
.error-404 {
    text-align: center;
    padding: 40px 0;
}

.error-404 .code {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.error-404 .search-form {
    margin: 24px auto;
}

/* =========================================================================
   13. Адаптив
   ====================================================================== */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .latest-grid,
    .tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .feature.reverse .feature-media {
        order: 0;
    }

    .footer-cols {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 17px;
    }

    .menu-toggle {
        display: inline-block;
    }

    .main-nav {
        width: 100%;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin-top: 12px;
    }

    .nav-list.is-open {
        display: flex;
    }

    .nav-list li {
        border-bottom: 1px solid var(--line);
    }

    .nav-list a {
        display: block;
        padding: 12px 0;
        border-bottom: none;
    }

    .layout-single .content-area {
        width: 100%;
    }

    .latest-grid,
    .tiles,
    .steps,
    .footer-cols {
        grid-template-columns: 1fr;
    }

    .entry-title {
        font-size: 1.7rem;
    }

    .slide-caption {
        padding: 18px 18px;
    }

    .slide-caption h3 {
        font-size: 1.15rem;
    }

    .slide img {
        aspect-ratio: 4 / 5;
    }
}
