/*
Theme Name: Stroy Gazobeton
Theme URI: https://stroy-gazobeton.ru/
Author: gazobeton
Description: stroy-gazobeton
Version: 1.2.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: stroy-gazobeton
*/

:root {
    --sg-navy: #172039;
    --sg-navy-dark: #101727;
    --sg-link: #4388b4;
    --sg-link-dark: #2d709c;
    --sg-orange: #ffad00;
    --sg-text: #444;
    --sg-muted: #777;
    --sg-sidebar: #eeeeee;
    --sg-rule: #d5857f;
    --sg-border: #d8d8d8;
    --sg-container: 1200px;
    --sg-sidebar-width: 390px;
    --sg-gap: 26px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #fff;
    color: var(--sg-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--sg-link);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--sg-link-dark);
    text-decoration: underline;
}

button,
input,
textarea,
select {
    font: inherit;
}

.zametka{
    border: 3px dashed #8aad41;
    background-color: #fcab02;
    color: #2c331d;
    border-color: #2980b9;
    border-width: 3px;
    border-radius: 8px;
    padding: 15px;
    font-style: italic;
    font-size: 17px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sg-container {
    width: min(calc(100% - 36px), var(--sg-container));
    margin-inline: auto;
}

/* Header */
.site-header {
    background: #fff;
}

.site-header__banner {
    display: block;
    width: min(100%, var(--sg-container));
    height: 150px;
    margin: 0 auto;
    background-image: url("assets/images/header.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.site-navigation {
    width: min(100%, var(--sg-container));
    min-height: 52px;
    margin: 0 auto;
    background: var(--sg-navy);
    position: relative;
}

.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0 10px;
    min-height: 52px;
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
}

.primary-menu > li {
    display: flex;
    align-items: stretch;
}

.primary-menu a {
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

.primary-menu a:hover,
.primary-menu a:focus,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
    color: #fff;
    background: rgba(255,255,255,.08);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    padding: 10px 18px;
    border: 0;
    background: var(--sg-navy);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}


/* Native WordPress menu compatibility */
.primary-menu,
.primary-menu ul,
.footer-menu,
.footer-menu ul {
    list-style: none;
}

.primary-menu li {
    position: relative;
}

.primary-menu .sub-menu {
    position: absolute;
    z-index: 50;
    top: 100%;
    left: 0;
    display: none;
    min-width: 220px;
    margin: 0;
    padding: 0;
    background: var(--sg-navy);
    box-shadow: 0 5px 12px rgba(0,0,0,.18);
}

.primary-menu .sub-menu li {
    display: block;
    width: 100%;
}

.primary-menu .sub-menu a {
    display: block;
    width: 100%;
    padding: 11px 13px;
    white-space: normal;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
    display: block;
}

.footer-menu .sub-menu {
    margin: 2px 0 2px 12px;
    padding: 0;
}

/* Main grid */
.site-main-wrap {
    padding-top: 12px;
}

.site-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sg-sidebar-width);
    gap: var(--sg-gap);
    align-items: start;
}

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

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

/* Home / archives */
.home-article,
.archive-article {
    margin: 0 0 34px;
}

.home-article__title,
.archive-article__title {
    margin: 0 0 20px;
    color: var(--sg-link);
    font-size: 25px;
    line-height: 1.2;
    font-weight: 700;
}

.home-article__title a,
.archive-article__title a {
    color: inherit;
}

.home-article__body,
.archive-article__body {
    font-size: 16px;
}

.home-article__body::after,
.archive-article__body::after {
    content: "";
    display: table;
    clear: both;
}

.home-article__thumb,
.archive-article__thumb {
    float: left;
    width: 48%;
    max-width: 390px;
    margin: 0 22px 14px 0;
}

.home-article__body p,
.archive-article__body p {
    margin: 0 0 18px;
}

.read-more {
    display: inline-block;
    margin-top: 2px;
    font-size: 15px;
}

/* Article typography */
.single-title,
.page-title,
.archive-title {
    margin: 5px 0 17px;
    padding: 0 0 12px;
    color: #383838;
    border-bottom: 1px solid var(--sg-rule);
    font-size: 25px;
    line-height: 1.25;
    font-weight: 700;
}

.single-title {
    text-transform: uppercase;
}

.entry-content {
    font-size: 16px;
}

.entry-content p {
    margin: 0 0 20px;
    text-align: justify;
}

.entry-content h2 {
    margin: 34px 0 18px;
    color: #333;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 400;
    text-align: center;
}

.entry-content h3 {
    margin: 28px 0 14px;
    color: #333;
    font-size: 20px;
    line-height: 1.35;
}

.entry-content blockquote,
.home-article__body blockquote {
    margin: 22px 0 30px;
    padding: 15px 18px;
    border: 2px dashed var(--sg-link);
    border-radius: 7px;
    background: var(--sg-orange);
    color: #4b4b4b;
    font-style: italic;
}

.entry-content blockquote p,
.home-article__body blockquote p {
    margin: 0;
    text-align: left;
}

.entry-content ol {
    list-style: none;
    counter-reset: sg-counter;
    margin: 18px 0 27px 50px;
    padding: 0;
}

.entry-content ol > li {
    counter-increment: sg-counter;
    position: relative;
    min-height: 36px;
    padding: 6px 0 6px 6px;
}

.entry-content ol > li::before {
    content: counter(sg-counter);
    position: absolute;
    left: -44px;
    top: 3px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: #5b9bc7;
    color: #fff;
    font-size: 15px;
}

.entry-content ul {
    padding-left: 25px;
}

.entry-content img {
    border: 0;
}

.alignleft {
    float: left;
    margin: 6px 20px 14px 0;
}

.alignright {
    float: right;
    margin: 6px 0 14px 20px;
}

.aligncenter {
    display: block;
    margin: 18px auto;
}

.wp-caption {
    max-width: 100%;
}

.entry-author {
    margin: 28px 0 20px;
    font-size: 14px;
}

/* Sidebar */
.sidebar-panel {
    margin: 0 0 26px;
}

.sidebar-area > .widget {
    margin-bottom: 26px;
}

.sidebar-compact-list {
    padding: 10px 12px 9px;
    background: #efefef;
}

.sidebar-compact-item {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 5px;
    align-items: center;
    min-height: 86px;
    margin-bottom: 6px;
}

.sidebar-compact-item:last-child {
    margin-bottom: 0;
}

.sidebar-compact-thumb {
    display: block;
    width: 110px;
    height: 86px;
    overflow: hidden;
    background: #ddd;
}

.sidebar-compact-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.sidebar-compact-title,
.sidebar-compact-item > a:last-child {
    color: var(--sg-link);
    font-size: 15px;
    line-height: 1.48;
    font-weight: 700;
}

.sidebar-feature-list {
    width: 100%;
}

.sidebar-feature-card {
    margin: 0 0 9px;
}

.sidebar-feature-title {
    display: block;
    min-height: 36px;
    padding: 6px 9px;
    background: var(--sg-orange);
    color: #111;
    font-size: 16px;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
}

.sidebar-feature-title:hover,
.sidebar-feature-title:focus {
    color: #111;
    text-decoration: underline;
}

.sidebar-feature-image {
    display: block;
    width: 100%;
    overflow: hidden;
    background: #ddd;
}

.sidebar-feature-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.widget {
    margin-bottom: 24px;
}

.widget-title {
    margin: 0 0 9px;
    font-size: 17px;
}

/* Related posts */
.related-posts {
    margin: 44px 0 18px;
}

.related-posts__title {
    margin: 0 0 16px;
    color: #313131;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 23px 9px;
}

.related-card {
    min-width: 0;
    text-align: center;
}

.related-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 1.46 / 1;
    overflow: hidden;
    background: #e5e5e5;
}

.related-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card__title {
    display: block;
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.38;
}

/* Pagination */
.sg-pagination {
    margin: 18px 0 16px;
    font-size: 14px;
}

.sg-pagination__summary {
    margin-bottom: 10px;
    color: #222;
}

.sg-pagination__links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sg-pagination__links a,
.sg-pagination__links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 27px;
    padding: 2px 7px;
    border: 1px solid #13264a;
    border-radius: 4px;
    background: linear-gradient(#7eb0e4, #4b79b1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 1px 1px rgba(0,0,0,.28);
    color: #0b1730;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.sg-pagination__links .current {
    background: #24568c;
    color: #fff;
}

/* Footer */
.site-footer {
    margin-top: 12px;
    background: var(--sg-navy);
    color: #cfd4dd;
    border-bottom: 25px solid var(--sg-navy-dark);
}

.footer-inner {
    display: grid;
    grid-template-columns: 330px repeat(3, minmax(0, 1fr));
    gap: 45px;
    align-items: center;
    padding-top: 32px;
    padding-bottom: 30px;
}

.footer-tools {
    width: 330px;
    max-width: 100%;
    height: auto;
    mix-blend-mode: normal;
}

.footer-col h2 {
    margin: 0 0 9px;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    margin: 2px 0;
}

.footer-menu a {
    color: #cfd4dd;
    font-size: 14px;
    line-height: 1.45;
}

.footer-meta {
    padding: 0 0 20px;
    color: #aeb6c4;
    font-size: 12px;
    text-align: center;
}

/* Archive/search */
.archive-description {
    margin-bottom: 28px;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-field {
    width: 100%;
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid #ccc;
}

.search-submit {
    padding: 9px 15px;
    border: 0;
    background: var(--sg-navy);
    color: #fff;
    cursor: pointer;
}

/* Responsive modernization */
@media (max-width: 1120px) {
    :root {
        --sg-sidebar-width: 330px;
        --sg-gap: 20px;
    }

    .primary-menu a {
        padding-inline: 9px;
        font-size: 13px;
    }

    .sidebar-compact-item {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .sidebar-compact-thumb {
        width: 100px;
        height: 78px;
    }

    .footer-inner {
        grid-template-columns: 280px repeat(3, minmax(0, 1fr));
        gap: 28px;
    }

    .footer-tools {
        width: 280px;
    }
}

@media (max-width: 900px) {
    .site-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-area {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .sidebar-panel:first-child,
    .widget {
        grid-column: 1 / -1;
    }

    .menu-toggle {
        display: flex;
    }

    .primary-menu {
        display: none;
        padding: 0;
        min-height: 0;
    }

    .site-navigation.is-open .primary-menu {
        display: block;
    }

    .primary-menu > li {
        display: block;
        border-top: 1px solid rgba(255,255,255,.08);
    }

    .primary-menu .sub-menu {
        position: static;
        display: block;
        min-width: 0;
        margin: 0;
        padding-left: 16px;
        box-shadow: none;
        background: rgba(0,0,0,.08);
    }

    .primary-menu a {
        display: block;
        padding: 13px 18px;
        white-space: normal;
    }

    .footer-inner {
        grid-template-columns: repeat(3, 1fr);
        align-items: start;
    }

    .footer-visual {
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer-tools {
        width: 320px;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    .sg-container {
        width: min(calc(100% - 24px), var(--sg-container));
    }

    .site-header__banner {
        height: 105px;
        background-position: center;
    }

    .home-article__title,
    .archive-article__title,
    .single-title,
    .page-title,
    .archive-title {
        font-size: 21px;
    }

    .home-article__thumb,
    .archive-article__thumb,
    .alignleft,
    .alignright {
        float: none;
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0 0 16px;
    }

    .entry-content p {
        text-align: left;
    }

    .entry-content ol {
        margin-left: 44px;
    }

    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 10px;
    }

    .sidebar-area {
        display: block;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 22px;
        text-align: center;
    }

    .footer-menu a {
        display: inline-block;
        padding: 2px 0;
    }
}

@media (max-width: 430px) {
    .site-header__banner {
        height: 86px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-compact-item {
        grid-template-columns: 94px minmax(0, 1fr);
    }

    .sidebar-compact-thumb {
        width: 94px;
        height: 73px;
    }

    .sidebar-compact-title,
    .sidebar-compact-item > a:last-child {
        font-size: 14px;
    }
}


@media (min-width: 901px) {
    .site-navigation .primary-menu {
        display: flex !important;
        visibility: visible;
        opacity: 1;
    }
}
