/* ============================================================
   ENG-TEACH — modern template
   Сайт учителя английского языка
   ============================================================ */

/* ---------- 1. Дизайн-токены ---------- */
:root {
	--ink:        #16233a;   /* основной текст */
	--ink-soft:   #3d4b63;
	--muted:      #64748b;
	--bg:         #f6f8fc;   /* фон страницы */
	--surface:    #ffffff;   /* карточки */
	--line:       #e4e9f2;

	--brand:      #2456e6;   /* синий — основной */
	--brand-dark: #1a3fae;
	--brand-soft: #e8eefc;
	--accent:     #f59e0b;   /* тёплый акцент */
	--accent-soft:#fef3c7;
	--danger:     #dc2626;
	--ok:         #059669;

	--font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
	--font-hand: "Caveat", cursive;

	--radius:    16px;
	--radius-sm: 10px;
	--shadow:    0 1px 2px rgba(22,35,58,.05), 0 8px 24px -12px rgba(22,35,58,.12);
	--shadow-lg: 0 2px 4px rgba(22,35,58,.06), 0 20px 44px -16px rgba(22,35,58,.22);

	--container: 1180px;
}

/* ---------- 2. Reset / база ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; }

a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .6em;
	line-height: 1.25;
	font-weight: 800;
	color: var(--ink);
	overflow-wrap: break-word;
}
h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.8rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

p { margin: 0 0 1em; }

::selection { background: var(--brand); color: #fff; }

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 20px;
}

.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	clip: rect(0 0 0 0); overflow: hidden;
}

/* ---------- 3. Кнопки ---------- */
.btn, a.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--brand);
	color: #fff;
	font: 700 15px/1.2 var(--font);
	cursor: pointer;
	transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
	text-decoration: none;
}
.btn:hover, a.btn:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; }

.btn--ghost, a.btn--ghost {
	background: transparent;
	color: var(--brand);
	box-shadow: inset 0 0 0 2px var(--brand);
}
.btn--ghost:hover, a.btn--ghost:hover { background: var(--brand-soft); color: var(--brand-dark); box-shadow: inset 0 0 0 2px var(--brand-dark); }

.btn--light, a.btn--light { background: #fff; color: var(--brand-dark); }
.btn--light:hover, a.btn--light:hover { background: var(--accent-soft); color: var(--ink); }

.btn-big { padding: 14px 30px; font-size: 16px; }

/* ---------- 4. Шапка ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255,255,255,.92);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled {
	border-bottom-color: var(--line);
	box-shadow: 0 4px 20px -8px rgba(22,35,58,.12);
}
.site-header__inner {
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 68px;
}

.logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	font-size: 20px;
	letter-spacing: .02em;
	color: var(--ink);
	white-space: nowrap;
}
.logo:hover { color: var(--ink); }
.logo__icon {
	display: grid;
	place-items: center;
	width: 38px; height: 38px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--brand) 0%, #5b8cff 100%);
	color: #fff;
	flex: 0 0 auto;
}
.logo__icon svg { width: 22px; height: 22px; }
.logo b { color: var(--brand); font-weight: 800; }

.site-nav { margin-left: auto; }
.site-nav ul {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-nav a {
	display: block;
	padding: 9px 14px;
	border-radius: 999px;
	color: var(--ink-soft);
	font-weight: 600;
	font-size: 15px;
}
.site-nav a:hover { color: var(--brand); background: var(--brand-soft); }
.site-nav li.active > a { color: var(--brand-dark); background: var(--brand-soft); }

/* поиск в шапке */
.header-search { position: relative; }
.header-search__toggle {
	display: grid;
	place-items: center;
	width: 40px; height: 40px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ink-soft);
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.header-search__toggle:hover { background: var(--brand-soft); color: var(--brand); }
.header-search__toggle svg { width: 20px; height: 20px; }

.header-search__form {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	display: none;
	gap: 8px;
	padding: 10px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-lg);
	width: min(340px, 84vw);
}
.header-search.is-open .header-search__form { display: flex; }
.header-search__form input[type="search"] {
	flex: 1;
	min-width: 0;
	height: auto;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	font: 500 15px var(--font);
	color: var(--ink);
}
.header-search__form input[type="search"]:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
.header-search__form .btn { padding: 10px 16px; border-radius: var(--radius-sm); }

/* бургер */
.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 42px; height: 42px;
	padding: 0 9px;
	border: 0;
	border-radius: var(--radius-sm);
	background: transparent;
	cursor: pointer;
}
.nav-toggle span {
	display: block;
	height: 2px;
	border-radius: 2px;
	background: var(--ink);
	transition: transform .25s ease, opacity .2s ease;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Hero (главная) ---------- */
.hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #1c3fb0 0%, var(--brand) 55%, #4f7dff 100%);
	color: #fff;
}
.hero::after {  /* мягкая «тетрадная» текстура из точек */
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.6px);
	background-size: 26px 26px;
	pointer-events: none;
}
.hero__inner {
	position: relative;
	z-index: 1;
	padding: clamp(48px, 8vw, 96px) 0;
	max-width: 800px;
}
.hero__hand {
	font-family: var(--font-hand);
	font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem);
	color: var(--accent-soft);
	display: block;
	margin-bottom: 6px;
}
.hero h1 {
	color: #fff;
	font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem);
	margin-bottom: .45em;
}
.hero h1 .u {
	background-image: linear-gradient(transparent 66%, rgba(245,158,11,.85) 66%, rgba(245,158,11,.85) 92%, transparent 92%);
}
.hero p {
	font-size: clamp(1rem, .95rem + .4vw, 1.15rem);
	color: rgba(255,255,255,.88);
	max-width: 56ch;
}
.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 26px;
}
.hero__hand--wish {
	margin-top: 26px;
	margin-bottom: 0;
	font-size: clamp(1.3rem, 1.1rem + .9vw, 1.8rem);
	transform: rotate(-2deg);
	display: inline-block;
}

/* ---------- 6. Слайдер (главная) ---------- */
.slider-section { padding: clamp(36px, 5vw, 56px) 0 0; }

.slider { position: relative; }
.slider__track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	border-radius: var(--radius);
}
.slider__track::-webkit-scrollbar { display: none; }

.slide {
	position: relative;
	flex: 0 0 100%;
	scroll-snap-align: start;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--ink);
	aspect-ratio: 21 / 9;
	min-height: 260px;
}
.slide img {
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	opacity: .82;
}
.slide__caption {
	position: absolute;
	inset: auto 0 0 0;
	padding: clamp(18px, 4vw, 36px);
	background: linear-gradient(to top, rgba(10,18,34,.88), rgba(10,18,34,0));
}
.slide__caption h2 { margin: 0 0 4px; font-size: clamp(1.15rem, 1rem + 1vw, 1.7rem); }
.slide__caption h2 a { color: #fff; }
.slide__caption h2 a:hover { color: var(--accent-soft); }
.slide__caption p { margin: 0; color: rgba(255,255,255,.82); font-size: .95rem; max-width: 70ch; }

.slider__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.92);
	color: var(--ink);
	cursor: pointer;
	box-shadow: var(--shadow);
	transition: background .15s ease, transform .15s ease;
	z-index: 2;
}
.slider__btn:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.slider__btn svg { width: 20px; height: 20px; }
.slider__btn--prev { left: 14px; }
.slider__btn--next { right: 14px; }

.slider__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
}
.slider__dots button {
	width: 8px; height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #c6d2e8;
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}
.slider__dots button.is-active { background: var(--brand); transform: scale(1.3); }

/* ---------- 7. Основная сетка страницы ---------- */
.page-main { padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 7vw, 80px); }

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	gap: 36px;
	align-items: start;
}
.layout--single { grid-template-columns: minmax(0, 1fr); }

.section-heading {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin-bottom: 22px;
}
.section-heading h2, .section-heading h1 { margin: 0; }
.section-heading::after {
	content: "";
	flex: 1;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(to right, var(--line), transparent);
}
.section-heading .more-link { font-weight: 700; font-size: 14px; white-space: nowrap; }

/* хлебные крошки */
.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
	font-size: 14px;
	color: var(--muted);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs li + li::before { content: "›"; margin-right: 8px; color: #b3bfd4; }

/* speedbar DLE */
.speedbar { margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.speedbar a { color: var(--muted); }
.speedbar a:hover { color: var(--brand); }

/* ---------- 8. Карточки публикаций ---------- */
.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
}
.layout .post-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* блоки, которые DLE дописывает внутрь {content} (пагинация, статичные
   страницы, сообщения, форма поиска, комментарии в результатах поиска),
   должны занимать всю ширину сетки */
.navigation,
.post-grid > .article,
.post-grid > .comment,
.post-grid > .box { grid-column: 1 / -1; }

.post-card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
	border-color: transparent;
}
.post-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--brand-soft);
}
.post-card__media img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}
.post-card:hover .post-card__media img { transform: scale(1.04); }

.post-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 20px 20px;
}
.post-card__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	font-size: 13px;
	color: var(--muted);
}
.badge, .post-card__meta a {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--brand-soft);
	color: var(--brand-dark);
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.5;
}
.post-card__meta a:hover { background: var(--brand); color: #fff; }

.post-card__title { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.35; }
.post-card__title a { color: var(--ink); }
.post-card__title a:hover { color: var(--brand); }

.post-card__excerpt {
	flex: 1;
	margin-bottom: 14px;
	color: var(--ink-soft);
	font-size: .95rem;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.post-card__excerpt p { margin: 0 0 .5em; }
.post-card__excerpt img, .post-card__excerpt br { display: none; }

.post-card__more {
	font-weight: 700;
	font-size: 14.5px;
	align-self: flex-start;
}
.post-card__more::after { content: " →"; transition: margin .15s ease; }
.post-card__more:hover::after { margin-left: 4px; }

.post-card__foot {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed var(--line);
	font-size: 13px;
	color: var(--muted);
}
.post-card__foot .spacer { flex: 1; }

/* ---------- 9. Сайдбар ---------- */
.sidebar { display: flex; flex-direction: column; gap: 26px; position: sticky; top: 88px; }

.widget {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px 20px 22px;
}
.widget__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	font-size: 1.05rem;
}
.widget__title::before {
	content: "";
	width: 4px; height: 20px;
	border-radius: 4px;
	background: var(--accent);
}

.mini-post {
	display: flex;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px dashed var(--line);
	color: var(--ink);
}
.mini-post:last-of-type { border-bottom: 0; }
.mini-post img {
	width: 74px; height: 56px;
	flex: 0 0 auto;
	object-fit: cover;
	border-radius: var(--radius-sm);
	background: var(--brand-soft);
}
.mini-post__body { min-width: 0; }
.mini-post__body b {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14.5px;
	line-height: 1.35;
	font-weight: 700;
	transition: color .15s ease;
}
.mini-post:hover b { color: var(--brand); }
.mini-post__body time { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }

.widget .more-link { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 14px; }

/* ---------- 10. Статья (fullstory / static) ---------- */
.article {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: clamp(22px, 4vw, 44px);
}
.article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin-bottom: 14px;
	font-size: 14px;
	color: var(--muted);
}
.article__meta .badge { font-size: 13px; }
.article__meta svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.article__title { margin-bottom: 18px; }
.article__cover {
	margin: 0 0 26px;
	border-radius: var(--radius-sm);
	overflow: hidden;
}
.article__cover img { display: block; width: 100%; max-height: 460px; object-fit: cover; }

/* --- Нормализация контента: гасим inline-стили модератора --- */
.article-body, .post-card__excerpt, .slide__caption p {
	font-family: var(--font);
}

/* Любые span/font/p/заголовки с inline-стилями приводятся к стилю сайта.
   Выравнивание текста (text-align) при этом сохраняется. */
.article-body :is(span, font, p, li, div, a, b, strong, i, em, u, h1, h2, h3, h4, h5, h6, blockquote, td, th)[style],
.post-card__excerpt :is(span, font, p, li, div, a, b, strong, i, em, u, h1, h2, h3, h4, h5, h6)[style] {
	font-family: inherit !important;
	font-size: inherit !important;
	color: inherit !important;
	background-color: transparent !important;
	line-height: inherit !important;
	letter-spacing: normal !important;
}
.article-body font[face], .article-body font[color], .article-body font[size],
.post-card__excerpt font { font: inherit !important; color: inherit !important; }

/* Типографика тела статьи */
.article-body {
	font-size: 1.06rem;
	line-height: 1.75;
	color: var(--ink-soft);
	overflow-wrap: break-word;
	display: flow-root; /* float-ы контента не вываливаются из карточки */
}
.article-body h1, .article-body h2 {
	font-size: 1.5rem;
	margin: 1.4em 0 .55em;
	color: var(--ink);
}
.article-body h3, .article-body h4, .article-body h5, .article-body h6 {
	font-size: 1.2rem;
	margin: 1.3em 0 .5em;
	color: var(--ink);
}
.article-body p { margin: 0 0 1.05em; }
.article-body img {
	border-radius: var(--radius-sm);
	margin: 6px 0;
}
.article-body ul, .article-body ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.article-body li { margin-bottom: .35em; }
.article-body li::marker { color: var(--brand); font-weight: 700; }

.article-body a { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(36,86,230,.35); text-underline-offset: 3px; }
.article-body a:hover { text-decoration-color: var(--brand); }

.article-body blockquote, .article-body .quote {
	margin: 1.2em 0;
	padding: 14px 20px;
	border-left: 4px solid var(--accent);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	background: var(--accent-soft);
	color: var(--ink);
	font-style: normal;
}
.article-body table {
	width: 100% !important;
	margin: 1.2em 0 !important;
	border-collapse: collapse;
	font-size: .95em;
	display: block;
	overflow-x: auto;
	border-color: var(--line) !important;
	float: none !important; /* align="left" из редактора модератора = float */
}
.article-body th, .article-body td {
	padding: 10px 14px;
	border: 1px solid var(--line) !important;
	text-align: left;
}
/* редактор модератора ставит таблицам свои рамки (красные и т.п.) —
   приводим к единому виду, включая inline-стили и атрибут bordercolor */
.article-body table[style], .article-body table[border], .article-body table[bordercolor],
.article-body :is(td, th)[style] {
	border-color: var(--line) !important;
}
.article-body th { background: var(--brand-soft); color: var(--ink); font-weight: 700; }
.article-body tr:nth-child(even) td { background: #fafbfe; }

.article-body hr {
	border: 0;
	height: 1px;
	background: var(--line);
	margin: 1.6em 0;
}
.article-body iframe { border-radius: var(--radius-sm); border: 0; }

.editdate {
	margin-top: 1.4em;
	font-size: 13.5px;
	color: var(--muted);
}

/* низ статьи */
.article__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 28px;
	padding-top: 18px;
	border-top: 1px solid var(--line);
	font-size: 14px;
	color: var(--muted);
}
.article__foot .spacer { flex: 1; }

.next-prev {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 24px;
}
.next-prev a { max-width: 48%; }

/* ---------- 11. Комментарии ---------- */
.comments-block { margin-top: 34px; }
.comments-block__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}
.comments-block__title .hnum {
	padding: 2px 12px;
	border-radius: 999px;
	background: var(--brand-soft);
	color: var(--brand-dark);
	font-size: .85em;
}

.comment {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 18px 20px;
	margin-bottom: 14px;
}
.com_info {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 10px;
}
.comment .avatar { position: relative; }
.comment .avatar .cover {
	display: block;
	width: 44px; height: 44px;
	border-radius: 50%;
	background-color: var(--brand-soft);
	background-size: cover;
	background-position: center;
	text-indent: -9999px;
	overflow: hidden;
}
.com_online {
	position: absolute;
	right: 0; bottom: 0;
	width: 10px; height: 10px;
	border-radius: 50%;
	background: var(--ok);
	border: 2px solid #fff;
	text-indent: -9999px;
	overflow: hidden;
}
.com_user .name { font-size: 15px; }
.com_user .grey { display: block; font-size: 12.5px; color: var(--muted); }
.comment .meta { margin-left: auto; }
.comment .meta ul {
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: var(--muted);
}
.comment .meta li { cursor: pointer; }
.comment .meta li:hover { color: var(--brand); }
.comment .meta .icon { width: 15px; height: 15px; vertical-align: -2px; }
.com_content .title { margin: 4px 0 8px; font-size: 1rem; }
.com_content .text { color: var(--ink-soft); font-size: .98rem; }
.com_content .signature { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

.mass_comments_action { margin: 14px 0; font-size: 14px; color: var(--muted); }

/* форма добавления комментария */
.addcomment { margin-top: 22px; }
.addcomment h3 { margin-bottom: 14px; }

/* ---------- 12. Формы (общие + legacy-классы DLE) ---------- */
input[type="text"], input[type="password"], input[type="email"],
input[type="search"], input[type="url"], input[type="number"],
textarea, select {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: #fff;
	font: 500 15px var(--font);
	color: var(--ink);
	transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px rgba(36,86,230,.14);
}
textarea { min-height: 130px; resize: vertical; }

.ui-form { margin: 0; padding: 0; list-style: none; }
.ui-form > li { margin-bottom: 14px; }
.form-group label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--ink-soft);
}
.form-group.combo { display: flex; gap: 12px; flex-wrap: wrap; }
.combo_field { flex: 1; min-width: 200px; }

.form_submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.c-captcha { display: flex; align-items: center; gap: 10px; }
.c-captcha input { width: 150px; }

/* ---------- 13. Служебные блоки DLE (.box, инфо, popup) ---------- */
.box {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px 22px;
	margin-bottom: 20px;
}
.box .box_in { padding: 0; }
.box.banner { text-align: center; }

.berrors {
	border-left: 4px solid var(--danger);
	background: #fef2f2;
	color: #7f1d1d;
}
.berrors b { display: block; margin-bottom: 6px; }

/* попапы движка */
#dlepopup, .ui-dialog {
	font-family: var(--font) !important;
	border-radius: var(--radius) !important;
	border: 1px solid var(--line) !important;
	box-shadow: var(--shadow-lg) !important;
}

/* ---------- 14. Пагинация ---------- */
.navigation {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 34px 0 6px;
}
.navigation .pages { display: flex; flex-wrap: wrap; gap: 8px; }
.navigation .pages span,
.navigation .pages a,
.navigation > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--ink-soft);
	font-weight: 700;
	font-size: 14.5px;
	transition: all .15s ease;
}
.navigation .pages a:hover,
.navigation > a:hover { border-color: var(--brand); color: var(--brand); }
.navigation .pages span:not(.nav_ext) {
	background: var(--brand);
	border-color: var(--brand);
	color: #fff;
}
.navigation .pages span.nav_ext { border: 0; background: transparent; }
.navigation .icon { width: 16px; height: 16px; }

/* ---------- 15. Подвал ---------- */
.site-footer {
	margin-top: auto;
	background: #101b30;
	color: #9fb0ca;
}
.site-footer__inner {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 32px;
	padding: clamp(36px, 5vw, 56px) 0 28px;
}
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.site-footer .logo b { color: #7fa3ff; }
.site-footer p { font-size: 14.5px; max-width: 46ch; }

.site-footer nav ul {
	margin: 0; padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.site-footer nav a { color: #c3d0e5; font-weight: 600; font-size: 14.5px; }
.site-footer nav a:hover { color: #fff; }
.site-footer__title { color: #fff; font-size: 1rem; margin-bottom: 14px; }

.site-footer__bottom {
	border-top: 1px solid rgba(255,255,255,.08);
	padding: 18px 0;
	font-size: 13.5px;
	text-align: center;
	color: #7488a8;
}

/* ---------- 16. Разное ---------- */
.icon { fill: currentColor; }

.grey { color: var(--muted); }

.title_hide { display: none; }

/* результаты поиска */
.search-hit { margin-bottom: 16px; }
.search-hit .title { margin-bottom: 6px; font-size: 1.1rem; }

/* страница-заглушка offline */
.offline-page { text-align: center; padding: 80px 20px; }

/* ---------- 17. Адаптив ---------- */
@media (max-width: 1020px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.sidebar { position: static; }
}

@media (max-width: 860px) {
	.nav-toggle { display: flex; }
	.site-nav {
		position: fixed;
		inset: 68px 0 auto 0;
		z-index: 99;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow-lg);
		padding: 12px 20px 18px;
		display: none;
	}
	body.nav-open .site-nav { display: block; }
	.site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
	.site-nav a { padding: 12px 14px; font-size: 16px; }

	.slide { aspect-ratio: 16 / 10; }
	.next-prev { flex-direction: column; }
	.next-prev a { max-width: 100%; }
	.site-footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
	.post-grid, .layout .post-grid { grid-template-columns: 1fr; }
	.article { padding: 20px 16px; }
	.slider__btn { display: none; }
	.comment .meta { margin-left: 0; width: 100%; }
	.comment .meta span { display: none; }
}

/* печать */
@media print {
	.site-header, .site-footer, .sidebar, .comments-block, .next-prev, .slider-section, .hero { display: none !important; }
	body { background: #fff; }
	.article { border: 0; padding: 0; }
}
