/*
Theme Name: dds_kudinovalab.ru
Author: Инна Грачева
Description: Информационная тема о салонном уходе: маникюр, ресницы, санитария и безопасность процедур. Адаптивная вёрстка, посимвольные отрывки, собственный раздел статей.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: klab
*/

/* ================================================================
   Переменные и база
   ================================================================ */
:root {
    --bg:        #faf6f4;
    --surface:   #ffffff;
    --ink:       #2d2328;
    --muted:     #6f6068;
    --primary:   #7d3a54;
    --primary-d: #5e2a40;
    --accent:    #c08a72;
    --accent-d:  #a86e57;
    --line:      #ece0dd;
    --line-2:    #e2d3cf;
    --footer-bg: #3a2530;
    --footer-ink:#e9dde1;
    --footer-mut:#c3aab4;
    --shadow:    0 6px 22px rgba(74, 40, 55, .08);
    --radius:    12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 .6em;
    font-weight: 600;
}
h1 { font-size: 2.15rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.28rem; }

p { margin: 0 0 1.1em; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent-d); text-decoration: underline; }

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

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

.btn {
    display: inline-block;
    padding: .74rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border-radius: 40px;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    transition: background .18s ease;
}
.btn:hover { background: var(--primary-d); color: #fff; text-decoration: none; }
.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-ghost:hover { background: var(--primary); color: #fff; }

/* ================================================================
   Шапка
   ================================================================ */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.05rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-width: 0;
}
.brand-logo { display: block; max-height: 56px; width: auto; }
.brand-mark { color: var(--primary); display: inline-flex; }
.brand-text { min-width: 0; }
.brand-title {
    font-family: Georgia, serif;
    font-size: 1.18rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.2;
    display: block;
}
.brand-title a { color: inherit; }
.brand-title a:hover { text-decoration: none; color: var(--primary); }
.brand-desc {
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.35;
    margin-top: .2rem;
    display: block;
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: .4rem;
    cursor: pointer;
    color: var(--ink);
}
.nav-toggle svg { display: block; }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}
.main-nav a {
    color: var(--ink);
    font-weight: 500;
    padding: .3rem 0;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--primary); border-bottom-color: var(--accent); text-decoration: none; }
.main-nav .current-menu-item > a { color: var(--primary); border-bottom-color: var(--primary); }

/* ================================================================
   Хлебные крошки
   ================================================================ */
.breadcrumbs {
    font-size: .86rem;
    color: var(--muted);
    padding: 1rem 0 .2rem;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { color: var(--line-2); margin: 0 .15rem; }
.breadcrumbs span:last-child { color: var(--ink); }

/* ================================================================
   Раскладки
   ================================================================ */
.site-main { padding: 1.4rem 0 3rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 2.4rem;
    align-items: start;
}
.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}
.content-area { min-width: 0; }

/* ================================================================
   Карточки записей (см. A8, A10)
   ================================================================ */
.card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
@media (min-width: 620px) {
    .card { flex-direction: row; }
    .card-thumb-wrap { flex: 0 0 260px; position: relative; }
    .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 { overflow: hidden; background: #f0e6e3; }
.card-thumb-wrap img { width: 100%; display: block; object-fit: cover; }
.card-body {
    flex: 1;
    min-width: 0;
    padding: 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
}
.card-title { font-size: 1.28rem; margin-bottom: .4rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--primary); text-decoration: none; }
.card-meta { font-size: .8rem; color: var(--muted); margin-bottom: .6rem; }
.card-excerpt { color: var(--muted); margin-bottom: 1rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more { margin-top: auto; align-self: flex-start; }

/* карточка без миниатюры */
.card.no-thumb .card-body { padding: 1.5rem; }

@media (max-width: 619px) {
    .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;
    }
}

/* ================================================================
   Сайдбар / виджеты
   ================================================================ */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.6rem;
    color: var(--ink);
}
.sidebar .widget-title {
    font-size: 1.12rem;
    margin: 0 0 .9rem;
    padding-bottom: .55rem;
    border-bottom: 2px solid var(--accent);
    color: var(--ink);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li {
    padding: .5rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--primary); }
.sidebar .widget a:hover { color: var(--accent-d); }
.sidebar .widget .post-date { display: block; font-size: .78rem; color: var(--muted); }

/* ================================================================
   Подвал
   ================================================================ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 2.6rem 0 1.6rem;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.footer-cols .widget { margin-bottom: 0; color: var(--footer-ink); }
.footer-cols .widget-title {
    font-size: 1.08rem;
    color: #fff;
    margin: 0 0 .9rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.footer-cols .widget,
.footer-cols .widget p,
.footer-cols .widget li { color: var(--footer-ink); }
.footer-cols .widget ul { list-style: none; margin: 0; padding: 0; }
.footer-cols .widget li { padding: .38rem 0; }
.footer-cols .widget a { color: var(--footer-ink); }
.footer-cols .widget a:hover { color: #fff; }
.footer-cols .widget .post-date { color: var(--footer-mut); font-size: .78rem; display: block; }

.footer-bottom {
    text-align: center;
    margin-top: 2.2rem;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: .84rem;
    color: var(--footer-mut);
}

/* ================================================================
   Главная — секции
   ================================================================ */
.front-section { padding: 2.6rem 0; }
.section-head { max-width: 720px; margin-bottom: 1.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .76rem;
    font-weight: 700;
    color: var(--accent-d);
    display: block;
    margin-bottom: .5rem;
}

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

/* Сетка тезисов */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4rem;
}
.topic-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    min-width: 0;
}
.topic-card .ic {
    width: 46px; height: 46px;
    color: var(--primary);
    margin-bottom: .9rem;
}
.topic-card h3 { font-size: 1.18rem; margin-bottom: .4rem; }
.topic-card p { color: var(--muted); margin: 0; font-size: .96rem; }

/* Пошаговый блок */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
    counter-reset: step;
}
.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem 1.5rem 1.5rem;
    position: relative;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-family: Georgia, serif;
    font-weight: 600;
    margin-bottom: .8rem;
}
.step h3 { font-size: 1.12rem; margin-bottom: .35rem; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }

/* FAQ */
.faq-wrap {
    max-width: 820px;
    margin-inline: auto;
}
.faq-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 1.4rem;
    margin-bottom: .9rem;
}
.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 1.1rem 0;
    font-family: Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    color: var(--accent-d);
    font-size: 1.5rem;
    line-height: 1;
    flex: none;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 0 1.2rem; color: var(--muted); }
.faq-item .faq-body p { margin: 0; }

/* CTA */
.fs-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-d));
    color: #fff;
    border-radius: 16px;
    padding: 2.6rem 2.4rem;
    text-align: center;
}
.fs-cta h2 { color: #fff; }
.fs-cta p { color: rgba(255, 255, 255, .9); max-width: 640px; margin-inline: auto; }
.fs-cta .btn {
    background: #fff;
    color: var(--primary);
    margin-top: .6rem;
}
.fs-cta .btn:hover { background: var(--bg); color: var(--primary-d); }

/* Заголовок раздела «последние записи» на главной */
.latest-head { margin-bottom: 1.6rem; }
.latest-head .more-link { font-weight: 600; }

/* ================================================================
   Пагинация (см. D5)
   ================================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin: 2.2rem 0 .5rem;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .7rem;
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: 8px;
    color: var(--ink);
    font-weight: 600;
}
.pagination a.page-numbers:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: 0;
    background: none;
}

/* ================================================================
   Записи, страницы, контент
   ================================================================ */
.entry-header { margin-bottom: 1.2rem; }
.entry-title { font-size: 2rem; }
.entry-meta { font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.entry-thumb {
    margin: 0 0 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
}
.entry-thumb img { display: block; width: 100%; object-fit: cover; }

.entry-content { font-size: 1.03rem; }
.entry-content h2 { margin-top: 1.8rem; }
.entry-content h3 { margin-top: 1.4rem; }
.entry-content img { border-radius: 8px; }
.entry-content blockquote {
    margin: 1.5rem 0;
    padding: 1.3rem 1.5rem;
    background: #f4ebe9;
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    color: var(--ink);
    font-style: italic;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content li { margin-bottom: .4rem; }

.entry-tags { margin-top: 1.8rem; font-size: .9rem; }
.entry-tags a {
    display: inline-block;
    background: #f4ebe9;
    padding: .25rem .7rem;
    border-radius: 30px;
    margin: 0 .3rem .4rem 0;
    color: var(--primary);
}

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--line-2);
}
.entry-content th, .entry-content td { padding: .65rem .8rem; text-align: left; }
.entry-content th { background: #f4ebe9; }

/* ================================================================
   Комментарии
   ================================================================ */
.comments-area { margin-top: 2.6rem; }
.comments-title, .comment-reply-title { font-size: 1.4rem; margin-bottom: 1.2rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 1.5rem; padding: 0; }
.comment-inner {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    margin-bottom: 1rem;
}
.comment-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .5rem;
    font-size: .88rem;
}
.comment-author { font-weight: 700; color: var(--ink); }
.comment-date { color: var(--muted); }
.comment-await { color: var(--accent-d); font-size: .85rem; }
.comment-reply a {
    font-size: .85rem;
    font-weight: 600;
}
.comment-respond {
    margin-top: 1.6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .7rem .8rem;
    border: 1px solid var(--line-2);
    border-radius: 8px;
    font: inherit;
    margin-top: .3rem;
    background: #fff;
    color: var(--ink);
}
.comment-form p { margin-bottom: .9rem; }

/* ================================================================
   Форма поиска
   ================================================================ */
.search-form {
    display: flex;
    gap: .5rem;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: .65rem .8rem;
    border: 1px solid var(--line-2);
    border-radius: 8px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}
.search-form .search-submit {
    padding: .65rem 1.2rem;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}
.search-form .search-submit:hover { background: var(--primary-d); }

.sidebar .widget .search-form { margin: 0; }

/* ================================================================
   404
   ================================================================ */
.error-404 {
    text-align: center;
    padding: 2.5rem 0 3.5rem;
    max-width: 620px;
    margin-inline: auto;
}
.error-404 .code {
    font-family: Georgia, serif;
    font-size: 5rem;
    color: var(--primary);
    line-height: 1;
    margin-bottom: .5rem;
}
.error-404 .search-form { max-width: 420px; margin: 1.6rem auto 0; }

/* ================================================================
   Cookie-баннер (см. A11, D6) — правило [hidden] раньше основного
   ================================================================ */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: rgba(45, 30, 40, .97);
    color: #f3e9ec;
    padding: 1rem 1.2rem;
}
.cookie-inner {
    width: min(92%, 1180px);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: .9rem; min-width: 0; }
.cookie-banner a { color: #f0c9d3; }
.cookie-banner .btn {
    background: var(--accent);
    color: #2d2328;
    padding: .55rem 1.4rem;
    flex: none;
}
.cookie-banner .btn:hover { background: #d7a894; color: #2d2328; }

/* ================================================================
   Адаптив
   ================================================================ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 2rem; }
    .layout-single .content-area { width: 100%; }
    .fs-split { grid-template-columns: 1fr; gap: 1.6rem; }
    .fs-split.reverse .fs-split-media { order: 0; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

    .nav-toggle { display: inline-flex; }
    .main-nav {
        display: none;
        width: 100%;
        margin-top: .8rem;
    }
    .main-nav.open { display: block; }
    .header-inner { flex-wrap: wrap; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav a { display: block; padding: .7rem 0; }

    .front-section { padding: 2rem 0; }
    .fs-cta { padding: 2rem 1.4rem; }
    .footer-cols { grid-template-columns: 1fr; gap: 1.6rem; }
    .cookie-inner { justify-content: center; text-align: center; }
}
