/*
Theme Name: dds_plomberie-92.com
Author: Роман Гидролог
Description: Информационная тема для мультиформатного блога об умных инженерных решениях для дома с акцентом на водные системы и сантехнику.
Version: 1.1
Text Domain: plb
*/

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: #1b2c33;
    background: #eef3f6;
    overflow-x: hidden;
}

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

a { color: #137a8c; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    line-height: 1.25;
    color: #0f3a4d;
    margin: 0 0 0.6em;
}
h1 { font-size: 2.05rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

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

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
    background: #ffffff;
    border-bottom: 3px solid #137a8c;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}
.brand-logo { display: block; height: 56px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f3a4d;
    line-height: 1.3;
}
.brand-desc {
    display: block;
    font-size: 0.82rem;
    color: #5a6b73;
    margin-top: 2px;
}

/* Навигация — не липкая */
.main-nav { position: static; }
.nav-toggle {
    display: none;
    background: #0f3a4d;
    color: #fff;
    border: 0;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}
.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;
    color: #0f3a4d;
    font-weight: 600;
    border-radius: 6px;
}
.main-nav a:hover {
    background: #e3eef1;
    text-decoration: none;
}
.main-nav .current-menu-item > a {
    background: #137a8c;
    color: #fff;
}

/* ============================================================
   Хлебные крошки
   ============================================================ */
.crumbs {
    font-size: 0.88rem;
    color: #5a6b73;
    padding: 14px 0;
}
.crumbs a { color: #137a8c; }
.crumbs .sep { margin: 0 6px; color: #9bb0b8; }

/* ============================================================
   Основная раскладка
   ============================================================ */
.site-main { padding: 10px 0 50px; }

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

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

/* ============================================================
   Карточки записей
   ============================================================ */
.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
}
.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #dbe6ea;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 58, 77, 0.05);
}
.card-thumb-wrap {
    overflow: hidden;
    background: #d6e6ea;
}
.card-thumb-wrap a { display: block; }
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
}
.card-title { font-size: 1.18rem; margin: 0 0 8px; }
.card-title a { color: #0f3a4d; }
.card-meta {
    font-size: 0.82rem;
    color: #6a7b83;
    margin-bottom: 10px;
}
.card-excerpt { color: #3a4b53; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    display: inline-block;
    padding: 8px 16px;
    background: #137a8c;
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}
.card-more:hover { background: #0f3a4d; text-decoration: none; }

/* ============================================================
   Контент записи / страницы
   ============================================================ */
.entry {
    background: #fff;
    border: 1px solid #dbe6ea;
    border-radius: 12px;
    padding: 30px 34px;
}
.entry-title { margin-top: 0; }
.entry-meta {
    font-size: 0.85rem;
    color: #6a7b83;
    margin-bottom: 18px;
}
.entry-content img { border-radius: 8px; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }

.entry-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.2em 0;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid #c4d4da;
}
.entry-content th,
.entry-content td { padding: 9px 12px; text-align: left; }
.entry-content th { background: #e8f1f3; }

.entry-content blockquote {
    margin: 1.4em 0;
    padding: 14px 20px;
    border-left: 4px solid #137a8c;
    background: #f0f6f8;
    color: #2b3c43;
}

/* ============================================================
   Сайдбар (светлый фон — тёмный текст)
   ============================================================ */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: #fff;
    border: 1px solid #dbe6ea;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 24px;
    color: #1b2c33;
}
.sidebar .widget-title {
    font-size: 1.1rem;
    color: #0f3a4d;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #137a8c;
}
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: 7px 0;
    border-bottom: 1px solid #eef3f6;
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: #137a8c; }
.sidebar .widget .post-date { color: #6a7b83; font-size: 0.8rem; }

/* ============================================================
   Главная — секции
   ============================================================ */
.home-section { padding: 46px 0; }
.home-section:nth-child(even) { background: #ffffff; }
.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 { margin-bottom: 8px; }
.section-head p { color: #5a6b73; max-width: 720px; margin: 0 auto; }

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

/* Блок: сетка рубрик */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.feature {
    background: #fff;
    border: 1px solid #dbe6ea;
    border-radius: 12px;
    padding: 26px 22px;
    text-align: center;
}
.home-section:nth-child(even) .feature { background: #f4f9fa; }
.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: block;
}
.feature h3 { margin-bottom: 8px; }
.feature p { color: #4a5b63; font-size: 0.95rem; margin: 0; }

/* Блок: шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 26px;
    counter-reset: step;
}
.step {
    position: relative;
    background: #fff;
    border: 1px solid #dbe6ea;
    border-radius: 12px;
    padding: 28px 22px 22px;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #137a8c;
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 14px;
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: #4a5b63; font-size: 0.95rem; }

/* Блок: FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
    background: #fff;
    border: 1px solid #dbe6ea;
    border-radius: 10px;
    margin-bottom: 14px;
    padding: 4px 20px;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    color: #0f3a4d;
    padding: 14px 0;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    float: right;
    color: #137a8c;
    font-size: 1.3rem;
    line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: #4a5b63; }

/* Блок: последние записи на главной */
.latest-wrap .card-list { margin-top: 8px; }

/* ============================================================
   Пагинация (type => plain, стили на .page-numbers — D5)
   ============================================================ */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 38px 0 10px;
}
.pager .page-numbers {
    display: inline-block;
    padding: 9px 15px;
    background: #fff;
    border: 1px solid #c4d4da;
    border-radius: 6px;
    color: #0f3a4d;
    font-weight: 600;
    line-height: 1;
}
.pager a.page-numbers:hover {
    background: #e3eef1;
    text-decoration: none;
}
.pager .page-numbers.current {
    background: #137a8c;
    border-color: #137a8c;
    color: #fff;
}
.pager .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

/* ============================================================
   Cookie-баннер
   ============================================================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: #0c2a38;
    color: #e6eef1;
    padding: 16px 0;
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: 0.9rem; }
.cookie-banner a { color: #7fd3e0; }
.cookie-accept {
    background: #1b9aaa;
    color: #fff;
    border: 0;
    padding: 11px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: #16a4b8; }

/* ============================================================
   Комментарии
   ============================================================ */
.comments-area {
    background: #fff;
    border: 1px solid #dbe6ea;
    border-radius: 12px;
    padding: 26px 30px;
    margin-top: 30px;
}
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 28px; padding: 0; }
.comment-inner {
    border-bottom: 1px solid #eef3f6;
    padding: 16px 0;
}
.comment-head {
    display: flex;
    gap: 14px;
    align-items: baseline;
    margin-bottom: 6px;
}
.comment-author { font-weight: 700; color: #0f3a4d; }
.comment-date { font-size: 0.8rem; color: #6a7b83; }
.comment-moderation { font-style: italic; color: #a06a00; }

.comment-form-wrap { margin-top: 26px; }
.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 #c4d4da;
    border-radius: 6px;
    font: inherit;
    margin-bottom: 6px;
}
.comment-form .submit,
.comment-form input[type="submit"] {
    background: #137a8c;
    color: #fff;
    border: 0;
    padding: 11px 26px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* ============================================================
   Поиск
   ============================================================ */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid #c4d4da;
    border-radius: 6px;
    font: inherit;
}
.search-form .search-submit {
    background: #137a8c;
    color: #fff;
    border: 0;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* ============================================================
   404
   ============================================================ */
.error-404 {
    text-align: center;
    background: #fff;
    border: 1px solid #dbe6ea;
    border-radius: 12px;
    padding: 50px 30px;
}
.error-404 .big { font-size: 4rem; color: #137a8c; margin: 0; }
.error-404 .search-form { max-width: 460px; margin: 24px auto 0; }

/* ============================================================
   Подвал (тёмный фон — светлый текст)
   ============================================================ */
.site-footer {
    background: #0c2a38;
    color: #c5d4da;
    padding: 44px 0 0;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}
.site-footer .widget { margin-bottom: 10px; color: #c5d4da; }
.site-footer .widget-title {
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1b9aaa;
}
.site-footer .widget p { color: #c5d4da; }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: 6px 0; }
.site-footer .widget a { color: #8fd6e2; }
.site-footer .widget a:hover { color: #ffffff; }
.site-footer .post-date { color: #92a6ae; }

.footer-bottom {
    margin-top: 36px;
    border-top: 1px solid #1c4254;
    padding: 18px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #92a6ae;
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }
    .layout-single .content-area { width: 100%; }
    .split { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .split.reverse .split-media { order: 0; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }

    .nav-toggle { display: block; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 12px;
    }
    .main-nav.open ul { display: flex; }
    .header-inner { position: relative; }

    .footer-cols { grid-template-columns: minmax(0, 1fr); }
    .cookie-inner { justify-content: center; text-align: center; }
}
