/*
 * Разделы MrCap: новости, портфолио, станции.
 * Палитра взята из темы сайта: фон #06131c, текст белый, акцент #ffe40d, шрифт Manrope.
 * Где тема объявляет переменные (--bg-color, --t-color) — опираемся на них,
 * чтобы разделы поехали вместе с сайтом, если палитру поменяют.
 */

.mrcap-wrap {
	max-width: 1280px;
	margin: 0 auto;
	padding: 48px 20px 80px;
	color: #fff;
	color: var(--t-color, #fff);
}

.mrcap-h1 {
	font-size: clamp(28px, 4vw, 46px);
	line-height: 1.1;
	margin: 0 0 12px;
	color: inherit;
}

.mrcap-lead {
	color: rgba(255, 255, 255, .62);
	margin: 0 0 36px;
	max-width: 660px;
	font-size: 16px;
	line-height: 1.6;
}

.mrcap-empty { padding: 40px 0; color: rgba(255, 255, 255, .5); }

/* ---------- Сетка карточек ---------- */

.mrcap-grid {
	display: grid;
	gap: 26px;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.mrcap-card {
	background: rgba(255, 255, 255, .045);
	border: 1px solid rgba(255, 255, 255, .09);
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.mrcap-card:hover {
	transform: translateY(-4px);
	border-color: #ffe40d;
	box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}

.mrcap-card a { color: inherit; text-decoration: none; display: block; }

.mrcap-card__media {
	aspect-ratio: 4 / 3;
	background: rgba(255, 255, 255, .06);
	overflow: hidden;
	position: relative;
}

.mrcap-card__media img,
.mrcap-card__media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mrcap-card__body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.mrcap-card__date { font-size: 13px; color: rgba(255, 255, 255, .5); margin-bottom: 8px; }
.mrcap-card__title { font-size: 18px; line-height: 1.32; margin: 0 0 8px; color: #fff; font-weight: 700; }
.mrcap-card__text { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .68); margin: 0; }

.mrcap-tag {
	display: inline-block;
	align-self: flex-start;
	background: #ffe40d;
	color: #06131c;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 11px;
	border-radius: 999px;
	margin-bottom: 10px;
}

/* метка видео поверх обложки */
.mrcap-card__video-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(6, 19, 28, .78);
	border: 1px solid rgba(255, 255, 255, .25);
	display: flex;
	align-items: center;
	justify-content: center;
}

.mrcap-card__video-badge::before {
	content: "";
	border-style: solid;
	border-width: 6px 0 6px 10px;
	border-color: transparent transparent transparent #ffe40d;
	margin-left: 2px;
}

/* ---------- Фильтр портфолио ---------- */

.mrcap-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	background: rgba(255, 255, 255, .04);
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 14px;
	padding: 20px 22px;
	margin-bottom: 34px;
}

.mrcap-filter__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	color: rgba(255, 255, 255, .6);
}

.mrcap-filter__field select {
	min-width: 200px;
	padding: 11px 13px;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 9px;
	background: #0b1b25;
	color: #fff;
	font: inherit;
	font-size: 15px;
}

.mrcap-filter__field select:disabled { opacity: .45; }

.mrcap-filter__submit {
	border: 0;
	background: #ffe40d;
	color: #06131c;
	font: inherit;
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	padding: 13px 26px;
	border-radius: 9px;
	cursor: pointer;
	transition: background .15s ease, transform .05s ease;
}
.mrcap-filter__submit:hover { background: #fff04a; }
.mrcap-filter__submit:active { transform: translateY(1px); }

.mrcap-filter__reset {
	border: 0;
	background: none;
	color: rgba(255, 255, 255, .6);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
	text-decoration: underline;
	padding: 11px 4px;
}

.mrcap-filter__reset:hover { color: #ffe40d; }
.mrcap-count { color: rgba(255, 255, 255, .5); font-size: 14px; margin: 0 0 18px; }

/* ---------- Станции: витрина ---------- */

.mrcap-stations { display: grid; gap: 30px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }

.mrcap-station-card {
	position: relative;
	isolation: isolate; /* свой слой: точки/счётчик карусели и номер не вылезают поверх выпадающего меню шапки */
	background: rgba(255, 255, 255, .045);
	border: 1px solid rgba(255, 255, 255, .09);
	border-radius: 14px;
	overflow: hidden;
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.mrcap-station-card:hover {
	transform: translateY(-4px);
	border-color: #ffe40d;
	box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}

.mrcap-station-card a { color: inherit; text-decoration: none; }

/* вся карточка ведёт на станцию: ссылка заголовка растянута на карточку */
.mrcap-station-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.mrcap-station-card .mrcap-slider__dots,
.mrcap-station-card .mrcap-slider__count { pointer-events: none; }

/* номер — своя ссылка поверх карточки (звонок, подмена Mango) */
.mrcap-station-card .mrcap-phone { position: relative; z-index: 3; }
.mrcap-station-card .mrcap-phone a { transition: color .2s ease; }
.mrcap-station-card .mrcap-phone a:hover { color: #ffe40d; }

/* карусель с автопрокруткой */
.mrcap-slider { position: relative; aspect-ratio: 16 / 10; background: rgba(255, 255, 255, .06); overflow: hidden; }
.mrcap-slider__track { position: absolute; inset: 0; }

.mrcap-slider__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity .7s ease;
}

.mrcap-slider__slide.is-active { opacity: 1; }
.mrcap-slider__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.mrcap-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
	display: flex;
	justify-content: center;
	gap: 6px;
	z-index: 2;
}

.mrcap-slider__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .45);
	transition: background .25s ease, width .25s ease;
}

.mrcap-slider__dot.is-active { background: #ffe40d; width: 18px; border-radius: 999px; }

.mrcap-slider__count {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	background: rgba(6, 19, 28, .78);
	border: 1px solid rgba(255, 255, 255, .2);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
}

.mrcap-station-card__body { padding: 20px 22px 24px; }
.mrcap-station-card__title { font-size: 21px; margin: 0 0 12px; color: #fff; font-weight: 700; }
.mrcap-station-card__row { margin: 0 0 7px; color: rgba(255, 255, 255, .72); font-size: 15px; line-height: 1.5; }
.mrcap-station-card__row b { color: #fff; font-weight: 600; }

.mrcap-station-card__more {
	display: inline-block;
	margin-top: 14px;
	color: #ffe40d;
	font-weight: 700;
	font-size: 15px;
}

/* ---------- Станция: своя страница ---------- */

.mrcap-station-head { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr); gap: 30px; align-items: start; margin-bottom: 40px; }
.mrcap-station-head__row { margin: 0 0 10px; color: rgba(255, 255, 255, .78); font-size: 16px; line-height: 1.6; }
.mrcap-station-head__row b { color: #fff; }
.mrcap-station-head__row a { color: #ffe40d; font-weight: 700; }
.mrcap-station-head__map iframe { width: 100%; min-height: 320px; border: 0; border-radius: 12px; display: block; }

.mrcap-gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mrcap-gallery a, .mrcap-gallery figure { margin: 0; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: rgba(255, 255, 255, .06); }
.mrcap-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.mrcap-gallery a:hover img, .mrcap-gallery figure:hover img { transform: scale(1.04); }

.mrcap-section-title { font-size: 24px; margin: 0 0 20px; color: #fff; font-weight: 700; }

/* ---------- Одиночная запись ---------- */

.mrcap-single__media img, .mrcap-single__media video { width: 100%; height: auto; border-radius: 14px; display: block; }
.mrcap-single__date { color: rgba(255, 255, 255, .5); font-size: 14px; display: block; margin-bottom: 20px; }
.mrcap-single__text { margin: 24px 0; line-height: 1.75; white-space: pre-line; color: rgba(255, 255, 255, .85); font-size: 16px; }
.mrcap-single__source a { color: #ffe40d; font-weight: 700; }

.mrcap-back { display: inline-block; margin-bottom: 18px; font-size: 14px; color: rgba(255, 255, 255, .6); }
.mrcap-back:hover { color: #ffe40d; }

/* ---------- Пагинация ---------- */

.mrcap-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }

.mrcap-pagination .page-numbers {
	padding: 9px 15px;
	border-radius: 9px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .1);
	color: #fff;
	text-decoration: none;
}

.mrcap-pagination .page-numbers.current { background: #ffe40d; color: #06131c; border-color: #ffe40d; font-weight: 700; }

@media (max-width: 860px) {
	.mrcap-station-head { grid-template-columns: 1fr; }
}

/* ---------- Лента новостей ---------- */
/*
 * Вертикальная лента как в соцсетях: одна колонка, крупное медиа, под ним дата
 * и полный текст поста. Лайков и комментариев нет — только публикация и дата.
 * Всё медиа лежит на сайте, наружу не ссылаемся.
 */

.mrcap-feed {
	max-width: 620px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.mrcap-post {
	background: rgba(255, 255, 255, .045);
	border: 1px solid rgba(255, 255, 255, .09);
	border-radius: 16px;
	overflow: hidden;
}

.mrcap-post__media {
	position: relative;
	background: rgba(255, 255, 255, .06);
	line-height: 0;
}

.mrcap-post__media img,
.mrcap-post__media video {
	width: 100%;
	height: auto;
	display: block;
	max-height: 760px;
	object-fit: cover;
}

.mrcap-post__body { padding: 18px 22px 24px; }

.mrcap-post__date {
	display: block;
	font-size: 13px;
	color: rgba(255, 255, 255, .5);
	margin-bottom: 10px;
	letter-spacing: .02em;
}

.mrcap-post__text {
	margin: 0;
	font-size: 15px;
	line-height: 1.62;
	color: rgba(255, 255, 255, .86);
	white-space: pre-line;
	word-wrap: break-word;
}

/* длинные подписи сворачиваем, чтобы лента оставалась листаемой */
.mrcap-post__text.is-clamped {
	display: -webkit-box;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.mrcap-post__more {
	margin-top: 10px;
	background: none;
	border: 0;
	padding: 0;
	color: #ffe40d;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.mrcap-post__more:hover { text-decoration: underline; }

@media (max-width: 660px) {
	.mrcap-feed { max-width: 100%; }
	.mrcap-post__body { padding: 16px 18px 20px; }
}

/* ---------- Подгрузка ленты ---------- */

.mrcap-feed__sentinel {
	display: flex;
	justify-content: center;
	padding: 28px 0 8px;
	min-height: 40px;
}

.mrcap-feed__spinner {
	width: 26px;
	height: 26px;
	border: 2px solid rgba(255, 255, 255, .18);
	border-top-color: #ffe40d;
	border-radius: 50%;
	animation: mrcap-spin .8s linear infinite;
}

@keyframes mrcap-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.mrcap-feed__spinner { animation-duration: 2.4s; }
}

/* видео из ВКонтакте, запасной вариант: ролик ещё не докачался — обложка + кнопка со ссылкой на ВК */
.mrcap-vk-video { position: relative; display: block; line-height: 0; }
.mrcap-vk-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 72px;
	height: 72px;
	margin: -36px 0 0 -36px;
	border-radius: 50%;
	background: rgba(6, 19, 28, .72);
	border: 2px solid rgba(255, 255, 255, .35);
	transition: background .2s ease, transform .2s ease;
}
.mrcap-vk-video__play::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -12px 0 0 -7px;
	border-style: solid;
	border-width: 12px 0 12px 20px;
	border-color: transparent transparent transparent #ffe40d;
}
.mrcap-vk-video:hover .mrcap-vk-video__play { background: rgba(6, 19, 28, .9); transform: scale(1.06); }
