/*
Theme Name: Nprc_Energocert_minimal
Description: Тема для nprch.energocert.ru (замена CherryFramework)
Version: 2.0.0
Text Domain: energocert
*/

/* ===== Переменные ===== */
:root {
    --blue:   #012c61;
    --orange: #ef7f1a;
    --gold:   #f4a321;
    --text:   #333;
    --muted:  #666;
    --line:   #e1e0e0;
    --f-head: 'Roboto Condensed', Arial, sans-serif;
    --f-body: 'Roboto', Arial, sans-serif;
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--text); font: 400 15px/24px var(--f-body); }
img { max-width: 100%; height: auto; border: 0; }
figure { margin: 0; }
p  { margin: 0 0 20px; }
ul, ol { margin: 0 0 20px; padding-left: 22px; }
a { color: var(--orange); text-decoration: none; transition: color .3s; }
a:hover { color: var(--gold); }
h1, h2, h3, h4, h5, h6 { font-family: var(--f-head); font-weight: 400; line-height: 1.2; margin: 0 0 18px; }
h1 { font-size: 30px; }
h2 { font-size: 24px; color: #4f5b66; text-transform: uppercase; }
h3 { font-size: 20px; }
h4 { font-size: 19px; }
h5 { font-size: 18px; color: var(--muted); }
h6 { font-size: 16px; }
table { width: 100%; border-collapse: collapse; margin: 20px 0; }
th, td { border: 1px solid #999; padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--blue); color: #fff; }

.container { max-width: 1170px; margin: 0 auto; padding-left: 15px; padding-right: 15px; }

/* ===== Утилиты (используются в контенте страниц) ===== */
.aligncenter { display: block; margin-left: auto; margin-right: auto; text-align: center; }
.alignleft   { float: left;  margin: 9px 25px 10px 0; }
.alignright  { float: right; margin: 9px 0 10px 25px; }
.clear { clear: both; }
.spacer { height: 15px; }
.extra-indent { padding-top: 40px; }
.top-indent   { margin-top: 10px; }
.extra-left   { text-align: left; }
.offsetupdown { margin: 60px 0; }
.title-header { font: 400 30px/38px var(--f-head); color: var(--muted); text-transform: uppercase; margin: 30px 0 20px; }

/* ===== Шапка (липкая, без JS) ===== */
.header { position: sticky; top: 0; z-index: 1000; background: var(--blue); box-shadow: 0 4px 20px rgba(0,0,0,.35); }
.header-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 40px; padding-top: 12px; padding-bottom: 12px; }
.header .logo img { height: 80px; width: auto; display: block; }
.header-phone { margin-left: auto; font: 400 30px/34px var(--f-head); color: #fff; white-space: nowrap; }
.header-phone:hover { color: var(--gold); }
.sf-menu { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; width: 100%; }
.sf-menu a { display: block; padding: 8px 14px; font: 400 17px/20px var(--f-head); text-transform: uppercase; color: var(--orange); }
.sf-menu a:hover,
.sf-menu .current-menu-item > a,
.sf-menu .current_page_item > a { color: #fff; }
/* выпадающие подпункты — чистый CSS */
.sf-menu .sub-menu {
    display: none; position: absolute; left: 0; top: 100%; z-index: 10;
    min-width: 230px; margin: 0; padding: 8px 0; list-style: none;
    background: var(--blue); box-shadow: 0 2px 5px rgba(0,0,0,.4);
}
.sf-menu li:hover > .sub-menu { display: block; }
.sf-menu .sub-menu a { color: #fff; text-transform: none; font-size: 15px; padding: 8px 18px; }
.sf-menu .sub-menu a:hover { background: var(--gold); color: #fff; }
@media (max-width: 900px) {
    .header-inner { justify-content: center; text-align: center; }
    .header-phone { margin: 0; width: 100%; font-size: 22px; }
    .sf-menu { justify-content: center; }
    .header .logo img { height: 60px; }
}

/* ===== Кнопки (перекрывают базовые из compat) ===== */
.btn {
    display: inline-block; padding: 12px 34px; border: 0; border-radius: 29px;
    background: var(--gold); color: #fff; cursor: pointer;
    font: 400 17px/22px var(--f-head); text-transform: uppercase; transition: background .3s;
}
.btn:hover { background: var(--blue); color: #fff; }
.btn-large { font-size: 20px; padding: 15px 48px; }

/* ===== Параллакс и фирменные блоки ===== */
.parallax-box .parallax-content :is(h1,h2,h3,h4,h5,h6) { color: inherit; }
.parallax-box__style-1 .parallax-content { padding-top: 90px; padding-bottom: 70px; }
.parallax-box__style-2 { color: #fff; }
.parallax-box__style-2 .parallax-content { padding-top: 120px; padding-bottom: 100px; }
.parallax-box__style-2 h2 { color: inherit; }
.parallax-box__style-2 p { margin-bottom: 30px; }
@media (max-width: 767px) {
    .parallax-box__style-1 .parallax-content,
    .parallax-box__style-2 .parallax-content { padding-top: 50px; padding-bottom: 50px; }
}

.content_box__style-6 { background: rgba(255,255,255,.92); color: var(--text); padding: 60px 40px; }
.content_box__style-6 :is(h2,h3) { color: var(--muted); }
.content_box__style-7 { background: var(--blue); color: #fff; padding: 50px; margin: 60px 0; }
.content_box__style-7 :is(h1,h2,h3,h4,h5,h6) { color: inherit; }
@media (max-width: 767px) {
    .content_box__style-6 { padding: 30px 20px; }
    .content_box__style-7 { padding: 30px 20px; margin: 40px 0; }
}

/* title_box (блок благодарностей на главной) */
.title-box { text-align: center; margin-bottom: 35px; }
.title-box .subtitle { color: var(--muted); font-size: 18px; margin-bottom: 0; }

/* ===== Отзывы ===== */
.testimonial {
    background: #fff; padding: 26px 30px; margin-bottom: 20px;
    border-left: 4px solid var(--gold); box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.testimonial_bq { margin: 0; }
.testimonial_bq p { margin-bottom: 10px; }
.testimonial_bq img { display: block; margin: 15px auto 0; }
.testimonial small { display: block; margin-top: 8px; color: var(--muted); font-size: 16px; }

/* ===== FAQ (аккордеон на <details>, без JS) ===== */
.faq-item { background: #fff; margin-bottom: 12px; border: 1px solid var(--line); }
.faq-item_q { padding: 15px 20px; font: 400 18px/24px var(--f-head); cursor: pointer; color: var(--text); }
.faq-item_q::marker { color: var(--orange); }
.faq-item[open] .faq-item_q { color: var(--orange); }
.faq-item_a { padding: 0 20px 18px; }

/* ===== Карусель услуг / posts_grid ===== */
.carousel-wrap h2 { margin-bottom: 25px; }
.owl-carousel .item { text-align: center; }
.owl-carousel .item figure { margin-bottom: 12px; }
.owl-carousel .item h5 { font-size: 16px; line-height: 1.3; margin: 0; }
.owl-carousel .item h5 a { color: #4f5b66; }
.owl-carousel .item h5 a:hover { color: var(--gold); }
.posts-grid .pg-item { margin-bottom: 30px; }
.posts-grid h5 { font-size: 18px; text-transform: uppercase; }
.pg-more { color: var(--orange); font-weight: 700; }

/* ===== Формы (CF7 и прочие) ===== */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="search"], select, textarea {
    width: 100%; padding: 10px 14px; font: inherit; color: var(--text);
    background: #fff; border: 1px solid var(--line); border-radius: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; }
textarea { min-height: 140px; resize: vertical; }
.wpcf7 form p { margin-bottom: 15px; }
.wpcf7-response-output { margin: 15px 0 0; padding: 12px 16px; border: 1px solid var(--line); }
span.wpcf7-not-valid-tip { color: #c00; font-size: 13px; }

/* ===== Футер ===== */
.footer { background: var(--blue); color: #9ea4ab; }
.footer .container {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 15px 40px; padding-top: 40px; padding-bottom: 40px;
}
.footer a { color: inherit; }
.footer a:hover { color: #fff; }
nav.footer-nav ul { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
nav.footer-nav li { position: relative; padding: 0 14px; }
nav.footer-nav li + li::before { content: '|'; position: absolute; left: -5px; color: #4e5154; }
@media (max-width: 767px) {
    .footer .container { flex-direction: column; text-align: center; }
}

/* ===== Сетка (перенос из compat): на мобильных — одна колонка ===== */
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.row > * { width: 100%; padding: 0 15px; min-width: 0; }
@media (min-width: 992px) {
    .col-md-1{width:8.33333%}.col-md-2{width:16.66667%}.col-md-3{width:25%}
    .col-md-4{width:33.33333%}.col-md-5{width:41.66667%}.col-md-6{width:50%}
    .col-md-7{width:58.33333%}.col-md-8{width:66.66667%}.col-md-9{width:75%}
    .col-md-10{width:83.33333%}.col-md-11{width:91.66667%}.col-md-12{width:100%}
}

/* ===== Параллакс: база + выход за контейнер на всю ширину экрана ===== */
body { overflow-x: hidden; }
.parallax-box {
    position: relative; width: 100vw; left: 50%; margin-left: -50vw;
    background-size: cover; background-position: center; background-attachment: fixed;
}
.parallax-content { position: relative; z-index: 1; max-width: 1170px; margin: 0 auto; padding: 0 15px; }
@media (max-width: 1024px) { .parallax-box { background-attachment: scroll; } }

/* ===== Эффекты появления ===== */
.llb { opacity: 0; transition: opacity .6s ease, transform .6s ease; }
.llb.effect-slideup        { transform: translateY(40px); }
.llb.effect-slidedown      { transform: translateY(-40px); }
.llb.effect-slidefromleft  { transform: translateX(-40px); }
.llb.effect-slidefromright { transform: translateX(40px); }
.llb.effect-zoomout        { transform: scale(1.12); }
.llb.llb-in { opacity: 1; transform: none; }

/* ===== Сетка внутри форм CF7 (row-fluid/span4) ===== */
.row-fluid { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.row-fluid > * { padding: 0 15px; }
.row-fluid > .span4 { width: 33.3333%; }
.row-fluid > .span6 { width: 50%; }
.row-fluid > .span8 { width: 66.6667%; }
@media (max-width: 767px) { .row-fluid > [class*="span"] { width: 100%; } }

/* ===== Таблица реквизитов: добивка к базовым table/th/td ===== */
.compat-table .td1 { width: 40%; font-weight: 700; background: #f7f7f7; }
address { font-style: normal; }

/* ===== Hero-слайдер ===== */
.hero-slider, .hero-slide { height: 560px; }
.hero-slide { background-size: cover; background-position: center; display: flex; justify-content: center; }
.hero-slide .slider_caption {
    margin-top: 110px; max-width: 936px; padding: 50px 90px; text-align: center;
    background: rgba(255,255,255,.68);
}
.hero-slide .slider_caption h2 { color: #2f3236; font-size: 45px; line-height: 1.2; text-transform: none; margin-bottom: 25px; }
@media (max-width: 991px) {
    .hero-slider, .hero-slide { height: 420px; }
    .hero-slide .slider_caption { margin-top: 60px; padding: 30px 25px; }
    .hero-slide .slider_caption h2 { font-size: 28px; }
}
@media (max-width: 767px) { .hero-slider, .hero-slide { height: 360px; } .hero-slide .slider_caption h2 { font-size: 20px; } }

