/*
Theme Name: dds_bokalebrassband.com
Author: Алексей Мартынов
Version: 1.1
Text Domain: bokal
Description: Контентно-сервисный сайт об электрике и вентиляции для частных и коммерческих помещений, с акцентом на подбор решений, монтаж, обслуживание и понятные практические материалы.
*/

/* ============ Tokens ============ */
:root{
    --bg: #F7F7F5;
    --ink: #1F2A2F;
    --ink-soft: #4a575c;
    --copper: #DD8822;
    --copper-deep: #BF6F1A;
    --leaf: #2C6E5C;
    --leaf-deep: #205045;
    --rule: #D0D6D9;
    --warn: #C85C3A;
    --pill-bg: #ECEFE8;
    --shadow-sm: 0 1px 2px rgba(31,42,47,.06);
    --shadow-md: 0 4px 14px rgba(31,42,47,.08);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-pill: 40px;
    --maxw: 1180px;
}

*,*::before,*::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PT Sans", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a{ color: var(--copper-deep); text-decoration: none; border-bottom: 1px solid rgba(221,136,34,.35); transition: color .18s, border-color .18s; }
a:hover{ color: var(--copper); border-color: var(--copper); }

p{ margin: 0 0 1em; }

h1,h2,h3,h4{ color: var(--ink); line-height: 1.25; margin: 1.4em 0 .6em; font-weight: 700; }
h1{ font-size: 2.05rem; }
h2{ font-size: 1.55rem; padding-bottom: .35em; border-bottom: 2px dotted var(--copper); }
h3{ font-size: 1.22rem; }
h4{ font-size: 1.05rem; }

ul, ol{ padding-left: 1.4em; }
li{ margin-bottom: .35em; }

blockquote{
    margin: 1.5em 0;
    padding: 1em 1.2em;
    border-left: 3px solid var(--leaf);
    background: rgba(44,110,92,.06);
    color: var(--ink);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

code, pre{
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: rgba(31,42,47,.05);
    border-radius: var(--radius-sm);
}
code{ padding: .12em .35em; font-size: .92em; }
pre{ padding: 1em; overflow-x: auto; }

table{ border-collapse: collapse; width: 100%; margin: 1.2em 0; border: 1px solid var(--rule); }
th, td{ border: 1px solid var(--rule); padding: .55em .75em; text-align: left; vertical-align: top; }
th{ background: var(--pill-bg); font-weight: 600; }

hr{ border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }

/* ============ Layout ============ */
.wrap{ max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.site{
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main{ flex: 1; padding: 28px 0 56px; }

.layout{
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
}
.layout.has-sidebar{
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    gap: 6%;
}
.layout.no-sidebar > .content{ max-width: 85%; margin: 0 auto; }

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

/* ============ Header ============ */
.site-head{
    background: #fff;
    border-bottom: 1px solid var(--rule);
}
.head-inner{
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 18px 0;
}
.brand{
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    border: 0;
    color: var(--ink);
}
.brand:hover{ color: var(--ink); }
.brand-logo, .brand-mark{
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: block;
}
.brand-mark{ color: var(--copper); }
.brand-text{
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.brand-name{
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    max-width: 520px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-desc{
    font-size: .82rem;
    color: var(--ink-soft);
    max-width: 540px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.head-nav{ margin-left: auto; }
.head-nav ul{
    list-style: none;
    margin: 0; padding: 0;
    display: flex; gap: 22px;
}
.head-nav a{
    color: var(--ink);
    border: 0;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.head-nav a:hover,
.head-nav .current-menu-item > a,
.head-nav .current_page_item > a{
    color: var(--copper-deep);
    border-bottom-color: var(--copper);
}

.nav-toggle{
    display: none;
    background: var(--pill-bg);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
    font: inherit;
    color: var(--ink);
}

@media (max-width: 960px){
    .nav-toggle{ display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
    .head-nav{
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: min(82%, 320px);
        background: #fff;
        margin: 0;
        padding: 64px 22px 22px;
        transform: translateX(100%);
        transition: transform .25s ease;
        box-shadow: -8px 0 24px rgba(31,42,47,.12);
        z-index: 60;
        overflow-y: auto;
    }
    .head-nav.is-open{ transform: translateX(0); }
    .head-nav ul{ flex-direction: column; gap: 4px; }
    .head-nav a{ display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
    .nav-toggle.is-active{ background: var(--ink); color: #fff; border-color: var(--ink); }
    .brand-name{ max-width: 220px; font-size: .98rem; }
    .brand-desc{ display: none; }
}

/* ============ Buttons ============ */
.btn{
    display: inline-block;
    padding: 11px 20px;
    border-radius: var(--radius-md);
    background: var(--copper);
    color: #fff;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    transition: background .18s, transform .12s, box-shadow .18s;
    text-decoration: none;
    line-height: 1.2;
    font: inherit;
    font-weight: 600;
}
.btn:hover{
    background: var(--copper-deep);
    color: #fff;
    transform: translateY(1px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.btn-ghost{
    display: inline-block;
    padding: 6px 0;
    border: 0;
    border-bottom: 2px solid var(--copper);
    color: var(--ink);
    font-weight: 600;
    background: transparent;
    transition: background .18s, color .18s, padding .18s;
    border-radius: 0;
    text-decoration: none;
}
.btn-ghost:hover{
    background: var(--copper);
    color: #fff;
    padding: 6px 12px;
    border-bottom-color: var(--copper);
}

/* ============ Cards (A8, A10) ============ */
.cards{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin: 18px 0 24px;
}

.card{
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.card:hover{ box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-thumb{
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--pill-bg);
}

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

.card-title{
    margin: 0 0 .5em;
    font-size: 1.18rem;
    line-height: 1.3;
    border: 0;
    padding: 0;
}
.card-title a{ color: var(--ink); border: 0; }
.card-title a:hover{ color: var(--copper-deep); }

.card-meta{
    font-size: .82rem;
    color: var(--ink-soft);
    margin-bottom: .6em;
}
.card-meta a{ color: var(--ink-soft); border: 0; }
.card-meta a:hover{ color: var(--copper-deep); }

.card-excerpt{ margin-bottom: 1em; }
.card-excerpt p{
    margin: 0 0 0.5em;
    background: none;
}

.card-foot{ margin-top: auto; }

/* Horizontal card variant — pattern from A10 */
.card-row{
    display: flex;
    flex-direction: row;
    align-items: stretch;
}
.card-thumb-wrap{
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.card-thumb-wrap a{
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 0;
}
.card-thumb-wrap img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-row .card-body{ flex: 1; }

@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;
    }
}

/* ============ Sidebar ============ */
.sidebar{
    font-size: .96rem;
}
.widget{
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 20px;
}
.widget-title{
    font-size: 1.05rem;
    margin: 0 0 .8em;
    padding: 0 0 .35em;
    border-bottom: 2px dotted var(--copper);
}
.widget ul{ list-style: none; padding: 0; margin: 0; }
.widget li{ padding: 6px 0; border-bottom: 1px solid var(--rule); }
.widget li:last-child{ border-bottom: 0; }
.widget a{ color: var(--ink); border: 0; }
.widget a:hover{ color: var(--copper-deep); }

/* ============ Search form ============ */
.search-form{
    display: flex;
    gap: 8px;
}
.search-form input[type="search"]{
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    font: inherit;
    background: #fff;
    color: var(--ink);
}
.search-form input[type="search"]:focus{
    outline: none;
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(221,136,34,.18);
}

/* ============ Breadcrumbs ============ */
.crumbs{
    font-size: .86rem;
    color: var(--ink-soft);
    margin: 6px 0 16px;
}
.crumbs a{
    color: var(--ink-soft);
    border: 0;
    text-decoration: underline;
    text-decoration-color: var(--rule);
    text-underline-offset: 3px;
}
.crumbs a:hover{ color: var(--copper-deep); text-decoration-color: var(--copper); }
.crumbs .sep{ margin: 0 .45em; color: var(--rule); }

/* ============ Pagination ============ */
.pager{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 30px 0 6px;
    justify-content: center;
}
.pager a, .pager span{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-weight: 500;
}
.pager a{ text-decoration: none; }
.pager a:hover{ background: var(--copper); color: #fff; border-color: var(--copper); }
.pager .current{ background: var(--ink); color: #fff; border-color: var(--ink); }
.pager .dots{ background: transparent; border-color: transparent; }

/* ============ Front page sections ============ */
.hero{
    background: linear-gradient(135deg, #fff 0%, var(--pill-bg) 100%);
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
    padding: 38px 32px;
    margin: 8px 0 28px;
}
.hero h1{ margin-top: 0; font-size: 2.1rem; }
.hero p{ font-size: 1.05rem; color: var(--ink-soft); max-width: 70ch; }
.hero .btn{ margin-top: 6px; }

.section{ margin: 38px 0; }
.section-head{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.section-head h2{ margin: 0; }

.feature-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 14px;
}
.feature{
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
    padding: 22px;
    position: relative;
}
.feature .feature-ico{
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(221,136,34,.12);
    color: var(--copper-deep);
    display: inline-flex;
    align-items: center; justify-content: center;
    margin-bottom: 10px;
}
.feature.is-leaf .feature-ico{
    background: rgba(44,110,92,.12);
    color: var(--leaf-deep);
}
.feature h3{ margin: 0 0 .35em; font-size: 1.08rem; }
.feature p{ color: var(--ink-soft); margin: 0; font-size: .95rem; }

/* Pill filters demo block */
.pill-row{ display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.pill{
    background: var(--pill-bg);
    border: 0;
    color: var(--ink);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font: inherit;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.pill.is-active, .pill:hover{ background: var(--leaf); color: #fff; }

/* Steps inside a section */
.steps{
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 14px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.steps li{
    counter-increment: step;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
    padding: 18px 18px 18px 56px;
    position: relative;
    margin: 0;
}
.steps li::before{
    content: counter(step);
    position: absolute;
    left: 16px; top: 16px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--copper);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
}

/* "Лента происхождения" — subtle accent ribbon */
.ribbon{
    height: 14px;
    margin: 30px 0 0;
    background:
        linear-gradient(to right, transparent 0, transparent calc(50% - 1px), var(--copper) calc(50% - 1px), var(--copper) calc(50% + 1px), transparent calc(50% + 1px)) repeat-y,
        repeating-linear-gradient(90deg, var(--leaf) 0 4px, transparent 4px 14px);
    background-size: 100% 14px, 100% 1px;
    background-position: center, center bottom;
    background-repeat: no-repeat, repeat-x;
    opacity: .55;
}

/* ============ Single article ============ */
.article-head{ margin-bottom: 18px; }
.article-head h1{ margin-top: .2em; }
.article-meta{
    font-size: .88rem;
    color: var(--ink-soft);
}
.article-thumb{
    width: 100%;
    border-radius: var(--radius-md);
    margin: 6px 0 22px;
    display: block;
}
.article-content img{ border-radius: var(--radius-sm); }

.tag-line{
    margin: 22px 0;
    font-size: .9rem;
    color: var(--ink-soft);
}
.tag-line a{
    display: inline-block;
    margin-right: 6px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: var(--pill-bg);
    border: 0;
    color: var(--ink);
    font-size: .85rem;
}
.tag-line a:hover{ background: var(--leaf); color: #fff; }

/* ============ Comments ============ */
.comments-area{ margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule); }
.comment-list{ list-style: none; padding: 0; margin: 0 0 22px; }
.comment-list li{ margin: 0 0 18px; }
.comment-body{
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
    padding: 14px 18px;
}
.comment-author{ font-weight: 600; }
.comment-date{ font-size: .82rem; color: var(--ink-soft); margin-left: 8px; }
.comment-list .children{ list-style: none; padding-left: 22px; margin-top: 14px; }
.comment-form{ display: grid; gap: 12px; }
.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(--rule);
    border-radius: var(--radius-sm);
    font: inherit;
    background: #fff;
    color: var(--ink);
}
.comment-form textarea{ min-height: 130px; resize: vertical; }
.comment-form label{ font-size: .9rem; color: var(--ink-soft); display: block; margin-bottom: 4px; }
.comment-form .row-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px){ .comment-form .row-2{ grid-template-columns: 1fr; } }

/* ============ Footer ============ */
.site-foot{
    background: var(--ink);
    color: #d8dcde;
    padding: 38px 0 22px;
    margin-top: 30px;
}
.site-foot a{ color: #f0e3d2; border: 0; }
.site-foot a:hover{ color: var(--copper); }
.foot-cols{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 28px;
}
@media (max-width: 800px){
    .foot-cols{ grid-template-columns: 1fr; gap: 22px; }
}
.foot-cols .widget{
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
}
.foot-cols .widget-title{
    color: #fff;
    border-bottom-color: var(--copper);
}
.foot-cols ul li{ border-bottom: 1px solid rgba(255,255,255,.08); }
.foot-ribbon{
    height: 6px;
    background: repeating-linear-gradient(90deg, var(--copper) 0 8px, transparent 8px 18px, var(--leaf) 18px 26px, transparent 26px 36px);
    border-radius: 3px;
    opacity: .55;
    margin: 0 0 20px;
}
.copy{
    font-size: .86rem;
    color: #b6bdc1;
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 16px;
    text-align: center;
}

/* ============ 404 ============ */
.error-404{
    text-align: center;
    padding: 40px 0;
}
.error-404 .big{
    font-size: 5rem;
    color: var(--copper);
    line-height: 1;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.error-404 .search-form{ max-width: 480px; margin: 18px auto; }

/* ============ Cookie banner (A11) ============ */
.cookie-banner[hidden]{ display: none !important; }

.cookie-banner{
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 80;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    max-width: 720px;
    margin: 0 auto;
}
.cookie-banner p{ margin: 0; flex: 1; min-width: 220px; font-size: .92rem; color: var(--ink); }
.cookie-banner .btn{ padding: 8px 18px; }

/* ============ Utility ============ */
.alignleft{ float: left; margin: 6px 18px 6px 0; }
.alignright{ float: right; margin: 6px 0 6px 18px; }
.aligncenter{ display: block; margin: 6px auto; }
.screen-reader-text{
    border: 0; clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px; width: 1px; overflow: hidden;
    position: absolute; word-wrap: normal !important;
}

.posts-list{ display: flex; flex-direction: column; gap: 22px; margin: 18px 0; }
