/* EduCompass Hub — основная вёрстка.
   Палитра мастер-контекста: navy #14213D, бирюза #18B7A0, CTA #FF8A3D, фон #F7F9FC. */

:root {
	--navy: #14213D;
	--teal: #18B7A0;
	--teal-dark: #109482;
	--orange: #FF8A3D;
	--orange-dark: #F0762A;
	--bg: #F7F9FC;
	--card: #FFFFFF;
	--text: #23304E;
	--muted: #64748B;
	--line: #E4EAF2;
	--radius: 16px;
	--shadow: 0 6px 24px rgba(20, 33, 61, 0.07);
	--shadow-soft: 0 2px 10px rgba(20, 33, 61, 0.05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 750; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 780px; }

/* ---------- Плашка тестового режима ---------- */
.test-banner {
	background: var(--orange);
	color: #fff;
	text-align: center;
	font-size: 0.86rem;
	font-weight: 600;
	padding: 8px 16px;
}

/* ---------- Шапка ---------- */
.site-header {
	background: #fff;
	border-bottom: 1px solid var(--line);
	position: sticky; top: 0; z-index: 50;
}
.site-header__inner { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); }
.brand__icon { color: var(--teal); display: flex; }
.brand__name { font-weight: 800; font-size: 1.25rem; color: var(--navy); letter-spacing: -0.01em; }
.brand__hub {
	background: var(--teal); color: #fff; font-size: 0.55em; font-weight: 700;
	padding: 2px 6px; border-radius: 6px; vertical-align: super; margin-left: 2px;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__tagline { font-size: 0.72rem; color: var(--muted); }
.brand--light .brand__name { color: #fff; }

.site-nav { margin-left: auto; }
.site-nav__list { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.site-nav__list a {
	display: block; padding: 8px 13px; border-radius: 10px;
	color: var(--navy); font-weight: 550; font-size: 0.95rem;
}
.site-nav__list a:hover { background: var(--bg); color: var(--teal-dark); }
.nav-toggle, .nav-burger { display: none; }

/* Переключатель языка */
.lang-switch {
	display: flex; align-items: center; gap: 2px;
	border: 1px solid var(--line); border-radius: 999px; padding: 3px;
}
.lang-switch__item {
	padding: 3px 10px; border-radius: 999px;
	font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; color: var(--muted);
}
.lang-switch__item:hover { color: var(--teal-dark); }
.lang-switch__item.is-active { background: var(--navy); color: #fff; }

/* Пометка «доступно только на русском» */
.i18n-note {
	background: #FFF7EC; border: 1px solid #FFD9BC; border-radius: 12px;
	padding: 10px 16px; margin-bottom: 20px; font-size: 0.9rem; color: var(--orange-dark);
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero__grid {
	display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px;
	align-items: center; padding: 64px 20px 56px;
}
.hero__lead { font-size: 1.12rem; color: var(--muted); margin: 18px 0 26px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }

.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 22px; border-radius: 12px; font-weight: 650; font-size: 1rem;
	border: none; cursor: pointer; transition: all 0.15s ease;
}
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-dark); color: #fff; }
.btn--accent { background: var(--orange); color: #fff; }
.btn--accent:hover { background: var(--orange-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal-dark); }

.hero__search {
	display: flex; gap: 10px; background: #fff; border: 1.5px solid var(--line);
	border-radius: 14px; padding: 8px; box-shadow: var(--shadow-soft); max-width: 560px;
}
.hero__search input {
	flex: 1; border: none; outline: none; font-size: 1rem; padding: 8px 12px;
	background: transparent; color: var(--text); min-width: 0;
}
.hero__popular { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: 0.9rem; }
.chip {
	display: inline-block; background: #fff; border: 1px solid var(--line);
	border-radius: 999px; padding: 5px 13px; font-size: 0.85rem; font-weight: 550; color: var(--navy);
}
.chip:hover { border-color: var(--teal); color: var(--teal-dark); }

.hero__visual { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero__blob {
	width: 290px; height: 290px; border-radius: 50%;
	background: radial-gradient(circle at 32% 28%, #E7F7F4 0%, #D3F0EB 55%, #C2E9E2 100%);
	display: flex; align-items: center; justify-content: center;
	box-shadow: var(--shadow);
}
.hero__compass { color: var(--navy); filter: drop-shadow(0 8px 18px rgba(20,33,61,0.18)); }
.hero__facts { list-style: none; margin: 0; padding: 14px 18px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 10px; min-width: 250px; }
.hero__facts li { display: flex; flex-direction: column; padding-left: 26px; position: relative; }
.hero__facts li::before { content: "✓"; position: absolute; left: 2px; color: var(--teal); font-weight: 800; }
.hero__facts strong { color: var(--navy); }
.hero__facts span { color: var(--muted); font-size: 0.85rem; }

/* ---------- Секции ---------- */
.section { padding: 56px 0; }
.section--alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section__more { font-weight: 600; white-space: nowrap; }

.card {
	background: var(--card); border: 1px solid var(--line);
	border-radius: var(--radius); box-shadow: var(--shadow-soft);
}

/* Направления */
.directions-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.direction-card {
	display: flex; flex-direction: column; align-items: center; gap: 10px;
	padding: 22px 10px; text-align: center; color: var(--navy); font-weight: 600; font-size: 0.9rem;
	transition: all 0.15s ease;
}
.direction-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--teal); color: var(--navy); }
.direction-card__icon {
	width: 54px; height: 54px; border-radius: 14px; background: var(--bg);
	display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}

/* Почему EduCompass */
.why-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; text-align: center; }
.why-item__icon {
	width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 50%;
	background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.why-item h3 { font-size: 1.02rem; }
.why-item p { color: var(--muted); font-size: 0.88rem; margin: 0; }

/* Compass Score */
.score-explain { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.score-explain__text p { color: var(--muted); }
.score-scale { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; color: var(--text); }
.score-pill {
	display: inline-block; min-width: 76px; text-align: center; margin-right: 10px;
	background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
	padding: 3px 10px; font-weight: 700; font-size: 0.85rem; color: var(--navy);
}
.score-pill--top { background: var(--teal); border-color: var(--teal); color: #fff; }
.score-pill--low { background: #FFF3EA; border-color: #FFD9BC; color: var(--orange-dark); }
.score-explain__weights { padding: 26px; }
.score-explain__weights h3 { font-size: 1.05rem; margin-bottom: 18px; }
.weight-row { display: grid; grid-template-columns: 1.2fr 1fr 44px; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 0.9rem; }
.weight-row__bar { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.weight-row__bar i { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.weight-row__pct { text-align: right; font-weight: 700; color: var(--navy); }

/* Карточки статей */
.posts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.post-card { overflow: hidden; display: flex; flex-direction: column; transition: all 0.15s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card__thumb { position: relative; display: block; aspect-ratio: 8 / 5; background: var(--bg); }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card__placeholder { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.compass--muted { color: #C0CCDA; }
.post-card__badge {
	position: absolute; top: 10px; left: 10px; background: var(--navy); color: #fff;
	font-size: 0.72rem; font-weight: 650; padding: 4px 10px; border-radius: 999px;
}
.post-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card__title { font-size: 1rem; margin: 0; }
.post-card__title a { color: var(--navy); }
.post-card__title a:hover { color: var(--teal-dark); }
.post-card__excerpt { color: var(--muted); font-size: 0.86rem; margin: 0; flex: 1; }
.post-card__meta { display: flex; gap: 14px; color: var(--muted); font-size: 0.78rem; }

/* Статья */
.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs span { color: var(--navy); }
.article__title { margin-bottom: 12px; }
.article__meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 0.88rem; margin-bottom: 24px; flex-wrap: wrap; }
.article__hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; box-shadow: var(--shadow); }
.article__content { font-size: 1.05rem; }
.article__content h2 { margin-top: 1.6em; }
.article__content img { border-radius: 12px; }
.article__content blockquote { border-left: 4px solid var(--teal); margin: 1.4em 0; padding: 4px 20px; color: var(--muted); background: #fff; border-radius: 0 12px 12px 0; }

.archive-title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.pagination { margin-top: 30px; text-align: center; }
.pagination .nav-links { display: inline-flex; gap: 8px; }
.pagination a, .pagination span.current { padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.pagination span.current { background: var(--navy); color: #fff; border-color: var(--navy); }
.empty-note { color: var(--muted); }

/* ---------- Подвал ---------- */
.site-footer { background: var(--navy); color: #B9C3D8; margin-top: 40px; }
.site-footer a { color: #D7DEEC; }
.site-footer a:hover { color: var(--teal); }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.site-footer__grid {
	display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 48px 20px 32px;
}
.site-footer__brand p { font-size: 0.88rem; line-height: 1.6; }
.site-footer__brand .brand__icon { color: var(--teal); }
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.9rem; }
.site-footer__bottom {
	display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 20px; font-size: 0.8rem;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1000px) {
	.directions-grid { grid-template-columns: repeat(4, 1fr); }
	.why-grid { grid-template-columns: repeat(3, 1fr); }
	.posts-grid { grid-template-columns: repeat(2, 1fr); }
	.hero__grid { grid-template-columns: 1fr; padding-top: 44px; }
	.hero__visual { flex-direction: row; justify-content: center; flex-wrap: wrap; }
	.hero__blob { width: 220px; height: 220px; }
	.score-explain { grid-template-columns: 1fr; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
	.directions-grid { grid-template-columns: repeat(2, 1fr); }
	.why-grid { grid-template-columns: 1fr 1fr; }
	.posts-grid { grid-template-columns: 1fr; }
	.hero__search { flex-direction: column; }
	.hero__search .btn { justify-content: center; }

	.nav-burger {
		display: flex; flex-direction: column; gap: 5px; margin-left: auto; cursor: pointer; padding: 8px;
	}
	.nav-burger span { width: 22px; height: 2.5px; background: var(--navy); border-radius: 2px; }
	.site-nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0;
		background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
	}
	.nav-toggle:checked ~ .site-nav { display: block; }
	.site-nav__list { flex-direction: column; padding: 12px; }
	.brand__tagline { display: none; }
	.lang-switch { margin-left: 4px; }
}
