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

/* =========================================================
   Переменные и базовая типографика
   ========================================================= */
:root {
    --ink: #16243f;
    --ink-soft: #2c3a55;
    --brass: #b07d34;
    --brass-deep: #8a5f24;
    --paper: #f6f3ec;
    --surface: #ffffff;
    --line: #e2dccf;
    --text: #232c39;
    --muted: #5e6675;
    --maxw: 1180px;
    --radius: 10px;
    --shadow: 0 8px 28px rgba(22, 36, 63, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: "PT Serif", Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.7;
    overflow-x: hidden;
}

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

h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a {
    color: var(--brass-deep);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--ink); text-decoration: underline; }

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

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

/* =========================================================
   Шапка
   ========================================================= */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-logo { display: block; height: 56px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-family: Georgia, serif;
    font-weight: 700;
    color: var(--ink);
    font-size: 1.2rem;
    line-height: 1.2;
    max-width: 46ch;
}
.brand-name a { color: inherit; text-decoration: none; }
.brand-desc {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 4px;
    max-width: 60ch;
    line-height: 1.4;
}

/* Навигация */
.main-nav { min-width: 0; }
.nav-toggle {
    display: none;
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: 8px 14px;
    color: var(--ink);
    font-family: Georgia, serif;
    font-size: 1rem;
    border-radius: 7px;
    text-decoration: none;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: var(--paper);
    color: var(--brass-deep);
}

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

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

/* Хлебные крошки */
.crumbs {
    font-family: Georgia, serif;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 22px;
}
.crumbs a { color: var(--brass-deep); }
.crumbs .sep { color: var(--line); margin: 0 4px; }

/* =========================================================
   Сайдбар и виджеты
   ========================================================= */
.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(--text);
}
.sidebar .widget-title {
    font-size: 1.1rem;
    color: var(--ink);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brass);
}
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--ink-soft); }
.sidebar .widget a:hover { color: var(--brass-deep); }
.sidebar .widget .post-date,
.sidebar .widget time { color: var(--muted); font-size: 0.82rem; }

/* =========================================================
   Карточки записей
   ========================================================= */
.card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb-wrap {
    display: block;
    overflow: hidden;
}
.card-thumb-wrap img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
    min-width: 0;
}
.card-meta {
    font-family: Georgia, serif;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.card-meta a { color: var(--brass-deep); }
.card-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brass-deep); text-decoration: none; }
.card-excerpt {
    color: var(--ink-soft);
    font-size: 0.95rem;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 14px;
}
.btn {
    display: inline-block;
    background: var(--ink);
    color: #fff;
    padding: 9px 18px;
    border-radius: 8px;
    font-family: Georgia, serif;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.15s ease;
}
.btn:hover { background: var(--brass-deep); color: #fff; text-decoration: none; }

/* =========================================================
   Одиночная запись / страница
   ========================================================= */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 36px;
    box-shadow: var(--shadow);
}
.entry-header { margin-bottom: 20px; }
.entry-title { font-size: 2rem; }
.entry-meta {
    font-family: Georgia, serif;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 8px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.entry-meta a { color: var(--brass-deep); }
.entry-thumb { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; }
.entry-thumb img { display: block; width: 100%; }
.entry-content { line-height: 1.8; }
.entry-content img { border-radius: 8px; }
.entry-content blockquote {
    margin: 1.5em 0;
    padding: 14px 22px;
    border-left: 4px solid var(--brass);
    background: var(--paper);
    font-style: italic;
    color: var(--ink-soft);
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
}
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
    padding: 10px 12px;
    text-align: left;
}
.entry-content th { background: var(--ink); color: #fff; }
.entry-tags {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}
.entry-tags a {
    display: inline-block;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 3px 12px;
    margin: 0 6px 6px 0;
    color: var(--ink-soft);
}

/* =========================================================
   Главная
   ========================================================= */
.front-section { margin-bottom: 56px; }
.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 { font-size: 1.9rem; }
.section-head p { color: var(--muted); max-width: 70ch; margin-inline: auto; }

/* Текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-text { min-width: 0; }
.split-text h2 { font-size: 1.8rem; }
.split-media {
    min-width: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.split-media img { display: block; width: 100%; }

/* Сетка преимуществ / иконок */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    min-width: 0;
}
.feature .feature-ico {
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
}
.feature h3 { font-size: 1.15rem; }
.feature p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* Пошаговый блок */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    counter-reset: step;
}
.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 20px;
    position: relative;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brass);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 14px;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

/* Цитата / акцент */
.accent-quote {
    background: var(--ink);
    color: #f3eee2;
    border-radius: var(--radius);
    padding: 50px 8%;
    text-align: center;
}
.accent-quote blockquote {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 1.5rem;
    line-height: 1.5;
    font-style: italic;
}
.accent-quote cite {
    display: block;
    margin-top: 18px;
    font-size: 0.95rem;
    font-style: normal;
    color: var(--brass);
}

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

/* Последние записи на главной */
.front-posts .card-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* =========================================================
   Пагинация
   ========================================================= */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 36px;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-family: Georgia, serif;
    text-decoration: none;
}
.pager a.page-numbers:hover { border-color: var(--brass); color: var(--brass-deep); }
.pager .page-numbers.current {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.pager .page-numbers.dots {
    border: 0;
    background: none;
}

/* =========================================================
   Комментарии
   ========================================================= */
.comments-area { margin-top: 36px; }
.comments-title { font-size: 1.4rem; margin-bottom: 18px; }
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment-list ol.children { list-style: none; margin: 0 0 0 26px; padding: 0; }
.comment-body {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 16px;
}
.comment-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.comment-author { font-family: Georgia, serif; font-weight: 700; color: var(--ink); }
.comment-date { color: var(--muted); font-size: 0.82rem; }
.comment-await { color: var(--brass-deep); font-style: italic; }
.comment-reply a { font-size: 0.85rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    background: var(--surface);
}
.comment-form label { display: block; margin-bottom: 4px; font-size: 0.9rem; color: var(--ink-soft); }
.comment-form p { margin-bottom: 14px; }
.comment-form .form-submit input { cursor: pointer; }
.comment-form input[type="submit"] {
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 11px 22px;
    font: inherit;
    cursor: pointer;
}
.comment-form input[type="submit"]:hover { background: var(--brass-deep); }

/* =========================================================
   Поиск
   ========================================================= */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    background: var(--surface);
}
.search-form .search-submit {
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 18px;
    font: inherit;
    cursor: pointer;
}
.search-form .search-submit:hover { background: var(--brass-deep); }

/* =========================================================
   404
   ========================================================= */
.error-404 {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 44px 36px;
    text-align: center;
}
.error-404 .big { font-size: 4rem; color: var(--brass); font-family: Georgia, serif; }
.error-404 .search-form { max-width: 440px; margin: 22px auto 0; }

/* =========================================================
   Подвал
   ========================================================= */
.site-footer {
    background: var(--ink);
    color: #cdd4e0;
    padding: 48px 0 24px;
    margin-top: 40px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}
.footer-cols .widget { min-width: 0; }
.footer-cols .widget-title {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brass);
}
.footer-cols .widget,
.footer-cols .widget p {
    color: #cdd4e0;
}
.footer-cols .widget ul { list-style: none; margin: 0; padding: 0; }
.footer-cols .widget li { padding: 6px 0; }
.footer-cols .widget a { color: #e7ddc7; }
.footer-cols .widget a:hover { color: #fff; }
.footer-cols .widget time,
.footer-cols .widget .post-date { color: #9aa3b5; }
.site-info {
    text-align: center;
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9aa3b5;
    font-size: 0.85rem;
}

/* =========================================================
   Cookie-баннер
   ========================================================= */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--ink);
    color: #eef1f7;
    padding: 16px 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: 0.9rem; }
.cookie-banner a { color: var(--brass); }
.cookie-accept {
    background: var(--brass);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 22px;
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--brass-deep); }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 40px; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .front-posts .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .brand-desc { display: none; }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    .nav-toggle { display: inline-block; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 12px;
    }
    .main-nav.is-open ul { display: flex; }
    .header-inner { flex-wrap: nowrap; }
    .main-nav { order: 3; width: 100%; }
    .card-list,
    .split,
    .feature-grid,
    .steps,
    .front-posts .card-list { grid-template-columns: 1fr; }
    .split.reverse .split-media { order: 0; }
    .layout-single .content-area { width: 100%; }
    .entry { padding: 24px 20px; }
    .accent-quote { padding: 36px 24px; }
    .accent-quote blockquote { font-size: 1.25rem; }
}
