/*
Theme Name: ОтПроффи — Ворота и заборы
Theme URI: https://otproffi.ru
Author: ОтПроффи
Description: Кастомная тема для сайта по продаже и монтажу ворот и заборов. Каталог, посадочные под типы, блог, FAQ, калькулятор, SEO-микроразметка. Готова к размножению на поддомены по городам.
Version: 1.0.0
Text Domain: otproffi
*/

:root {
	--teal: #15807a;
	--teal-d: #0f615c;
	--dark: #14202b;
	--accent: #0abab5;
	--accent-d: #0a9b96;
	--accent-ink: #06403e;
	--bg: #f4f7f8;
	--line: #e1e7ea;
	--text: #1d2733;
	--muted: #6b7785;
	--radius: 14px;
	--shadow: 0 8px 28px rgba(20,32,43,.10);
}

* { box-sizing: border-box; }
.opc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
body {
	margin: 0;
	font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--text);
	background: #fff;
	line-height: 1.55;
}
h1, h2, h3, h4 { font-family: "Montserrat", sans-serif; line-height: 1.18; color: var(--dark); }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-d); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 820px; }
.section { padding: 64px 0; }
.section__title { font-size: 32px; margin: 0 0 8px; }
.section__sub { color: var(--muted); margin: 0 0 28px; font-size: 16px; }
.center { text-align: center; margin-top: 26px; }

/* Кнопки */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 15px;
	border: 2px solid transparent; cursor: pointer; transition: .15s; font-family: "Montserrat", sans-serif;
	background: #eef2f4; color: var(--dark);
}
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-d); color: #fff; }
.btn--ghost { background: transparent; border-color: currentColor; color: var(--teal); }
.btn--ghost:hover { background: rgba(21,128,122,.08); }
.btn--lg { padding: 16px 30px; font-size: 16px; }
.btn--block { width: 100%; }

/* Topbar + шапка */
.topbar { background: var(--dark); color: #cfd8df; font-size: 13px; }
.topbar__row { display: flex; gap: 22px; padding: 7px 0; align-items: center; }
.topbar__adv { margin-left: auto; color: #8fd5cf; }
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(20,32,43,.10); }
.header__row { display: flex; align-items: center; gap: 24px; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { width: 46px; height: 46px; border-radius: 50%; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__text b { font-family: "Montserrat", sans-serif; font-size: 20px; color: var(--teal); }
.logo__text small { font-size: 11px; color: var(--muted); }

.main-nav { margin-left: 14px; }
.main-nav__list { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.main-nav__list a { color: var(--dark); font-weight: 600; font-size: 15px; }
.main-nav__list a:hover { color: var(--teal); }

.header__contacts { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.header__phone { font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 19px; color: var(--dark); white-space: nowrap; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { width: 26px; height: 3px; background: var(--dark); border-radius: 2px; transition: .2s; }

/* Hero */
.hero { position: relative; background-size: cover; background-position: center; color: #fff; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(15,32,40,.88) 35%, rgba(15,32,40,.45)); }
.hero__inner { position: relative; padding: 90px 0; }
.hero__content { max-width: 640px; }
.hero h1 { color: #fff; font-size: 46px; margin: 0 0 16px; }
.hero__lead { font-size: 19px; color: #dce7ea; margin: 0 0 22px; }
.hero__usp { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 10px 26px; font-weight: 600; }
.hero__usp li { color: #8fd5cf; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Преимущества */
.advantages { background: var(--bg); }
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.adv { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.adv__ico { width: 56px; height: 56px; border-radius: 14px; background: rgba(21,128,122,.10); color: var(--teal); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.adv__ico svg { width: 30px; height: 30px; }
.icon { width: 24px; height: 24px; flex: none; }
.calc-cta__feats li { display: flex; align-items: center; gap: 10px; }
.calc-cta__feats .icon { color: #8fd5cf; }
.mobile-bar__btn .icon { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.adv b { font-family: "Montserrat", sans-serif; font-size: 16px; }
.adv span { color: var(--muted); font-size: 14px; }

/* Каталог / карточки */
.catalog__cat { font-size: 22px; margin: 30px 0 16px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cards--articles { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; color: var(--text); }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(20,32,43,.16); color: var(--text); }
.card__img { aspect-ratio: 4/3; background-size: cover; background-position: center; background-color: #dde3e6; }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__title { font-size: 17px; margin: 0; }
.card__excerpt { color: var(--muted); font-size: 13.5px; margin: 0; flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.card__price { font-family: "Montserrat", sans-serif; font-weight: 700; color: var(--teal); font-size: 16px; }
.card__more { color: var(--accent); font-weight: 600; font-size: 14px; }

/* Калькулятор CTA */
.calc-cta { background: var(--dark); color: #fff; }
.calc-cta__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.calc-cta h2 { color: #fff; font-size: 30px; }
.calc-cta p { color: #c4d0d6; }
.calc-cta__badge { display: inline-block; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 6px 14px; border-radius: 20px; margin-bottom: 14px; }
.calc-cta__feats { list-style: none; padding: 0; margin: 18px 0 26px; display: flex; flex-direction: column; gap: 10px; font-weight: 600; }
.calc-cta__img { border-radius: var(--radius); min-height: 320px; background-size: cover; background-position: center; }

/* Этапы */
.steps__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--bg); border-radius: var(--radius); padding: 24px; position: relative; }
.step__num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #fff; font-family: "Montserrat", sans-serif; font-weight: 700; margin-bottom: 12px; }
.step b { display: block; font-family: "Montserrat", sans-serif; margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* Галерея */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery__item { aspect-ratio: 4/3; border-radius: var(--radius); background-size: cover; background-position: center; }

/* Отзывы */
.reviews { background: var(--bg); }
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.review { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.review__stars { color: #f5a623; font-size: 18px; margin-bottom: 10px; }
.review p { font-size: 15px; margin: 0 0 12px; }
.review b { font-size: 13px; color: var(--muted); font-weight: 600; }

/* О компании */
.about__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.about__img { border-radius: var(--radius); min-height: 340px; background-size: cover; background-position: center; }
.about__counters { display: flex; gap: 32px; margin-top: 24px; }
.about__counters b { font-family: "Montserrat", sans-serif; font-size: 30px; color: var(--teal); display: block; }
.about__counters span { color: var(--muted); font-size: 14px; }

/* FAQ */
.faq__item { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 4px 18px; background: #fff; }
.faq__q { font-family: "Montserrat", sans-serif; font-weight: 600; cursor: pointer; padding: 14px 0; list-style: none; position: relative; padding-right: 30px; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: '+'; position: absolute; right: 4px; top: 12px; font-size: 22px; color: var(--teal); }
details[open] .faq__q::after { content: '−'; }
.faq__a { padding: 0 0 16px; color: var(--muted); }

/* CTA final */
.cta-final { background: linear-gradient(100deg, var(--teal), var(--teal-d)); color: #fff; }
.cta-final__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-final h2 { color: #fff; margin: 0 0 6px; }
.cta-final p { margin: 0; color: #d4ece9; }

/* Крошки */
.crumbs { background: var(--bg); font-size: 13px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 0; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: '/'; margin-left: 8px; color: #aab4bc; }

/* Каталог фильтр */
.catalog__filter { display: flex; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
.chip { padding: 8px 18px; border-radius: 30px; background: var(--bg); font-weight: 600; font-size: 14px; color: var(--dark); }
.chip.is-active, .chip:hover { background: var(--teal); color: #fff; }

/* Товар */
.product__top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; margin-bottom: 40px; }
.product__media { border-radius: var(--radius); min-height: 380px; background-size: cover; background-position: center; box-shadow: var(--shadow); }
.product__info h1 { font-size: 32px; margin: 0 0 12px; }
.product__excerpt { color: var(--muted); font-size: 16px; }
.product__price { font-family: "Montserrat", sans-serif; font-size: 28px; font-weight: 800; color: var(--teal); margin: 14px 0; }
.product__specs { list-style: none; padding: 0; margin: 0 0 22px; }
.product__specs li { padding: 8px 0 8px 28px; border-bottom: 1px solid var(--line); position: relative; }
.product__specs li::before { content: '✓'; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.product__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.product__note { color: var(--muted); font-size: 13px; margin-top: 12px; }
.product__desc { margin: 30px auto; }

/* Статья / страница */
.article__title { font-size: 34px; margin: 0 0 8px; }
.article__meta { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.article__cover { aspect-ratio: 16/8; border-radius: var(--radius); background-size: cover; background-position: center; margin-bottom: 24px; }
.article__body { font-size: 16.5px; }
.article__body h2 { font-size: 24px; margin: 28px 0 12px; }
.article__body ul { padding-left: 22px; }
.article__body li { margin-bottom: 6px; }
.article__cta { margin-top: 36px; padding: 24px; background: var(--bg); border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.page__body { font-size: 16px; }

/* Контакты */
.contacts { display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px; align-items: start; }
.contacts__info p { margin: 8px 0; font-size: 16px; }
.contacts__map iframe { border-radius: var(--radius); }

/* Модалка */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal__overlay { position: absolute; inset: 0; background: rgba(15,32,40,.6); }
.modal__box { position: relative; background: #fff; border-radius: var(--radius); padding: 32px; max-width: 440px; width: 100%; box-shadow: var(--shadow); }
.modal__box h3 { margin: 0 0 8px; font-size: 22px; }
.modal__box p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.modal__close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--muted); line-height: 1; }
.lead-form input { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; margin-bottom: 12px; }
.lead-form input:focus { outline: none; border-color: var(--accent); }
.lead-form__consent { display: block; color: var(--muted); font-size: 11px; margin-top: 10px; }
.lead-form__msg { margin-top: 12px; font-size: 14px; }
.lead-form__msg.is-ok { color: var(--teal); }
.lead-form__msg.is-err { color: #c0392b; }

/* Подвал */
.site-footer { background: var(--dark); color: #aeb9c2; margin-top: 0; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; padding: 54px 0 36px; }
.logo--light .logo__text b { color: #fff; }
.logo--light .logo__text small { color: #8fd5cf; }
.footer__about { font-size: 14px; margin-top: 14px; }
.footer__col h4 { color: #fff; font-size: 16px; margin: 0 0 14px; }
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: 9px; }
.footer__col a { color: #aeb9c2; font-size: 14px; }
.footer__col a:hover { color: #fff; }
.footer__phone { font-family: "Montserrat", sans-serif; font-size: 20px; font-weight: 700; color: #fff; display: block; margin-bottom: 10px; }
.footer__col .btn { margin-top: 14px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: 12.5px; color: #7e8b95; }
.footer__bottom .container { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; flex-wrap: wrap; }

/* Мобильная панель */
.mobile-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; background: #fff; box-shadow: 0 -4px 18px rgba(0,0,0,.12); padding: 8px; gap: 8px; }
.mobile-bar__btn { flex: 1; text-align: center; padding: 13px; border-radius: 10px; font-weight: 600; background: var(--bg); color: var(--dark); border: none; cursor: pointer; font-size: 15px; }
.mobile-bar__btn--accent { background: var(--accent); color: #fff; }

/* Адаптив */
@media (max-width: 1024px) {
	.cards, .adv-grid { grid-template-columns: repeat(2, 1fr); }
	.calc-cta__inner, .about__inner, .product__top, .contacts { grid-template-columns: 1fr; }
	.calc-cta__img, .about__img { min-height: 240px; }
}
@media (max-width: 760px) {
	.section { padding: 44px 0; }
	.section__title { font-size: 26px; }
	.hero h1 { font-size: 32px; }
	.hero__inner { padding: 56px 0; }
	.topbar { display: none; }
	.main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: var(--shadow); margin: 0; padding: 12px 20px; }
	.main-nav.is-open { display: block; }
	.main-nav__list { flex-direction: column; gap: 0; }
	.main-nav__list li { border-bottom: 1px solid var(--line); }
	.main-nav__list a { display: block; padding: 13px 0; }
	.header__contacts .btn { display: none; }
	.header__phone { font-size: 16px; }
	.burger { display: flex; }
	.header__row { gap: 12px; }
	.cards, .cards--articles, .steps__grid, .gallery, .reviews__grid, .adv-grid { grid-template-columns: 1fr; }
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.mobile-bar { display: flex; }
	body { padding-bottom: 64px; }
}
