/*
Theme Name: dds_cliniclaser.ru
Author: Анна Соболева
Description: Информационно-экспертная тема для портала о безопасных нехирургических методиках восстановления тонуса и сияния кожи. Глубокий изумрудный и шафраново-золотой акцент, спокойная клиническая эстетика.
Version: 1.1
Text Domain: cliniclaser
*/

/* ============================================================
   Переменные
   ============================================================ */
:root {
    --emerald: #1A4D3E;
    --emerald-dark: #143b30;
    --emerald-light: #266653;
    --gold: #E6B87E;
    --gold-soft: #f1d6b3;
    --white: #FFFFFF;
    --pearl: #F5F3F0;
    --graphite: #2C2C2C;
    --line: #e3e0da;
    --shadow: 0 8px 28px rgba(26, 77, 62, 0.10);
    --radius: 14px;
}

/* ============================================================
   Базовые сбросы
   ============================================================ */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

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

a {
    color: var(--emerald);
    text-decoration: none;
    transition: color .2s ease;
}
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
    font-family: "Georgia", "PT Serif", serif;
    color: var(--emerald);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 700;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

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

blockquote {
    margin: 1.4em 0;
    padding: 1em 1.4em;
    border-left: 4px solid var(--gold);
    background: var(--pearl);
    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(--pearl); color: var(--emerald); }

code, pre {
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
    background: var(--pearl);
    border-radius: 6px;
}
code { padding: 0.1em 0.4em; font-size: 0.92em; }
pre { padding: 1em; overflow-x: auto; }

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

.page-wrap { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; padding: 38px 0 56px; }

/* Каллиграфический полукурсив для имён */
.signature {
    font-family: "Brush Script MT", "Segoe Script", "Snell Roundhand", cursive;
    font-style: italic;
    color: var(--emerald-light);
    text-shadow: 0 0 6px rgba(230, 184, 126, 0.55);
    font-size: 1.18em;
    letter-spacing: .3px;
}

/* ============================================================
   Кнопки — форма «капли» лазерной головки
   ============================================================ */
.btn {
    display: inline-block;
    padding: 0.66em 1.7em;
    font-family: "Georgia", serif;
    font-size: 0.98rem;
    color: #fff;
    background: var(--emerald);
    border: 1.5px solid var(--gold);
    border-radius: 10px 10px 26px 26px;
    box-shadow: inset 0 0 13px rgba(230, 184, 126, 0.30);
    cursor: pointer;
    transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.btn:hover,
.btn:focus {
    background: var(--gold);
    color: #fff;
    font-weight: 300;
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.6);
}

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.brand { padding: 22px 0 16px; }

.brand-link {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--graphite);
}
.brand-link:hover { color: var(--graphite); }

.brand-logo {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    display: block;
}
.brand-logo--svg {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-family: "Georgia", serif;
    font-weight: 700;
    font-size: 1.04rem;
    line-height: 1.35;
    color: var(--emerald);
}
.brand-desc {
    display: block;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #6a6a6a;
    margin-top: 4px;
}

/* Панель навигации */
.nav-bar { background: var(--emerald); }
.nav-bar-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 52px;
}

.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.primary-menu li { margin: 0; }
.primary-menu a {
    display: block;
    padding: 14px 16px;
    color: #eef1ee;
    font-size: 0.97rem;
}
.primary-menu a:hover,
.primary-menu .current-menu-item > a {
    color: var(--gold);
}

/* Гамбургер */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--gold);
    transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Хлебные крошки
   ============================================================ */
.breadcrumbs {
    font-size: 0.88rem;
    color: #7a7a7a;
    margin: 0 0 22px;
}
.breadcrumbs a { color: var(--emerald-light); }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs .sep { color: var(--gold); margin: 0 5px; }
.breadcrumbs span:last-child { color: var(--graphite); }

/* ============================================================
   Раскладки
   ============================================================ */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 44px;
    align-items: start;
}
.layout-single {
    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: 36px; }
    .layout-single { width: 100%; }
}

/* ============================================================
   Сайдбар-виджеты
   ============================================================ */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--pearl);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    color: var(--graphite);
}
.sidebar .widget-title {
    color: var(--emerald);
    font-size: 1.1rem;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
}
.sidebar .widget a { color: var(--emerald-light); }
.sidebar .widget a:hover { color: var(--gold); }
.sidebar .widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar .widget li {
    padding: 8px 0;
    border-bottom: 1px dotted var(--line);
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget_recent_entries .post-date {
    display: block;
    font-size: 0.8rem;
    color: #8a8a8a;
}

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

.card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(26, 77, 62, 0.16);
}

.card-thumb {
    display: block;
    overflow: hidden;
}
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .4s ease;
}
.card:hover .card-thumb img { transform: scale(1.05); }

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 24px;
}

.card-title {
    font-size: 1.18rem;
    margin: 10px 0 8px;
}
.card-title a { color: var(--emerald); }
.card-title a:hover { color: var(--gold); }

.card-meta {
    font-size: 0.82rem;
    color: #8a8a8a;
    margin-bottom: 8px;
}

.card-excerpt {
    color: var(--graphite);
    font-size: 0.96rem;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

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

/* Клинический бейдж рубрики */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 4px 12px 5px;
    font-size: 0.76rem;
    letter-spacing: .3px;
    color: var(--emerald);
    background: rgba(230, 184, 126, 0.18);
    border: 1px solid var(--gold);
    border-radius: 4px 4px 11px 11px;
}
.badge:hover { color: var(--emerald-dark); background: rgba(230, 184, 126, 0.34); }
.badge-icon { width: 14px; height: 14px; flex: 0 0 auto; }

/* Патчворк: первая карточка крупнее на широких экранах */
@media (min-width: 961px) {
    .card-grid--feature .card:first-child { grid-column: span 2; }
    .card-grid--feature .card:first-child .card-thumb img { aspect-ratio: 21 / 9; }
}

/* ============================================================
   Пагинация
   ============================================================ */
.pagination { margin: 38px 0 0; }
.pagination ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
}
.pagination a,
.pagination span {
    display: block;
    padding: 9px 15px;
    border: 1px solid var(--line);
    border-radius: 8px 8px 14px 14px;
    color: var(--emerald);
    background: var(--white);
}
.pagination a:hover { background: var(--pearl); color: var(--gold); }
.pagination .current {
    background: var(--emerald);
    color: #fff;
    border-color: var(--emerald);
}

/* ============================================================
   Тематические секции главной
   ============================================================ */
.front-section {
    position: relative;
    margin: 0 0 56px;
    overflow: hidden;
}
.front-section:last-child { margin-bottom: 8px; }

.section-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 30px;
}
.section-head h2 { font-size: 1.85rem; }
.section-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

/* Сияющие ореолы (рефлексы лазерной вспышки) */
.halo {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(230, 184, 126, 0.30) 0%, rgba(230, 184, 126, 0) 70%);
    pointer-events: none;
    z-index: 0;
}
.halo--a { width: 320px; height: 320px; top: -120px; right: -90px; }
.halo--b { width: 240px; height: 240px; bottom: -110px; left: -80px; }

/* Геро-блок */
.hero {
    background: var(--pearl);
    border-radius: 22px;
    padding: 54px 6%;
    text-align: center;
}
.hero h1 { font-size: 2.3rem; }
.hero-lead {
    max-width: 720px;
    margin: 0 auto 26px;
    font-size: 1.08rem;
    color: #444;
    position: relative;
    z-index: 1;
}
.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Сетка направлений / бейджей */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}
.feature-card {
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    position: relative;
    z-index: 1;
}
.feature-card .feat-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    color: var(--emerald);
}
.feature-card h3 { font-size: 1.12rem; }
.feature-card p { font-size: 0.94rem; margin: 0; color: #444; }

/* Шаги «как мы работаем» */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    counter-reset: step;
}
.step {
    min-width: 0;
    background: var(--pearl);
    border-radius: var(--radius);
    padding: 28px 24px 24px;
    position: relative;
    z-index: 1;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    font-family: "Georgia", serif;
    font-weight: 700;
    color: #fff;
    background: var(--emerald);
    border: 1.5px solid var(--gold);
    border-radius: 8px 8px 18px 18px;
}
.step h3 { font-size: 1.08rem; }
.step p { margin: 0; font-size: 0.94rem; color: #444; }

/* Слайдер цитат экспертов */
.quote-band {
    background: var(--emerald);
    border-radius: 22px;
    padding: 48px 7%;
    position: relative;
    overflow: hidden;
}
.quote-band .section-eyebrow { color: var(--gold); }
.quote-band h2 { color: #fff; }
.quote-slider {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}
.quote-slide { display: none; }
.quote-slide.is-active { display: block; }
.quote-text {
    font-size: 1.22rem;
    line-height: 1.6;
    color: #f3f1ec;
    font-style: italic;
    padding: 14px 18px;
    border-radius: 12px;
    transition: background .3s ease, color .3s ease;
    position: relative;
}
.quote-text:hover {
    background: rgba(230, 184, 126, 0.16);
    color: var(--gold);
}
.quote-text:hover::after {
    content: "";
    position: absolute;
    top: -14px;
    right: 8px;
    width: 30px;
    height: 30px;
    background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E6B87E' stroke-width='2'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cline x1='15.5' y1='15.5' x2='21' y2='21'/%3E%3Cpath d='M7.5 12.5c1.2 1.4 4.4 1.4 6 0' stroke-linecap='round'/%3E%3C/svg%3E");
}
.quote-author {
    display: block;
    margin-top: 14px;
    font-size: 1.3rem;
}
.quote-role {
    display: block;
    font-size: 0.86rem;
    color: var(--gold-soft);
}
.quote-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
}
.quote-prev, .quote-next {
    background: transparent;
    border: 1.5px solid var(--gold);
    color: var(--gold);
    width: 38px;
    height: 38px;
    border-radius: 8px 8px 16px 16px;
    cursor: pointer;
    font-size: 1rem;
}
.quote-prev:hover, .quote-next:hover { background: var(--gold); color: var(--emerald-dark); }
.quote-dots { display: flex; gap: 8px; }
.quote-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}
.quote-dot.is-active { background: var(--gold); }

/* Лента последних записей на главной */
.front-posts { margin: 0 0 56px; }

/* ============================================================
   Контент записи / страницы
   ============================================================ */
.entry-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px 38px;
    box-shadow: var(--shadow);
}
.entry-title { font-size: 2rem; margin-bottom: 6px; }
.entry-meta {
    font-size: 0.86rem;
    color: #8a8a8a;
    margin-bottom: 18px;
}
.entry-thumb {
    margin: 0 0 22px;
    border-radius: var(--radius);
    overflow: hidden;
}
.entry-thumb img { display: block; width: 100%; }
.entry-content { font-size: 1.04rem; }
.entry-content img { border-radius: var(--radius); }
.entry-content h2 { margin-top: 1.4em; }

.entry-footer {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}
.entry-footer .tag-link {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 3px 11px;
    background: var(--pearl);
    border: 1px solid var(--line);
    border-radius: 4px 4px 11px 11px;
    font-size: 0.82rem;
}

.author-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 26px;
    padding: 20px 22px;
    background: var(--pearl);
    border-radius: var(--radius);
}
.author-box .author-name { font-size: 1.35rem; }

/* ============================================================
   Комментарии
   ============================================================ */
.comments-area {
    margin-top: 30px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 34px;
    box-shadow: var(--shadow);
}
.comments-title { font-size: 1.4rem; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list ul.children { list-style: none; padding-left: 28px; }
.comment-item { margin: 0 0 18px; }
.comment-body {
    padding: 16px 18px;
    background: var(--pearl);
    border-radius: var(--radius);
}
.comment-meta {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 6px;
}
.comment-date { font-size: 0.8rem; color: #8a8a8a; }
.comment-reply { font-size: 0.85rem; margin-top: 6px; }

.comment-respond {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.96rem;
    background: var(--white);
}
.comment-form textarea { min-height: 130px; }
.comment-form label { font-size: 0.9rem; display: block; margin: 12px 0 4px; }

/* ============================================================
   Форма поиска
   ============================================================ */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px 8px 14px 14px;
    font-family: inherit;
    font-size: 0.96rem;
}
.search-form .search-submit { white-space: nowrap; }

/* ============================================================
   Страница 404
   ============================================================ */
.error-404 {
    text-align: center;
    padding: 40px 0 30px;
}
.error-404 .err-code {
    font-size: 5rem;
    color: var(--gold);
    line-height: 1;
    margin: 0;
}
.error-404 .search-form {
    max-width: 460px;
    margin: 24px auto;
}

/* ============================================================
   Подвал — прозрачная панель на изумрудном фоне
   ============================================================ */
.site-footer {
    position: relative;
    background: var(--emerald);
    color: #e9efe9;
    overflow: hidden;
}
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 26%, rgba(230,184,126,0.55) 0 2.5px, transparent 3px),
        radial-gradient(circle at 30% 64%, rgba(230,184,126,0.45) 0 2.5px, transparent 3px),
        radial-gradient(circle at 52% 22%, rgba(230,184,126,0.5) 0 2.5px, transparent 3px),
        radial-gradient(circle at 70% 58%, rgba(230,184,126,0.4) 0 2.5px, transparent 3px),
        radial-gradient(circle at 88% 34%, rgba(230,184,126,0.5) 0 2.5px, transparent 3px),
        radial-gradient(circle at 46% 80%, rgba(230,184,126,0.35) 0 2.5px, transparent 3px);
    pointer-events: none;
}
.footer-cols {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    padding: 46px 0 36px;
}
.footer-col { min-width: 0; }
.site-footer .widget { margin-bottom: 4px; }
.site-footer .widget-title {
    color: var(--gold);
    font-size: 1.08rem;
    margin-bottom: 12px;
}
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li { color: #e3e9e3; }
.site-footer .widget a { color: #eef2ee; }
.site-footer .widget a:hover { color: var(--gold); }
.site-footer .widget ul { list-style: none; padding: 0; margin: 0; }
.site-footer .widget li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.10); }
.site-footer .widget li:last-child { border-bottom: none; }
.site-footer .widget_recent_entries .post-date {
    display: block;
    font-size: 0.8rem;
    color: var(--gold-soft);
}

.footer-bottom {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.14);
    padding: 18px 0;
}
.copyright {
    margin: 0;
    font-size: 0.84rem;
    color: #cdd6cd;
    text-align: center;
}

/* ============================================================
   Cookie-баннер  (правило [hidden] — ДО основного блока)
   ============================================================ */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
    background: var(--emerald-dark);
    color: #eef2ee;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: 16px 22px;
    box-shadow: 0 10px 34px rgba(0,0,0,0.3);
}
.cookie-text { margin: 0; font-size: 0.9rem; max-width: 760px; }
.cookie-accept { flex: 0 0 auto; }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 960px) {
    body { font-size: 16px; }
    .nav-toggle { display: flex; }
    .nav-bar-inner { justify-content: space-between; }
    .primary-nav {
        flex-basis: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .primary-nav.is-open { max-height: 640px; }
    .primary-menu { flex-direction: column; gap: 0; padding-bottom: 8px; }
    .primary-menu a { padding: 12px 6px; border-top: 1px solid rgba(255,255,255,0.12); }
    .footer-cols { grid-template-columns: 1fr; gap: 28px; }
    .entry-card { padding: 26px 22px; }
    .comments-area { padding: 22px 20px; }
}

@media (max-width: 600px) {
    h1 { font-size: 1.7rem; }
    .hero { padding: 38px 7%; }
    .hero h1 { font-size: 1.8rem; }
    .quote-band, .quote-text { padding-left: 4%; padding-right: 4%; }
    .card-grid { grid-template-columns: 1fr; }
    .author-box { flex-direction: column; }
    .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 14px 16px; }
}
