/**
 * Главная: афиша / города (доп. к home-redesign.css).
 * Токены: --kgf-* из home-redesign.css
 */

/* Слайдер команды (slick) и баннер Госуслуг иначе дают горизонтальный скролл */
body.home {
	overflow-x: clip;
}
body.home .uagb-block-2a212a74,
body.home .uagb-block-ea8ced15,
body.home .uagb-block-4d559eb5 {
	overflow: hidden;
	max-width: 100%;
}

body.home .kgf-afisha-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin: 24px 0 16px;
}

body.home .kgf-afisha-toolbar .uagb-block-3cefcf8d {
	margin: 0 !important;
	flex: 1 1 auto;
	min-width: 0;
}

body.home .kgf-afisha-toolbar .uagb-heading-text {
	font-family: Prata, "Noto Serif", Georgia, serif !important;
	font-weight: 400;
	color: #424242;
	margin: 0;
}

body.home .kgf-afisha-toolbar .uagb-separator {
	border-color: #dddddd !important;
	max-width: 64px;
}

/* Компактный выбор города (ссылки на страницы городов) */
body.home .kgf-city-dd {
	position: relative;
	flex: 0 0 auto;
	max-width: 100%;
}

body.home .kgf-city-dd__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	padding: 8px 12px;
	border: 1px solid #dddddd;
	border-radius: 10px;
	background: #ffffff;
	color: #424242;
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

body.home .kgf-city-dd__btn::after {
	content: "";
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid #6b6b6b;
	flex: 0 0 auto;
}

body.home .kgf-city-dd__btn[aria-expanded="true"] {
	border-color: #936533;
}

body.home .kgf-city-dd__btn[aria-expanded="true"]::after {
	transform: rotate(180deg);
	border-top-color: #936533;
}

body.home .kgf-city-dd__btn:focus-visible {
	outline: 2px solid #992f22;
	outline-offset: 2px;
}

body.home .kgf-city-dd__list {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	z-index: 40;
	min-width: 220px;
	max-width: min(320px, 92vw);
	max-height: 280px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: #ffffff;
	border: 1px solid #dddddd;
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(66, 66, 66, 0.12);
	overflow-y: auto;
}

body.home .kgf-city-dd__list[hidden] {
	display: none !important;
}

body.home .kgf-city-dd__list a,
body.home .kgf-city-dd__list span.is-current {
	display: block;
	padding: 10px 12px;
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	color: #424242;
	text-decoration: none;
}

body.home .kgf-city-dd__list a:hover,
body.home .kgf-city-dd__list a:focus-visible {
	background: #f6f6f6;
	outline: none;
}

body.home .kgf-city-dd__list span.is-current {
	color: #6b6b6b;
	font-weight: 700;
	cursor: default;
}

@media (max-width: 768px) {
	body.home .kgf-afisha-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		margin: 16px 0 12px;
	}

	body.home .kgf-city-dd,
	body.home .kgf-city-dd__btn {
		width: 100%;
	}

	body.home .kgf-city-dd__list {
		left: 0;
		right: 0;
		max-width: none;
	}
}

/* Спокойные карточки EventON только на главной */
body.home .ajde_evcal_calendar.boxy .eventon_list_event {
	background: #ffffff !important;
	border: 1px solid #dddddd !important;
	border-radius: 10px !important;
	overflow: hidden !important;
	box-shadow: none !important;
	transform: none !important;
	opacity: 1 !important;
}

body.home .ajde_evcal_calendar.boxy .eventon_list_event:hover {
	transform: none !important;
	opacity: 1 !important;
	border-color: #cfcfcf !important;
}

body.home .ajde_evcal_calendar.boxy .eventon_list_event .desc_trig {
	border: none !important;
	border-radius: 0 !important;
}

body.home .ajde_evcal_calendar.boxy .eventon_list_event .evo_boxtop {
	background-color: #f6f6f6 !important;
}

body.home .ajde_evcal_calendar.boxy .eventon_list_event .evcal_event_title {
	display: block;
	white-space: normal !important;
	overflow-wrap: anywhere;
	word-break: normal;
	hyphens: auto;
	font-family: "Open Sans", sans-serif !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	color: #424242 !important;
}

body.home .ajde_evcal_calendar.boxy .eventon_list_event .evo_start .date {
	font-family: "Open Sans", sans-serif !important;
	font-size: 22px !important;
	font-weight: 700 !important;
	letter-spacing: 0 !important;
	color: #ffffff !important;
}

body.home .ajde_evcal_calendar.boxy .eventon_list_event .evcal_time {
	font-family: "Open Sans", sans-serif !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
	color: #ffffff !important;
}

body.home .ajde_evcal_calendar.boxy .eventon_list_event .event_location_name,
body.home .ajde_evcal_calendar.boxy .eventon_list_event .evcal_location {
	font-family: "Open Sans", sans-serif !important;
	font-size: 13px !important;
	font-style: normal !important;
	font-weight: 400 !important;
	letter-spacing: 0 !important;
	line-height: 1.4 !important;
	color: rgba(255, 255, 255, 0.92) !important;
	white-space: normal !important;
}

body.home .ajde_evcal_calendar.boxy .eventon_list_event .evocmd_button {
	background: #936533 !important;
	border-radius: 5px !important;
	font-family: "Open Sans", sans-serif !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}

body.home .ajde_evcal_calendar.boxy .eventon_list_event .evocmd_button:hover {
	background: #992f22 !important;
}

/* Сетка: единая ширина в ряду */
body.home .ajde_evcal_calendar.boxy.box_4 .eventon_list_event,
body.home .ajde_evcal_calendar.boxy.box_4 .evoShow_more_events {
	width: 25% !important;
	max-width: 25%;
	flex: 0 0 25%;
	box-sizing: border-box;
}

@media (max-width: 900px) {
	body.home .ajde_evcal_calendar.boxy.box_4 .eventon_list_event,
	body.home .ajde_evcal_calendar.boxy.box_4 .evoShow_more_events {
		width: 50% !important;
		max-width: 50%;
		flex-basis: 50%;
	}
}

@media (max-width: 650px) {
	body.home .ajde_evcal_calendar.boxy .eventon_list_event,
	body.home .ajde_evcal_calendar.boxy .evoShow_more_events,
	body.home .ajde_evcal_calendar.boxy.box_4 .eventon_list_event,
	body.home .ajde_evcal_calendar.boxy.box_4 .evoShow_more_events {
		width: 100% !important;
		max-width: 100% !important;
		flex: 0 0 100% !important;
	}
}

/* EventON задаёт padding-top под старую высоту 340px — с aspect-ratio появляется пустота */
body.home .ajde_evcal_calendar.boxy .eventon_list_event {
	display: flex !important;
	flex-direction: column;
	min-height: 0 !important;
	height: auto !important;
}
body.home .ajde_evcal_calendar.boxy .eventon_list_event .evo_boxtop {
	position: relative !important;
	order: 0;
}
body.home .ajde_evcal_calendar.boxy .eventon_list_event .desc_trig_outter,
body.home .ajde_evcal_calendar.boxy .eventon_list_event .desc_trig {
	position: relative !important;
	padding-top: 12px !important;
	order: 1;
	flex: 1 1 auto;
}

/* Спокойнее блок «Уважаемые посетители» */
body.home .uagb-block-2a212a74 {
	background: #f6f6f6 !important;
	border: 1px solid #dddddd;
	border-radius: 10px !important;
	margin-top: 24px !important;
}

/* Логотипы в шапке: пропорции и отступы на телефоне */
@media (max-width: 921px) {
	body.home .ast-primary-header-bar .custom-logo-link img,
	body.home .ast-primary-header-bar .site-logo-img img,
	body.home .main-header-bar img {
		height: auto !important;
		max-height: 56px;
		width: auto !important;
		object-fit: contain;
	}

	body.home .ast-primary-header-bar .ast-builder-layout-element {
		padding-top: 8px;
		padding-bottom: 8px;
	}
}


/* Светлая «подложка» текста под афишей вместо тяжёлого бордо */
body.home .ajde_evcal_calendar.boxy.boxstyle2 .eventon_list_event {
	background: #ffffff !important;
}
body.home .ajde_evcal_calendar.boxy.boxstyle2 #evcal_list .eventon_list_event .desc_trig,
body.home .ajde_evcal_calendar.boxy .eventon_list_event .evcal_list_a {
	background: #ffffff !important;
	color: #424242 !important;
}
body.home .ajde_evcal_calendar.boxy .eventon_list_event .evoet_cx {
	color: #424242 !important;
}
body.home .ajde_evcal_calendar.boxy .eventon_list_event .evo_start .date,
body.home .ajde_evcal_calendar.boxy .eventon_list_event .evcal_time,
body.home .ajde_evcal_calendar.boxy .eventon_list_event .evcal_time i {
	color: #992f22 !important;
}
body.home .ajde_evcal_calendar.boxy .eventon_list_event .event_location_name,
body.home .ajde_evcal_calendar.boxy .eventon_list_event .evcal_location,
body.home .ajde_evcal_calendar.boxy .eventon_list_event .evcal_location i {
	color: #6b6b6b !important;
}
body.home .ajde_evcal_calendar.boxy .eventon_list_event .evcal_cblock,
body.home .ajde_evcal_calendar.boxy .eventon_list_event .evoet_dayblock {
	background: transparent !important;
}
