/*
Theme Name: dds_provance-mtd.ru
Author: Алексей Зимин
Description: Информационный портал о строительстве, ремонте и дизайне интерьера.
Version: 1.1
Text Domain: sbg
*/

/* ===== Переменные ===== */
:root{
    --bg:#f6f2ea;
    --surface:#ffffff;
    --surface-2:#efe8db;
    --ink:#2c2a30;
    --muted:#6f6a72;
    --accent:#6d6294;
    --accent-d:#534a73;
    --terra:#c07a52;
    --sage:#7e9a7a;
    --border:#e7ded0;
    --dark:#2b2934;
    --dark-soft:#3a3747;
    --radius:14px;
    --shell:min(92%,1180px);
    --shadow:0 6px 22px rgba(44,42,48,.08);
}

/* ===== База ===== */
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
    margin:0;
    background:var(--bg);
    color:var(--ink);
    font-family:"Georgia","Times New Roman",serif;
    font-size:17px;
    line-height:1.65;
    overflow-x:hidden;
}
h1,h2,h3,h4{
    font-family:"Trebuchet MS","Segoe UI",system-ui,sans-serif;
    line-height:1.25;
    color:var(--ink);
    margin:0 0 .5em;
    font-weight:700;
}
h1{font-size:2.1rem;}
h2{font-size:1.6rem;}
h3{font-size:1.25rem;}
p{margin:0 0 1em;}
a{color:var(--accent);text-decoration:none;}
a:hover{color:var(--accent-d);text-decoration:underline;}
img{max-width:100%;height:auto;}
.shell{width:var(--shell);margin-inline:auto;}

/* ===== Шапка ===== */
.site-header{
    background:var(--surface);
    border-bottom:1px solid var(--border);
}
.header-inner{
    display:flex;
    align-items:center;
    gap:22px;
    padding:18px 0;
    flex-wrap:wrap;
}
.brand{
    display:flex;
    align-items:center;
    gap:14px;
    min-width:0;
}
.brand-logo{display:block;width:54px;height:54px;flex:0 0 auto;}
.brand-text{min-width:0;}
.brand-name{
    font-family:"Trebuchet MS",sans-serif;
    font-weight:700;
    font-size:1.15rem;
    color:var(--ink);
    display:block;
    line-height:1.2;
}
.brand-name a{color:inherit;}
.brand-name a:hover{text-decoration:none;color:var(--accent);}
.brand-desc{
    font-size:.82rem;
    color:var(--muted);
    display:block;
    margin-top:2px;
    max-width:520px;
}
.main-nav{margin-left:auto;}
.nav-toggle{
    display:none;
    background:var(--accent);
    color:#fff;
    border:0;
    border-radius:8px;
    padding:10px 14px;
    font-size:1rem;
    cursor:pointer;
}
.menu{
    list-style:none;
    display:flex;
    gap:6px;
    margin:0;
    padding:0;
    flex-wrap:wrap;
}
.menu a{
    display:block;
    padding:8px 14px;
    border-radius:8px;
    color:var(--ink);
    font-family:"Trebuchet MS",sans-serif;
    font-size:.98rem;
}
.menu a:hover{background:var(--surface-2);text-decoration:none;color:var(--accent-d);}
.menu .current-menu-item>a{background:var(--accent);color:#fff;}

/* ===== Раскладки ===== */
.site-main{padding:34px 0 48px;}
.layout-with-sidebar{
    display:grid;
    grid-template-columns:minmax(0,67fr) minmax(0,27fr);
    gap:38px;
    align-items:start;
}
.layout-single .content-area{width:85%;margin-inline:auto;}
.content-area{min-width:0;}

/* ===== Хлебные крошки ===== */
.breadcrumbs{
    font-family:"Trebuchet MS",sans-serif;
    font-size:.86rem;
    color:var(--muted);
    margin:0 0 22px;
}
.breadcrumbs a{color:var(--accent);}
.breadcrumbs .sep{margin:0 6px;color:var(--terra);}

/* ===== Сайдбар ===== */
.sidebar{min-width:0;}
.widget{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:20px 22px;
    margin-bottom:24px;
    box-shadow:var(--shadow);
}
.widget-title,.widget h2,.widget h3{
    font-size:1.1rem;
    margin:0 0 14px;
    padding-bottom:10px;
    border-bottom:2px solid var(--terra);
    color:var(--ink);
}
.sidebar .widget{color:var(--ink);}
.sidebar .widget a{color:var(--accent);}
.sidebar .widget a:hover{color:var(--accent-d);}
.sidebar ul{list-style:none;margin:0;padding:0;}
.sidebar ul li{padding:8px 0;border-bottom:1px dashed var(--border);}
.sidebar ul li:last-child{border-bottom:0;}
.widget_recent_entries .post-date{
    display:block;
    font-size:.78rem;
    color:var(--muted);
    margin-top:3px;
}

/* ===== Карточки записей ===== */
.cards-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:26px;
}
.card{
    display:flex;
    flex-direction:column;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    overflow:hidden;
    box-shadow:var(--shadow);
    transition:transform .15s ease,box-shadow .15s ease;
}
.card:hover{transform:translateY(-3px);box-shadow:0 10px 28px rgba(44,42,48,.13);}
.card-thumb{display:block;}
.card-thumb img{
    display:block;
    width:100%;
    aspect-ratio:16/10;
    object-fit:cover;
}
.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:var(--ink);}
.card-title a:hover{color:var(--accent);text-decoration:none;}
.card-meta{
    font-family:"Trebuchet MS",sans-serif;
    font-size:.78rem;
    color:var(--muted);
    margin-bottom:10px;
}
.card-excerpt{color:var(--ink);font-size:.96rem;}
.card-excerpt p{margin:0 0 .5em;background:none;}
.card-more{
    margin-top:auto;
    align-self:flex-start;
    font-family:"Trebuchet MS",sans-serif;
    font-size:.9rem;
    font-weight:600;
    color:var(--terra);
    padding-top:10px;
}
.card-more:hover{color:var(--accent-d);text-decoration:none;}

/* ===== Запись / страница ===== */
.entry{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:30px 34px;
    box-shadow:var(--shadow);
}
.entry-title{font-size:2rem;margin-bottom:8px;}
.entry-meta{
    font-family:"Trebuchet MS",sans-serif;
    font-size:.84rem;
    color:var(--muted);
    margin-bottom:18px;
}
.entry-thumb{margin:0 0 22px;border-radius:10px;overflow:hidden;}
.entry-thumb img{display:block;width:100%;object-fit:cover;}
.entry-content p{margin:0 0 1.1em;}
.entry-content h2,.entry-content h3{margin-top:1.4em;}
.entry-content img{border-radius:8px;display:block;}
.entry-content ul,.entry-content ol{padding-left:1.4em;}
.entry-content blockquote{
    margin:1.2em 0;
    padding:14px 20px;
    border-left:4px solid var(--terra);
    background:var(--surface-2);
    border-radius:0 8px 8px 0;
    font-style:italic;
}
.entry-content table{
    border-collapse:collapse;
    width:100%;
    margin:1.2em 0;
}
.entry-content table,.entry-content th,.entry-content td{
    border:1px solid var(--border);
}
.entry-content th,.entry-content td{padding:10px 12px;text-align:left;}
.entry-content th{background:var(--surface-2);}

/* ===== Главная ===== */
.home-wrap{padding:8px 0 20px;}
.section{padding:30px 0;}
.section + .section{border-top:1px solid var(--border);}
.section-head{margin-bottom:22px;}
.section-head h2{font-size:1.7rem;}
.section-head .lead{color:var(--muted);max-width:680px;}

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

/* Блок B: сетка направлений */
.feature-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:22px;
}
.feature{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    overflow:hidden;
    box-shadow:var(--shadow);
    display:flex;
    flex-direction:column;
}
.feature img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;}
.feature .feature-body{padding:16px 18px 20px;flex:1;display:flex;flex-direction:column;}
.feature h3{font-size:1.1rem;margin-bottom:6px;}
.feature p{font-size:.9rem;color:var(--muted);margin:0;}

/* Блок C: шаги */
.steps{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:22px;
    counter-reset:step;
}
.step{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:24px 20px;
    box-shadow:var(--shadow);
    position:relative;
}
.step::before{
    counter-increment:step;
    content:counter(step);
    display:flex;
    align-items:center;
    justify-content:center;
    width:42px;height:42px;
    border-radius:50%;
    background:var(--accent);
    color:#fff;
    font-family:"Trebuchet MS",sans-serif;
    font-weight:700;
    font-size:1.1rem;
    margin-bottom:14px;
}
.step h3{font-size:1.08rem;}
.step p{font-size:.92rem;color:var(--muted);margin:0;}

/* Блок D: галерея */
.gallery-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
}
.gallery-grid figure{margin:0;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);}
.gallery-grid img{
    display:block;
    width:100%;
    aspect-ratio:4/3;
    object-fit:cover;
    transition:transform .25s ease;
}
.gallery-grid figure:hover img{transform:scale(1.05);}

/* Последние записи (главная) */
.latest-section{background:var(--surface-2);border-radius:var(--radius);padding:34px 30px;}

/* ===== Пагинация ===== */
.pagination{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:34px 0 6px;
    justify-content:center;
}
.pagination .page-numbers{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:42px;
    padding:9px 14px;
    border:1px solid var(--border);
    border-radius:9px;
    background:var(--surface);
    color:var(--ink);
    font-family:"Trebuchet MS",sans-serif;
    font-size:.95rem;
}
.pagination a.page-numbers:hover{background:var(--surface-2);color:var(--accent-d);text-decoration:none;}
.pagination .page-numbers.current{background:var(--accent);color:#fff;border-color:var(--accent);}
.pagination .page-numbers.dots{border:0;background:none;}

/* ===== Поиск ===== */
.search-form{display:flex;gap:8px;}
.search-form .search-field{
    flex:1;
    min-width:0;
    padding:10px 14px;
    border:1px solid var(--border);
    border-radius:9px;
    font:inherit;
    font-size:.95rem;
    background:var(--surface);
    color:var(--ink);
}
.search-form .search-submit{
    border:0;
    background:var(--accent);
    color:#fff;
    border-radius:9px;
    padding:10px 18px;
    font-family:"Trebuchet MS",sans-serif;
    cursor:pointer;
}
.search-form .search-submit:hover{background:var(--accent-d);}

/* ===== FAQ блок (на странице, если нужен) ===== */
.faq details{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:10px;
    padding:4px 18px;
    margin-bottom:12px;
}
.faq summary{
    cursor:pointer;
    padding:14px 0;
    font-family:"Trebuchet MS",sans-serif;
    font-weight:600;
    list-style:none;
}
.faq summary::-webkit-details-marker{display:none;}
.faq summary::after{content:"+";float:right;color:var(--terra);font-size:1.2rem;}
.faq details[open] summary::after{content:"–";}
.faq details p{margin:0 0 14px;color:var(--muted);}

/* ===== Комментарии ===== */
.comments-area{
    margin-top:30px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:26px 30px;
    box-shadow:var(--shadow);
}
.comment-list{list-style:none;margin:0;padding:0;}
.comment-list li{padding:14px 0;border-bottom:1px dashed var(--border);}
.comment-list .children{list-style:none;padding-left:26px;}
.comment-meta{font-size:.82rem;color:var(--muted);margin-bottom:6px;}
.comment-respond input[type=text],
.comment-respond input[type=email],
.comment-respond input[type=url],
.comment-respond textarea{
    width:100%;
    padding:10px 12px;
    border:1px solid var(--border);
    border-radius:8px;
    font:inherit;
    margin-bottom:12px;
    background:var(--surface);
}
.comment-respond .submit{
    border:0;
    background:var(--accent);
    color:#fff;
    padding:11px 22px;
    border-radius:9px;
    font-family:"Trebuchet MS",sans-serif;
    cursor:pointer;
}
.comment-respond .submit:hover{background:var(--accent-d);}

/* ===== 404 ===== */
.notfound{
    text-align:center;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:50px 30px;
    box-shadow:var(--shadow);
}
.notfound .big{font-size:4rem;color:var(--terra);margin:0;font-family:"Trebuchet MS",sans-serif;}
.notfound .search-form{max-width:420px;margin:22px auto 0;}

/* ===== Контакты статичные ===== */
.contact-static{margin:18px 0;}
.contact-static a{font-weight:600;}
.social-links{display:flex;gap:14px;margin-top:10px;list-style:none;padding:0;}

/* ===== Подвал ===== */
.site-footer{
    background:var(--dark);
    color:#d8d4e0;
    margin-top:40px;
}
.footer-cols{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:34px;
    padding:42px 0 30px;
}
.footer-col{min-width:0;}
.footer-col .widget{
    background:transparent;
    border:0;
    box-shadow:none;
    padding:0;
    margin:0;
    color:#d8d4e0;
}
.footer-col .widget-title,
.footer-col .widget h2,
.footer-col .widget h3{
    color:#fff;
    border-bottom:2px solid var(--terra);
}
.footer-col .widget a{color:#cdc7da;}
.footer-col .widget a:hover{color:#fff;}
.footer-col ul{list-style:none;margin:0;padding:0;}
.footer-col li{padding:6px 0;}
.footer-col .post-date{color:#9b95ab;font-size:.78rem;display:block;}
.footer-bottom{
    border-top:1px solid var(--dark-soft);
    padding:18px 0;
    font-size:.85rem;
    color:#9b95ab;
    text-align:center;
}

/* ===== Cookie-баннер ===== */
.cookie-banner[hidden]{display:none !important;}
.cookie-banner{
    position:fixed;
    left:0;right:0;bottom:0;
    z-index:999;
    background:var(--dark);
    color:#e6e2ee;
    padding:16px 0;
    box-shadow:0 -4px 18px rgba(0,0,0,.18);
}
.cookie-inner{
    display:flex;
    align-items:center;
    gap:18px;
    flex-wrap:wrap;
    justify-content:space-between;
}
.cookie-inner p{margin:0;font-size:.9rem;flex:1;min-width:240px;}
.cookie-inner a{color:#c9a9e0;}
.cookie-accept{
    border:0;
    background:var(--terra);
    color:#fff;
    padding:11px 24px;
    border-radius:9px;
    font-family:"Trebuchet MS",sans-serif;
    font-size:.95rem;
    cursor:pointer;
    flex:0 0 auto;
}
.cookie-accept:hover{background:#a9663f;}

/* ===== Адаптив ===== */
@media (max-width:960px){
    .layout-with-sidebar{grid-template-columns:1fr;}
    .feature-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
    .steps{grid-template-columns:repeat(2,minmax(0,1fr));}
    .split{grid-template-columns:1fr;gap:24px;}
    .split.reverse .split-media{order:0;}
    .footer-cols{grid-template-columns:1fr 1fr;}
    .layout-single .content-area{width:100%;}
}
@media (max-width:600px){
    body{font-size:16px;}
    h1{font-size:1.7rem;}
    .nav-toggle{display:block;}
    .main-nav{margin-left:auto;position:relative;width:auto;}
    .menu{
        display:none;
        position:absolute;
        right:0;top:calc(100% + 8px);
        background:var(--surface);
        border:1px solid var(--border);
        border-radius:10px;
        box-shadow:var(--shadow);
        flex-direction:column;
        padding:8px;
        min-width:220px;
        z-index:50;
    }
    .menu.is-open{display:flex;}
    .feature-grid,.steps,.gallery-grid,.footer-cols{grid-template-columns:1fr;}
    .gallery-grid{grid-template-columns:1fr 1fr;}
    .entry{padding:22px 18px;}
    .latest-section{padding:24px 18px;}
}
