/*
Theme Name: dds_marysebeauty.com
Author: Мария Соболева
Description: Информационная тема для образовательного ресурса о бьюти-индустрии.
Version: 1.1
Text Domain: msb
*/

/* ============ Переменные ============ */
:root {
    --bg: #faf5f2;
    --surface: #ffffff;
    --ink: #2c2530;
    --muted: #6e6470;
    --accent: #a85c79;
    --accent-deep: #7e3f59;
    --accent-soft: #f3e3ea;
    --line: #e7ddE0;
    --footer-bg: #2b2230;
    --footer-ink: #e9dfe6;
    --footer-muted: #b8a9b6;
    --radius: 14px;
    --shell: min(92%, 1180px);
}

/* ============ Сброс и база ============ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, "Segoe UI", "Inter", "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.2;
    color: var(--ink);
    margin: 0 0 .5em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

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

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

/* ============ Шапка ============ */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-logo, .brand svg.brand-logo {
    height: 54px;
    width: auto;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    display: block;
    line-height: 1.25;
}
.brand-desc {
    font-size: .82rem;
    color: var(--muted);
    display: block;
    max-width: 520px;
}
.brand a { color: inherit; text-decoration: none; }

.main-nav {
    margin-left: auto;
    min-width: 0;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}
.main-nav a {
    color: var(--ink);
    font-weight: 600;
    font-size: .98rem;
    padding: 6px 2px;
    display: inline-block;
}
.main-nav a:hover { color: var(--accent-deep); text-decoration: none; }
.main-nav .current-menu-item > a { color: var(--accent-deep); }

.nav-toggle {
    display: none;
    margin-left: auto;
    background: var(--accent-soft);
    border: 1px solid var(--line);
    color: var(--ink);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: .95rem;
    cursor: pointer;
}

/* ============ Структура страницы ============ */
.site-main { padding: 34px 0 56px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 40px;
    align-items: start;
}
.layout-single .content-area { width: 100%; }
.content-area { min-width: 0; }

.narrow-page {
    width: 85%;
    margin-inline: auto;
    min-width: 0;
}

/* ============ Хлебные крошки ============ */
.crumbs {
    font-size: .85rem;
    color: var(--muted);
    margin: 0 0 22px;
}
.crumbs a { color: var(--accent-deep); }
.crumbs .sep { margin: 0 4px; color: var(--line); }

/* ============ Карточки записей ============ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 26px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover {
    box-shadow: 0 12px 30px rgba(126, 63, 89, .12);
    transform: translateY(-3px);
}
.card-thumb {
    display: block;
    width: 100%;
}
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-body {
    flex: 1;
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
}
.card-title { font-size: 1.18rem; margin: 0 0 8px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent-deep); text-decoration: none; }
.card-meta {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: 10px;
}
.card-excerpt { color: #463c48; font-size: .95rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 12px;
    font-weight: 600;
    color: var(--accent-deep);
}

/* Лента записей списком */
.post-list { display: flex; flex-direction: column; gap: 26px; }

/* ============ Одиночная запись / страница ============ */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px 38px;
}
.entry-header { margin-bottom: 18px; }
.entry-title { margin: 0 0 8px; }
.entry-meta { font-size: .85rem; color: var(--muted); }
.entry-thumb { margin: 0 0 22px; }
.entry-thumb img { width: 100%; border-radius: 10px; display: block; }
.entry-content img { border-radius: 8px; display: block; }
.entry-content h2 { margin-top: 1.3em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    border: 1px solid var(--line);
}
th, td {
    border: 1px solid var(--line);
    padding: 10px 12px;
    text-align: left;
}
th { background: var(--accent-soft); }

blockquote {
    margin: 1.4em 0;
    padding: 14px 22px;
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* ============ Сайдбар ============ */
.sidebar {
    min-width: 0;
}
.sidebar .widget {
    background: var(--surface);
    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;
    margin: 0 0 14px;
    color: var(--ink);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-soft);
}
.sidebar .widget a { color: var(--accent-deep); }
.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 .post-date { display: block; font-size: .78rem; color: var(--muted); }

/* ============ Пагинация ============ */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 38px 0 0;
}
.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: 10px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}
.pager a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent-deep);
}
.pager .page-numbers.current {
    background: var(--accent-deep);
    border-color: var(--accent-deep);
    color: #fff;
}
.pager .page-numbers.dots {
    border: none;
    background: none;
}

/* ============ Главная ============ */
.home-section { margin: 0 0 56px; }
.section-title {
    text-align: center;
    margin-bottom: 8px;
}
.section-lead {
    text-align: center;
    color: var(--muted);
    max-width: 680px;
    margin: 0 auto 30px;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #f6e6ec 0%, #f0dde8 100%);
    border-radius: 20px;
    padding: 54px 48px;
    margin: 6px 0 48px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 36px;
    align-items: center;
}
.hero-text h1 { font-size: 2.4rem; }
.hero-text p { color: #574a55; font-size: 1.05rem; }
.hero-actions { margin-top: 18px; }
.hero-img img { width: 100%; border-radius: 16px; display: block; }

.btn {
    display: inline-block;
    background: var(--accent-deep);
    color: #fff;
    padding: 12px 26px;
    border-radius: 10px;
    font-weight: 600;
}
.btn:hover { background: var(--accent); text-decoration: none; color: #fff; }
.btn-ghost {
    background: transparent;
    color: var(--accent-deep);
    border: 1px solid var(--accent);
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-deep); }

/* Блок текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}
.split.reverse .split-media { order: -1; }
.split-media img {
    width: 100%;
    border-radius: 16px;
    display: block;
}
.split-text h2 { text-align: left; }

/* Сетка тематических карточек */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px;
    min-width: 0;
}
.feature .feature-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    color: var(--accent);
}
.feature h3 { margin: 0 0 8px; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Пошаговый блок */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    counter-reset: step;
}
.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    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;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 14px;
}
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }

/* FAQ */
.faq { max-width: 820px; margin-inline: auto; }
.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 4px 22px;
    margin-bottom: 14px;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-family: Georgia, serif;
    font-size: 1.08rem;
    padding: 14px 0;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+';
    float: right;
    color: var(--accent);
    font-size: 1.4rem;
    line-height: 1;
}
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 16px; color: #4a404c; }

/* Галерея */
.gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.gallery-mosaic figure {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
}
.gallery-mosaic img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--accent-deep), var(--accent));
    color: #fff;
    border-radius: 20px;
    padding: 48px 44px;
    text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #f6e6ec; max-width: 640px; margin: 0 auto 22px; }
.cta .btn {
    background: #fff;
    color: var(--accent-deep);
}
.cta .btn:hover { background: var(--accent-soft); }

/* ============ Подвал ============ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 48px 0 0;
    margin-top: 40px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 36px;
    padding-bottom: 38px;
}
.site-footer .widget { min-width: 0; }
.site-footer .widget-title {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 14px;
}
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li {
    color: var(--footer-ink);
}
.site-footer .widget a { color: var(--footer-muted); }
.site-footer .widget a:hover { color: #fff; }
.site-footer .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer .widget li {
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-footer .widget li:last-child { border-bottom: none; }
.site-footer .widget .post-date { color: var(--footer-muted); font-size: .78rem; display: block; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 20px 0;
    font-size: .85rem;
    color: var(--footer-muted);
    text-align: center;
}

/* ============ Поиск ============ */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: .95rem;
    background: var(--surface);
    color: var(--ink);
}
.search-form button {
    background: var(--accent-deep);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 600;
}
.search-form button:hover { background: var(--accent); }

/* ============ Комментарии ============ */
.comments-area { margin-top: 38px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 26px; padding: 0; }
.comment-item { margin-bottom: 18px; }
.comment-inner {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 22px;
}
.comment-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.comment-author { font-weight: 700; }
.comment-date { font-size: .8rem; color: var(--muted); }
.comment-await { font-size: .85rem; color: var(--accent-deep); }
.comment-reply a { font-size: .85rem; font-weight: 600; }

.comment-form-wrap { 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 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: .95rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
}
.comment-form p { margin-bottom: 14px; }
.comment-form .submit {
    background: var(--accent-deep);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 26px;
    cursor: pointer;
    font-weight: 600;
}

/* ============ 404 ============ */
.error-404 {
    text-align: center;
    padding: 30px 0 10px;
}
.error-404 .big {
    font-family: Georgia, serif;
    font-size: 5rem;
    color: var(--accent);
    margin: 0;
}
.error-404 .search-form { max-width: 460px; margin: 22px auto 0; }

/* ============ Контакты (статичные) ============ */
.contact-list { list-style: none; padding: 0; margin: 1em 0; }
.contact-list li { margin-bottom: 10px; }

/* ============ Cookie-баннер ============ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,.18);
}
.cookie-banner p { margin: 0; font-size: .9rem; max-width: 760px; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 24px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}
.cookie-banner button:hover { background: var(--accent-deep); }

/* ============ Адаптив ============ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .hero { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; }
    .split.reverse .split-media { order: 0; }
    .narrow-page { width: 100%; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    .hero { padding: 34px 24px; }
    .hero-text h1 { font-size: 1.9rem; }
    .entry { padding: 24px 20px; }
    .nav-toggle { display: inline-block; }
    .main-nav {
        flex-basis: 100%;
        margin-left: 0;
    }
    .main-nav ul { display: none; flex-direction: column; gap: 0; }
    .main-nav.is-open ul { display: flex; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .cta, .hero { padding: 30px 22px; }
}
