/*
Theme Name: Рембыт Сервис
Description: Единая блочная тема для городских сайтов Рембыт Сервис.
Version: 0.2.0
Requires at least: 6.8
Requires PHP: 8.1
Text Domain: rembyt-service
*/

:root {
	--rb-navy: #243b53;
	--rb-orange: #b94a16;
	--rb-price: #bc4916;
	--rb-muted: #4b5a65;
	--rb-line: #e1e5e9;
	--rb-soft: #f3f5f7;
	--rb-gutter: clamp(16px, 3vw, 28px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--rb-header-height, 150px) + var(--wp-admin--admin-bar--height, 0px) + 12px); }
body { margin: 0; color: #202a38; }
a { color: var(--rb-navy); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #1672ba; outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.12; margin-bottom: 16px; }
h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); line-height: 1.22; margin-bottom: 18px; }
h3 { font-size: 1.05rem; }
.rb-wrap { width: min(100% - var(--rb-gutter) * 2, 1200px); margin-inline: auto; }
.wp-site-blocks > header.wp-block-template-part {
	position: sticky; inset-block-start: var(--wp-admin--admin-bar--height, 0px); z-index: 30;
	background: #fff; box-shadow: 0 1px 0 var(--rb-line);
}
.rb-back-to-top {
	position: fixed; z-index: 25; inset-inline-end: var(--rb-gutter);
	inset-block-end: max(16px, env(safe-area-inset-bottom)); gap: 6px;
	box-shadow: 0 2px 8px #243b5329;
}
.rb-back-to-top[hidden] { display: none; }
.rb-top { background: var(--rb-soft); font-size: .88rem; }
.rb-header-row, .rb-top .rb-wrap, .rb-nav .rb-wrap {
	display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px;
}
.rb-top .rb-wrap { justify-content: space-between; }
.rb-top nav, .rb-footer nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.rb-top a, .rb-footer a { padding-block: 12px; }
.rb-header-row { justify-content: space-between; min-height: 72px; padding-block: 10px; }
.rb-brand { font-weight: 800; font-size: clamp(1.2rem, 4vw, 1.6rem); text-decoration: none; }
.rb-brand-mark { color: var(--rb-orange); }
.rb-nav { color: #fff; background: var(--rb-navy); }
.rb-nav-items { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 24px; }
.rb-nav a, .rb-nav summary { display: block; color: #fff; padding: 12px 0; font-weight: 600; text-decoration: none; }
.rb-nav summary { cursor: pointer; }
.rb-nav summary::after { content: " ▾"; }
.rb-nav details { position: relative; }
.rb-nav details div {
	position: absolute; z-index: 3; right: 0; width: min(260px, 86vw);
	padding: 6px 16px; background: var(--rb-navy); border: 1px solid #60778d; border-radius: 6px;
	max-height: min(62dvh, 36rem); overflow-y: auto; overscroll-behavior: contain;
}
.rb-nav details a { padding-block: 10px; }
.rb-nav a:hover, .rb-nav summary:hover { text-decoration: underline; }
.rb-review-header { min-height: 63px; justify-content: flex-start; }
.rb-review-header .rb-button { margin-inline-start: auto; }
.rb-review-city { color: var(--rb-muted); font-size: .9rem; }
.rb-nav .rb-review-menu .rb-nav-items { gap: 0 18px; }
.rb-review-menu a, .rb-review-menu summary { font-size: .9rem; }
.rb-nav .rb-review-nav div { min-width: 230px; }
.rb-nav .rb-review-nav div a + a { border-top: 1px solid #ffffff24; }
.rb-nav .rb-services-nav > div {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 18px;
	inset-inline: 0 auto; width: min(620px, 82vw);
}
.rb-nav .rb-services-nav > div a:first-child { grid-column: 1 / -1; }
.rb-nav .rb-nested-nav > div { position: static; width: auto; min-width: 0; padding: 0 10px; border: 0; }
.rb-button {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: 9px 16px; border-radius: 7px; border: 0;
	background: var(--rb-orange); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.rb-button:hover { background: #973b12; color: #fff; }
.rb-button--navy { background: var(--rb-navy); }
.rb-button--navy:hover { background: #172b3c; }
.rb-button--outline { background: transparent; color: var(--rb-orange); border: 1px solid var(--rb-orange); }
.rb-crumbs { padding-block: 16px; font-size: .88rem; color: var(--rb-muted); }
.rb-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 0; margin: 0; }
.rb-crumbs li + li::before { content: "›"; margin-inline-end: 10px; }
.rb-hero { padding-block: 20px 0; }
.rb-crumbs + .rb-hero { padding-top: 0; }
.rb-hero-panel {
	display: grid; align-items: center; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, .76fr);
	padding: clamp(22px, 4vw, 46px); border: 1px solid #e8e4df; border-radius: 12px;
	background: #f4f4f0;
	border-inline-start: 5px solid var(--rb-orange);
}
.rb-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.rb-hero-panel:not(.rb-hero-panel--image) { grid-template-columns: minmax(0, 1fr); }
.rb-hero-panel h1 { max-width: 24ch; }
.rb-hero-panel p { color: var(--rb-muted); max-width: 61ch; margin-bottom: 18px; }
.rb-hero-panel img { width: 100%; border-radius: 8px; }
.rb-hero-panel img.rb-hero-device { width: min(100%, 240px); justify-self: center; }
.rb-section { padding-block: clamp(23px, 4vw, 48px); }
.rb-section + .rb-section { border-top: 1px solid var(--rb-line); }
.rb-section--soft { background: var(--rb-soft); }
.rb-section p:last-child, .rb-card p:last-child { margin-bottom: 0; }
.rb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rb-grid--popular { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rb-card { padding: 15px; border: 1px solid var(--rb-line); border-radius: 8px; background: #fff; }
a.rb-card { display: flex; align-items: center; min-height: 61px; font-weight: 700; text-decoration: none; }
a.rb-card:hover { border-color: var(--rb-orange); text-decoration: underline; }
.rb-card h3 { margin-bottom: 6px; }
.rb-card img { aspect-ratio: 1 / 1; width: 64px; object-fit: cover; border-radius: 50%; margin-bottom: 10px; }
.rb-card small, .rb-muted { color: var(--rb-muted); }
.rb-grid--master { gap: 16px; }
.rb-master-card {
	overflow: hidden; display: flex; flex-direction: column; background: #fff;
	border: 1px solid var(--rb-line); border-radius: 10px;
}
.rb-master-card__portrait {
	width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: center;
	background: #ebe6df;
}
.rb-master-card__body { display: flex; flex-direction: column; flex: 1; align-items: flex-start; gap: 10px; padding: 16px; }
.rb-master-card__body h3 { font-size: 1.2rem; line-height: 1.25; margin: 0; }
.rb-master-card__body p { color: var(--rb-muted); margin: 0; }
.rb-master-card__body .rb-button { margin-top: auto; }
.rb-master-card__specialties { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.rb-master-card__specialties li { padding: 3px 8px; border-radius: 4px; background: var(--rb-soft); color: var(--rb-navy); font-size: .85rem; }
.rb-master-profile { max-width: 400px; display: grid; gap: 16px; }
.rb-master-profile .rb-master-card__portrait { border-radius: 10px; }
.rb-price { color: var(--rb-price); font-weight: 750; white-space: nowrap; }
.rb-table-wrap + .rb-table-wrap { margin-top: 22px; }
.rb-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.rb-table th, .rb-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rb-line); }
.rb-table th { background: var(--rb-soft); }
.rb-table .rb-table-price { width: 22%; }
.rb-table .rb-table-action { width: 120px; text-align: right; }
.rb-table caption { text-align: left; font-weight: 700; margin-bottom: 8px; }
.rb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.rb-chips a { padding: 9px 13px; border: 1px solid var(--rb-line); border-radius: 6px; }
.rb-faq { max-width: 840px; }
.rb-faq details { border-bottom: 1px solid var(--rb-line); padding: 0 8px; }
.rb-faq summary { padding: 12px 0; font-weight: 700; cursor: pointer; }
.rb-cta { display: grid; gap: 18px; align-items: start; grid-template-columns: 1fr 1fr; padding: clamp(18px, 4vw, 32px); background: var(--rb-soft); border-radius: 8px; }
.rb-form { display: grid; gap: 12px; }
.rb-form label { display: block; }
.rb-form input:not([type=checkbox]), .rb-form textarea { display: block; width: 100%; padding: 9px; min-height: 44px; border: 1px solid #78838e; border-radius: 5px; font: inherit; }
.rb-footer { background: var(--rb-navy); color: #fff; padding-block: 24px; }
.rb-footer a, .rb-footer .rb-brand-mark { color: #fff; }
.rb-main { min-height: 55vh; }
.rb-main > .wp-block-post-content, .rb-main > .wp-block-search, .rb-main > .wp-block-query,
.rb-main > .wp-block-query-title, .rb-main > .wp-block-heading {
	width: min(100% - var(--rb-gutter) * 2, 1200px); margin-inline: auto; padding-block: 22px;
}
.rb-main > .wp-block-post-content > * { max-width: 780px; }
.rb-main > .wp-block-post-content:empty { display: none; }
.rb-main > .wp-block-post-content h2:not(:first-child) { margin-top: 26px; }
.rb-mobile { display: none; }
.rb-status { padding: 10px 12px; border-left: 4px solid var(--rb-navy); }

.rb-hero-panel { border-radius: 5px; min-height: 270px; border-inline-start-color: #d85b1b; }
.rb-hero-panel .rb-eyebrow { font-weight: 750; font-size: .8rem; margin-bottom: 9px; letter-spacing: .02em; }
.rb-catalog > .rb-wrap > h2, .rb-price-section > .rb-wrap > h2 {
	padding-block-end: 12px; border-bottom: 2px solid #d85b1b;
}
.rb-catalog-card {
	display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 10px;
	min-height: 108px; padding: 12px; background: #fff; border: 1px solid #dce1e6;
	border-radius: 8px; text-decoration: none; line-height: 1.3;
}
a.rb-catalog-card:hover { border-color: var(--rb-orange); }
a.rb-catalog-card:hover strong { text-decoration: underline; }
.rb-catalog-card small { display: block; color: var(--rb-muted); font-size: .78rem; margin-top: 5px; }
.home .rb-hero-panel { padding: clamp(18px, 3.3vw, 42px); }
.home .rb-catalog { padding-block: 24px 32px; }
.rb-catalog-card img { width: 72px; aspect-ratio: 1; object-fit: contain; }
.rb-catalog-card > span:only-child { grid-column: 1 / -1; }
.rb-catalog-arrow { display: block; font-size: .82rem; color: var(--rb-price); margin-top: 5px; }
.rb-benefits { padding-block: 16px; }
.rb-benefits h2 { font-size: 1.1rem; margin-bottom: 10px; }
.rb-grid--benefits .rb-card { border: 0; border-inline-start: 2px solid #d85b1b; border-radius: 0; padding-block: 4px; }
.rb-grid--steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rb-grid--steps article > span { color: var(--rb-price); font-weight: 800; display: block; margin-bottom: 6px; }
.rb-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rb-popular-section h2 { text-align: center; }
.rb-popular-section .rb-card { border-inline: 0; border-radius: 0; border-bottom: 0; }
.rb-popular-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; }
.rb-popular-actions span { color: var(--rb-price); font-weight: 700; }
.rb-section-note { color: var(--rb-muted); font-size: .9rem; margin-top: 12px; }
.rb-price-more { padding-bottom: 22px; }
.rb-chips--labels span { padding: 8px 12px; background: var(--rb-soft); border-radius: 6px; }
.rb-review-portrait { display: grid; place-content: center; color: var(--rb-muted); background: #e9eef2; }
.rb-form :disabled { cursor: default; }
.rb-grid.rb-grid--brands-v5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rb-v5-brands summary { margin: 12px 0; cursor: pointer; }
.rb-v5-footer-grid, .rb-v5-geo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 24px; }
.rb-v5-footer-grid nav { display: grid; gap: 4px; }
.rb-v5-footer-grid h2 { font-size: 1.08rem; }
.rb-v5-footer-grid nav a, .rb-v5-legal a { padding: 5px 0; }
.rb-v5-legal { margin-top: 20px; }
.rb-v5-lead { background: #243b53; color: #fff; }
.rb-v5-lead a { color: #fff; }
@media (max-width: 900px) {
	.rb-grid.rb-grid--brands-v5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.rb-v5-footer-grid, .rb-v5-geo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
	.rb-grid.rb-grid--brands-v5, .rb-v5-geo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rb-v5-footer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
	.rb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.rb-grid--popular { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
	.rb-top nav, .rb-nav .rb-desktop { display: none; }
	.rb-nav .rb-mobile { display: block; }
	.rb-nav .rb-mobile div { inset-inline-start: 0; inset-inline-end: auto; }
	.rb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rb-hero-panel, .rb-cta { grid-template-columns: minmax(0, 1fr); }
	.rb-hero-panel img { max-height: 185px; object-fit: contain; }
	.rb-catalog-card { grid-template-columns: minmax(0, 1fr); align-content: start; }
	.rb-catalog-card img { justify-self: center; }
	.rb-grid--steps, .rb-grid--two { grid-template-columns: minmax(0, 1fr); }
	.rb-review-header { min-height: 56px; column-gap: 10px; }
	.rb-review-header .rb-button { display: none; }
	.rb-review-city { margin-inline-start: auto; font-size: .8rem; }
	.rb-nav .rb-review-menu .rb-mobile > div { width: min(320px, calc(100vw - 2 * var(--rb-gutter))); }
	.home .rb-hero-panel { gap: 8px; }
	.home .rb-hero-panel img { max-height: 112px; }
	.home .rb-catalog { padding-block: 20px 24px; }
	.home .rb-catalog-card { min-height: 104px; padding: 8px; gap: 4px; }
	.home .rb-catalog-card img { width: 53px; }
}
@media (max-width: 480px) {
	.rb-grid--popular, .rb-grid--master { grid-template-columns: minmax(0, 1fr); }
	.rb-card { padding: 11px; overflow-wrap: anywhere; }
	.rb-table .rb-table-price { width: 25%; }
	.rb-table .rb-table-action { width: 81px; }
	.rb-table th, .rb-table td { padding: 8px 4px; font-size: .875rem; }
	.rb-table .rb-button { padding-inline: 6px; }
}
