/*
 * Рекламные баннеры ([ai_bot_banner], [ai_sidebar_bot_banner]) — кампания «Каникулы в Китае».
 * Сетка, шрифты и кнопка — по макету Figma «Преподаёте китайский?»; цвета и картинки — со страницы поездки.
 * Подключается из functions/short-code-banners.php, только пока кампания активна.
 */

.uk-promo-wrap {
	--up-red: #b5110f;
	--up-red-dark: #8e0d0c;
	--up-gold: #ffcd20;
	--up-ink: #241442;
	--up-soft: #fbf3ef;
	container-type: inline-size;
	flex: 0 0 100%;
	width: 100%;
	max-width: 100%;
	margin: 20px 0;
}

/* ---- Широкий баннер: по умолчанию — мобильный формат 343×403 ---- */
/* селекторы с обёрткой — чтобы правила вроде «.page-content a» не перекрашивали баннер */
.uk-promo-wrap a.uk-promo {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 20px;
	min-height: 403px;
	padding: 24px;
	overflow: hidden;
	border-radius: 16px;
	color: #fff;
	text-align: center;
	text-decoration: none;
	background:
		radial-gradient(70% 60% at 50% 30%, rgba(142, 13, 12, 0) 0, rgba(142, 13, 12, .6) 100%),
		repeating-conic-gradient(from 0deg at 50% 30%, var(--up-red) 0 10deg, #c1171a 10deg 20deg);
}
.uk-promo-wrap a.uk-promo:hover,
.uk-promo-wrap a.uk-promo:focus { color: #fff; text-decoration: none; }
.uk-promo-wrap .uk-promo__title,
.uk-promo-wrap .uk-promo__text { color: #fff; }

.uk-promo__photo { display: none; }

.uk-promo__art {
	position: absolute;
	z-index: 1;
	top: -30px;
	left: 50%;
	width: 250px;
	max-width: none;
	height: auto;
	transform: translateX(-50%);
	pointer-events: none;
	-webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent);
	mask-image: radial-gradient(closest-side, #000 60%, transparent);
}

.uk-promo__body { position: relative; z-index: 2; display: block; }

.uk-promo__title {
	display: block;
	margin-bottom: 12px;
	font-size: 28px;
	font-weight: 500;
	line-height: 32px;
	text-wrap: balance;
}

.uk-promo__text { display: block; font-size: 16px; line-height: 24px; text-wrap: balance; }
.uk-promo__date { font-weight: 600; white-space: nowrap; }
.uk-promo__date::after { content: " ·"; }

.uk-promo__btn {
	position: relative;
	z-index: 2;
	display: block;
	flex-shrink: 0;
	min-width: 228px;
	padding: 10px 24px;
	border: 2px solid #fff;
	border-radius: 16px;
	background: var(--up-gold, #ffcd20);
	color: #333;
	font-size: 16px;
	font-weight: 700;
	line-height: 24px;
	text-align: center;
	white-space: nowrap;
	transition: background-color .2s, color .2s;
}
.uk-promo-wrap .uk-promo__btn,
.uk-promo-side .uk-promo__btn { color: #333; }
a.uk-promo:hover .uk-promo__btn,
a.uk-promo-side:hover .uk-promo__btn { background: #fff; color: #b5110f; }

/* ---- Средний формат 802×153 ---- */
@container (min-width: 600px) {
	.uk-promo-wrap a.uk-promo {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 24px;
		min-height: 153px;
		padding: 32px;
		text-align: left;
		background: radial-gradient(120% 140% at 85% 30%, #d4231c 0%, var(--up-red) 45%, var(--up-red-dark) 100%);
	}
	.uk-promo__art { display: none; }
	.uk-promo__photo {
		position: absolute;
		top: 0;
		right: 0;
		display: block;
		width: 70%;
		max-width: none;
		height: 100%;
		object-fit: cover;
		mix-blend-mode: soft-light;
		pointer-events: none;
		-webkit-mask-image: linear-gradient(90deg, transparent, #000 50%);
		mask-image: linear-gradient(90deg, transparent, #000 50%);
	}
	.uk-promo__body { max-width: 465px; }
	.uk-promo__title { margin-bottom: 9px; text-wrap: initial; }
}

/* ---- Широкий формат 1170×129 ---- */
@container (min-width: 900px) {
	.uk-promo-wrap a.uk-promo { min-height: 129px; }
	.uk-promo__body { max-width: 52%; }
	.uk-promo__photo { width: 46%; opacity: .9; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%); mask-image: linear-gradient(90deg, transparent, #000 40%); }
	.uk-promo__art {
		display: block;
		top: -40px;
		left: 54%;
		width: 300px;
		transform: none;
		-webkit-mask-image: radial-gradient(closest-side, #000 65%, transparent);
		mask-image: radial-gradient(closest-side, #000 65%, transparent);
	}
}

/* ---- Боковой баннер 296×468 (обёртка .post-sidebar-banner и прилипание — из style.css) ---- */
a.ai-sidebar-bot-banner.uk-promo-side {
	min-height: 468px;
	padding: 24px;
	border-radius: 16px;
	background: #fbf3ef;
	color: #241442;
	text-align: center;
	text-decoration: none;
}
a.ai-sidebar-bot-banner.uk-promo-side:hover,
a.ai-sidebar-bot-banner.uk-promo-side:focus { color: #241442; text-decoration: none; }
.uk-promo-side .uk-promo-side__title { color: #241442; }
.uk-promo-side .uk-promo-side__date { color: #fff; }

.uk-promo-side__date {
	display: inline-block;
	margin-bottom: 12px;
	padding: 6px 10px;
	border-radius: 30px;
	background: #b5110f;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
}

.uk-promo-side__title {
	display: block;
	max-width: 248px;
	margin-bottom: 14px;
	font-size: 26px;
	font-weight: 500;
	line-height: 32px;
}

.uk-promo-side__art {
	display: block;
	width: 248px;
	max-width: 100%;
	height: 150px;
	margin-bottom: 16px;
	overflow: hidden;
	border-radius: 14px;
	background: #b5110f;
}
.uk-promo-side__art img {
	display: block;
	width: 120%;
	max-width: none;
	height: auto;
	margin: -12% 0 0 -10%;
}

.uk-promo-side .uk-promo-side__text {
	display: block;
	margin-bottom: 20px;
	color: #333;
	font-size: 16px;
	line-height: 24px;
}

a.uk-promo-side .uk-promo__btn { width: 100%; min-width: 0; margin-top: auto; border-color: #ffcd20; }

/* на телефоне боковой баннер стоит в потоке страницы — не растягиваем */
@media (max-width: 767px) {
	.post-sidebar-banner { min-height: 0; }
	a.ai-sidebar-bot-banner.uk-promo-side { max-width: 343px; margin: 0 auto; }
}
