/*
Theme Name: dds_rareyaagency.com
Theme URI: https://rareyaagency.com/
Author: Анна Светлова
Description: Тема для образовательного блога-путеводителя по digital-профессиям и онлайн-обучению. Японский минимализм, холодная палитра.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rareya
*/

/* ---------- hidden-правила до основных стилей (A11) ---------- */
.cookie-banner[hidden] { display: none !important; }

/* ---------- Токены ---------- */
:root {
	--bg: #F7F9FA;
	--bg-alt: #EDF2F5;
	--bg-side: #F2F5F7;
	--bg-foot: #1B2A3A;
	--ink: #1C2B36;
	--muted: #6B7D8C;
	--accent: #3A7CA5;
	--coral: #D96C4A;
	--line: #DCE3E8;
	--font: "Inter", "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
	--ease: .25s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.65;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

/* контур гор в правом нижнем углу каждой страницы */
body::after {
	content: "";
	position: fixed;
	right: 1.5rem;
	bottom: 1rem;
	width: 380px;
	height: 190px;
	opacity: .05;
	pointer-events: none;
	z-index: 50;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 380 190'%3E%3Cpath d='M2 186 L78 70 L118 124 L176 28 L236 118 L272 80 L378 186' fill='none' stroke='%233A7CA5' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M40 186 C110 150 170 170 230 150 S330 140 378 160' fill='none' stroke='%233A7CA5' stroke-width='2'/%3E%3C/svg%3E") no-repeat center / contain;
}

img { max-width: 100%; height: auto; }

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font);
	font-weight: 300;
	letter-spacing: .02em;
	line-height: 1.25;
	color: var(--ink);
	margin: 1.6em 0 .6em;
}
h1 { font-size: 2.8rem; margin-top: 0; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; font-weight: 400; }

a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--muted);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: text-decoration-color var(--ease), color var(--ease);
}
a:hover {
	text-decoration-color: var(--accent);
	text-decoration-thickness: 2px;
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

blockquote {
	margin: 1.8em 0;
	padding: .4em 0 .4em 1.4em;
	border-left: 3px solid var(--coral);
	color: var(--ink);
	font-size: 1.15rem;
	font-weight: 300;
}

table { width: 100%; border-collapse: collapse; margin: 1.5em 0; border: 1px solid var(--line); }
th, td { border: 1px solid var(--line); padding: .6em .8em; text-align: left; vertical-align: top; }
th { background: var(--bg-alt); font-weight: 500; }

pre { overflow-x: auto; background: var(--bg-alt); padding: 1rem 1.2rem; }
ul, ol { padding-left: 1.3em; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

/* ---------- Контейнер (единственное место ограничения ширины) ---------- */
.shell { width: min(92%, 1180px); margin-inline: auto; }
.shell--front { width: min(85%, 1180px); }

/* ---------- Кнопки ---------- */
.btn, .search-submit, .form-submit .submit, .comment-reply-link {
	display: inline-block;
	padding: .7em 1.5em;
	border: 1px solid var(--accent);
	border-radius: 4px;
	background: transparent;
	color: var(--accent);
	font: 400 .95rem/1.2 var(--font);
	letter-spacing: .03em;
	text-decoration: none;
	cursor: pointer;
	transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.btn:hover, .search-submit:hover, .form-submit .submit:hover, .comment-reply-link:hover {
	background: var(--accent);
	color: #fff;
}
.btn--light { border-color: #fff; color: #fff; }
.btn--light:hover { background: #fff; color: var(--ink); }

/* ---------- Шапка ---------- */
.site-head {
	position: relative;
	z-index: 20;
	background: rgba(255,255,255,.78);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.site-head__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 84px;
}
.brand {
	display: flex;
	align-items: center;
	gap: .9rem;
	min-width: 0;
	text-decoration: none;
}
.brand-logo { display: block; max-height: 52px; width: auto; }
.brand-mark { display: block; width: 44px; height: 44px; flex: 0 0 44px; }
.brand-text { min-width: 0; }
.brand-name {
	display: block;
	font-size: .98rem;
	font-weight: 500;
	line-height: 1.3;
	color: var(--ink);
	max-width: 46ch;
}
.brand-desc {
	display: block;
	font-size: .8rem;
	line-height: 1.4;
	color: var(--muted);
	max-width: 52ch;
	margin-top: .2rem;
}

.nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: .55rem .6rem;
	cursor: pointer;
	color: var(--ink);
}
.nav-toggle span { display: block; width: 22px; height: 1px; background: currentColor; margin: 5px 0; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2rem; }
.main-nav a {
	text-decoration: none;
	font-size: .95rem;
	letter-spacing: .03em;
	padding: .3rem 0;
	border-bottom: 1px solid transparent;
	transition: border-color var(--ease), color var(--ease);
	white-space: nowrap;
}
.main-nav a:hover, .main-nav .current-menu-item > a { border-bottom-color: var(--accent); color: var(--accent); }
.main-nav .sub-menu { display: none; }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
	font-size: .85rem;
	color: var(--muted);
	padding: 1.6rem 0 0;
	margin-bottom: 2rem;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs .sep { margin: 0 .45em; color: var(--line); }
.breadcrumbs span:last-child { color: var(--ink); }

/* ---------- Раскладки ---------- */
.site-main { padding-bottom: 4.5rem; }
.layout-with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
	column-gap: 6%;
	align-items: start;
}
.layout-single { display: block; }
.layout-single > .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }

.page-head { margin-bottom: 2.4rem; }
.page-head h1 { margin-bottom: .4rem; }
.page-head p { color: var(--muted); margin: 0; }

/* ---------- Заголовок секции: линия 40px, уходящая в отступ ---------- */
.sec-title {
	position: relative;
	font-size: 1.9rem;
	font-weight: 300;
	letter-spacing: .04em;
	margin: 0 0 2.2rem;
}
.sec-title::before {
	content: "";
	position: absolute;
	top: .68em;
	left: calc(-40px - 1rem);
	width: 40px;
	height: 1px;
	background: var(--accent);
}

/* ---------- Сайдбар ---------- */
.sidebar {
	min-width: 0;
	background: var(--bg-side);
	padding: 1.8rem 1.6rem;
	color: var(--ink);
}
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title, .sidebar .widgettitle, .sidebar h2 {
	font-size: 1.05rem;
	font-weight: 500;
	letter-spacing: .04em;
	color: var(--ink);
	margin: 0 0 1rem;
	padding-left: .8rem;
	border-left: 2px solid var(--accent);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink); text-decoration-color: var(--line); }
.sidebar a:hover { text-decoration-color: var(--accent); }
.sidebar .post-date, .sidebar .rss-date { display: block; font-size: .8rem; color: var(--muted); }
.sidebar p, .sidebar .textwidget { color: var(--ink); }

/* ---------- Карточки записей ---------- */
.cards { display: grid; gap: 1.8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 0;
	transition: border-color var(--ease), transform var(--ease);
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-thumb { display: block; }
.card-thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 0;
}
.card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 1.3rem 1.4rem 1.5rem;
}
.card-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.cat-tag {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	font-size: .72rem;
	letter-spacing: .04em;
	padding: .22em .6em;
	border-radius: 0;
	text-decoration: none;
	line-height: 1.4;
}
.cat-tag:hover { background: var(--ink); color: #fff; }
.card-title { font-size: 1.2rem; font-weight: 400; margin: 0 0 .5rem; letter-spacing: .01em; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-meta { font-size: .8rem; color: var(--muted); margin-bottom: .8rem; }
.card-excerpt { color: var(--ink); font-size: .95rem; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { margin-top: 1rem; align-self: flex-start; font-size: .9rem; color: var(--accent); }

.no-posts { padding: 2rem; border: 1px solid var(--line); background: #fff; }

/* ---------- Пагинация (type => plain) ---------- */
.pager {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin-top: 3rem;
	align-items: center;
}
.pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 .8rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: #fff;
	color: var(--ink);
	font-size: .9rem;
	text-decoration: none;
	transition: border-color var(--ease), background var(--ease), color var(--ease);
}
.pager a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pager .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 .3rem; }

/* ---------- Запись и страница ---------- */
.entry-head { margin-bottom: 2rem; }
.entry-meta { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.entry-thumb { margin: 0 0 2rem; }
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content { max-width: 72ch; }
.layout-single .entry-content { max-width: 76ch; }
.entry-content img { display: block; }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption { font-size: .85rem; color: var(--muted); margin-top: .4rem; }
.entry-foot { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- Комментарии ---------- */
.comments { margin-top: 3.5rem; max-width: 72ch; }
.comments .comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.comments .comment-list .children { list-style: none; padding-left: 1.6rem; }
.comment-item { padding: 1.3rem 1.4rem; border: 1px solid var(--line); background: #fff; margin-bottom: 1rem; }
.comment-meta { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.comment-meta b { color: var(--ink); font-weight: 500; }
.comment-awaiting { font-size: .85rem; color: var(--coral); }
.comment-form label { display: block; font-size: .85rem; margin-bottom: .3rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%;
	padding: .7rem .8rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: #fff;
	font: inherit;
	color: var(--ink);
}
.comment-form p { margin-bottom: 1rem; }
.comment-form-cookies-consent label { display: inline; }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: .5rem; max-width: 480px; }
.search-field {
	flex: 1;
	min-width: 0;
	padding: .7rem .8rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: #fff;
	font: inherit;
	color: var(--ink);
}

.notfound { padding: 2rem 0 1rem; }
.notfound-code { font-size: 5rem; font-weight: 200; color: var(--accent); line-height: 1; margin-bottom: 1rem; letter-spacing: .08em; }
.notfound .search-form { margin: 1.8rem 0; }

/* ---------- Главная: секции ---------- */
.fs { padding: 5.5rem 0; }
.fs--alt {
	background-color: var(--bg-alt);
	background-image: radial-gradient(circle, var(--line) 1px, transparent 1.5px);
	background-size: 20px 20px;
}

/* Блок 1: hero */
.fs-hero {
	position: relative;
	overflow: hidden;
	min-height: 540px;
	display: flex;
	align-items: center;
	padding: 6rem 0;
	color: #fff;
}
.fs-hero__img {
	position: absolute;
	top: 0; left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.fs-hero::before {
	content: "";
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0;
	background: rgba(24, 52, 78, .62);
	z-index: 1;
}
.fs-hero .shell { position: relative; z-index: 2; }
.fs-hero__text { width: 50%; min-width: 0; }
.fs-hero h1 {
	color: #fff;
	font-weight: 200;
	font-size: 2.8rem;
	letter-spacing: .05em;
	margin: 0 0 1.2rem;
}
.fs-hero p { color: #E4ECF2; font-size: 1.1rem; margin: 0 0 2rem; max-width: 46ch; }

/* Блок 2: чек-лист */
.checklist { list-style: none; margin: 0; padding: 0; max-width: 780px; }
.checklist li {
	display: flex;
	gap: 1.1rem;
	align-items: flex-start;
	padding: .9rem 0;
}
.checklist svg { flex: 0 0 22px; width: 22px; height: 22px; margin-top: .2rem; color: var(--accent); }
.checklist p { margin: 0; min-width: 0; }
.checklist b { font-weight: 500; }
.checklist-lead { color: var(--muted); max-width: 62ch; margin-bottom: 1.6rem; }

/* Последние записи */
.fs-posts__foot { margin-top: 2.5rem; }

/* Блок 3: статистика */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: .5rem 2.5rem; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num {
	display: block;
	font-size: 3.6rem;
	font-weight: 200;
	line-height: 1;
	color: var(--accent);
	margin-bottom: .8rem;
	letter-spacing: .02em;
}
.stat-cap { color: var(--muted); font-size: .95rem; margin: 0; max-width: 28ch; }

/* Блок 4: рубрикатор */
.topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; }
.topic {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	aspect-ratio: 1 / 1;
	min-width: 0;
	padding: 1.6rem 1.5rem;
	border: 1px solid var(--line);
	border-radius: 0;
	background: #fff;
	color: var(--ink);
	text-decoration: none;
	transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.topic svg { width: 44px; height: 44px; color: var(--accent); transition: color var(--ease); }
.topic-name { display: block; font-size: 1.15rem; font-weight: 400; letter-spacing: .03em; margin-bottom: .3rem; }
.topic-hint { display: block; font-size: .85rem; color: var(--muted); line-height: 1.45; transition: color var(--ease); }
.topic:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.topic:hover svg, .topic:hover .topic-hint { color: #fff; }

/* ---------- Подвал ---------- */
.site-foot { background: var(--bg-foot); color: #C9D5DF; padding: 4rem 0 0; position: relative; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
.foot-col { min-width: 0; }
.site-foot .widget { margin-bottom: 1.8rem; color: #C9D5DF; }
.site-foot .widget-title, .site-foot .widgettitle, .site-foot h2 {
	color: #FFFFFF;
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: .05em;
	margin: 0 0 1rem;
}
.site-foot p, .site-foot .textwidget { color: #C9D5DF; font-size: .92rem; }
.site-foot a { color: #E4ECF2; text-decoration-color: #5B7187; }
.site-foot a:hover { color: #FFFFFF; text-decoration-color: var(--coral); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { padding: .3rem 0; font-size: .92rem; }
.site-foot .post-date { display: block; font-size: .78rem; color: #93A6B6; }
.foot-bottom { margin-top: 2.5rem; padding: 1.4rem 0; border-top: 1px solid #2C3F52; font-size: .85rem; color: #93A6B6; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
	position: fixed;
	left: 1rem;
	right: 1rem;
	bottom: 1rem;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.2rem;
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
	padding: 1rem 1.3rem;
	background: #fff;
	border: 1px solid var(--line);
	border-left: 3px solid var(--coral);
	color: var(--ink);
	font-size: .9rem;
}
.cookie-banner p { margin: 0; min-width: 0; }
.cookie-banner .btn { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
	h1, .fs-hero h1 { font-size: 2.2rem; }
	.layout-with-sidebar { display: block; }
	.layout-with-sidebar .sidebar { margin-top: 3rem; }
	.layout-single > .content-area { width: 100%; }
	.cards--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fs-hero__text { width: 75%; }
	.sec-title { padding-top: 1rem; }
	.sec-title::before { top: 0; left: 0; }
	.foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.shell--front { width: min(92%, 1180px); }

	.nav-toggle { display: block; }
	.site-head__row { flex-wrap: wrap; }
	.main-nav { display: none; width: 100%; padding-bottom: 1rem; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; }
	.main-nav li { border-top: 1px solid var(--line); }
	.main-nav a { display: block; padding: .8rem 0; border-bottom: 0; }
}

@media (max-width: 600px) {
	body { font-size: 1rem; }
	h1, .fs-hero h1 { font-size: 1.85rem; }
	.sec-title { font-size: 1.55rem; }
	.brand-desc { display: none; }
	.brand-name { font-size: .88rem; }
	.cards, .cards--three { grid-template-columns: minmax(0, 1fr); }
	.fs { padding: 3.5rem 0; }
	.fs-hero { min-height: 440px; padding: 4rem 0; }
	.fs-hero__text { width: 100%; }
	.stats { grid-template-columns: minmax(0, 1fr); }
	.stat, .stat:first-child { border-left: 0; border-top: 1px solid var(--line); padding: 1.5rem 0; }
	.stat:first-child { border-top: 0; }
	.topics { gap: .8rem; }
	.topic { padding: 1.1rem 1rem; }
	.topic-hint { display: none; }
	.foot-cols { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
	.cookie-banner { flex-direction: column; align-items: flex-start; padding: 1rem 1.1rem; }
	.sidebar { padding: 1.5rem 1.2rem; }
	.search-form { flex-direction: column; }
	body::after { width: 220px; height: 110px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
}
