/*
Theme Name: dds_lola11.com
Theme URI: https://lola11.com
Author: Илья Руденко
Author URI: https://lola11.com
Description: Информационно-образовательная тема об искусственном интеллекте в медицинской визуализации. Спокойная научно-медицинская стилистика, акцент на читаемость и строгость.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: dds_lola11
*/

/* ================================================================
   Переменные
   ================================================================ */
:root {
    --c-navy: #1A2A3A;
    --c-teal: #3E6B6F;
    --c-bg: #F4F6F8;
    --c-white: #ffffff;
    --c-text: #1E1E1E;
    --c-text-2: #4A4A4A;
    --c-accent: #B85C3A;
    --c-border: #dfe4e9;
    --c-footer-text: #c7d0d9;
    --radius: 4px;
    --shell: min(92%, 1180px);
    --font-head: "Inter", "Roboto", -apple-system, "Segoe UI", sans-serif;
    --font-body: "Merriweather", Georgia, "Times New Roman", serif;
}

/* ================================================================
   База
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--c-navy);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 600;
}

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

p { margin: 0 0 1.1em; }

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

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

.shell {
    width: var(--shell);
    margin-inline: auto;
}

/* Кнопки */
.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.6em 1.3em;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: var(--c-accent);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: #9c4a2d; text-decoration: none; color: #fff; }

.btn-outline {
    background: transparent;
    border-color: var(--c-teal);
    color: var(--c-teal);
}
.btn-outline:hover { background: var(--c-teal); color: #fff; }

/* Текстовая ссылка «Читать далее» */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--c-accent);
    background: none;
    padding: 0;
}
.read-more::after { content: "→"; transition: transform 0.2s ease; }
.read-more:hover { text-decoration: underline; }
.read-more:hover::after { transform: translateX(3px); }

/* ================================================================
   Шапка
   ================================================================ */
.site-header {
    background: var(--c-white);
    border-bottom: 1px solid var(--c-border);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo, .brand-logo-svg {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--c-navy);
    line-height: 1.2;
    display: block;
}
.brand-desc {
    font-family: var(--font-head);
    font-size: 0.82rem;
    color: var(--c-text-2);
    display: block;
    margin-top: 2px;
    max-width: 640px;
}

.header-tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Навигация */
.main-nav { background: var(--c-navy); }
.main-nav .shell {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    font-family: var(--font-head);
    border-radius: var(--radius);
    padding: 0.5em 0.9em;
    cursor: pointer;
    margin: 0.6rem 0;
}
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}
.nav-menu li { margin: 0; }
.nav-menu a {
    display: block;
    color: #e6ecf2;
    font-family: var(--font-head);
    font-size: 0.96rem;
    padding: 0.95rem 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a {
    background: var(--c-teal);
    color: #fff;
    text-decoration: none;
}

/* Поиск в шапке */
.search-form {
    display: flex;
    align-items: stretch;
}
.search-form input[type="search"] {
    font-family: var(--font-head);
    font-size: 0.9rem;
    padding: 0.5em 0.7em;
    border: 1px solid var(--c-border);
    border-radius: var(--radius) 0 0 var(--radius);
    min-width: 0;
    width: 180px;
    background: #fff;
    color: var(--c-text);
}
.search-form button {
    border: none;
    background: var(--c-teal);
    color: #fff;
    padding: 0 0.9em;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    font-family: var(--font-head);
}
.search-form button:hover { background: var(--c-navy); }

/* ================================================================
   Каркас контента
   ================================================================ */
.site-main { padding: 2.2rem 0 3rem; }

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

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

/* Хлебные крошки */
.breadcrumbs {
    font-family: var(--font-head);
    font-size: 0.86rem;
    color: var(--c-text-2);
    margin-bottom: 1.4rem;
}
.breadcrumbs a { color: var(--c-teal); }
.breadcrumbs .sep { color: #9aa6b1; margin: 0 0.15em; }

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

.card {
    display: flex;
    flex-direction: column;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-thumb-wrap {
    display: block;
    overflow: hidden;
    background: #e7ebee;
}
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    filter: grayscale(100%) contrast(1.02);
    transition: filter 0.3s ease, transform 0.3s ease;
}
.card:hover .card-thumb-wrap img {
    filter: grayscale(45%);
    transform: scale(1.02);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.2rem 1.2rem;
    min-width: 0;
}
.card-title {
    font-size: 1.12rem;
    margin: 0 0 0.5rem;
}
.card-title a { color: var(--c-navy); }
.card-title a:hover { color: var(--c-teal); text-decoration: none; }
.card-meta {
    font-family: var(--font-head);
    font-size: 0.78rem;
    color: var(--c-text-2);
    margin-bottom: 0.6rem;
}
.card-excerpt { color: var(--c-text-2); font-size: 0.95rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-footer { margin-top: auto; padding-top: 0.6rem; }

/* ================================================================
   Одиночная запись / страница
   ================================================================ */
.entry {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.8rem 2rem 2rem;
    min-width: 0;
}
.entry-header { margin-bottom: 1.2rem; }
.entry-title { margin-bottom: 0.4rem; }
.entry-meta {
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: var(--c-text-2);
}
.entry-thumb { margin: 0 0 1.4rem; }
.entry-thumb img {
    width: 100%;
    border-radius: var(--radius);
    display: block;
    filter: grayscale(100%);
    cursor: zoom-in;
    transition: filter 0.3s ease;
}
.entry-thumb img:hover { filter: grayscale(40%); }
.entry-content { font-size: 1.05rem; }
.entry-content img { border-radius: var(--radius); display: block; }
.entry-content h2 { margin-top: 1.6rem; }
.entry-content h3 { margin-top: 1.3rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content blockquote {
    margin: 1.4rem 0;
    padding: 0.6rem 1.2rem;
    border-left: 4px solid var(--c-teal);
    background: var(--c-bg);
    color: var(--c-text-2);
}
.entry-tags {
    margin-top: 1.6rem;
    font-family: var(--font-head);
    font-size: 0.85rem;
}
.entry-tags a {
    display: inline-block;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.2em 0.7em;
    margin: 0 0.3em 0.3em 0;
    color: var(--c-teal);
}

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--c-border);
}
.entry-content th,
.entry-content td {
    padding: 0.6em 0.8em;
    text-align: left;
}
.entry-content th {
    background: var(--c-navy);
    color: #fff;
    font-family: var(--font-head);
}

/* ================================================================
   Главная
   ================================================================ */
.home-section { margin-bottom: 2.6rem; }
.home-section:last-child { margin-bottom: 0; }
.section-head { margin-bottom: 1.3rem; }
.section-head .eyebrow {
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
    color: var(--c-accent);
    font-weight: 600;
    display: block;
    margin-bottom: 0.4rem;
}

.hero {
    background: var(--c-navy);
    color: #eef2f6;
    border-radius: var(--radius);
    padding: 2.6rem 2.2rem;
}
.hero h1 { color: #fff; max-width: 24ch; }
.hero p { color: #c7d2dc; max-width: 60ch; font-size: 1.08rem; }
.hero .btn { margin-top: 0.6rem; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1.4rem;
}
.feature {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.4rem 1.4rem 1.5rem;
    min-width: 0;
}
.feature .feature-ico {
    width: 42px;
    height: 42px;
    color: var(--c-teal);
    margin-bottom: 0.7rem;
}
.feature h3 { margin-bottom: 0.4rem; }
.feature p { color: var(--c-text-2); font-size: 0.96rem; margin: 0; }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.4rem;
    counter-reset: step;
}
.step {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.4rem;
    position: relative;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    background: var(--c-accent);
    width: 34px; height: 34px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 0.7rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.step p { color: var(--c-text-2); font-size: 0.94rem; margin: 0; }

.cta-band {
    background: var(--c-teal);
    color: #fff;
    border-radius: var(--radius);
    padding: 2.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}
.cta-band h2 { color: #fff; margin: 0; }
.cta-band p { color: #e3eeee; margin: 0.3rem 0 0; max-width: 52ch; }
.cta-band .btn { background: var(--c-accent); }
.cta-band .btn:hover { background: var(--c-navy); }

/* ================================================================
   Сайдбар / виджеты
   ================================================================ */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem;
    margin-bottom: 1.4rem;
    color: var(--c-text);
}
.sidebar .widget-title {
    font-size: 1.05rem;
    color: var(--c-navy);
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--c-accent);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 0.4rem 0; border-bottom: 1px solid var(--c-border); }
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--c-teal); }
.sidebar .widget a:hover { color: var(--c-accent); }
.sidebar .widget .post-date,
.sidebar .widget .rss-date { color: var(--c-text-2); font-size: 0.8rem; }

/* ================================================================
   Пагинация
   ================================================================ */
.pagination { margin-top: 2rem; }
.pagination ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.pagination a, .pagination span {
    display: block;
    font-family: var(--font-head);
    font-size: 0.92rem;
    padding: 0.5em 0.85em;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-white);
    color: var(--c-teal);
}
.pagination a:hover { background: var(--c-teal); color: #fff; text-decoration: none; }
.pagination .current {
    background: var(--c-navy);
    color: #fff;
    border-color: var(--c-navy);
}

/* ================================================================
   Комментарии
   ================================================================ */
.comments-area {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.6rem 2rem;
    margin-top: 1.6rem;
    min-width: 0;
}
.comments-title { font-size: 1.3rem; }
.comment-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.comment-list ul.children { list-style: none; margin: 0 0 0 1.4rem; padding: 0; }
.comment-item { margin-bottom: 1.1rem; }
.comment-inner {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    background: var(--c-bg);
}
.comment-meta { font-family: var(--font-head); font-size: 0.85rem; margin-bottom: 0.4rem; }
.comment-author { font-weight: 600; color: var(--c-navy); }
.comment-date { color: var(--c-text-2); margin-left: 0.6rem; }
.comment-awaiting { color: var(--c-accent); font-size: 0.9rem; }
.comment-reply a { font-family: var(--font-head); font-size: 0.85rem; }
.comment-respond { margin-top: 1.4rem; }
.comment-form label { display: block; font-family: var(--font-head); font-size: 0.9rem; margin-bottom: 0.3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.55em 0.7em;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 1rem;
    background: #fff;
}
.comment-form .form-submit input {
    font-family: var(--font-head);
    background: var(--c-accent);
    color: #fff;
    border: none;
    padding: 0.6em 1.4em;
    border-radius: var(--radius);
    cursor: pointer;
}
.comment-form .form-submit input:hover { background: #9c4a2d; }

/* ================================================================
   404
   ================================================================ */
.error-404 {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 2.4rem 2rem;
    text-align: center;
}
.error-404 .code {
    font-family: var(--font-head);
    font-size: 4rem;
    font-weight: 700;
    color: var(--c-accent);
    line-height: 1;
}
.error-404 .search-form { justify-content: center; margin: 1.4rem 0; }
.error-404 .search-form input[type="search"] { width: 240px; }

/* ================================================================
   Подвал
   ================================================================ */
.site-footer {
    background: var(--c-navy);
    color: var(--c-footer-text);
    padding: 2.6rem 0 0;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
}
.site-footer .widget { margin-bottom: 0; color: var(--c-footer-text); min-width: 0; }
.site-footer .widget-title {
    font-family: var(--font-head);
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 0.9rem;
}
.site-footer .widget,
.site-footer .widget p { color: var(--c-footer-text); }
.site-footer .widget a { color: #e9eef3; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.3); }
.site-footer .widget a:hover { color: #fff; text-decoration-color: #fff; }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: 0.32rem 0; }
.site-footer .widget .post-date { color: #9fb0bf; font-size: 0.8rem; }

.site-copyright {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 1.2rem 0;
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: #9fb0bf;
}

/* ================================================================
   Cookie-баннер
   ================================================================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: var(--c-navy);
    color: #e6ecf2;
    border-top: 2px solid var(--c-accent);
    padding: 1rem 0;
}
.cookie-banner .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: 0.92rem; font-family: var(--font-head); }
.cookie-banner a { color: #fff; }
.cookie-accept {
    flex: 0 0 auto;
    font-family: var(--font-head);
    background: var(--c-accent);
    color: #fff;
    border: none;
    padding: 0.55em 1.4em;
    border-radius: var(--radius);
    cursor: pointer;
}
.cookie-accept:hover { background: #9c4a2d; }

/* Лайтбокс для КТ-изображений */
.lightbox-overlay {
    position: fixed; inset: 0;
    background: rgba(8, 14, 20, 0.92);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    padding: 2rem;
    cursor: zoom-out;
}
.lightbox-overlay[hidden] { display: none !important; }
.lightbox-overlay img { max-width: 95%; max-height: 92vh; filter: grayscale(100%); }

/* ================================================================
   Адаптив
   ================================================================ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .layout-single .content-area,
    .layout-narrow .content-area { width: 100%; }
    .hero { padding: 2rem 1.6rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    .header-inner { gap: 1rem; }
    .header-tools { margin-left: 0; width: 100%; }
    .search-form input[type="search"] { width: 100%; }
    .brand-desc { display: none; }

    .nav-toggle { display: block; }
    .main-nav .shell { flex-direction: column; align-items: stretch; }
    .nav-menu {
        flex-direction: column;
        display: none;
        padding-bottom: 0.6rem;
    }
    .nav-menu.is-open { display: flex; }
    .nav-menu a { padding: 0.75rem 0.4rem; border-top: 1px solid rgba(255,255,255,0.1); }

    .entry { padding: 1.3rem 1.2rem; }
    .cta-band { flex-direction: column; align-items: flex-start; }
    .comments-area { padding: 1.2rem 1.2rem; }
}
