/*
Theme Name: dds_celebrarts.com
Author: Марина Фёдорова
Description: Информационная тема о праздничной полиграфии: приглашения, рассадка, бумага, печать, цветовые решения и единый визуальный стиль события.
Version: 1.1
Text Domain: celebrarts
Requires at least: 6.0
Requires PHP: 8.0
*/

/* =========================================================
   Переменные и базовые сбросы
   ========================================================= */
:root {
    --ivory: #faf6f0;
    --cream: #f3ebe0;
    --plum:  #6e2a4e;
    --wine:  #4a1a34;
    --gold:  #c9a24b;
    --gold-dark: #a9812f;
    --blush: #e8c9d4;
    --ink:   #2a2530;
    --muted: #6b6470;
    --line:  #e4dad0;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(74, 26, 52, 0.08);
    --serif: Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--ivory);
    overflow-x: hidden;
}

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

a { color: var(--plum); text-decoration: none; }
a:hover, a:focus { color: var(--wine); text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    line-height: 1.2;
    color: var(--wine);
    margin: 0 0 0.6em;
    font-weight: 700;
}

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }

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

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

/* =========================================================
   Контейнер ширины — один источник (A12.7)
   ========================================================= */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* =========================================================
   Кнопки
   ========================================================= */
.btn {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.98rem;
    font-weight: 600;
    padding: 12px 26px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    text-decoration: none;
}
.btn:hover, .btn:focus { text-decoration: none; }

.btn--primary { background: var(--plum); color: #fff; border-color: var(--plum); }
.btn--primary:hover, .btn--primary:focus { background: var(--wine); border-color: var(--wine); color: #fff; }

.btn--ghost { background: transparent; color: var(--plum); border-color: var(--plum); }
.btn--ghost:hover, .btn--ghost:focus { background: var(--plum); color: #fff; }

.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn--ghost-light:hover, .btn--ghost-light:focus { background: rgba(255,255,255,0.14); color: #fff; }

/* =========================================================
   Шапка
   ========================================================= */
.site-header {
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
}
.site-branding { min-width: 0; }
.brand-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    min-width: 0;
}
.brand-link:hover { text-decoration: none; }
.brand-logo { height: 46px; width: auto; display: block; }
.brand-mark { display: block; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--serif);
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--wine);
    line-height: 1.2;
}
.brand-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.35;
    max-width: 520px;
}

.site-nav .nav-menu {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
}
.site-nav .nav-menu a {
    display: block;
    padding: 8px 14px;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.96rem;
    border-radius: 8px;
}
.site-nav .nav-menu a:hover,
.site-nav .nav-menu .current-menu-item > a {
    background: var(--cream);
    color: var(--wine);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    padding: 0 11px;
}
.nav-toggle__bar { display: block; height: 2px; background: var(--wine); border-radius: 2px; }

/* =========================================================
   Основная область / раскладки (A12)
   ========================================================= */
.site-main { display: block; padding: 34px 0 56px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 44px;
    align-items: start;
}
.layout-single { display: block; }
.layout-single .content-area {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}
.content-area { min-width: 0; }

/* На главной секции идут во всю ширину сайта */
.front .site-main { padding: 0; }

/* =========================================================
   Хлебные крошки
   ========================================================= */
.breadcrumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin: 0 0 22px;
}
.breadcrumbs a { color: var(--plum); }
.breadcrumbs .sep { margin: 0 4px; color: var(--gold-dark); }

/* =========================================================
   Заголовки страниц
   ========================================================= */
.page-head { margin-bottom: 26px; }
.page-title { font-size: 2.1rem; margin-bottom: 0.35em; }
.page-intro { color: var(--muted); font-size: 1.02rem; max-width: 720px; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-title { font-size: 1.9rem; }
.section-sub { color: var(--muted); max-width: 640px; margin-inline: auto; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold-dark);
    margin-bottom: 0.5em;
}

/* =========================================================
   Карточки записей (A8, A10)
   ========================================================= */
.cards-grid,
.posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 28px;
}

.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 0;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(74, 26, 52, 0.12); }

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

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 22px 22px;
    min-width: 0;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 10px;
}
.card-cat a {
    color: var(--gold-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.74rem;
}
.card-title { font-size: 1.24rem; margin-bottom: 0.5em; }
.card-title a { color: var(--wine); }
.card-title a:hover { color: var(--plum); text-decoration: none; }
.card-excerpt { flex: 1; color: #4a444f; font-size: 0.96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: 14px;
    font-weight: 600;
    color: var(--plum);
    align-self: flex-start;
}
.card-more:hover { color: var(--wine); text-decoration: none; }

/* =========================================================
   Пагинация (D5 — type=plain)
   ========================================================= */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 40px;
}
.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: 10px;
    background: #fff;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}
.pagination a.page-numbers:hover { background: var(--cream); color: var(--wine); }
.pagination .page-numbers.current {
    background: var(--plum);
    border-color: var(--plum);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* =========================================================
   Запись / страница
   ========================================================= */
.post-single, .page-article { min-width: 0; }
.post-head { margin-bottom: 22px; }
.post-meta {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 10px;
}
.post-cat a { color: var(--gold-dark); font-weight: 600; }
.post-title { font-size: 2.2rem; }
.post-thumb {
    margin-bottom: 26px;
    border-radius: var(--radius);
    overflow: hidden;
}
.post-thumb img { width: 100%; display: block; }

.post-content { font-size: 1.05rem; }
.post-content img { border-radius: 8px; display: block; }
.post-content h2 { font-size: 1.6rem; margin-top: 1.4em; }
.post-content h3 { font-size: 1.3rem; margin-top: 1.2em; }
.post-content blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.6rem;
    background: var(--cream);
    border-left: 4px solid var(--gold);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: var(--wine);
}
.post-content blockquote p:last-child { margin-bottom: 0; }

.post-tags {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-chip {
    display: inline-block;
    padding: 5px 12px;
    background: var(--cream);
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--plum);
}
.tag-chip:hover { background: var(--blush); text-decoration: none; }

.page-links { margin-top: 1.4em; font-weight: 600; }
.page-links a { padding: 2px 10px; border: 1px solid var(--line); border-radius: 6px; margin: 0 3px; }

/* Таблицы */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
}
.post-content table, .post-content th, .post-content td {
    border: 1px solid var(--line);
}
.post-content th, .post-content td { padding: 10px 14px; text-align: left; }
.post-content th { background: var(--cream); color: var(--wine); }

/* =========================================================
   Сайдбар (светлый фон → тёмный текст)
   ========================================================= */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.sidebar .widget-title {
    font-size: 1.1rem;
    color: var(--wine);
    margin-bottom: 0.8em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--gold);
}
.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: var(--ink); }
.sidebar .widget a { color: var(--plum); }
.sidebar .widget a:hover { color: var(--wine); }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.94rem;
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget .post-date { display: block; font-size: 0.78rem; color: var(--muted); }

/* =========================================================
   Главная — секции
   ========================================================= */
.front-section { padding: 3.4rem 0; }
.front-section:nth-child(even) { background: var(--cream); }

/* Блок 1: текст + иллюстрация */
.fs-intro__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 48px;
    align-items: center;
}
.fs-intro__title { font-size: 2.5rem; margin-bottom: 0.5em; }
.fs-intro__text .btn { margin-top: 8px; }
.fs-intro__media img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Блок 2: шаги */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 24px;
}
.step {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    box-shadow: var(--shadow);
    min-width: 0;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--plum);
    color: #fff;
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 14px;
}
.step-title { font-size: 1.2rem; margin-bottom: 0.4em; }
.step p { margin: 0; color: #4a444f; font-size: 0.96rem; }

/* Последние записи */
.fs-latest__more { text-align: center; margin-top: 34px; }
.empty-note { text-align: center; color: var(--muted); }

/* Блок 3: галерея / мозаика */
.gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.gm-item {
    position: relative;
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-width: 0;
}
.gm-item--wide { grid-column: span 2; }
.gm-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.gm-item--wide img { aspect-ratio: 8 / 3; }
.gm-item figcaption {
    position: absolute;
    left: 0; bottom: 0;
    padding: 8px 14px;
    background: rgba(74, 26, 52, 0.82);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 0 10px 0 0;
}

/* Блок 4: CTA (A14 — свой padding со всех сторон) */
.fs-cta {
    background: var(--wine);
    color: #fff;
    border-radius: 16px;
    padding: 2.8rem 2.4rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.fs-cta__title { color: #fff; font-size: 1.9rem; }
.fs-cta__text { color: rgba(255,255,255,0.85); max-width: 620px; margin-inline: auto; }
.fs-cta__actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 22px;
}

/* =========================================================
   Форма поиска
   ========================================================= */
.search-form__label { display: block; font-weight: 600; margin-bottom: 8px; }
.search-form__row { display: flex; gap: 10px; flex-wrap: wrap; }
.search-form__input {
    flex: 1;
    min-width: 0;
    padding: 11px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}
.search-form__submit {
    padding: 11px 22px;
    background: var(--plum);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}
.search-form__submit:hover { background: var(--wine); }

/* =========================================================
   Комментарии
   ========================================================= */
.comments-area { margin-top: 46px; }
.comments-title { font-size: 1.5rem; margin-bottom: 20px; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list ol { list-style: none; padding-left: 26px; }
.comment-body {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 16px;
}
.comment-meta {
    display: flex;
    gap: 14px;
    align-items: baseline;
    margin-bottom: 8px;
}
.comment-author { font-weight: 700; color: var(--wine); }
.comment-date { font-size: 0.8rem; color: var(--muted); }
.comment-reply-link { margin-top: 8px; font-size: 0.86rem; font-weight: 600; }
.comment-respond {
    background: var(--cream);
    border-radius: var(--radius);
    padding: 24px 26px;
    margin-top: 24px;
}
.comment-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.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: 8px;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 14px;
}
.comment-form .form-submit input {
    padding: 12px 28px;
    background: var(--plum);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
}
.comment-form .form-submit input:hover { background: var(--wine); }

/* =========================================================
   404
   ========================================================= */
.error-404__inner { text-align: center; }
.error-code {
    font-family: var(--serif);
    font-size: 5rem;
    color: var(--gold);
    line-height: 1;
    margin: 0;
}
.error-text { color: var(--muted); max-width: 520px; margin: 0 auto 22px; }
.error-search { max-width: 460px; margin: 0 auto 22px; }
.error-home { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   Подвал — тёмный фон → светлый текст виджетов (F)
   ========================================================= */
.site-footer { background: var(--wine); color: #efe6dd; margin-top: 40px; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    padding: 48px 0 40px;
}
.footer-col { min-width: 0; }
.site-footer .widget { margin-bottom: 0; }
.site-footer .widget-title {
    font-family: var(--serif);
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 0.8em;
}
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li { color: #e5d8ce; }
.site-footer .widget a { color: #f0dcc4; }
.site-footer .widget a:hover { color: #fff; text-decoration: underline; }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: 6px 0; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.14);
    padding: 18px 0;
}
.copyright { margin: 0; font-size: 0.86rem; color: rgba(255,255,255,0.72); }

/* =========================================================
   Cookie-баннер (A11 — правило [hidden] до основного блока)
   ========================================================= */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    background: var(--ink);
    color: #fff;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.2);
}
.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.cookie-banner__text {
    margin: 0;
    font-size: 0.9rem;
    flex: 1;
    min-width: 220px;
    color: #eee;
}
.cookie-banner__accept {
    padding: 10px 24px;
    background: var(--gold);
    color: var(--ink);
    border: none;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-banner__accept:hover { background: var(--gold-dark); color: #fff; }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .sidebar { margin-top: 20px; }
    .fs-intro__grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .fs-intro__media { order: -1; }
    .gallery-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gm-item--wide { grid-column: span 2; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .nav-toggle { display: flex; }
    .site-nav {
        display: none;
        width: 100%;
        margin-top: 12px;
    }
    .site-nav.is-open { display: block; }
    .site-header__inner { flex-wrap: wrap; }
    .site-nav .nav-menu { flex-direction: column; gap: 2px; }
    .site-nav .nav-menu a { padding: 12px 14px; }

    .page-title { font-size: 1.7rem; }
    .post-title { font-size: 1.7rem; }
    .fs-intro__title { font-size: 1.9rem; }
    .section-title { font-size: 1.5rem; }
    .front-section { padding: 2.4rem 0; }

    .fs-cta { padding: 1.9rem 1.5rem; }
    .fs-cta__title { font-size: 1.5rem; }

    .gallery-mosaic { grid-template-columns: minmax(0, 1fr); }
    .gm-item--wide { grid-column: span 1; }
    .gm-item img, .gm-item--wide img { aspect-ratio: 16 / 9; }

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

    .cookie-banner__inner { flex-direction: column; align-items: stretch; text-align: center; }
    .cookie-banner__accept { width: 100%; }
}
