/*
Theme Name: dds_gold-s-book.ru
Author: Анна Сотникова
Description: Информационно-образовательный портал по академической психологии, философии сознания и осознанным практикам.
Version: 1.1
Text Domain: goldsbook
*/

/* ===== Tokens ===== */
:root {
    --ink: #20243f;
    --ink-soft: #3a3f63;
    --gold: #b08442;
    --gold-deep: #8a6526;
    --gold-light: #d9b873;
    --cream: #f7f3ea;
    --paper: #fffdf8;
    --line: #e4dccb;
    --text: #2b2b30;
    --muted: #6b6b73;
    --maxw: 1180px;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(32, 36, 63, 0.08);
}

/* ===== Base ===== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background: var(--cream);
    overflow-x: hidden;
}

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

h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

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

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

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

blockquote {
    margin: 1.4em 0;
    padding: 0.6em 1.4em;
    border-left: 4px solid var(--gold);
    background: var(--paper);
    color: var(--ink-soft);
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--line);
}
th, td {
    border: 1px solid var(--line);
    padding: 0.6em 0.8em;
    text-align: left;
}
th { background: var(--cream); color: var(--ink); }

code, pre {
    font-family: "SFMono-Regular", Consolas, monospace;
    background: #efe9dc;
    border-radius: 6px;
}
code { padding: 0.1em 0.4em; }
pre { padding: 1em; overflow: auto; }

/* ===== Layout ===== */
.shell {
    width: min(92%, var(--maxw));
    margin-inline: auto;
}

.site-main { padding: 2.6rem 0 3rem; }

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

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 2rem; }
    .layout-single .content-area { width: 100%; }
}

/* ===== Header ===== */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1;
}
.brand-logo, .brand-mark { flex: 0 0 auto; display: block; }
.brand-mark { width: 52px; height: 52px; }
.brand-text { min-width: 0; }
.brand-title {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    display: block;
    text-decoration: none;
}
.brand-desc {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0.2rem 0 0;
    max-width: 60ch;
}

.main-nav { width: 100%; }
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0.6rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.6rem;
    border-top: 1px solid var(--line);
}
.main-nav a {
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 0.96rem;
    padding: 0.3rem 0;
    display: inline-block;
}
.main-nav a:hover { color: var(--gold-deep); text-decoration: none; }
.main-nav .current-menu-item > a { color: var(--gold-deep); }

.nav-toggle {
    display: none;
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    font-size: 0.95rem;
    cursor: pointer;
}

@media (max-width: 600px) {
    .nav-toggle { display: inline-block; margin-top: 0.6rem; }
    .main-nav ul { display: none; flex-direction: column; gap: 0.2rem; }
    .main-nav.is-open ul { display: flex; }
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    padding: 1rem 0 0;
}
.breadcrumbs a { color: var(--gold-deep); }
.breadcrumbs .sep { margin: 0 0.4rem; color: var(--line); }

/* ===== Front page sections ===== */
.front-section { padding: 2.8rem 0; }
.front-section.alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 70ch; margin-bottom: 1.6rem; }
.section-head .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.74rem;
    color: var(--gold-deep);
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

/* split: text + illustration */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.4rem;
    align-items: center;
}
.split.reverse .split-media { order: -1; }
.split-media img { width: 100%; border-radius: var(--radius); display: block; box-shadow: var(--shadow); }
@media (max-width: 760px) {
    .split { grid-template-columns: 1fr; gap: 1.5rem; }
    .split.reverse .split-media { order: 0; }
}

/* feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1.4rem;
}
.feature {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem;
    min-width: 0;
}
.feature .ficon {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    background: var(--cream);
    border-radius: 12px;
    margin-bottom: 0.9rem;
    color: var(--gold-deep);
}
.feature h3 { font-size: 1.15rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.4rem;
    counter-reset: step;
}
.step {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.4rem 1.4rem;
    position: relative;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--gold-light);
    font-family: Georgia, serif;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}
.step h3 { font-size: 1.1rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* quote band */
.quote-band {
    background: var(--ink);
    color: var(--cream);
    border-radius: var(--radius);
    padding: 2.8rem;
    text-align: center;
}
.quote-band p {
    font-family: Georgia, serif;
    font-size: 1.5rem;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 48ch;
    font-style: italic;
}
.quote-band cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--gold-light);
    font-style: normal;
    letter-spacing: 0.08em;
}

/* ===== Cards ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.6rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-thumb-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--cream);
}
.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-thumb-ph {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--ink), var(--ink-soft));
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.3rem 1.4rem 1.4rem;
}
.card-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.5rem; }
.card-title { font-size: 1.2rem; margin: 0 0 0.6rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--gold-deep); text-decoration: none; }
.card-excerpt { color: var(--muted); font-size: 0.95rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 0.8rem;
    font-weight: 600;
    color: var(--gold-deep);
    align-self: flex-start;
}

/* ===== Single / page ===== */
.entry { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 2.2rem; }
.entry-header { margin-bottom: 1.4rem; }
.entry-meta { font-size: 0.82rem; color: var(--muted); margin-top: 0.4rem; }
.entry-thumb { border-radius: var(--radius); overflow: hidden; margin: 0 0 1.6rem; }
.entry-thumb img { width: 100%; display: block; }
.entry-content img { border-radius: 10px; }
.entry-content > * { min-width: 0; }
@media (max-width: 600px) { .entry { padding: 1.4rem 1.2rem; } }

.post-tags { margin-top: 1.6rem; font-size: 0.9rem; }
.post-tags a {
    display: inline-block;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 0.2rem 0.8rem;
    margin: 0.2rem 0.3rem 0.2rem 0;
}

/* ===== Sidebar ===== */
.sidebar { min-width: 0; }
.widget {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem;
    margin-bottom: 1.6rem;
}
.widget-title {
    font-size: 1.05rem;
    color: var(--ink);
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold);
}
.sidebar .widget, .sidebar .widget p, .sidebar .widget li { color: var(--text); }
.sidebar .widget a { color: var(--gold-deep); }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.widget_recent_entries .post-date { display: block; font-size: 0.78rem; color: var(--muted); }

/* ===== Виджет «Последние материалы» ===== */
.recent-materials { list-style: none; padding: 0; margin: 0; }
.recent-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
}
.recent-item:first-child { padding-top: 0; }
.recent-item:last-child { border-bottom: 0; padding-bottom: 0; }
.recent-thumb {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--paper-2, #f5efe2);
    display: block;
}
.recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.recent-thumb .card-thumb-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.recent-text { min-width: 0; }
.recent-title {
    display: block;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink) !important;
    text-decoration: none;
}
.recent-title:hover { color: var(--gold-deep) !important; }
.recent-date {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    color: var(--muted);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.2rem 0 0;
}
.pagination .page-numbers {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.7rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink-soft);
    font-weight: 600;
    text-decoration: none;
}
.pagination a.page-numbers:hover { border-color: var(--gold); color: var(--gold-deep); }
.pagination .page-numbers.current {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.pagination .page-numbers.dots { border: 0; background: none; }

/* ===== Search form ===== */
.search-form { display: flex; gap: 0.5rem; }
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    background: var(--paper);
}
.search-form .search-submit {
    border: 0;
    background: var(--ink);
    color: #fff;
    border-radius: 10px;
    padding: 0 1.1rem;
    cursor: pointer;
    font: inherit;
}
.search-form .search-submit:hover { background: var(--gold-deep); }

/* ===== Comments ===== */
.comments-area { margin-top: 2.4rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { margin-bottom: 1.2rem; }
.comment-body {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem;
}
.comment-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.4rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    background: var(--paper);
    margin-top: 0.3rem;
}
.comment-form p { margin-bottom: 0.9rem; }
.comment-form .submit {
    background: var(--ink); color: #fff; border: 0;
    border-radius: 10px; padding: 0.6rem 1.4rem; cursor: pointer; font: inherit;
}
.comment-form .submit:hover { background: var(--gold-deep); }

/* ===== 404 ===== */
.error-404 { text-align: center; padding: 3rem 0; }
.error-404 .big { font-size: 5rem; color: var(--gold); font-family: Georgia, serif; margin: 0; }
.error-404 .search-form { max-width: 420px; margin: 1.6rem auto 0; }
.btn {
    display: inline-block;
    background: var(--ink);
    color: #fff;
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    font-weight: 600;
    margin-top: 1.2rem;
}
.btn:hover { background: var(--gold-deep); text-decoration: none; color: #fff; }

/* ===== Footer ===== */
.site-footer {
    background: var(--ink);
    color: #d7d9e6;
    margin-top: 3rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 2rem;
    padding: 2.8rem 0 2rem;
}
.footer-col { min-width: 0; }
.site-footer .widget { background: none; border: 0; padding: 0; margin: 0; }
.site-footer .widget-title { color: #fff; border-bottom-color: var(--gold); }
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li { color: #c7cadb; }
.site-footer .widget a { color: var(--gold-light); }
.site-footer .widget a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 0.35rem 0; }
.site-footer .post-date { display: block; font-size: 0.78rem; color: #9a9db4; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 1.2rem 0;
    font-size: 0.85rem;
    color: #9a9db4;
}

/* ===== Cookie banner ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    max-width: 760px;
    margin-inline: auto;
    background: var(--ink);
    color: #e7e8f0;
    border: 1px solid var(--gold-deep);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 14px 40px rgba(0,0,0,0.35);
    z-index: 1000;
}
.cookie-banner p { margin: 0; flex: 1; min-width: 220px; font-size: 0.9rem; }
.cookie-banner a { color: var(--gold-light); }
.cookie-accept {
    border: 0;
    background: var(--gold);
    color: var(--ink);
    font-weight: 700;
    border-radius: 10px;
    padding: 0.6rem 1.4rem;
    cursor: pointer;
    font: inherit;
}
.cookie-accept:hover { background: var(--gold-light); }

/* details / faq if used elsewhere */
details {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.4rem 1.2rem;
    margin-bottom: 0.8rem;
}
summary { cursor: pointer; font-weight: 600; padding: 0.7rem 0; color: var(--ink); }

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