:root {
	--green: #1f7a4d;
	--green-dark: #155c39;
	--green-soft: #e8f3ec;
	--ink: #17231d;
	--muted: #5b6b62;
	--line: #dbe4de;
	--bg: #ffffff;
	--bg-alt: #f5f8f6;
	--dark: #12261c;
	--accent: #f2b33d;
	--radius: 14px;
	--shadow: 0 10px 30px rgba(18, 38, 28, .08);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body.ecoprof {
	margin: 0;
	font: 16px/1.6 "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	color: var(--ink);
	background: var(--bg);
	-webkit-text-size-adjust: 100%;
}
img, svg, iframe { max-width: 100%; }
a { color: var(--green); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 800; }
h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 860px; }
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--dark); color: #e9f1ec; }
.section-dark a { color: #9fe0bb; }
.section-lead { color: var(--muted); max-width: 760px; margin-bottom: 28px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 12px 24px; border: 2px solid var(--green); border-radius: 10px;
	background: var(--green); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
	transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--green-soft); }
.btn-sm { min-height: 42px; padding: 8px 16px; font-size: 15px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--green); font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.logo-mark { color: var(--green); display: flex; }
.logo-text { font-weight: 800; font-size: 14px; line-height: 1.2; }
.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--green); }
.header-contacts { display: flex; flex-direction: column; text-align: right; line-height: 1.3; }
.header-phone { color: var(--ink); font-weight: 800; text-decoration: none; white-space: nowrap; }
.header-addr { color: var(--muted); font-size: 12px; }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; position: relative; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 11px; width: 20px; height: 2px; background: var(--ink); content: ""; }
.burger span { top: 21px; }
.burger span::before { top: -6px; left: 0; }
.burger span::after { top: 6px; left: 0; }

/* Первый экран */
.hero { padding: 56px 0 72px; background: linear-gradient(180deg, var(--green-soft), #fff); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.eyebrow { display: inline-block; padding: 4px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--green); font-weight: 700; font-size: 14px; }
.lead { font-size: 18px; color: var(--muted); max-width: 600px; }
.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 28px 0; list-style: none; }
.hero-facts li { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.hero-facts strong { display: block; font-size: 26px; font-weight: 800; color: var(--green); }
.hero-facts span { font-size: 14px; color: var(--muted); line-height: 1.35; display: block; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Квиз */
.quiz { padding: 28px; }
.quiz-title { font-weight: 800; font-size: 19px; line-height: 1.3; margin-bottom: 14px; }
.quiz-progress { height: 6px; background: var(--green-soft); border-radius: 99px; overflow: hidden; }
.quiz-progress span { display: block; height: 100%; background: var(--green); transition: width .25s; }
.quiz-step-label { color: var(--muted); font-size: 14px; margin: 8px 0 16px; }
.quiz-step { display: none; border: 0; padding: 0; margin: 0; min-width: 0; }
.quiz-step.is-active { display: block; }
.quiz-step legend { font-weight: 700; font-size: 18px; margin-bottom: 12px; padding: 0; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; line-height: 1.35; }
.opt:hover { border-color: var(--green); }
.opt:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.opt input { margin-top: 3px; accent-color: var(--green); flex-shrink: 0; }
.opt-other { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.hint { font-size: 14px; color: var(--muted); }
.quiz-nav { display: flex; gap: 12px; margin-top: 16px; }
.quiz-nav .btn { flex: 1; }

/* Поля форм */
.lead-form label, .quiz-step > label:not(.opt):not(.agree), .opt-other { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
input[type=text], input[type=tel], input[type=email], textarea {
	display: block; width: 100%; margin-top: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
	font: inherit; font-weight: 400; color: var(--ink); background: #fff;
}
input:focus, textarea:focus, .btn:focus-visible, .tab:focus-visible, .link-btn:focus-visible { outline: 3px solid rgba(31, 122, 77, .35); outline-offset: 1px; }
.agree { display: flex !important; gap: 8px; align-items: flex-start; font-size: 13px !important; font-weight: 400 !important; color: var(--muted); line-height: 1.4; margin: 4px 0 14px; }
.agree input { margin-top: 2px; accent-color: var(--green); flex-shrink: 0; }
.lead-form .btn { width: 100%; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* Программы */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab { padding: 10px 16px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; color: var(--ink); }
.tab.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.tab-panel { padding: 8px 24px; overflow-x: auto; }
.programs { width: 100%; border-collapse: collapse; }
.programs th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 14px 8px; border-bottom: 1px solid var(--line); }
.programs td { padding: 14px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.programs tr:last-child td { border-bottom: 0; }
.programs .hours { white-space: nowrap; font-weight: 700; width: 80px; }
.programs .row-cta { white-space: nowrap; text-align: right; width: 170px; }

/* Услуги, форматы, преимущества */
.service, .format { padding: 24px; display: flex; flex-direction: column; }
.service p, .format p { color: var(--muted); font-size: 15px; flex: 1; }
.service .link-btn { margin-top: auto; }
.format h3::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--accent); margin-bottom: 14px; }
.why { padding: 20px 0; border-top: 3px solid var(--green); }
.why b { display: block; font-size: 18px; margin-bottom: 6px; }
.why p { color: var(--muted); font-size: 15px; }

/* Законодательство и ответственность */
.law { padding: 0; margin: 0; list-style: none; }
.law li { position: relative; padding: 10px 0 10px 28px; border-bottom: 1px solid var(--line); font-size: 15px; }
.law li::before { content: "§"; position: absolute; left: 4px; top: 10px; color: var(--green); font-weight: 800; }
.fine { padding: 22px 24px; margin-bottom: 16px; font-size: 15px; }
.fine ul { margin: 0 0 1em; padding-left: 20px; }
.fine p:last-child { margin-bottom: 0; }

/* FAQ */
details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
summary { padding: 18px 48px 18px 20px; font-weight: 700; cursor: pointer; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 20px; top: 14px; font-size: 24px; color: var(--green); }
details[open] summary::after { content: "−"; }
details p { padding: 0 20px 18px; margin: 0; color: var(--muted); }

/* Документы */
.docs { padding: 0; margin: 0; list-style: none; display: grid; gap: 10px; }
.docs a { display: block; padding: 14px 18px 14px 48px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 600; position: relative; }
.docs a::before { content: "PDF"; position: absolute; left: 12px; top: 15px; font-size: 10px; font-weight: 800; color: #fff; background: var(--green); border-radius: 4px; padding: 1px 4px; }
.docs a:hover { border-color: var(--green); }

/* Контакты */
.contacts { list-style: none; padding: 0; margin: 0 0 20px; }
.contacts li { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); font-size: 18px; font-weight: 600; }
.contacts span { display: block; font-size: 13px; font-weight: 400; color: #a9bdb1; }
.contacts a { color: #fff; text-decoration: none; }
.map { border-radius: var(--radius); overflow: hidden; height: 300px; background: #20372b; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.contact-card { padding: 28px; color: var(--ink); }
.contact-card a { color: var(--green); }
.contact-card > p { color: var(--muted); }
.notice { padding: 12px 16px; border-radius: 10px; font-weight: 600; }
.notice.ok { background: #d8f2e2; color: #0f5130; }
.notice.err { background: #fde2e2; color: #7a1c1c; }

/* Подвал */
.site-footer { background: #0c1a13; color: #a9bdb1; padding: 28px 0; font-size: 14px; }
.site-footer a { color: #d6e6dc; }
.footer-row p { margin: 0 0 6px; }
.small { font-size: 12px; }

/* Окно заявки */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(12, 26, 19, .6); }
.modal[hidden] { display: none; }
.modal-box { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; }
.modal-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-sub { color: var(--muted); }
body.modal-open { overflow: hidden; }

.float-call { display: none; position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }

/* Планшет */
@media (max-width: 1100px) {
	.header-addr { display: none; }
	.nav { gap: 14px; }
	.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	.header-row { gap: 12px; }
	.burger { display: block; margin-left: auto; }
	.nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
	.nav.is-open { display: flex; }
	.nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
	.header-row > .btn-sm { display: none; }
	.hero-grid, .grid-2 { grid-template-columns: minmax(0, 1fr); }
	.grid-3 { grid-template-columns: minmax(0, 1fr); }
}
/* Телефон */
@media (max-width: 640px) {
	.section { padding: 48px 0; }
	.hero { padding: 32px 0 48px; }
	.header-row { min-height: 64px; }
	.logo-text { font-size: 12px; }
	.header-contacts { display: none; }
	.hero-facts { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.hero-facts li { display: flex; align-items: baseline; gap: 12px; padding: 12px 14px; }
	.hero-facts strong { font-size: 22px; flex-shrink: 0; }
	.hero-cta .btn { flex: 1; }
	.quiz { padding: 20px 16px; }
	.grid-4 { grid-template-columns: minmax(0, 1fr); }
	.tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 4px; }
	.tab { white-space: nowrap; }
	.tab-panel { padding: 4px 16px; }
	.programs thead { display: none; }
	.programs tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
	.programs tr:last-child { border-bottom: 0; }
	.programs td { padding: 0; border: 0; }
	.programs td:first-child { grid-column: 1 / -1; font-weight: 600; }
	.programs .hours { width: auto; font-weight: 400; color: var(--muted); }
	.programs .hours::after { content: " ч"; }
	.programs .row-cta { width: auto; }
	.map { height: 240px; }
	.float-call { display: flex; }
}
