/*
Theme Name: dds_janus-servis.ru
Author: Артём Грачёв
Description: Независимая база знаний по архитектурному бетону, вибролитью, ландшафтному проектированию и обслуживанию оборудования для каменного литья.
Version: 1.1
Text Domain: dds_janus-servis
*/

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: #1E1E1E;
    background: #F5F4F0;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: #B45F3B; text-decoration: none; transition: color .2s ease; }
a:hover { color: #8E4A2D; text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    line-height: 1.25;
    margin: 1.2em 0 .55em;
    color: #1E1E1E;
    letter-spacing: -0.01em;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.65rem; color: #B45F3B; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em 1.2em; padding: 0; }
li { margin-bottom: .35em; }

blockquote {
    margin: 1.5em 0;
    padding: 1em 1.2em;
    border-left: 4px solid #5A6B6F;
    background: #EAE8E3;
    font-style: italic;
    color: #3A3A3A;
}

code, pre {
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    background: #EAE8E3;
}
code { padding: 2px 6px; border-radius: 2px; }
pre {
    padding: 1em;
    overflow-x: auto;
    border-left: 4px solid #B45F3B;
    margin: 1.2em 0;
    min-width: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    border: 1px solid #B0AAA0;
}
th, td {
    padding: .7em .9em;
    border: 1px solid #B0AAA0;
    text-align: left;
    vertical-align: top;
}
th { background: #EAE8E3; font-weight: 700; }

hr { border: 0; border-top: 1px solid #B0AAA0; margin: 2em 0; }

/* ---------- Shell / Container ---------- */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ---------- Skip link ---------- */
.skip-to-main {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #1E1E1E;
    color: #F5F4F0;
    padding: .5em 1em;
    z-index: 9999;
}
.skip-to-main:focus { left: 1em; top: 1em; }

/* ---------- Header ---------- */
.site-header {
    background: #F5F4F0;
    border-bottom: 1px solid #D1CDC5;
    padding: 1.1em 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2em;
    min-width: 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1em;
    min-width: 0;
}
.brand-logo {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1E1E1E;
    display: block;
    max-width: 540px;
}
.brand-name a { color: inherit; text-decoration: none; }
.brand-tagline {
    font-size: .82rem;
    color: #5A6B6F;
    line-height: 1.4;
    display: block;
    margin-top: .2em;
    max-width: 540px;
}

/* ---------- Navigation ---------- */
.main-nav { min-width: 0; }
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid #1E1E1E;
    color: #1E1E1E;
    padding: .55em .9em;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.nav-toggle:focus { outline: 2px solid #B45F3B; outline-offset: 2px; }

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.7em;
}
.nav-list li { margin: 0; }
.nav-list a {
    color: #1E1E1E;
    font-weight: 600;
    font-size: .94rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: border-color .2s ease, color .2s ease;
}
.nav-list a:hover,
.nav-list .current-menu-item > a {
    color: #B45F3B;
    border-bottom-color: #B45F3B;
    text-decoration: none;
}

/* ---------- Layout ---------- */
.site-main { padding: 2em 0 3em; }
.layout {
    display: flex;
    gap: 3%;
    align-items: flex-start;
}
.layout.has-sidebar .content-area { flex: 0 0 67%; min-width: 0; }
.layout.has-sidebar .sidebar { flex: 0 0 27%; min-width: 0; }
.layout.no-sidebar .content-area { width: 85%; margin-inline: auto; min-width: 0; }

.content-area > article,
.content-area > .page-block {
    margin-bottom: 2.5em;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    font-size: .85rem;
    color: #5A6B6F;
    margin-bottom: 1.5em;
    padding: .6em 0;
    border-bottom: 1px dashed #B0AAA0;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.breadcrumbs a {
    color: #5A6B6F;
    border-bottom: 1px dotted #5A6B6F;
}
.breadcrumbs a:hover {
    color: #B45F3B;
    border-bottom-color: #B45F3B;
    text-decoration: none;
}
.breadcrumbs .sep {
    display: inline-block;
    margin: 0 .5em;
    color: #B45F3B;
    font-weight: 700;
    transform: skewX(-15deg);
}

/* ---------- Post Cards ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1.6em;
    margin: 0 0 2em;
}
.card {
    display: flex;
    flex-direction: column;
    background: #EAE8E3;
    border-left: 8px solid #B45F3B;
    overflow: hidden;
    position: relative;
    transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30,30,30,.08);
}
.card-thumb {
    display: block;
    overflow: hidden;
    background: #D1CDC5;
}
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .3s ease;
}
.card:hover .card-thumb img { transform: scale(1.03); }
.card-body {
    flex: 1;
    padding: 1.2em 1.3em 1.3em;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.card-marker {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #B45F3B;
    margin-bottom: .5em;
}
.card-title {
    font-family: Georgia, serif;
    font-size: 1.18rem;
    line-height: 1.3;
    margin: 0 0 .55em;
    color: #1E1E1E;
}
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: #B45F3B; }
.card-meta {
    font-size: .78rem;
    color: #5A6B6F;
    margin-bottom: .6em;
    letter-spacing: .02em;
}
.card-excerpt {
    color: #3A3A3A;
    font-size: .95rem;
    line-height: 1.55;
    margin-bottom: 1em;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-excerpt p:last-child { margin-bottom: 0; }
.card-link {
    margin-top: auto;
    align-self: flex-start;
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #1E1E1E;
    border-bottom: 1px dashed #B45F3B;
    padding-bottom: 2px;
}
.card-link:hover {
    color: #B45F3B;
    text-decoration: none;
}
.card-link::after { content: ' →'; }

/* ---------- Single post ---------- */
.entry-header { margin-bottom: 1.5em; }
.entry-title {
    font-size: 2.1rem;
    margin: 0 0 .5em;
    line-height: 1.2;
}
.entry-meta {
    font-size: .85rem;
    color: #5A6B6F;
    letter-spacing: .03em;
    border-top: 1px solid #D1CDC5;
    border-bottom: 1px solid #D1CDC5;
    padding: .5em 0;
    margin-bottom: 1.5em;
}
.entry-meta a { color: #5A6B6F; }
.entry-meta a:hover { color: #B45F3B; }
.entry-thumbnail { margin: 0 0 1.5em; }
.entry-thumbnail img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 1.02rem; min-width: 0; }
.entry-content img { display: block; margin: 1.2em auto; }
.entry-content > *:first-child { margin-top: 0; }

.entry-footer {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #D1CDC5;
    font-size: .88rem;
    color: #5A6B6F;
}
.entry-footer a { color: #5A6B6F; }
.entry-footer a:hover { color: #B45F3B; }

/* ---------- Pagination ---------- */
.pagination-wrap {
    margin: 2em 0 1em;
    text-align: center;
}
.pagination-wrap .page-numbers {
    display: inline-block;
    padding: .55em .95em;
    margin: 0 .15em;
    border: 1px solid #B0AAA0;
    color: #1E1E1E;
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pagination-wrap .page-numbers:hover {
    background: #EAE8E3;
    border-color: #5A6B6F;
}
.pagination-wrap .page-numbers.current {
    background: #B45F3B;
    color: #FEFCF8;
    border-color: #B45F3B;
}
.pagination-wrap .page-numbers.dots {
    border: none;
    background: transparent;
}

/* ---------- Sidebar ---------- */
.sidebar { font-size: .95rem; }
.widget {
    background: #EAE8E3;
    padding: 1.2em 1.3em;
    margin-bottom: 1.6em;
    border-left: 4px solid #5A6B6F;
    color: #1E1E1E;
}
.widget-title {
    font-family: Georgia, serif;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 .9em;
    padding-bottom: .5em;
    border-bottom: 1px solid #B0AAA0;
    color: #1E1E1E;
}
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget ul li {
    padding: .35em 0;
    border-bottom: 1px dashed #D1CDC5;
}
.widget ul li:last-child { border-bottom: none; }
.widget a { color: #1E1E1E; }
.widget a:hover { color: #B45F3B; }
.widget .post-date,
.widget .rss-date {
    font-size: .78rem;
    color: #5A6B6F;
    display: block;
    margin-top: .15em;
}

/* ---------- Front page ---------- */
.front-block {
    background: #EAE8E3;
    padding: 2em 2em 2.2em;
    margin: 0 0 2em;
    border-left: 8px solid #B45F3B;
    min-width: 0;
}
.front-block-num {
    display: block;
    font-family: Georgia, serif;
    font-size: 3rem;
    font-weight: 700;
    color: #B45F3B;
    line-height: 1;
    margin-bottom: .15em;
    letter-spacing: -0.02em;
}
.front-block h2 {
    margin: 0 0 .8em;
    color: #1E1E1E;
    font-size: 1.55rem;
}
.front-block p:last-child { margin-bottom: 0; }
.front-block .feature-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.2em;
    margin-top: 1.4em;
}
.front-block .feature {
    background: #F5F4F0;
    padding: 1em 1.1em;
    border-top: 2px solid #5A6B6F;
    min-width: 0;
}
.front-block .feature h3 {
    font-size: 1.02rem;
    margin: 0 0 .4em;
    color: #1E1E1E;
}
.front-block .feature p {
    margin: 0;
    font-size: .9rem;
    color: #3A3A3A;
}

.front-recent {
    margin: 2em 0 2.5em;
}
.front-recent-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 2px solid #1E1E1E;
    padding-bottom: .4em;
    margin-bottom: 1.4em;
    gap: 1em;
    flex-wrap: wrap;
}
.front-recent-head h2 {
    margin: 0;
    color: #1E1E1E;
}
.front-recent-head .all-link {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #B45F3B;
}

/* ---------- Comments ---------- */
.comments-area {
    margin-top: 2.5em;
    padding-top: 1.5em;
    border-top: 2px solid #1E1E1E;
}
.comments-title {
    font-size: 1.4rem;
    margin: 0 0 1em;
}
.comment-list {
    list-style: none;
    margin: 0 0 1.5em;
    padding: 0;
}
.comment-list .comment {
    padding: 1em 1.2em;
    margin-bottom: 1em;
    background: #EAE8E3;
    border-left: 4px solid #5A6B6F;
}
.comment-list .children {
    list-style: none;
    margin-top: 1em;
    margin-left: 1.5em;
    padding: 0;
}
.comment-author { font-weight: 700; margin-bottom: .25em; }
.comment-author img.avatar {
    vertical-align: middle;
    margin-right: .5em;
    border-radius: 2px;
}
.comment-metadata {
    font-size: .8rem;
    color: #5A6B6F;
    margin-bottom: .5em;
}
.comment-content { font-size: .96rem; }
.comment-reply-link {
    font-size: .85rem;
    font-weight: 700;
    color: #B45F3B;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.comment-form { margin-top: 1.5em; }
.comment-form p { margin-bottom: 1em; }
.comment-form label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .35em;
}

/* ---------- Forms (search, comments) ---------- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
input[type="tel"],
textarea {
    width: 100%;
    padding: .65em .8em;
    background: #FEFCF8;
    border: 1px solid #D1CDC5;
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
    color: #1E1E1E;
    transition: border-color .2s ease, box-shadow .2s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: #5A6B6F;
    box-shadow: 0 0 0 3px rgba(90,107,111,.15);
}
textarea { resize: vertical; min-height: 130px; }

input[type="submit"],
button.submit,
.button {
    display: inline-block;
    background: #1E1E1E;
    color: #FEFCF8;
    border: 1px solid #1E1E1E;
    border-top-color: #3A3A3A;
    border-left-color: #3A3A3A;
    padding: 0 1.4em;
    height: 48px;
    line-height: 46px;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 700;
    font-size: .88rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}
input[type="submit"]:hover,
button.submit:hover,
.button:hover {
    background: #000;
    color: #FFF;
}

/* Search form */
.search-form {
    display: flex;
    gap: .5em;
    max-width: 480px;
}
.search-form input[type="search"] { flex: 1; min-width: 0; }
.search-form input[type="submit"] { flex: 0 0 auto; }

/* ---------- Footer ---------- */
.site-footer {
    background: #1E1E1E;
    color: #C9C5BC;
    padding: 2.5em 0 1.2em;
    margin-top: 3em;
    border-top: 4px solid #B45F3B;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2em;
    margin-bottom: 2em;
}
.footer-col { min-width: 0; }
.site-footer .widget {
    background: transparent;
    border-left: 3px solid #B45F3B;
    padding: 0 0 0 1em;
    margin: 0;
    color: #C9C5BC;
}
.site-footer .widget-title {
    color: #FEFCF8;
    border-bottom-color: #5A6B6F;
}
.site-footer .widget a { color: #E8E4DC; }
.site-footer .widget a:hover { color: #C9A87C; }
.site-footer .widget ul li { border-bottom-color: #3A3A3A; }
.site-footer .widget .post-date,
.site-footer .widget .rss-date { color: #8B8B85; }

.site-footer p { color: #C9C5BC; }

.footer-bottom {
    border-top: 1px solid #3A3A3A;
    padding-top: 1.2em;
    font-size: .85rem;
    color: #8B8B85;
    text-align: center;
    letter-spacing: .03em;
}

/* ---------- 404 ---------- */
.error-404 {
    text-align: center;
    padding: 3em 0;
}
.error-404 .big {
    font-family: Georgia, serif;
    font-size: 6rem;
    color: #B45F3B;
    line-height: 1;
    margin: 0;
    letter-spacing: -0.04em;
}
.error-404 h1 {
    margin: .3em 0 .6em;
    font-size: 1.8rem;
}
.error-404 .back-link {
    display: inline-block;
    margin-top: 1.2em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #1E1E1E;
    border-bottom: 2px solid #B45F3B;
    padding-bottom: 2px;
}

/* ---------- Cookie banner ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1em;
    right: 1em;
    bottom: 1em;
    z-index: 999;
    background: #1E1E1E;
    color: #F5F4F0;
    padding: 1em 1.3em;
    border-left: 4px solid #B45F3B;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    box-shadow: 0 4px 18px rgba(0,0,0,.25);
    max-width: 1180px;
    margin: 0 auto;
}
.cookie-banner p {
    margin: 0;
    font-size: .9rem;
    color: #F5F4F0;
    min-width: 0;
    flex: 1 1 320px;
}
.cookie-banner a { color: #C9A87C; }
.cookie-banner button {
    background: #B45F3B;
    color: #FEFCF8;
    border: none;
    padding: .65em 1.4em;
    font-family: inherit;
    font-weight: 700;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    cursor: pointer;
    border-radius: 4px;
    transition: background .2s ease;
}
.cookie-banner button:hover { background: #8E4A2D; }

/* ---------- Utilities ---------- */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin: 1em auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
    font-size: .85rem;
    color: #5A6B6F;
    text-align: center;
    padding-top: .4em;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .layout { flex-direction: column; gap: 2em; }
    .layout.has-sidebar .content-area,
    .layout.has-sidebar .sidebar,
    .layout.no-sidebar .content-area { flex: none; width: 100%; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    body { font-size: 15px; }
    h1, .entry-title { font-size: 1.6rem; }
    h2 { font-size: 1.35rem; }
    .header-inner { flex-wrap: wrap; gap: 1em; }
    .nav-toggle { display: inline-block; }
    .main-nav .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        background: #EAE8E3;
        margin-top: 1em;
        padding: .5em 0;
    }
    .main-nav.is-open .nav-list { display: flex; }
    .nav-list li { width: 100%; }
    .nav-list a {
        display: block;
        padding: .8em 1em;
        border-bottom: 1px solid #D1CDC5;
        border-bottom-width: 1px !important;
    }
    .nav-list a:hover,
    .nav-list .current-menu-item > a {
        border-bottom-color: #B45F3B;
    }
    .footer-cols { grid-template-columns: 1fr; gap: 1.4em; }
    .card { border-left-width: 0; border-bottom: 4px solid #B45F3B; }
    .front-block { padding: 1.5em 1.3em; border-left-width: 0; border-bottom: 6px solid #B45F3B; }
    .input[type="submit"],
    button.submit,
    .button {
        width: 100%;
    }
    .search-form { flex-direction: column; }
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }
    .cookie-banner button { width: 100%; }
    .error-404 .big { font-size: 4rem; }
}
