/*
Theme Name: RoverMobile
Description: rovermobile.ru — инструкции по телефону и гаджетам. Справочный центр: быстрый поиск, пошаговые блоки, плашки Android / iPhone, меню раздела как в документации.
Version: 1.0.0
Text Domain: rovermobile
*/

:root {
	--bg: #f7f7fa;
	--card: #ffffff;
	--ink: #17141f;
	--text: #2a2733;
	--muted: #686475;
	--line: #e4e2ea;
	--vio: #5b34d6;
	--vio-deep: #4524ad;
	--vio-soft: #eeeafc;
	--and: #1d8f4e;
	--and-soft: #e3f4ea;
	--ios: #2b2b30;
	--ios-soft: #ececef;
	--font: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--w: 1200px;
	--r: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.62 var(--font); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--vio); text-underline-offset: 3px; }
a:hover { color: var(--vio-deep); }
h1, h2, h3 { color: var(--ink); font-weight: 600; line-height: 1.22; letter-spacing: -.01em; }
.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 16px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: #fff; padding: 6px 10px; }
.ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--vio-soft), #fff); }
.ic { flex: none; }

/* ---------- Шапка ---------- */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.mark b { font-weight: 600; color: var(--vio); }
.mark__i { width: 18px; height: 28px; border: 3px solid var(--vio); border-radius: 5px; position: relative; }
.mark__i::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--vio); }
.top__q { width: 380px; max-width: 50%; }
.qform { position: relative; }
.qform__i { position: absolute; left: 12px; top: 50%; margin-top: -9px; color: var(--muted); }
.qform input { width: 100%; font: 400 16px var(--font); padding: 10px 14px 10px 38px; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; }
.qform input:focus { outline: none; border-color: var(--vio); background: #fff; }
.sections { border-top: 1px solid var(--line); }
.sections__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.sections__list::-webkit-scrollbar { display: none; }
.sections__list a { display: flex; align-items: center; gap: 8px; padding: 12px 12px; color: var(--text); text-decoration: none; font-size: 15px; white-space: nowrap; border-bottom: 2px solid transparent; }
.sections__list a .ic { width: 18px; height: 18px; color: var(--muted); }
.sections__list a:hover, .sections__list .is-cur a { color: var(--vio); border-bottom-color: var(--vio); }
.sections__list a:hover .ic, .sections__list .is-cur .ic { color: var(--vio); }

/* ---------- Главная ---------- */
.hero { background: var(--vio-soft); padding: 56px 0 40px; }
.hero__in { max-width: 820px; text-align: center; }
.hero__k { margin: 0 0 8px; font-size: 16px; font-weight: 500; color: var(--vio); }
.hero__t { font-size: 38px; margin: 0 0 10px; }
.hero__lead { margin: 0 auto 26px; color: var(--muted); max-width: 36em; }
.big { position: relative; display: flex; background: #fff; border-radius: var(--r); box-shadow: 0 1px 2px rgba(23, 20, 31, .06), 0 10px 30px rgba(91, 52, 214, .12); padding: 6px; text-align: left; }
.big input { flex: 1; min-width: 0; border: 0; font: 400 19px var(--font); padding: 12px 14px; background: transparent; }
.big input:focus { outline: none; }
.big button { border: 0; background: var(--vio); color: #fff; font: 500 16px var(--font); padding: 0 24px; border-radius: 10px; cursor: pointer; }
.big button:hover { background: var(--vio-deep); }
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: #fff; border-radius: var(--r); box-shadow: 0 12px 32px rgba(23, 20, 31, .14); z-index: 30; }
.sugg a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 16px; }
.sugg a:hover { background: var(--vio-soft); }
.pop { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; font-size: 15px; }
.pop span { color: var(--muted); margin-right: 4px; }
.pop a { background: #fff; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; }
.pop a:hover { border-color: var(--vio); color: var(--vio); }

.blk { margin-top: 48px; }
.blk__t { font-size: 26px; margin: 0 0 18px; }
.secs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.sec__h { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 18px; line-height: 1.25; }
.sec__h small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; }
.sec__ic { width: 44px; height: 44px; border-radius: 12px; background: var(--vio-soft); color: var(--vio); display: grid; place-items: center; flex: none; }
.sec ul { list-style: none; margin: 14px 0 0; padding: 0; font-size: 15px; }
.sec li { padding: 6px 0; border-top: 1px solid var(--line); }
.sec li a { color: var(--text); text-decoration: none; }
.sec li a:hover { color: var(--vio); }

/* Карточки с обложкой */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.card:hover { border-color: var(--vio); }
.card__img { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--vio-soft); }
.card__img img, .doc__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.card__cat { font-size: 13px; color: var(--muted); }
.card__t { font-weight: 500; font-size: 18px; line-height: 1.3; }
.card__pl { margin-top: auto; display: flex; gap: 6px; }

/* Плашки платформ */
.pl { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.pl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pl--android { background: var(--and-soft); color: var(--and); }
.pl--iphone { background: var(--ios-soft); color: var(--ios); }
.pl--s { font-size: 11px; padding: 2px 6px; }

/* ---------- Раздел ---------- */
.phead { display: flex; align-items: flex-start; gap: 18px; padding-top: 32px; padding-bottom: 20px; }
.phead__ic { width: 56px; height: 56px; border-radius: 16px; background: var(--vio); color: #fff; display: grid; place-items: center; flex: none; }
.phead__ic .ic { width: 28px; height: 28px; }
.phead__k { margin: 0 0 4px; color: var(--muted); font-size: 15px; }
.phead__t { font-size: 34px; margin: 0 0 6px; }
.phead__d { color: var(--muted); max-width: 44em; }
.phead__d p { margin: 0; }
.empty { color: var(--muted); }
.pagination { margin-top: 28px; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pagination .current { background: var(--vio); border-color: var(--vio); color: #fff; }

/* ---------- Инструкция: документация ---------- */
.doc { display: grid; grid-template-columns: 250px minmax(0, 760px); gap: 48px; padding-top: 32px; }
.doc__nav { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow-y: auto; font-size: 15px; }
.doc__sec { display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--ink); text-decoration: none; margin-bottom: 10px; }
.doc__sec .ic { color: var(--vio); width: 20px; height: 20px; }
.doc__nav ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.doc__nav li a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.doc__nav li a:hover { color: var(--ink); }
.doc__nav .is-cur a { color: var(--vio); border-left-color: var(--vio); font-weight: 500; }
.doc__t { font-size: 38px; margin: 0 0 12px; }
.doc__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.doc__for { display: inline-flex; gap: 6px; align-items: center; }
.doc__cover { margin: 0 0 24px; position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--vio-soft); }
.inthis { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; margin: 0 0 28px; }
.inthis__t { margin: 0 0 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.inthis ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.inthis a { display: inline-block; background: var(--bg); padding: 4px 10px; border-radius: 8px; font-size: 15px; text-decoration: none; }
.inthis a:hover { background: var(--vio-soft); }
.doc__warn { margin-top: 32px; font-size: 15px; color: var(--muted); padding: 14px 18px; border: 1px dashed var(--line); border-radius: var(--r); }
.pg { max-width: 800px; padding-top: 32px; }

.content > * { margin-top: 0; margin-bottom: 1em; }
.content h2 { font-size: 27px; margin: 1.7em 0 .55em; }
.content h3 { font-size: 21px; margin: 1.4em 0 .5em; }
.content ul { padding-left: 1.25em; }
.content ul li::marker { color: var(--vio); }
.content li { margin-bottom: .35em; }
.content strong { color: var(--ink); font-weight: 600; }
.content blockquote { margin: 0 0 1em; padding: 14px 18px; background: var(--vio-soft); border-radius: 10px; }
.content blockquote p { margin: 0; }
.content figure { margin: 0 0 1.2em; }
.content figure img { border-radius: 10px; }
.content figcaption, .wp-element-caption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.content code { background: var(--ios-soft); padding: 2px 6px; border-radius: 5px; font-size: .9em; }

/* Шаги: любой нумерованный список в инструкции */
.content ol.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 10px; }
.content ol.steps > li { counter-increment: step; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 60px; margin: 0; min-height: 56px; }
.content ol.steps > li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--vio); color: #fff; font-weight: 600; font-size: 16px; display: grid; place-items: center; }

/* Заголовки для платформ */
.ph-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-head::before { font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 7px; letter-spacing: 0; }
.ph-head--android::before { content: "Android"; background: var(--and-soft); color: var(--and); }
.ph-head--iphone::before { content: "iPhone"; background: var(--ios); color: #fff; }
.content ol.steps--android > li::before { background: var(--and); }
.content ol.steps--iphone > li::before { background: var(--ios); }

.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 460px; }
.tbl th { text-align: left; font-weight: 600; padding: 10px 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.wp-block-table { margin: 0 0 1.2em; }

.slot { margin: 24px 0; }
.offer { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.offer__note { font-size: 12px; color: var(--muted); }
.offer__title { margin: 2px 0; font-weight: 600; }
.offer__text { margin: 0; font-size: 15px; color: var(--muted); }
.offer__btn { background: var(--vio); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; white-space: nowrap; }
.nf { padding-top: 48px; }

/* ---------- Подвал ---------- */
.bot { margin-top: 72px; background: var(--card); border-top: 1px solid var(--line); padding: 28px 0 20px; font-size: 15px; color: var(--muted); }
.bot__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: start; }
.mark--s { font-size: 18px; }
.bot__t { margin: 0; max-width: 40em; }
.bot__l { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.bot__l a { color: var(--text); text-decoration: none; }
.bot__l a:hover { color: var(--vio); }
.bot__c { margin-top: 18px; font-size: 13px; }

/* ---------- ≤920 ---------- */
@media (max-width: 920px) {
	.doc { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.doc__nav { position: static; max-height: none; order: 2; margin-top: 36px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
	.secs, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bot__row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.bot__l { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
	.top__q { width: 300px; }
}

/* ---------- ≤560 ---------- */
@media (max-width: 560px) {
	body { font-size: 17px; }
	.top__row { flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
	.top__q { width: 100%; max-width: none; }
	.hero { padding: 32px 0 28px; }
	.hero__in { text-align: left; }
	.hero__t { font-size: 26px; }
	.pop { justify-content: flex-start; }
	.big input { font-size: 17px; padding: 10px; }
	.big button { padding: 0 14px; }
	.secs, .cards { grid-template-columns: minmax(0, 1fr); }
	.card { flex-direction: row; }
	.card__img { width: 116px; flex: none; aspect-ratio: auto; min-height: 88px; }
	.card__body { padding: 10px 12px; }
	.card__t { font-size: 16px; }
	.phead__t, .doc__t { font-size: 28px; }
	.phead__ic { width: 44px; height: 44px; border-radius: 12px; }
	.content h2 { font-size: 23px; }
	.content ol.steps > li { padding: 12px 14px 12px 52px; }
	.content ol.steps > li::before { left: 12px; width: 28px; height: 28px; font-size: 14px; }
	.offer { flex-direction: column; align-items: flex-start; }
}
