/*
Theme Name: dds_indoortanningreportcard.com
Author: Алексей Загородний
Description: Информационная тема для аналитического блог-агрегатора о загаре в помещении.
Version: 1.1
Text Domain: tanlab
*/

/* ===== Базовые переменные ===== */
:root {
    --bg:        #faf5ee;
    --surface:   #ffffff;
    --ink:       #2b2017;
    --muted:     #6f5f50;
    --accent:    #c4621f;
    --accent-d:  #a4501a;
    --gold:      #e09a3a;
    --line:      #e6dccc;
    --dark:      #241a12;
    --dark-ink:  #f1e6d6;
    --dark-mut:  #c4b29c;
    --radius:    14px;
    --shell:     1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-d); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 2.05rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

.shell {
    width: min(92%, var(--shell));
    margin-inline: auto;
}

/* ===== Шапка ===== */
.site-head {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.head-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo { display: block; max-height: 56px; width: auto; }
.brand-mark { display: block; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--ink);
    line-height: 1.3;
}
.brand-desc {
    display: block;
    font-size: .82rem;
    color: var(--muted);
    margin-top: 2px;
}
.nav-toggle {
    margin-left: auto;
    display: none;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1rem;
    cursor: pointer;
}

/* ===== Меню ===== */
.main-nav { margin-left: auto; }
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 600;
    font-size: .96rem;
}
.main-nav a:hover { background: var(--bg); color: var(--accent); text-decoration: none; }
.main-nav .current-menu-item > a { background: var(--accent); color: #fff; }

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

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

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

/* ===== Хлебные крошки ===== */
.crumbs {
    font-size: .86rem;
    color: var(--muted);
    margin-bottom: 22px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { margin: 0 6px; color: var(--gold); }

/* ===== Карточки записей ===== */
.cards { display: grid; gap: 24px; }
.cards.cols-1 { grid-template-columns: 1fr; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.card-row {
    flex-direction: row;
}
.card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}
.card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-thumb-fallback {
    width: 100%;
    height: 100%;
    display: block;
    background: linear-gradient(135deg, var(--gold), var(--accent));
}
.card-body {
    flex: 1;
    min-width: 0;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
}
.card-title { font-size: 1.28rem; margin-bottom: 8px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); text-decoration: none; }
.card-meta { font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.card-excerpt { color: var(--ink); }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 10px;
    font-weight: 600;
}

@media (max-width: 600px) {
    .card-row { flex-direction: column; }
    .card-thumb-wrap { flex: none; width: 100%; position: static; }
    .card-thumb-wrap a { position: static; }
    .card-thumb-wrap img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}

/* ===== Запись / страница ===== */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 34px;
}
.entry-thumb { margin: 0 0 24px; border-radius: 10px; overflow: hidden; }
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-meta { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.entry-content { min-width: 0; }
.entry-content img { display: block; border-radius: 8px; margin: 1.2em 0; }
.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: 14px 22px;
    border-left: 4px solid var(--gold);
    background: var(--bg);
    color: var(--muted);
}
.tags-line { margin-top: 26px; font-size: .85rem; color: var(--muted); }
.tags-line a {
    display: inline-block;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 3px 12px;
    margin: 0 4px 6px 0;
}

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

/* ===== Сайдбар ===== */
.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(--ink);
}
.sidebar .widget-title {
    font-size: 1.05rem;
    margin-bottom: 14px;
    color: var(--ink);
    border-bottom: 2px solid var(--gold);
    padding-bottom: 8px;
}
.sidebar .widget a { color: var(--accent); }
.sidebar .widget a:hover { color: var(--accent-d); }
.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: 0; }
.sidebar .post-date { color: var(--muted); font-size: .8rem; }

/* ===== Главная ===== */
.hero {
    color: var(--dark-ink);
    background: linear-gradient(120deg, rgba(36,26,18,.78), rgba(164,80,26,.62)), var(--hero-img) center/cover no-repeat;
    border-radius: 18px;
    padding: 64px 8% ;
    margin: 30px 0 0;
    text-align: center;
}
.hero h1 { color: #fff; font-size: 2.3rem; margin-bottom: 14px; }
.hero p { color: var(--dark-ink); max-width: 760px; margin: 0 auto 22px; font-size: 1.08rem; }
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 12px 26px;
    border-radius: 10px;
    font-weight: 600;
}
.btn:hover { background: var(--accent-d); color: #fff; text-decoration: none; }

.section { padding: 48px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.section-head p { color: var(--muted); }

/* Блок: текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media img { display: block; width: 100%; height: auto; border-radius: 14px; }
@media (max-width: 760px) {
    .split { grid-template-columns: 1fr; }
    .split.reverse .split-media { order: 0; }
}

/* Блок: сетка рубрик */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}
.feature {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px;
    text-align: center;
}
.feature .ico { display: inline-flex; margin-bottom: 12px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Блок: шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    counter-reset: step;
}
.step {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 22px 22px;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: -18px; left: 22px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
}
.step h3 { margin: 8px 0; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Блок: FAQ */
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 4px 20px;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    padding: 14px 0;
    list-style: none;
    color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); margin: 0 0 14px; }

/* Лента последних записей на главной */
.latest-list { display: grid; gap: 24px; grid-template-columns: 1fr; }

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

/* ===== Комментарии ===== */
.comments { margin-top: 36px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 26px; padding: 0; }
.comment-inner {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.comment-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.comment-author { font-weight: 700; }
.comment-date { color: var(--muted); font-size: .8rem; }
.comment-pending { color: var(--accent); font-size: .85rem; }
.comment-actions { font-size: .85rem; }

.comment-respond {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px 24px;
    margin-top: 20px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    margin-top: 4px;
    background: var(--bg);
    color: var(--ink);
}
.comment-form textarea { min-height: 130px; }
.comment-form .form-submit input,
.comment-form input[type="submit"] {
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 11px 24px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

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

/* ===== 404 ===== */
.notfound { text-align: center; padding: 40px 0; }
.notfound .code { font-size: 5rem; font-weight: 800; color: var(--gold); line-height: 1; }
.notfound .search-form { max-width: 480px; margin: 24px auto 0; }

/* ===== Подвал ===== */
.site-foot {
    background: var(--dark);
    color: var(--dark-ink);
    margin-top: 40px;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
    padding: 46px 0 30px;
}
.site-foot .widget { color: var(--dark-ink); margin-bottom: 0; }
.site-foot .widget-title {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
}
.site-foot .widget,
.site-foot .widget p,
.site-foot .widget li,
.site-foot .post-date { color: var(--dark-mut); }
.site-foot .widget a { color: var(--dark-ink); }
.site-foot .widget a:hover { color: var(--gold); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-foot li:last-child { border-bottom: 0; }
.foot-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 18px 0;
    text-align: center;
    font-size: .85rem;
    color: var(--dark-mut);
}

@media (max-width: 760px) {
    .foot-cols { grid-template-columns: 1fr; gap: 26px; }
}

/* ===== Cookie-баннер ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--dark);
    color: var(--dark-ink);
    padding: 16px 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}
.cookie-inner p { margin: 0; font-size: .9rem; color: var(--dark-mut); }
.cookie-inner a { color: var(--gold); }
.cookie-accept {
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 22px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

/* ===== Адаптив меню ===== */
@media (max-width: 860px) {
    .nav-toggle { display: inline-block; }
    .main-nav {
        flex-basis: 100%;
        margin-left: 0;
        display: none;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 2px; }
    .main-nav a { padding: 12px 14px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    .entry { padding: 22px 20px; }
    .hero { padding: 44px 6%; }
    .hero h1 { font-size: 1.8rem; }
}
