/*
Theme Name: dds_jillransomphotography.com
Author: Юлия Светлова
Description: Тема для информационного сайта онлайн-школы креативных профессий. Эстетика творческой мастерской: тёплая серо-кремовая палитра, терракотовые акценты, асимметричная сетка, эффект мягкой проявки. Адаптивная вёрстка, собственные хлебные крошки, нумерованная пагинация, готовая страница блога.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
Text Domain: jrphoto
*/

/* ============================================================
   1. ПЕРЕМЕННЫЕ
   ============================================================ */
:root {
    --bg: #F5F2EF;
    --bg-card: #F9F6F0;
    --accent: #B85C38;
    --accent-soft: rgba(184, 92, 56, 0.20);
    --accent-faint: rgba(184, 92, 56, 0.10);
    --accent-2: #6A7152;
    --text: #2A2A2A;
    --text-soft: #5A5A5A;
    --white: #FFFFFF;
    --border: #E3DCD2;
    --footer-bg: #272320;
    --footer-text: #D9D2C6;
    --footer-head: #EBE3D4;
    --shadow-soft: 0 8px 24px rgba(42, 42, 42, 0.12);
    --radius-cta: 12px;
    --radius-sec: 6px;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

/* ============================================================
   2. СБРОС / БАЗА
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

h1, h2, h3, h4 {
    font-family: var(--sans);
    line-height: 1.25;
    color: var(--text);
    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 1em; }

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

blockquote {
    font-family: var(--serif);
    font-size: 1.35rem;
    letter-spacing: 0.01em;
    line-height: 1.5;
    color: var(--text);
    border-left: 3px solid var(--accent);
    margin: 1.4em 0;
    padding: 0.2em 0 0.2em 1.2em;
    background: none;
}

code, pre {
    font-family: "SF Mono", Consolas, "Liberation Mono", monospace;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
}
code { padding: 0.1em 0.35em; font-size: 0.9em; }
pre { padding: 14px 16px; overflow-x: auto; max-width: 100%; }
pre code { border: 0; padding: 0; background: none; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid var(--border);
}
th, td {
    border: 1px solid var(--border);
    padding: 9px 12px;
    text-align: left;
}
th { background: var(--bg-card); }

hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

/* ============================================================
   3. КОНТЕЙНЕР ШИРИНЫ (единственное место)
   ============================================================ */
.shell {
    width: min(85%, 1180px);
    margin-inline: auto;
}

/* ============================================================
   4. КНОПКИ
   ============================================================ */
.btn {
    display: inline-block;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease,
                background-color 0.18s ease, color 0.18s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background-color: var(--accent-soft);
    color: var(--accent);
    border: 0;
    border-radius: var(--radius-cta);
    padding: 15px 30px;
}
.btn-primary:hover {
    background-color: var(--accent);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    border-radius: var(--radius-sec);
    padding: 12px 24px;
}
.btn-secondary:hover {
    background-color: var(--accent-faint);
    color: var(--accent);
}

/* ============================================================
   5. ШАПКА
   ============================================================ */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 20px 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo,
.brand-logo-svg {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    display: block;
    border-radius: 8px;
}
.brand-text { min-width: 0; }
.brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-desc {
    font-size: 0.82rem;
    color: var(--text-soft);
    margin: 4px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Навигация */
.main-nav { min-width: 0; }
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
}
.main-nav a {
    color: var(--text);
    font-weight: 600;
    font-size: 0.98rem;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.18s ease, color 0.18s ease;
}
.main-nav a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
    text-decoration: none;
}
.main-nav .current-menu-item > a {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1.5px solid var(--accent);
    border-radius: var(--radius-sec);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 9px 16px;
    cursor: pointer;
}

/* ============================================================
   6. ОСНОВНАЯ РАЗМЕТКА
   ============================================================ */
.site-main { padding: 40px 0 60px; }

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

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

/* ============================================================
   7. ХЛЕБНЫЕ КРОШКИ
   ============================================================ */
.breadcrumbs {
    font-size: 0.88rem;
    color: var(--text-soft);
    margin: 0 0 22px;
    line-height: 1.6;
}
.breadcrumbs a { color: var(--accent-2); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--text-soft); margin: 0 4px; }
.breadcrumbs span { color: var(--text-soft); }

/* ============================================================
   8. КАРТОЧКИ ЗАПИСЕЙ
   ============================================================ */
.card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
    border-color: transparent;
    box-shadow: inset 0 0 0 1px rgba(42,42,42,0.04), 0 10px 26px rgba(42,42,42,0.13);
}

/* Горизонтальная карточка (список блога / архивы) */
.card-row { flex-direction: row; }
.card-row .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.card-row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-row .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Вертикальная карточка (сетка на главной) */
.card-grid .card-thumb-wrap a { display: block; }
.card-grid .card-thumb-wrap img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.card-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EDE6DB, #E2D8C8);
    color: var(--accent-2);
    font-family: var(--serif);
    font-size: 1.4rem;
    min-height: 100%;
}

.card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 22px 24px;
}
.card-title {
    font-size: 1.2rem;
    margin: 0 0 8px;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); text-decoration: none; }

.card-meta {
    font-size: 0.8rem;
    color: var(--text-soft);
    margin: 0 0 10px;
}
.card-meta .cat-link { color: var(--accent-2); }

.card-excerpt {
    color: var(--text-soft);
    font-size: 0.96rem;
    margin-bottom: 16px;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-excerpt p:last-child { margin-bottom: 0; }

.card-more {
    margin-top: auto;
    align-self: flex-start;
}

/* ============================================================
   9. ОДИНОЧНАЯ ЗАПИСЬ / СТРАНИЦА
   ============================================================ */
.entry {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 34px 38px;
}
.entry-header { margin-bottom: 22px; }
.entry-title { font-size: 2rem; margin-bottom: 10px; }
.entry-meta {
    font-size: 0.85rem;
    color: var(--text-soft);
}
.entry-meta a { color: var(--accent-2); }
.entry-thumb {
    margin: 0 0 24px;
    border-radius: 8px;
    overflow: hidden;
}
.entry-thumb img { width: 100%; display: block; }
.entry-content { min-width: 0; }
.entry-content img { border-radius: 6px; }
.entry-content > *:last-child { margin-bottom: 0; }

.entry-tags {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}
.entry-tags .tag-link {
    display: inline-block;
    color: var(--accent-2);
    border: 1px solid var(--accent-2);
    border-radius: var(--radius-sec);
    padding: 3px 11px;
    margin: 3px 5px 3px 0;
}
.entry-tags .tag-link:hover {
    background: var(--accent-2);
    color: var(--white);
    text-decoration: none;
}

/* ============================================================
   10. ПАГИНАЦИЯ
   ============================================================ */
.pagination { margin: 36px 0 6px; }
.pagination .page-numbers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pagination .page-numbers li { margin: 0; }
.pagination a.page-numbers,
.pagination span.page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sec);
    background: var(--bg-card);
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}
.pagination a.page-numbers:hover {
    background: var(--accent-faint);
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}
.pagination span.page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}
.pagination span.page-numbers.dots {
    background: transparent;
    border-color: transparent;
}

/* ============================================================
   11. САЙДБАР И ВИДЖЕТЫ
   ============================================================ */
.sidebar { min-width: 0; }

.widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 26px;
    color: var(--text);
}
.widget:last-child { margin-bottom: 0; }
.widget-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}
.widget,
.widget p,
.widget li,
.widget td { color: var(--text); }
.widget a { color: var(--accent); }
.widget a:hover { color: var(--accent-2); }
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.95rem;
}
.widget li:last-child { border-bottom: 0; }
.widget .post-date,
.widget .rss-date {
    display: block;
    font-size: 0.78rem;
    color: var(--text-soft);
}

/* ============================================================
   12. ПОДВАЛ (плотный блок, текстура «холст»)
   ============================================================ */
.site-footer {
    background-color: var(--footer-bg);
    background-image:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.018) 0 2px, transparent 2px 4px),
        repeating-linear-gradient(-45deg, rgba(0,0,0,0.10) 0 2px, transparent 2px 4px);
    color: var(--footer-text);
    margin-top: 40px;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    padding: 50px 0 40px;
}
.footer-col .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: var(--footer-text);
}
.footer-col .widget,
.footer-col .widget p,
.footer-col .widget li,
.footer-col .widget td { color: var(--footer-text); }
.footer-col .widget-title {
    color: var(--footer-head);
    border-bottom-color: var(--accent);
}
.footer-col .widget a { color: var(--footer-head); }
.footer-col .widget a:hover { color: var(--accent); }
.footer-col .widget li { border-bottom-color: rgba(255,255,255,0.12); }
.footer-col .widget .post-date,
.footer-col .widget .rss-date { color: #ABA395; }

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    color: var(--footer-head);
    transition: background-color 0.18s ease, transform 0.18s ease;
}
.footer-social a:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-3px);
    text-decoration: none;
}
.footer-social svg { width: 20px; height: 20px; display: block; }

.footer-team { margin-top: 14px; font-size: 0.9rem; }
.footer-team .team-member {
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.12);
}
.footer-team .team-member:last-child { border-bottom: 0; }
.footer-team .team-name { color: var(--footer-head); font-weight: 600; }
.footer-team .team-role { color: #ABA395; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 18px 0;
    font-size: 0.85rem;
    color: #ABA395;
    text-align: center;
}

/* ============================================================
   13. 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-text);
    border-top: 2px solid var(--accent);
    padding: 16px 0;
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    flex-wrap: wrap;
}
.cookie-text { font-size: 0.9rem; margin: 0; flex: 1; min-width: 240px; }
.cookie-text a { color: var(--footer-head); text-decoration: underline; }
.cookie-banner .btn-primary {
    background-color: var(--accent);
    color: var(--white);
}
.cookie-banner .btn-primary:hover {
    background-color: #a04e2e;
    color: var(--white);
}

/* ============================================================
   14. ФОРМА ПОИСКА
   ============================================================ */
.search-form {
    display: flex;
    gap: 8px;
    margin: 0;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sec);
    background: var(--white);
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--sans);
}
.search-form .search-field:focus {
    outline: 2px solid var(--accent-soft);
    border-color: var(--accent);
}
.search-form .search-submit {
    background: var(--accent);
    color: var(--white);
    border: 0;
    border-radius: var(--radius-sec);
    padding: 11px 20px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--sans);
}
.search-form .search-submit:hover { background: #a04e2e; }

/* ============================================================
   15. КОММЕНТАРИИ
   ============================================================ */
.comments-area {
    margin-top: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 30px 34px;
}
.comments-title, .comment-reply-title { font-size: 1.3rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ul.children {
    list-style: none;
    margin: 0;
    padding-left: 28px;
}
.comment-body {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.comment-meta { font-size: 0.85rem; color: var(--text-soft); margin-bottom: 6px; }
.comment-author .fn { font-weight: 700; color: var(--text); font-style: normal; }
.comment-respond { 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(--border);
    border-radius: var(--radius-sec);
    background: var(--white);
    font-family: var(--sans);
    font-size: 0.95rem;
    margin-top: 4px;
}
.comment-form p { margin-bottom: 14px; }
.comment-form .form-submit input {
    background: var(--accent-soft);
    color: var(--accent);
    border: 0;
    border-radius: var(--radius-cta);
    padding: 13px 28px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--sans);
}
.comment-form .form-submit input:hover { background: var(--accent); color: var(--white); }

/* ============================================================
   16. ЭФФЕКТ «ПРОЯВКИ»
   ============================================================ */
.reveal {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(18px);
    transition: opacity 0.7s ease, filter 0.7s ease, transform 0.7s ease;
}
.reveal.in-focus {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* ============================================================
   17. ГЛАВНАЯ СТРАНИЦА
   ============================================================ */
.front-section { padding: 56px 0; }
.front-section + .front-section { border-top: 1px solid var(--border); }

.section-head { margin-bottom: 30px; max-width: 680px; }
.section-kicker {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-2);
    margin-bottom: 8px;
}
.section-title { font-size: 1.9rem; margin: 0 0 10px; }
.section-lead { color: var(--text-soft); font-size: 1.02rem; margin: 0; }

/* Hero */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 44px;
    align-items: center;
}
.hero-title { font-size: 2.6rem; line-height: 1.18; margin-bottom: 16px; }
.hero-title em {
    font-family: var(--serif);
    font-style: italic;
    color: var(--accent);
}
.hero-lead { font-size: 1.1rem; color: var(--text-soft); margin-bottom: 24px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-collage {
    position: relative;
    min-height: 320px;
}
.hero-collage .frame {
    position: absolute;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: var(--bg-card);
}
.hero-collage .frame img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.hero-collage .f1 { width: 62%; height: 74%; top: 0; left: 0; z-index: 2; }
.hero-collage .f2 { width: 52%; height: 60%; bottom: 0; right: 0; z-index: 3; }
.hero-collage .f3 {
    width: 34%; height: 34%; top: 8%; right: 4%; z-index: 1;
    background: var(--accent-2);
}

/* Методика — лабораторная схема */
.method-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    counter-reset: step;
}
.method-step {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 26px 22px;
    min-width: 0;
}
.method-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -1px;
    width: 22px;
    height: 2px;
    background: var(--accent);
    z-index: 2;
}
.method-step .step-num {
    counter-increment: step;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.method-step .step-num::before { content: counter(step); }
.method-step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.method-step p { font-size: 0.9rem; color: var(--text-soft); margin: 0; }

/* Сетка направлений */
.dir-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.dir-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 26px 24px;
    min-width: 0;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.dir-card:hover {
    border-color: transparent;
    box-shadow: inset 0 0 0 2px var(--accent-faint), 0 8px 22px rgba(42,42,42,0.10);
}
.dir-icon {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: var(--accent-2);
    color: var(--white);
    margin-bottom: 14px;
}
.dir-icon svg { width: 24px; height: 24px; }
.dir-card h3 { font-size: 1.15rem; }
.dir-card p { font-size: 0.93rem; color: var(--text-soft); margin: 0; }

/* Цитата-слайдер */
.quote-slider {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px 44px;
    overflow: hidden;
}
.quote-slide { display: none; }
.quote-slide.is-active { display: block; }
.quote-text {
    font-family: var(--serif);
    font-size: 1.5rem;
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: var(--text);
    margin: 0 0 18px;
}
.quote-author { font-weight: 700; color: var(--accent); }
.quote-role { color: var(--text-soft); font-size: 0.9rem; }
.quote-dots {
    display: flex;
    gap: 9px;
    margin-top: 22px;
}
.quote-dots button {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    background: transparent;
    cursor: pointer;
    padding: 0;
}
.quote-dots button.is-active { background: var(--accent); }

/* Портфолио — асимметричная «шахматная» сетка */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    min-height: 200px;
    background: var(--accent-2);
}
.portfolio-item img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.portfolio-item:nth-child(2) { transform: translateY(28px); }
.portfolio-item:nth-child(5) { transform: translateY(28px); }
.portfolio-item .pf-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent, rgba(39,35,32,0.85));
    color: var(--footer-head);
    font-size: 0.82rem;
    padding: 22px 16px 12px;
}
.portfolio-item .pf-caption strong { color: var(--white); }

/* Доска сообщества */
.board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}
.board-note {
    background: var(--white);
    border-radius: 4px;
    padding: 22px 22px 26px;
    box-shadow: 0 6px 16px rgba(42,42,42,0.14);
    min-width: 0;
    position: relative;
}
.board-note::before {
    content: "";
    position: absolute;
    top: -7px; left: 50%;
    transform: translateX(-50%);
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.board-note:nth-child(1) { transform: rotate(-1.5deg); }
.board-note:nth-child(2) { transform: rotate(1deg); }
.board-note:nth-child(3) { transform: rotate(-0.5deg); }
.board-note p { font-size: 0.95rem; color: var(--text); margin: 0 0 10px; }
.board-note .note-author {
    font-size: 0.82rem;
    color: var(--text-soft);
    font-style: italic;
}

/* Блок последних записей на главной */
.front-posts-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Контакты — статичные */
.contact-static {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 30px;
    font-size: 1rem;
}
.contact-static a { font-weight: 600; }

/* ============================================================
   18. УТИЛИТЫ
   ============================================================ */
.page-title-block {
    margin-bottom: 26px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.page-title-block h1 { margin: 0; }
.no-posts {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 30px 34px;
}
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.sticky-note { display: inline-block; }

/* 404 */
.error-404 {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 44px 40px;
    text-align: center;
}
.error-404 .big-code {
    font-family: var(--serif);
    font-size: 5rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 10px;
}
.error-404 .search-form { max-width: 420px; margin: 22px auto 0; }

/* ============================================================
   19. АДАПТИВ
   ============================================================ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 36px; }
    .hero { grid-template-columns: 1fr; }
    .hero-collage { min-height: 280px; }
    .method-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .method-step:nth-child(2)::after { display: none; }
    .dir-grid,
    .portfolio-grid,
    .board,
    .front-posts-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portfolio-item:nth-child(2),
    .portfolio-item:nth-child(5) { transform: none; }
    .footer-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    .hero-title { font-size: 2rem; }

    .nav-toggle { display: inline-block; }
    .main-nav {
        display: none;
        width: 100%;
        margin-top: 14px;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 2px; }
    .main-nav a {
        display: block;
        padding: 10px 4px;
        border-bottom: 1px solid var(--border);
    }
    .header-inner { flex-wrap: wrap; }

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

    .card-row { flex-direction: column; }
    .card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-row .card-thumb-wrap a { position: static; }
    .card-row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .method-flow { grid-template-columns: 1fr; }
    .method-step:not(:last-child)::after {
        top: auto; right: 50%;
        bottom: -1px; transform: translateX(50%);
        width: 2px; height: 22px;
    }
    .dir-grid,
    .portfolio-grid,
    .board,
    .front-posts-cards { grid-template-columns: 1fr; }
    .portfolio-item { min-height: 220px; }

    .footer-widgets { grid-template-columns: 1fr; gap: 30px; }
    .entry, .comments-area { padding: 24px 22px; }
    .quote-slider { padding: 30px 26px; }
    .quote-text { font-size: 1.25rem; }
    .cookie-inner { flex-direction: column; align-items: flex-start; }
}
