/**
 * Impreza 9 compatibility (upgrade from Impreza 8.28, 2026-11).
 * Restores the Impreza 8 look of legacy [us_grid] lists.
 */

/* Impreza 9 lays grids out with CSS grid and gap = 2 x --gap. Impreza 8 used 1 x --gap
   between stacked items when a grid was in one-column mode (cols_1 or a responsive breakpoint). */
@container style(--columns: 1) {
	.w-grid.type_grid > .w-grid-list {
		gap: var(--gap, 0px);
	}
	/* Impreza 8 also kept the gap after the last stacked item */
	.w-grid.type_grid:not(.cols_1) > .w-grid-list {
		margin-bottom: var(--gap, 0px);
	}
}

/* Home "Novinky": child theme forced one column from 1280px via width:100% on items,
   which no longer works with CSS grid. Same 2 x gap as in Impreza 8 (it was a 2-col grid there). */
@media only screen and (min-width: 1280px) {
	.w-grid.grid_blog.layout_horizontal {
		--columns: 1 !important;
	}
	.w-grid.grid_blog.layout_horizontal:not(.cols_1) > .w-grid-list {
		gap: calc(var(--gap, 0px) * 2);
		margin-bottom: 0;
	}
}

/* Vertical menus (footer link lists): Impreza 9 lowered line-height 1.4 -> 1.25 */
.w-menu.layout_ver {
	line-height: 1.4;
}
/* ...and on mobile it no longer adds the gap after the last item (footer column spacing) */
@media ( max-width: 600px ) {
	.w-menu.for_simple_menu.layout_ver .menu > li:last-child {
		margin-bottom: var(--main-gap, 4px) !important;
	}
}

/* Accordions (tabs on mobile): Impreza 9 "toggle_style_1" draws only top/bottom borders and colours
   the active title with the primary colour, which made it invisible on the child theme's red header */
.w-tabs.accordion.toggle_style_1 > div > .w-tabs-section {
	border: 1px solid var(--color-content-border);
}
.w-tabs.accordion.toggle_style_1 > div > .w-tabs-section.active {
	border-color: var(--color-content-primary);
}
.w-tabs.accordion.toggle_style_1 > div > .w-tabs-section.active:not(.has_text_color) > .w-tabs-section-header {
	color: var(--color-white);
}
/* Impreza 9 accordion content padding (more specific) overrides the child theme values */
.w-tabs.accordion > div > .w-tabs-section > .w-tabs-section-content {
	padding: 30px 15px;
}
@media (min-width: 768px) {
	.w-tabs.accordion > div > .w-tabs-section > .w-tabs-section-content {
		padding: 30px;
	}
}
