/*
Theme Name: dds_appliedosteology.com
Author: Екатерина Зуева
Description: Научно-информационный портал доказательной реабилитации после переломов и архива по остеологии.
Version: 1.1
Text Domain: osteo
*/

/* ============================================================
   ПЕРЕМЕННЫЕ И БАЗА
   ============================================================ */
:root {
    --ink: #233039;
    --ink-soft: #4a5963;
    --bg: #f6f3ec;
    --surface: #ffffff;
    --surface-2: #efeadf;
    --line: #e0d9c9;
    --teal: #2f7d78;
    --teal-dark: #235e5a;
    --amber: #b9743a;
    --footer-bg: #1d2832;
    --footer-ink: #d6dde2;
    --footer-soft: #93a1ab;
    --shadow: 0 2px 10px rgba(35, 48, 57, 0.07);
    --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Georgia", "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 0.6em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

/* Единственный контейнер ширины (A12.7) */
.shell {
    width: min(92%, 1180px);
    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;
    flex: 1;
}
.brand-logo, .brand-mark {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
}
.brand-text { min-width: 0; }
.brand-title {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    line-height: 1.3;
}
.brand-title a { color: inherit; }
.brand-desc {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin: 4px 0 0;
    line-height: 1.4;
}

/* Навигация */
.main-nav { width: 100%; border-top: 1px solid var(--line); }
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.main-nav a {
    display: block;
    padding: 12px 16px;
    color: var(--ink);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
}
.main-nav a:hover { color: var(--teal-dark); text-decoration: none; background: var(--surface-2); }
.main-nav .current-menu-item > a { color: var(--teal-dark); border-bottom: 2px solid var(--teal); }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
    color: var(--ink);
}

/* ============================================================
   КОМПОНОВКА
   ============================================================ */
.site-main { padding: 30px 0 48px; }

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

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

/* Sidebar */
.sidebar {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}
.sidebar .widget { margin-bottom: 26px; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    font-size: 1.05rem;
    color: var(--ink);
    border-bottom: 2px solid var(--teal);
    padding-bottom: 8px;
    margin-bottom: 14px;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: none; }
.sidebar a { color: var(--teal-dark); }
.sidebar a:hover { color: var(--amber); }
.sidebar .post-date, .sidebar .rss-date { color: var(--ink-soft); font-size: 0.82rem; }

/* ============================================================
   ХЛЕБНЫЕ КРОШКИ
   ============================================================ */
.breadcrumbs {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 22px;
}
.breadcrumbs a { color: var(--teal-dark); }
.breadcrumbs .sep { margin: 0 6px; color: var(--ink-soft); }

/* ============================================================
   КАРТОЧКИ ЗАПИСЕЙ
   ============================================================ */
.cards { 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 {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.04); }

.card-body { flex: 1; padding: 18px 20px 22px; 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(--teal-dark); text-decoration: none; }
.card-meta { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 10px; }
.card-excerpt { margin-bottom: 16px; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.read-more {
    align-self: flex-start;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--teal-dark);
    border: 1px solid var(--teal);
    border-radius: 6px;
    padding: 7px 16px;
}
.read-more:hover { background: var(--teal); color: #fff; text-decoration: none; }

/* ============================================================
   ОДИНОЧНАЯ ЗАПИСЬ / СТРАНИЦА
   ============================================================ */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 34px;
    box-shadow: var(--shadow);
}
.entry-header { margin-bottom: 18px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.entry-title { margin: 0 0 8px; }
.entry-meta { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 0.82rem; color: var(--ink-soft); }
.entry-thumb { margin: 0 0 22px; border-radius: 8px; overflow: hidden; }
.entry-thumb img { width: 100%; display: block; }
.entry-content { line-height: 1.8; }
.entry-content img { border-radius: 6px; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content blockquote {
    margin: 1.4em 0;
    padding: 4px 20px;
    border-left: 4px solid var(--teal);
    background: var(--surface-2);
    color: var(--ink-soft);
}

/* Таблицы */
.entry-content table { border-collapse: collapse; width: 100%; margin: 1.4em 0; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.entry-content th { background: var(--surface-2); }

/* ============================================================
   ПАГИНАЦИЯ (type => plain → .page-numbers)
   ============================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 36px 0 6px;
}
.pagination .page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9rem;
}
.pagination a.page-numbers:hover { border-color: var(--teal); color: var(--teal-dark); text-decoration: none; }
.pagination .page-numbers.current { background: var(--teal); border-color: var(--teal); color: #fff; }
.pagination .page-numbers.dots { border: none; background: none; }

/* ============================================================
   КОММЕНТАРИИ / ФОРМЫ
   ============================================================ */
.comments-area { margin-top: 34px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px; }
.comments-title, .comment-reply-title { font-size: 1.25rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin: 0 0 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; }
.comment-list .children { list-style: none; margin: 16px 0 0; padding-left: 24px; }
.comment-author { font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 600; }
.comment-meta { font-size: 0.8rem; color: var(--ink-soft); }

input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    color: var(--ink);
}
.comment-form p { margin-bottom: 14px; }
.comment-form label { display: block; font-size: 0.88rem; margin-bottom: 4px; font-family: "Helvetica Neue", Arial, sans-serif; }

button, input[type="submit"], .btn {
    display: inline-block;
    background: var(--teal);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 11px 22px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
}
button:hover, input[type="submit"]:hover, .btn:hover { background: var(--teal-dark); text-decoration: none; color: #fff; }

/* Форма поиска */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; min-width: 0; }
.search-form button { flex: 0 0 auto; }

/* ============================================================
   ГЛАВНАЯ СТРАНИЦА
   ============================================================ */
.home-wrap { width: 85%; margin-inline: auto; }
.home-section { margin: 0 0 56px; }
.section-head { margin-bottom: 24px; }
.section-head .eyebrow {
    display: inline-block;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal-dark);
    margin-bottom: 8px;
}
.section-head h2 { font-size: 1.75rem; margin: 0 0 8px; }
.section-head .lead { color: var(--ink-soft); max-width: 720px; margin: 0; }

/* Слайдер */
.slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface);
}
.slider-track { position: relative; }
.slide {
    display: none;
    position: relative;
}
.slide.is-active { display: block; }
.slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    display: block;
}
.slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 26px 30px;
    background: linear-gradient(transparent, rgba(29, 40, 50, 0.86));
    color: #fff;
}
.slide-caption h3 { color: #fff; margin: 0 0 6px; font-size: 1.3rem; }
.slide-caption p { margin: 0; color: #e9eef1; font-size: 0.95rem; }
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    color: var(--ink);
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.slider-btn:hover { background: #fff; }
.slider-prev { left: 14px; }
.slider-next { right: 14px; }
.slider-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.slider-dot { width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(255,255,255,0.55); cursor: pointer; padding: 0; }
.slider-dot.is-active { background: #fff; }

/* Тематические колонки/карточки на главной */
.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;
    box-shadow: var(--shadow);
}
.feature-icon { width: 52px; height: 52px; margin-bottom: 14px; }
.feature h3 { font-size: 1.12rem; }
.feature p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; align-items: center; }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split-media img { width: 100%; display: block; }
.split-body p { color: var(--ink-soft); }

.contact-block {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 34px;
    text-align: center;
}
.contact-block p { color: var(--ink-soft); max-width: 640px; margin: 0 auto 16px; }
.contact-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.contact-links a {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
    color: var(--teal-dark);
}

.latest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.latest-head .all-link { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 0.9rem; }

/* ============================================================
   404
   ============================================================ */
.error-404 { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 50px 30px; }
.error-404 .code { font-size: 4rem; font-family: "Helvetica Neue", Arial, sans-serif; color: var(--teal); margin: 0; }
.error-404 .search-form { max-width: 420px; margin: 22px auto 0; }

/* ============================================================
   ПОДВАЛ
   ============================================================ */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); margin-top: 40px; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
    padding: 46px 0 36px;
}
.footer-col { min-width: 0; }
.footer-col .widget-title { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 1.05rem; color: #fff; margin-bottom: 14px; }
.footer-col, .footer-col p, .footer-col li, .footer-col .post-date, .footer-col .rss-date { color: var(--footer-ink); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-col li:last-child { border-bottom: none; }
.footer-col a { color: var(--footer-ink); }
.footer-col a:hover { color: #fff; }
.footer-col .post-date, .footer-col .rss-date { color: var(--footer-soft); font-size: 0.8rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; font-family: "Helvetica Neue", Arial, sans-serif; font-size: 0.82rem; color: var(--footer-soft); }

/* ============================================================
   COOKIE-БАННЕР  (правило A11 — до основного блока)
   ============================================================ */
.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 0;
    box-shadow: 0 -2px 14px rgba(0,0,0,0.2);
}
.cookie-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.cookie-inner p { margin: 0; font-family: "Helvetica Neue", Arial, sans-serif; font-size: 0.88rem; flex: 1; min-width: 220px; }
.cookie-inner a { color: #fff; text-decoration: underline; }
.cookie-accept { flex: 0 0 auto; }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 34px; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: 1fr; }
    .home-wrap, .layout-single .content-area { width: 100%; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .cards { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .nav-toggle { display: inline-block; margin: 12px 0; }
    .main-nav ul { display: none; flex-direction: column; }
    .main-nav.is-open ul { display: flex; }
    .main-nav { border-top: none; }
    .slide-caption { padding: 16px 18px; }
    .slide-caption h3 { font-size: 1.1rem; }
    .slider-btn { width: 36px; height: 36px; }
    .entry { padding: 22px 20px; }
    .home-wrap, .layout-single .content-area { width: 100%; }
}
