/*
Theme Name: Класс: дом в порядке
Theme URI: https://klass-market.ru/
Description: Тема домашнего справочника по бытовой химии: белый, тёмно-синий, бирюза, лимон, шкала pH; Raleway + Mulish. Таблица пятен, шаги инструкции, блок «Чего не делать». Mobile-first, без JS.
Version: 1.0.0
Author: Редакция «Класс: дом в порядке»
Text Domain: klass
Requires PHP: 7.4
*/

:root {
	--bg: #ffffff;
	--soft: #f2f7f8;
	--navy: #13294b;
	--navy-2: #1d3a66;
	--aqua: #17a9b8;
	--aqua-l: #dff3f5;
	--lemon: #f5d547;
	--lemon-l: #fdf6d3;
	--text: #26324a;
	--muted: #66708a;
	--line: #dde5ea;
	--acid: #e5484d;
	--alk: #6c4bd1;
	--ok: #2f9e6b;
	--ph: linear-gradient(90deg, #e5484d 0%, #f08a3c 18%, #f5d547 34%, #45b36b 50%, #17a9b8 66%, #3b6fd8 82%, #6c4bd1 100%);
	--head: "Raleway", "Helvetica Neue", Arial, sans-serif;
	--sans: "Mulish", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--w: 1160px;
	--r: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.65 var(--sans); overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); text-decoration-color: var(--aqua); text-underline-offset: 3px; }
a:hover { color: var(--aqua); }
h1, h2, h3 { font-family: var(--head); color: var(--navy); line-height: 1.2; margin: 0; font-weight: 800; }
.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.phline { height: 4px; background: var(--ph); }

/* ---------- Шапка ---------- */
.top { background: #fff; }
.top__row { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); margin-right: auto; }
.logo:hover { color: var(--navy); }
.logo__mark { width: 38px; height: 38px; flex: none; }
.logo__mark .lm1 { fill: var(--aqua); }
.logo__mark .lm2 { fill: var(--lemon); }
.logo__mark .lm3 { fill: var(--navy); }
.logo__mark .lm4 { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.logo__txt { font: 800 24px/1 var(--head); letter-spacing: -.01em; }
.logo__txt small { display: block; font: 600 12px/1.3 var(--sans); color: var(--muted); letter-spacing: .02em; }
.top__nav { display: none; }
.top__find { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--soft); color: var(--navy); }
.top__find:hover { background: var(--aqua-l); color: var(--navy); }

/* Разделы плитками (телефон/планшет) */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 12px; }
.tiles__i { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--soft); color: var(--navy); text-decoration: none; font: 700 14px/1.2 var(--head); }
.tiles__i .ico { width: 22px; height: 22px; flex: none; color: var(--aqua); }
.tiles__i:hover, .tiles__i.is-cur { background: var(--navy); color: #fff; }
.tiles__i:hover .ico, .tiles__i.is-cur .ico { color: var(--lemon); }

@media (min-width: 921px) {
	.top__row { min-height: 76px; }
	.tiles { display: none; }
	.top__nav { display: block; }
	.top__nav .menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
	.top__nav .menu a { display: block; padding: 9px 14px; border-radius: 999px; color: var(--navy); text-decoration: none; font: 700 15px/1 var(--head); }
	.top__nav .menu a:hover, .top__nav .current-menu-item > a { background: var(--aqua-l); }
}

/* ---------- Поиск ---------- */
.finder { display: flex; max-width: 560px; background: #fff; border: 2px solid var(--navy); border-radius: 999px; padding: 4px 4px 4px 6px; }
.finder input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 12px; font: 400 17px var(--sans); color: var(--navy); }
.finder input:focus { outline: none; }
.finder button { border: 0; border-radius: 50%; width: 46px; height: 46px; background: var(--navy); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.finder button:hover { background: var(--aqua); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--aqua-l); padding: 34px 0 40px; }
.hero__in { position: relative; z-index: 1; }
.hero__t { font-size: clamp(28px, 7vw, 48px); max-width: 820px; letter-spacing: -.015em; }
.hero__lede { font-size: 18px; max-width: 600px; margin: 14px 0 22px; color: var(--text); }
.bub { position: absolute; border-radius: 50%; border: 2px solid rgba(23, 169, 184, .35); background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .9), rgba(255, 255, 255, .15) 60%); }
.bub--1 { width: 180px; height: 180px; right: -60px; top: -40px; }
.bub--2 { width: 90px; height: 90px; right: 90px; bottom: -30px; }
.bub--3 { width: 46px; height: 46px; right: 40px; top: 150px; border-color: rgba(245, 213, 71, .8); }
@media (min-width: 921px) {
	.hero { padding: 64px 0 70px; }
	.bub--1 { width: 340px; height: 340px; right: 4%; top: -60px; }
	.bub--2 { width: 150px; height: 150px; right: 26%; bottom: -50px; }
	.bub--3 { width: 70px; height: 70px; right: 20%; top: 60px; }
}

/* ---------- Секции ---------- */
.sec { padding: 40px 16px; }
.sec__t { font-size: clamp(24px, 5.6vw, 34px); margin-bottom: 20px; }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.sec__head .sec__t { margin: 0; }
.sec__more { font: 700 15px var(--head); text-decoration: none; }

/* Таблица пятен */
.stains { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stain { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--navy); background: #fff; font: 700 17px/1.2 var(--head); }
.stain__blot { width: 40px; height: 40px; flex: none; }
.stain:hover { border-color: var(--navy); color: var(--navy); box-shadow: 0 6px 18px rgba(19, 41, 75, .08); }
@media (min-width: 561px) { .stains { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 921px) { .stain { flex-direction: column; justify-content: center; padding: 22px 12px; text-align: center; } .stain__blot { width: 64px; height: 64px; } }

/* Техника */
.dev { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dev__i { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; background: var(--navy); color: #fff; border-radius: var(--r); text-decoration: none; font: 700 16px/1.25 var(--head); }
.dev__i .ico { width: 34px; height: 34px; color: var(--lemon); }
.dev__i:hover { background: var(--aqua); color: #fff; }
.dev__i:hover .ico { color: #fff; }
.dev__i:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 921px) { .dev { grid-template-columns: repeat(5, 1fr); gap: 14px; } .dev__i:last-child:nth-child(odd) { grid-column: auto; } .dev__i { padding: 22px 18px; } }

/* Шкала pH */
.phsec { background: var(--soft); padding: 40px 0; }
.phsec__lede { color: var(--muted); margin: -8px 0 18px; max-width: 640px; }
.scale { height: 14px; border-radius: 999px; background: var(--ph); display: flex; justify-content: space-between; align-items: flex-end; margin: 0 0 30px; }
.scale span { font: 700 12px/1 var(--head); color: var(--muted); transform: translateY(20px); }
.phcols { display: grid; gap: 12px; }
.phcol { background: #fff; border-radius: var(--r); padding: 18px; border-top: 5px solid var(--ok); }
.phcol--k { border-top-color: var(--acid); }
.phcol--s { border-top-color: var(--alk); }
.phcol b { font: 800 20px/1.2 var(--head); color: var(--navy); display: block; }
.phcol span { font: 700 13px/1 var(--sans); color: var(--muted); }
.phcol p { margin: 8px 0 0; font-size: 16px; }
.phsec__note { margin: 18px 0 0; padding: 12px 16px; background: var(--lemon-l); border-radius: 10px; font-size: 16px; border-left: 4px solid var(--lemon); }
@media (min-width: 921px) { .phcols { grid-template-columns: repeat(3, 1fr); gap: 18px; } .phsec { padding: 56px 0; } }

/* Список «Новое» */
.list { display: grid; border-top: 1px solid var(--line); }
.list__i { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.list__t { font: 700 18px/1.3 var(--head); color: var(--navy); }
.list__i:hover .list__t { color: var(--aqua); }
@media (min-width: 921px) { .list { grid-template-columns: 1fr 1fr; column-gap: 40px; } .list__i { grid-template-columns: 170px 1fr; align-items: baseline; } }

/* Карточки */
.cards { display: grid; gap: 16px; }
@media (min-width: 561px) { .cards--3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 921px) { .cards--3 { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.card__img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card__b { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__cat { align-self: flex-start; font: 700 12px/1 var(--sans); padding: 5px 9px; border-radius: 999px; background: var(--aqua-l); color: #0c6d77; text-decoration: none; }
.card__cat--stirka { background: #e6ecfb; color: #2a4fb0; }
.card__cat--tehnika { background: var(--aqua-l); color: #0c6d77; }
.card__cat--uborka { background: #e7f5ec; color: #23734e; }
.card__cat--sredstva { background: var(--lemon-l); color: #7a6208; }
.card__t { font-size: 19px; font-weight: 700; }
.card__t a { color: var(--navy); text-decoration: none; }
.card__t a:hover { color: var(--aqua); }
.card__ex { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.5; }

.btn { display: inline-block; background: var(--navy); color: #fff; text-decoration: none; font: 700 15px/1 var(--head); padding: 14px 22px; border-radius: 999px; }
.btn:hover { background: var(--aqua); color: #fff; }

/* ---------- Рубрика / поиск ---------- */
.phead { background: var(--soft); padding: 30px 0 28px; }
.phead__in { display: flex; gap: 16px; align-items: flex-start; }
.phead__ico { flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--navy); display: grid; place-items: center; }
.phead__ico .ico { width: 32px; height: 32px; color: var(--lemon); }
.phead__t { font-size: clamp(27px, 6.4vw, 44px); }
.phead__d { color: var(--muted); max-width: 680px; margin-top: 8px; }
.phead__d p { margin: 0; }
.phead .finder { margin-top: 18px; }
.empty { color: var(--muted); }

/* ---------- Статья ---------- */
.art__head { background: var(--soft); padding: 28px 0 26px; margin-bottom: 26px; }
.art__cat { display: inline-block; margin-bottom: 12px; }
.art__t { font-size: clamp(27px, 6.6vw, 46px); max-width: 900px; letter-spacing: -.01em; }
.art__meta { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.quick { margin-top: 18px; max-width: 820px; background: #fff; border-radius: var(--r); padding: 14px 18px; border-left: 6px solid var(--lemon); }
.quick b { font: 800 13px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.quick p { margin: 6px 0 0; }
.art__grid { display: grid; gap: 22px; padding-bottom: 10px; }
.art__main { min-width: 0; max-width: 760px; }
.art__cover { margin: 0 0 24px; }
.art__cover img { border-radius: var(--r); width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.toc { border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.toc summary { cursor: pointer; padding: 12px 16px; font: 800 15px var(--head); color: var(--navy); }
.toc ol { margin: 0; padding: 0 16px 14px 34px; font-size: 15px; }
.toc li { margin: 5px 0; line-height: 1.4; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--aqua); }
@media (min-width: 921px) {
	.art__grid { grid-template-columns: 250px minmax(0, 760px); gap: 48px; }
	.art__side .toc { position: sticky; top: 20px; }
	.art__side { order: 0; }
}

/* Текст */
.content > * { margin-top: 0; margin-bottom: 1.1em; }
.content h2 { font-size: clamp(23px, 5vw, 30px); margin: 1.7em 0 .6em; }
.content h3 { font-size: 20px; font-weight: 700; margin: 1.4em 0 .5em; }
.content ul, .content ol { padding-left: 1.3em; }
.content li { margin: .35em 0; }
.content ul li::marker { color: var(--aqua); }
.content blockquote { margin: 1.4em 0; padding: 14px 18px; background: var(--lemon-l); border-radius: var(--r); }
.content blockquote p { margin: 0; }
.content figure { margin: 1.5em 0; }
.content figure img { border-radius: var(--r); }
.content figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* Что понадобится */
.content ul.kit { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.content ul.kit li { margin: 0; padding: 8px 14px 8px 12px; background: var(--aqua-l); border-radius: 999px; font-weight: 600; font-size: 15px; line-height: 1.3; }
.content ul.kit li::before { content: "✓ "; color: #0c6d77; font-weight: 800; }

/* Пошагово */
.content ol.steps { list-style: none; padding: 0; counter-reset: s; }
.content ol.steps > li { counter-increment: s; position: relative; padding: 14px 16px 14px 62px; margin: 0 0 10px; background: var(--soft); border-radius: var(--r); min-height: 60px; }
.content ol.steps > li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font: 800 17px/34px var(--head); text-align: center; }

/* Чего не делать */
.dont { border: 2px solid #f3c1c3; background: #fff6f6; border-radius: var(--r); padding: 4px 18px 6px; margin: 1.6em 0; }
.dont h2 { color: var(--acid); margin-top: .7em !important; }
.dont ul { list-style: none; padding-left: 0; }
.dont ul li { position: relative; padding-left: 28px; }
.dont ul li::before { content: "✕"; position: absolute; left: 0; top: 0; color: var(--acid); font-weight: 800; }

/* Таблицы */
.tbl { overflow-x: auto; margin: 1.4em 0; border-radius: var(--r); border: 1px solid var(--line); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 480px; }
.tbl th { background: var(--navy); color: #fff; text-align: left; padding: 10px 12px; font: 700 14px var(--head); border: 0; }
.tbl td { padding: 10px 12px; border: 0; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr:nth-child(even) td { background: var(--soft); }
.content .wp-block-table { margin: 0; }

/* Шорткод [ph] */
.phb { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 14px; background: var(--soft); white-space: nowrap; }
.phb b { font: 800 12px/1.6 var(--head); color: #fff; padding: 0 7px; border-radius: 999px; background: var(--ok); }
.phb--kislotnoe b { background: var(--acid); }
.phb--shchelochnoe b { background: var(--alk); }

/* Оффер/виджеты */
.klm-slot { margin: 28px 0; }
.klm-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r); background: var(--lemon-l); }
.klm-offer__body { flex: 1 1 240px; }
.klm-offer__note { font: 700 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.klm-offer__title { font: 800 19px var(--head); margin: 4px 0; color: var(--navy); }
.klm-offer__text { margin: 0; font-size: 15px; }
.klm-offer__btn { background: var(--navy); color: #fff; text-decoration: none; padding: 12px 20px; border-radius: 999px; font: 700 15px var(--head); }

/* Страница */
.pg { max-width: 780px; padding-top: 30px; padding-bottom: 40px; }
.pg__t { font-size: clamp(28px, 6vw, 42px); margin-bottom: 20px; }

/* Пагинация */
.pagination { margin-top: 28px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers { display: inline-block; min-width: 40px; text-align: center; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--navy); background: var(--soft); font: 700 15px var(--head); }
.page-numbers.current { background: var(--navy); color: #fff; }

/* 404 */
.nf { padding: 50px 16px 64px; max-width: 720px; }
.nf__code { font: 800 110px/1 var(--head); margin: 0 0 12px; background: var(--ph); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf__d { color: var(--muted); margin: 12px 0 18px; }
.nf .btn { margin-top: 18px; }

/* ---------- Подвал ---------- */
.foot { background: var(--navy); color: #b9c4d8; margin-top: 44px; }
.foot__row { display: grid; gap: 22px; padding-top: 34px; padding-bottom: 20px; }
.logo--foot { color: #fff; }
.logo--foot:hover { color: #fff; }
.logo--foot .logo__txt small { color: #9fb0cc; }
.logo--foot .lm3 { fill: #fff; }
.foot__t { margin: 12px 0 0; font-size: 15px; max-width: 360px; }
.foot__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot__menu a, .foot__l a { color: #fff; text-decoration: none; font-size: 15px; }
.foot__menu a:hover, .foot__l a:hover { color: var(--lemon); }
.foot__l { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; }
.foot__c { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 14px; padding-bottom: 18px; font-size: 13px; color: #8d9bb5; }
@media (min-width: 921px) { .foot__row { grid-template-columns: 1.3fr 1fr 1fr; padding-top: 46px; } .foot__l { flex-direction: column; } }
