/*
Theme Name: dds_florenaux.com
Author: Анна Соколова
Description: Мультитематический блог о комплексном обустройстве жилья: ремонт, дизайн интерьера, декор и озеленение помещений. Адаптивная информационная тема без коммерческих блоков.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: fln
*/

/* ==========================================================================
   Переменные и базовые стили
   ========================================================================== */
:root {
    --bg: #f7f4ef;
    --ink: #2c2722;
    --muted: #6f665b;
    --leaf: #4a7c59;
    --leaf-dark: #345a41;
    --clay: #c2774f;
    --line: #e4ddd3;
    --card: #ffffff;
    --foot-bg: #232019;
    --foot-ink: #cbc1b3;
    --foot-head: #f3ede3;
    --foot-line: #3a342c;
    --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a { color: var(--leaf-dark); }
a:hover { color: var(--leaf); }

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

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 10px 16px;
    z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ==========================================================================
   Кнопки
   ========================================================================== */
.btn {
    display: inline-block;
    background: var(--leaf);
    color: #fff;
    text-decoration: none;
    padding: 11px 22px;
    border: 1px solid var(--leaf);
    border-radius: 9px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn:hover { background: var(--leaf-dark); border-color: var(--leaf-dark); color: #fff; }
.btn-outline {
    background: transparent;
    color: var(--leaf-dark);
}
.btn-outline:hover { background: var(--leaf); color: #fff; }

/* ==========================================================================
   Шапка
   ========================================================================== */
.site-head {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.head-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-logo-link { flex: 0 0 auto; display: inline-flex; }
.brand-mark, .brand-logo { display: block; height: 48px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    text-decoration: none;
    max-width: 640px;
}
.brand-name:hover { color: var(--leaf); }
.brand-desc {
    margin: 4px 0 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--muted);
    max-width: 640px;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font: inherit;
    color: var(--ink);
    align-self: flex-start;
}
.nav-toggle-bar {
    width: 18px;
    height: 2px;
    background: var(--ink);
    position: relative;
}
.nav-toggle-bar::before, .nav-toggle-bar::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--ink);
}
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

.primary-nav { display: none; }
.primary-nav.is-open { display: block; }
.nav-list {
    list-style: none;
    margin: 0;
    padding: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.nav-list a {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
}
.nav-list a:hover { color: var(--leaf); }
.nav-list .current-menu-item > a { color: var(--leaf-dark); }

/* ==========================================================================
   Основной контейнер страниц
   ========================================================================== */
.site-main { display: block; }
.page-wrap { padding: 28px 0 56px; }

.crumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 22px;
}
.crumbs a { color: var(--leaf-dark); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { margin: 0 6px; color: var(--muted); }

.layout-single { display: block; }
.layout-single .content-area {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
}
.content-area { min-width: 0; }
.sidebar { min-width: 0; }

.page-title { font-size: 1.9rem; }
.archive-head { margin-bottom: 28px; }
.archive-desc { color: var(--muted); }

/* ==========================================================================
   Карточки записей
   ========================================================================== */
.posts-list, .latest-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-thumb-wrap { display: block; }
.card-thumb-wrap a { display: block; }
.card-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 22px;
    min-width: 0;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 8px;
}
.card-cat a { color: var(--clay); text-decoration: none; }
.card-title { font-size: 1.25rem; margin: 0 0 0.4em; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--leaf); }
.card-excerpt { color: var(--muted); font-size: 0.96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 12px;
    font-weight: 600;
    color: var(--leaf-dark);
    text-decoration: none;
    align-self: flex-start;
}
.card-more:hover { color: var(--leaf); }

.no-posts, .latest-empty { color: var(--muted); }
.latest-all { margin-top: 30px; }

/* ==========================================================================
   Запись и страница
   ========================================================================== */
.single-title { font-size: 2rem; }
.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 18px;
}
.single-meta a { color: var(--clay); text-decoration: none; }
.single-thumb {
    margin: 0 0 24px;
    border-radius: var(--radius);
    overflow: hidden;
}
.single-thumb img { width: 100%; display: block; }
.entry-content { font-size: 1.02rem; }
.entry-content img { border-radius: 10px; display: block; }
.entry-content h2 { font-size: 1.5rem; margin-top: 1.4em; }
.entry-content h3 { font-size: 1.25rem; margin-top: 1.2em; }
.entry-content blockquote {
    margin: 1.4em 0;
    padding: 12px 22px;
    border-left: 4px solid var(--leaf);
    background: #fff;
    color: var(--ink);
    border-radius: 0 8px 8px 0;
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    margin: 1.4em 0;
}
.entry-content th, .entry-content td {
    border: 1px solid var(--line);
    padding: 10px 12px;
    text-align: left;
}
.entry-content th { background: #efe9e0; }
.single-tags { margin-top: 26px; }
.tag-link {
    display: inline-block;
    color: var(--leaf-dark);
    text-decoration: none;
    margin-right: 8px;
    font-size: 0.9rem;
}
.page-links { margin-top: 18px; font-size: 0.9rem; }

/* ==========================================================================
   Сайдбар (светлый фон → тёмный текст)
   ========================================================================== */
.sidebar .widget {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    color: var(--ink);
}
.sidebar .widget-title {
    font-size: 1.1rem;
    color: var(--ink);
    margin-bottom: 14px;
}
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--leaf-dark); text-decoration: none; }
.sidebar .widget a:hover { color: var(--leaf); text-decoration: underline; }
.sidebar .widget .post-date {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
}

/* ==========================================================================
   Пагинация (type => plain ↔ .page-numbers)
   ========================================================================== */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 44px;
}
.pager .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: #fff;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.92rem;
}
.pager a.page-numbers:hover { border-color: var(--leaf); color: var(--leaf); }
.pager .page-numbers.current {
    background: var(--leaf);
    border-color: var(--leaf);
    color: #fff;
}
.pager .page-numbers.dots {
    border: none;
    background: none;
    min-width: auto;
}

/* Комментарии */
.comments-area { margin-top: 48px; }
.comments-title { font-size: 1.4rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 24px; padding: 0; }
.comment-inner {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.comment-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.comment-author { font-weight: 600; }
.comment-date { font-size: 0.8rem; color: var(--muted); }
.comment-pending { font-size: 0.85rem; color: var(--clay); }
.comment-reply a { color: var(--leaf-dark); text-decoration: none; font-size: 0.9rem; }
.comment-respond {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px;
    margin-top: 24px;
}
.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: 8px;
    font: inherit;
    background: #fff;
    color: var(--ink);
    margin-top: 4px;
}
.comment-form label { font-size: 0.9rem; }
.comment-form p { margin-bottom: 14px; }

/* Форма поиска */
.search-form { margin: 18px 0; }
.search-label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 6px;
}
.search-row { display: flex; gap: 8px; }
.search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}
.search-submit {
    background: var(--leaf);
    color: #fff;
    border: 1px solid var(--leaf);
    border-radius: 8px;
    padding: 0 18px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}
.search-submit:hover { background: var(--leaf-dark); }

.error-404 .page-title { font-size: 2rem; }
.error-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ==========================================================================
   Главная — тематические блоки
   ========================================================================== */
.block { padding: clamp(40px, 6vw, 72px) 0; }
.block-head { text-align: center; max-width: 680px; margin: 0 auto 36px; }
.block-title { font-size: clamp(1.5rem, 4vw, 2rem); }
.block-lead { color: var(--muted); margin: 0; }

/* Слайдер */
.block-slider { padding: 0; }
.slider {
    position: relative;
    width: min(100%, 1180px);
    margin-inline: auto;
}
.slides { position: relative; }
.slide { display: none; position: relative; }
.slide.is-active { display: block; }
.slide img {
    width: 100%;
    height: clamp(300px, 52vh, 540px);
    object-fit: cover;
    display: block;
}
.slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px 24px;
    color: #fff;
    background: linear-gradient(to top, rgba(20, 16, 12, 0.78), rgba(20, 16, 12, 0));
}
.slide-caption h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.3rem, 3.5vw, 1.9rem); }
.slide-caption p { margin: 0; max-width: 620px; font-size: 0.95rem; }
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.slider-prev { left: 14px; }
.slider-next { right: 14px; }
.slider-arrow:hover { background: #fff; }
.slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
}
.slider-dot.is-active { background: #fff; }

/* Сетка направлений */
.dirs-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
}
.dir-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    min-width: 0;
}
.dir-ico { display: inline-flex; margin-bottom: 12px; }
.dir-card h3 { font-size: 1.2rem; margin: 0 0 8px; }
.dir-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Лента последних */
.block-latest { background: #fff; }

/* Текст + иллюстрация */
.split-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}
.split-text { min-width: 0; }
.split-media { min-width: 0; }
.split-media img {
    width: 100%;
    border-radius: var(--radius);
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* Галерея */
.block-gallery { background: #fff; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.gallery-item {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    min-width: 0;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   Подвал (тёмный фон → светлый текст)
   ========================================================================== */
.site-foot {
    background: var(--foot-bg);
    color: var(--foot-ink);
    padding: 52px 0 0;
}
.foot-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
}
.foot-col { min-width: 0; }
.site-foot .widget { margin-bottom: 8px; color: var(--foot-ink); }
.site-foot .widget-title {
    color: var(--foot-head);
    font-size: 1.05rem;
    margin-bottom: 14px;
}
.site-foot .widget,
.site-foot .widget p,
.site-foot .widget li { color: var(--foot-ink); }
.site-foot .widget ul { list-style: none; margin: 0; padding: 0; }
.site-foot .widget li { padding: 6px 0; border-bottom: 1px solid var(--foot-line); }
.site-foot .widget li:last-child { border-bottom: none; }
.site-foot .widget a { color: var(--foot-head); text-decoration: none; }
.site-foot .widget a:hover { color: #fff; text-decoration: underline; }
.site-foot .widget .post-date { display: block; font-size: 0.78rem; color: #9b9183; }
.foot-bottom {
    margin-top: 44px;
    padding: 20px 0;
    border-top: 1px solid var(--foot-line);
}
.copyright { margin: 0; font-size: 0.85rem; color: var(--foot-ink); }

/* ==========================================================================
   Cookie-баннер — правило [hidden] ДО основного блока (см. A11)
   ========================================================================== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--ink);
    color: #f3ede3;
    padding: 14px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.cookie-text { margin: 0; font-size: 0.88rem; flex: 1; min-width: 0; }
.cookie-accept {
    background: var(--leaf);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    flex: 0 0 auto;
}
.cookie-accept:hover { background: var(--leaf-dark); }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (min-width: 600px) {
    .dirs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .posts-list, .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; }
    .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
    .head-inner {
        flex-direction: row;
        align-items: center;
        gap: 28px;
    }
    .nav-toggle { display: none; }
    .primary-nav { display: block; margin-left: auto; }
    .nav-list {
        flex-direction: row;
        gap: 24px;
        padding: 0;
    }
    .nav-list a { padding: 0; }
    .dirs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    }
    .layout-single .content-area { width: 85%; }
    .latest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
