/*
Theme Name: dds_siemens-servicing.ru
Author: Даниил Кудрин
Description: Информационная тема о ремонте и обслуживании бытовой техники: диагностика неисправностей, профилактика, уход и безопасность.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: techcare
*/

/* ===== Токены ===== */
:root {
    --ink: #1c2733;
    --ink-soft: #52616b;
    --brand: #0f4c81;
    --brand-dark: #0c3a63;
    --accent: #f2a541;
    --accent-dark: #d98a1f;
    --line: #dfe6ec;
    --bg: #ffffff;
    --bg-soft: #f4f7fa;
    --bg-deep: #10222f;
    --radius: 12px;
    --shell: min(92%, 1180px);
}

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

html { scroll-behavior: smooth; }

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

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

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

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); }
h1 { font-size: 1.9rem; margin: 0 0 .6em; }
h2 { font-size: 1.5rem; margin: 0 0 .6em; }
h3 { font-size: 1.2rem; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

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

/* ===== Шапка ===== */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: .9rem 0;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.brand-mark, .brand-logo { display: block; flex: 0 0 auto; }
.brand-logo { max-height: 54px; width: auto; }
.brand-text { min-width: 0; }
.brand-title { font-size: 1.05rem; font-weight: 700; color: var(--ink); display: block; }
.brand-desc { font-size: .78rem; color: var(--ink-soft); display: block; }

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.1rem;
    flex-wrap: wrap;
}
.main-nav a { color: var(--ink); font-weight: 600; font-size: .95rem; }
.main-nav a:hover { color: var(--brand); text-decoration: none; }

.nav-toggle {
    display: none;
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: .5rem .8rem;
    font-size: .95rem;
    cursor: pointer;
}

/* ===== Раскладка ===== */
.site-main { padding: 2rem 0 2.5rem; }

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

/* ===== Хлебные крошки ===== */
.breadcrumbs {
    font-size: .85rem;
    color: var(--ink-soft);
    margin-bottom: 1.2rem;
}
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs .sep { margin: 0 .35rem; color: var(--line); }

/* ===== Сайдбар ===== */
.sidebar { min-width: 0; }
.widget {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem;
    margin-bottom: 1.4rem;
    color: var(--ink);
}
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 .8rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--accent);
    color: var(--ink);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--brand-dark); }
.widget .post-date { display: block; font-size: .78rem; color: var(--ink-soft); }

/* ===== Карточки записей (A8, A10) ===== */
.card-list { display: grid; gap: 1.4rem; }
.card {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: 0 10px 26px rgba(16, 34, 47, .1); transform: translateY(-2px); }

.card-thumb-wrap {
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    display: block;
}
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.card-body { flex: 1; padding: 1.1rem 1.3rem 1.3rem; display: flex; flex-direction: column; }
.card-title { font-size: 1.2rem; margin: 0 0 .5rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand); text-decoration: none; }
.card-meta { font-size: .8rem; color: var(--ink-soft); margin-bottom: .6rem; }
.card-excerpt { color: var(--ink-soft); }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more {
    align-self: flex-start;
    margin-top: auto;
    padding-top: .5rem;
    font-weight: 600;
    color: var(--brand);
}

/* ===== Кнопки ===== */
.btn {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    padding: .7rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    border: 0;
    cursor: pointer;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn-accent { background: var(--accent); color: #3a2a05; }
.btn-accent:hover { background: var(--accent-dark); color: #3a2a05; }

/* ===== Одиночная запись / страница ===== */
.entry {
    background: var(--bg);
}
.entry-title { font-size: 2rem; }
.entry-meta { font-size: .85rem; color: var(--ink-soft); margin-bottom: 1.2rem; }
.entry-thumb { margin: 0 0 1.4rem; border-radius: var(--radius); overflow: hidden; }
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content { min-width: 0; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.6rem; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content blockquote {
    margin: 1.4rem 0;
    padding: 1.1rem 1.4rem;
    background: var(--bg-soft);
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    color: var(--ink);
}

/* ===== Таблицы контента ===== */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
}
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
    padding: .6rem .8rem;
    text-align: left;
}
.entry-content th { background: var(--bg-soft); }

/* ===== Пагинация (D5) ===== */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 2rem 0 .5rem;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: .5rem .7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--bg);
    font-weight: 600;
}
.pager a.page-numbers:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pager .page-numbers.current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.pager .page-numbers.dots { border: 0; background: none; }

/* ===== Главная ===== */
.front { }
.front-section { padding: 2.6rem 0; }
.front-section + .front-section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: 1.6rem; }
.section-head h2 { font-size: 1.7rem; }
.section-head p { color: var(--ink-soft); max-width: 720px; }

/* Блок: текст + иллюстрация */
.fs-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.2rem;
    align-items: center;
}
.fs-split.reverse .fs-media { order: -1; }
.fs-media img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.fs-text h2 { font-size: 1.7rem; }

/* Блок: сетка карточек-иконок */
.fs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}
.fs-cell {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem 1.4rem;
}
.fs-cell .ic {
    width: 46px;
    height: 46px;
    display: block;
    margin-bottom: .8rem;
    color: var(--brand);
}
.fs-cell h3 { margin: 0 0 .4rem; }
.fs-cell p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* Блок: шаги */
.fs-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.3rem;
    counter-reset: step;
}
.fs-step {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem 1.3rem 1.4rem;
    position: relative;
}
.fs-step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    margin-bottom: .7rem;
}
.fs-step h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.fs-step p { margin: 0; color: var(--ink-soft); font-size: .92rem; }

/* Блок: FAQ */
.fs-faq { max-width: 820px; }
.faq-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: .8rem;
    background: var(--bg-soft);
    overflow: hidden;
}
.faq-item summary {
    cursor: pointer;
    padding: 1rem 1.3rem;
    font-weight: 600;
    list-style: none;
    position: relative;
    color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 1.3rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand);
    font-size: 1.3rem;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item .faq-a { padding: 0 1.3rem 1.1rem; color: var(--ink-soft); }

/* Блок: CTA-плашка (A14) */
.fs-cta {
    background: var(--bg-deep);
    color: #eaf1f6;
    border-radius: var(--radius);
    padding: 2.6rem 2.4rem;
    text-align: center;
}
.fs-cta h2 { color: #fff; }
.fs-cta p { color: #c2d2dd; max-width: 640px; margin-inline: auto; }
.fs-cta .btn-accent { margin-top: .6rem; }

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

/* ===== Подвал ===== */
.site-footer {
    background: var(--bg-deep);
    color: #c8d5df;
    padding: 2.6rem 0 1.4rem;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.site-footer .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: #c8d5df;
}
.site-footer .widget-title {
    color: #fff;
    border-bottom-color: var(--accent);
}
.site-footer .widget a { color: #e7eef4; }
.site-footer .widget a:hover { color: var(--accent); }
.site-footer .widget li { border-bottom-color: rgba(255, 255, 255, .12); }
.site-footer .widget .post-date { color: #95a8b6; }
.site-copyright {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: .85rem;
    color: #9fb0bd;
    text-align: center;
}

/* ===== Поиск ===== */
.search-form { display: flex; gap: .5rem; }
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: .6rem .8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: .95rem;
}
.search-form button {
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: .6rem 1rem;
    cursor: pointer;
}

/* ===== Комментарии ===== */
.comments-area { margin-top: 2.4rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ul.children { list-style: none; margin: 0 0 0 1.4rem; padding: 0; }
.comment-body {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    background: var(--bg-soft);
}
.comment-meta { font-size: .82rem; color: var(--ink-soft); margin-bottom: .5rem; }
.comment-author { font-weight: 600; color: var(--ink); margin-right: .6rem; }
.comment-form label { display: block; font-size: .9rem; margin: .6rem 0 .2rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .6rem .8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: .95rem;
    font-family: inherit;
}

/* ===== Контакты / статичный блок ===== */
.contact-block { display: flex; flex-direction: column; gap: .5rem; margin: 1.2rem 0; }
.contact-block a { font-weight: 600; }

/* ===== 404 ===== */
.error-404 { text-align: center; padding: 2rem 0; }
.error-404 .big { font-size: 4rem; font-weight: 800; color: var(--brand); margin: 0; }

/* ===== Cookie-баннер (A11, D6) ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--bg-deep);
    color: #e7eef4;
    padding: 1rem 0;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .18);
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-inner p { margin: 0; font-size: .9rem; color: #cddae3; }
.cookie-inner a { color: var(--accent); }

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .fs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fs-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fs-latest .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    h1, .entry-title { font-size: 1.55rem; }
    .layout-single { width: 100%; }
    .main-nav {
        display: none;
        flex-basis: 100%;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: .3rem; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav a { display: block; padding: .5rem 0; }
    .nav-toggle { display: inline-block; }

    .fs-split { grid-template-columns: 1fr; }
    .fs-split.reverse .fs-media { order: 0; }
    .fs-grid { grid-template-columns: 1fr; }
    .fs-steps { grid-template-columns: 1fr; }
    .fs-latest .card-list { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr; }
    .fs-cta { padding: 1.9rem 1.4rem; }
    .cookie-inner { justify-content: center; text-align: center; }
}
