/* AVmag.cz — homepage grid + site-wide sidebar. Do not reuse Flex Mag float wrappers. */

#avm-home {
	width: 100%;
	float: none !important;
	padding: 0 0 48px;
	box-sizing: border-box;
	color: #1a1a1a;
}

#avm-home *,
#avm-home *::before,
#avm-home *::after {
	box-sizing: border-box;
}

#avm-home .left,
#avm-home li,
#avm-home ul,
#avm-home .avm-card,
#avm-home .avm-media,
#avm-home .avm-card-body {
	float: none !important;
}

#avm-home a {
	color: inherit;
	text-decoration: none;
}

#avm-home a:hover .avm-title {
	color: #111;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ----- page shell: main + sidebar ----- */
.avm-shell {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	gap: 32px;
	width: 100%;
	align-items: start;
}

.avm-main,
.avm-side {
	min-width: 0;
	width: 100%;
}

#avm-home #sidebar-wrap {
	width: 100%;
	float: none !important;
}

/* ----- typography ----- */
.avm-cat {
	display: block;
	position: static !important;
	float: none !important;
	width: auto !important;
	margin: 0 0 6px;
	padding: 0;
	background: none !important;
	color: #d6004b;
	font-family: Montserrat, Arial, sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.avm-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin: 0;
	padding: 0;
	color: #111;
	font-weight: 700;
	line-height: 1.28;
	text-transform: none;
}

.avm-excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin: 8px 0 0;
	padding: 0;
	color: #555;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
}

.avm-card-lead .avm-title,
.avm-card--lead .avm-title {
	font-size: 28px;
	-webkit-line-clamp: 4;
	line-height: 1.2;
}

.avm-card--grid .avm-title,
.avm-card--stack .avm-title {
	font-size: 16px;
}

.avm-card--list .avm-title {
	font-size: 15px;
	-webkit-line-clamp: 3;
}

/* ----- media: uniform 16:9, cover ----- */
.avm-media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #e8eaed;
	line-height: 0;
}

.avm-media img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
}

.avm-card-link {
	display: block;
	color: inherit;
	height: 100%;
}

.avm-card-body {
	padding-top: 10px;
	min-width: 0;
}

/* ----- hero: 1 lead + 3 stacked ----- */
.avm-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
	gap: 24px;
	align-items: stretch;
	margin: 0 0 8px;
}

.avm-hero-side {
	display: grid;
	grid-template-rows: repeat(3, minmax(0, 1fr));
	gap: 16px;
	min-height: 0;
}

.avm-hero .avm-card--lead .avm-card-link,
.avm-rubric-grid > .avm-card--lead .avm-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.avm-hero-side .avm-card--stack .avm-card-link {
	display: grid;
	grid-template-columns: minmax(110px, 42%) minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	height: 100%;
}

.avm-hero-side .avm-card-body {
	padding-top: 0;
}

.avm-hero-side .avm-title {
	font-size: 15px;
	-webkit-line-clamp: 3;
}

/* ----- section heads ----- */
.avm-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 28px 0 16px;
	padding: 0 0 8px;
	border-bottom: 2px solid #111;
}

.avm-section-head h2 {
	margin: 0;
	font-family: Montserrat, Arial, sans-serif;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
}

.avm-section-head h2 a:hover {
	text-decoration: none;
	color: #d6004b;
}

.avm-section-more {
	flex: 0 0 auto;
	color: #666 !important;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.avm-section-more:hover {
	color: #d6004b !important;
	text-decoration: underline;
}

/* ----- latest: 4 equal cards ----- */
.avm-latest-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

/* ----- rubric: 1 large + 4 list items ----- */
.avm-rubric-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

.avm-rubric-side {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.avm-rubric-side .avm-card--list .avm-card-link {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
}

.avm-rubric-side .avm-card-body {
	padding-top: 0;
}

.avm-rubric-grid > .avm-card--lead .avm-title {
	font-size: 22px;
	-webkit-line-clamp: 3;
}

/* ----- more: 3 x 2 ----- */
.avm-more-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.avm-more-grid .avm-title {
	font-size: 17px;
}


/* ----- breakpoints ----- */
@media screen and (max-width: 1100px) {
	.avm-shell {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.avm-side {
		width: 100%;
		max-width: 520px;
	}

	.avm-card--lead .avm-title,
	.avm-hero .avm-card--lead .avm-title {
		font-size: 24px;
	}
}

@media screen and (max-width: 800px) {
	.avm-hero {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.avm-hero-side {
		grid-template-rows: none;
		gap: 16px;
	}

	.avm-latest-grid,
	.avm-more-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.avm-rubric-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.avm-card--lead .avm-title {
		font-size: 22px;
	}
}

@media screen and (max-width: 480px) {
	.avm-latest-grid,
	.avm-more-grid {
		grid-template-columns: 1fr;
	}

	.avm-hero-side .avm-card--stack .avm-card-link,
	.avm-rubric-side .avm-card--list .avm-card-link {
		grid-template-columns: 110px minmax(0, 1fr);
	}

	.avm-card--lead .avm-title {
		font-size: 20px;
	}

	.avm-section-head h2 {
		font-size: 16px;
	}
}


/* =========================================================================
   Sidebar — homepage, single posts, archives
   Override Flex Mag floats (.side-widget width 90%, .side-list-out, etc.)
   ========================================================================= */

#sidebar-wrap,
#sidebar-wrap *,
#sidebar-wrap *::before,
#sidebar-wrap *::after,
#post-right-col,
#post-right-col *,
#arch-right-col,
#arch-right-col * {
	box-sizing: border-box;
}

#sidebar-wrap,
#post-right-col #sidebar-wrap,
#arch-right-col #sidebar-wrap {
	width: 100% !important;
	float: none !important;
	max-width: 100%;
}

#sidebar-wrap .side-widget,
#post-right-col .side-widget,
#arch-right-col .side-widget {
	float: none !important;
	display: block;
	width: 100% !important;
	max-width: 100%;
	margin: 0 0 8px !important;
	padding: 0 0 22px !important;
	background: transparent;
	border-bottom: 1px solid #e6e6e6;
	overflow: hidden;
}

#sidebar-wrap .side-widget:last-child {
	border-bottom: 0;
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

/* Uniform widget headings */
#sidebar-wrap h4.post-header,
#post-right-col h4.post-header,
#arch-right-col h4.post-header,
#post-right-col h3.side-list-title,
#arch-right-col h3.side-list-title {
	float: none !important;
	display: flex;
	align-items: baseline;
	width: 100% !important;
	margin: 0 0 14px !important;
	padding: 0 0 8px !important;
	border: 0;
	border-bottom: 2px solid #111;
	background: none;
	text-align: left;
	line-height: 1.2;
}

#sidebar-wrap h4.post-header span.post-header,
#sidebar-wrap span.post-header,
#post-right-col span.post-header,
#arch-right-col span.post-header {
	float: none !important;
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	color: #111;
	font-family: Montserrat, Arial, sans-serif;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
}

/* Search — full width */
#sidebar-wrap #searchform,
#sidebar-wrap form#searchform {
	display: block;
	float: none !important;
	width: 100%;
	margin: 0;
	padding: 0;
}

#sidebar-wrap #searchform input,
#sidebar-wrap #searchform #s,
#sidebar-wrap input[type="text"]#s {
	float: none !important;
	display: block;
	width: 100% !important;
	max-width: 100%;
	height: 42px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #d0d0d0;
	border-radius: 2px;
	background: #f7f7f7;
	color: #222;
	font-family: Lato, Arial, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 42px;
	box-shadow: none;
}

#sidebar-wrap #searchform #s:focus {
	outline: 2px solid #d6004b;
	outline-offset: 1px;
	background: #fff;
}

#sidebar-wrap #searchform #searchsubmit {
	display: none;
}

/* Nejčtenější — compact uniform rows */
.avm-pop {
	list-style: none;
	margin: 0;
	padding: 0;
}

.avm-pop-item {
	margin: 0;
	padding: 0;
	list-style: none;
	float: none !important;
	width: auto !important;
}

.avm-pop-item + .avm-pop-item {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #eee;
}

.avm-pop-link {
	display: grid;
	grid-template-columns: 22px 80px minmax(0, 1fr);
	gap: 10px;
	align-items: start;
	color: inherit;
	text-decoration: none;
	min-height: 60px;
}

.avm-pop-rank {
	display: block;
	padding-top: 2px;
	color: #888;
	font-family: Montserrat, Arial, sans-serif;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	text-align: right;
}

.avm-pop-media {
	display: block;
	position: relative;
	width: 80px;
	height: 60px;
	overflow: hidden;
	background: #e8eaed;
	flex: none;
}

.avm-pop-media img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
}

.avm-pop-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding-top: 0;
}

.avm-pop-cat {
	display: block;
	position: static !important;
	float: none !important;
	width: auto !important;
	margin: 0 0 4px;
	padding: 0;
	background: none !important;
	color: #d6004b;
	font-family: Montserrat, Arial, sans-serif;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
}

.avm-pop-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin: 0;
	color: #111;
	font-family: Lato, Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.avm-pop-link:hover .avm-pop-title {
	color: #111;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Recent posts (archives / single) — compact text list */
#sidebar-wrap .widget_recent_entries ul {
	list-style: none;
	margin: 0;
	padding: 0;
	float: none !important;
	width: 100% !important;
}

#sidebar-wrap .widget_recent_entries li {
	float: none !important;
	width: auto !important;
	margin: 0;
	padding: 0 0 10px;
	border: 0;
	list-style: none;
}

#sidebar-wrap .widget_recent_entries li + li {
	padding-top: 10px;
	border-top: 1px solid #eee;
}

#sidebar-wrap .widget_recent_entries a,
#sidebar-wrap .widget_recent_entries a:link,
#sidebar-wrap .widget_recent_entries a:visited,
#sidebar-wrap .widget_recent_entries a:focus,
#sidebar-wrap .widget_recent_entries a:active {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	color: #111;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}

#sidebar-wrap .widget_recent_entries a:hover {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Tag cloud — uniform pill chips */
#sidebar-wrap .tagcloud,
#sidebar-wrap .tag-cloud,
.widget_tag_cloud .tagcloud {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	float: none !important;
	width: 100% !important;
	margin: 0;
	padding: 0;
}

#sidebar-wrap .tagcloud a,
#sidebar-wrap .tag-cloud a,
.widget_tag_cloud .tagcloud a,
.widget_tag_cloud a.tag-cloud-link {
	float: none !important;
	display: inline-block;
	margin: 0 !important;
	padding: 5px 10px !important;
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	background: #f4f4f4 !important;
	color: #333 !important;
	font-family: Montserrat, Arial, sans-serif !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	letter-spacing: 0;
	line-height: 1.3 !important;
	text-transform: none !important;
	white-space: nowrap;
}

#sidebar-wrap .tagcloud a:hover,
.widget_tag_cloud .tagcloud a:hover {
	background: #111 !important;
	border-color: #111;
	color: #fff !important;
	text-decoration: none;
}

/* O AVmag.cz */
#sidebar-wrap .avm-about,
#sidebar-wrap .textwidget,
#sidebar-wrap .custom-html-widget {
	float: none !important;
	width: 100% !important;
}

#sidebar-wrap .avm-about p,
#sidebar-wrap .textwidget p {
	margin: 0;
	color: #333;
	font-family: Lato, Arial, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.55;
}

#sidebar-wrap .avm-about p + p,
#sidebar-wrap .textwidget p + p {
	margin-top: 10px;
}

/* Column widths on desktop: ~330px sidebar, main grid shrinks.
   Sticky sidebar: ancestors #site/#site-wrap/body use overflow:hidden in Flex Mag,
   which prevents position:sticky from pinning to the viewport. Use overflow-x:clip
   (does not create a sticky containing block) and overflow-y:visible. */
@media screen and (min-width: 1100px) {
	html,
	body,
	#site,
	#site-wrap {
		overflow-x: clip;
		overflow-y: visible !important;
	}

	#arch-right-col,
	.home-right-col,
	#post-right-col {
		width: 330px !important;
		max-width: 330px;
		margin-left: 16px !important;
	}

	.home-wrap-out1,
	.post-wrap-out1 {
		margin-right: -346px !important;
	}

	.home-wrap-in1,
	.post-wrap-in1 {
		margin-right: 346px !important;
	}

	/* Sticky without an inner scrollbar. JS may set a negative top when the
	   sidebar is taller than the viewport so the bottom stays in view. */
	.avm-side,
	#post-right-col,
	#arch-right-col {
		position: sticky !important;
		top: 66px; /* 50px nav + 16px gap; JS may override */
		align-self: start;
		z-index: 5;
		max-height: none !important;
		overflow: visible !important;
		transform: none !important;
		scrollbar-width: none;
	}

	.avm-side::-webkit-scrollbar,
	#post-right-col::-webkit-scrollbar,
	#arch-right-col::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
	}

	body.admin-bar .avm-side,
	body.admin-bar #post-right-col,
	body.admin-bar #arch-right-col {
		top: 98px;
	}

	/* Let CSS sticky own the column; Theia's inner wrap must stay in flow. */
	.avm-side .theiaStickySidebar,
	#post-right-col .theiaStickySidebar,
	#arch-right-col .theiaStickySidebar,
	#sidebar-wrap.theiaStickySidebar {
		position: static !important;
		transform: none !important;
		width: 100% !important;
		top: auto !important;
		height: auto !important;
	}
}

@media screen and (max-width: 1099px) {
	.avm-shell {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	/* Unfloat Flex Mag holy-grail (including floated article) so the left column
	   has real height and the sidebar stacks underneath instead of overlapping. */
	.home-wrap-out1,
	.home-wrap-in1,
	.post-wrap-out1,
	.post-wrap-in1,
	#post-main-wrap,
	#home-main-wrap,
	#post-left-col,
	#home-left-col,
	#arch-left-col,
	#content-main,
	#content-area,
	#post-area,
	article.post {
		float: none !important;
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		height: auto !important;
		min-height: 0 !important;
	}

	.post-wrap-in1,
	#post-left-col,
	#home-left-col {
		display: flow-root;
	}

	.avm-side,
	#arch-right-col,
	.home-right-col,
	#post-right-col,
	#sidebar-wrap,
	#sidebar-wrap.theiaStickySidebar,
	.theiaStickySidebar {
		position: static !important;
		float: none !important;
		clear: both;
		width: 100% !important;
		max-width: 640px;
		margin: 24px auto 0 !important;
		padding-left: 16px;
		padding-right: 16px;
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		transform: none !important;
		top: auto !important;
		bottom: auto !important;
		overflow: visible !important;
	}
}

@media screen and (max-width: 480px) {
	.avm-pop-link {
		grid-template-columns: 20px 72px minmax(0, 1fr);
		gap: 8px;
	}

	.avm-pop-media {
		width: 72px;
		height: 54px;
	}
}

/* =========================================================================
   Header 2.2.1 — one row at every width. Flex, nowrap.
   Flex Mag leaves an empty #head-main-top (50px) as a sibling before
   #main-nav-wrap; if both are in normal flow the bar sits 50px too low and
   covers the hero / rubric. Collapse the empty top and pin the nav fixed
   at y=0; #head-main-wrap stays a 50px spacer so content is never covered.
   Below 1280px the text menu hides (items remain in the fly / hamburger).
   Content gutters are at least 24px on all widths.
   ========================================================================= */
#head-main-wrap {
	height: 50px;
	min-height: 50px;
	max-height: 50px;
	overflow: visible;
	float: none !important;
}

/* Empty sibling above the nav — must not consume the spacer height. */
#head-main-top {
	height: 0 !important;
	min-height: 0 !important;
	max-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
	float: none !important;
}

#main-nav-wrap,
#main-nav-wrap.fixed {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	float: none !important;
	width: 100%;
	box-sizing: border-box;
	overflow: visible;
	height: 50px !important;
	min-height: 50px;
	background-color: #fff;
	z-index: 9999;
}

body.admin-bar #main-nav-wrap,
body.admin-bar #main-nav-wrap.fixed {
	top: 32px;
}

#main-nav-wrap .nav-out,
#main-nav-wrap .nav-in {
	float: none !important;
	display: block;
	width: 100% !important;
	max-width: none;
	margin: 0 !important;
	height: 50px;
	box-sizing: border-box;
	overflow: visible;
}

#main-nav-cont {
	display: flex !important;
	flex-wrap: nowrap;
	align-items: center;
	float: none !important;
	width: 100% !important;
	max-width: none;
	margin: 0 !important;
	height: 50px;
	box-sizing: border-box;
	overflow: visible;
}

#main-nav-cont .nav-logo-out,
#main-nav-cont .nav-logo-in,
#main-nav-cont .nav-menu-out {
	display: contents;
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}

#main-nav-cont .nav-left-wrap {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	float: none !important;
	width: auto !important;
	max-width: none;
	height: 50px;
	margin: 0 !important;
}

#main-nav-cont .fly-but-wrap {
	flex: 0 0 50px;
	width: 50px;
	height: 50px;
	float: none !important;
}

#main-nav-cont .nav-logo {
	flex: 0 1 auto;
	width: auto !important;
	max-width: 200px;
	padding: 0 !important;
	height: 50px;
	display: flex;
	align-items: center;
	float: none !important;
}

#main-nav-cont .nav-logo img {
	display: block;
	max-height: 40px;
	width: auto;
	height: auto;
	max-width: 200px;
}

#main-nav-cont .nav-menu-in {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	min-width: 0;
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	height: 50px;
}

#main-nav-cont nav.main-menu-wrap {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	overflow: hidden;
}

#main-nav-cont nav.main-menu-wrap ul {
	display: flex;
	flex-wrap: nowrap;
	float: none !important;
	width: auto;
	margin: 0;
}

#main-nav-cont nav.main-menu-wrap ul li {
	float: none !important;
	flex: 0 0 auto;
}

#main-nav-cont nav.main-menu-wrap ul li a {
	font-size: 12px;
	padding: 19px 8px;
	white-space: nowrap;
}

#main-nav-cont nav.main-menu-wrap ul li.menu-item-has-children a {
	padding: 19px 16px 19px 8px;
}

#main-nav-cont nav.main-menu-wrap ul li.menu-item-has-children a:after {
	right: 5px;
}

#main-nav-cont nav.main-menu-wrap ul li ul.sub-menu {
	z-index: 10001;
}

#main-nav-cont .nav-right-wrap {
	display: flex;
	flex: 0 0 50px;
	align-items: center;
	justify-content: flex-end;
	position: relative;
	float: none !important;
	width: 50px !important;
	height: 50px;
	margin: 0 0 0 auto !important;
}

/* AVmag: 9 short rubric items fit from 1024px; below that the fly menu (hamburger) takes over. */
@media screen and (max-width: 1023px) {
	#main-nav-cont nav.main-menu-wrap {
		display: none !important;
	}
}

@media screen and (min-width: 1024px) {
	#main-nav-cont nav.main-menu-wrap {
		display: block !important;
	}
}

@media screen and (min-width: 1024px) and (max-width: 1279px) {
	#main-nav-cont nav.main-menu-wrap ul li a {
		font-size: 11.5px;
		padding: 19px 7px;
	}
}

/* Side padding / header inner width — match the content well, min 24px. */
@media screen and (max-width: 1249px) {
	.body-main-out {
		margin-left: 0 !important;
		right: auto !important;
		float: none !important;
		width: 100% !important;
	}

	.body-main-in {
		margin-left: 0 !important;
	}

	#body-main-wrap {
		padding-left: 24px;
		padding-right: 24px;
		box-sizing: border-box;
	}

	#main-nav-wrap {
		padding-left: 24px;
		padding-right: 24px;
	}
}

@media screen and (min-width: 1250px) and (max-width: 1600px) {
	#main-nav-wrap {
		padding-left: 100px;
		padding-right: 100px;
	}
}

@media screen and (min-width: 1601px) {
	#main-nav-wrap {
		padding-left: calc((100vw - 1400px) / 2);
		padding-right: calc((100vw - 1400px) / 2);
	}
}

/* =========================================================================
   Footer — 4 columns, professional dark bar
   ========================================================================= */
/* Keep article+sidebar floats from collapsing and sliding over the footer. */
#post-main-wrap {
	display: flow-root;
	width: 100%;
	float: none !important;
}

/* Footer 2.2.3 — sits outside #body-main-wrap (which is only 1600px at 1920)
   so the dark background is edge-to-edge. Inner content uses the same
   gutters as the header / #body-main-cont. */
footer#foot-wrap.avm-footer {
	background: #1a1a1a;
	color: #c5c5c5;
	clear: both;
	float: none !important;
	width: 100% !important;
	max-width: none;
	margin: 48px 0 0;
	left: auto;
	right: auto;
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	overflow: visible;
}

.avm-foot-inner {
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 48px 24px 36px;
}

@media screen and (min-width: 1250px) and (max-width: 1600px) {
	.avm-foot-inner {
		padding-left: 100px;
		padding-right: 100px;
	}
}

@media screen and (min-width: 1601px) {
	.avm-foot-inner {
		padding-left: calc((100vw - 1400px) / 2);
		padding-right: calc((100vw - 1400px) / 2);
	}
}

.avm-foot-grid {
	display: grid;
	grid-template-columns: 1.15fr 0.9fr 1.15fr 1fr;
	gap: 36px 32px;
	align-items: start;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

@media screen and (max-width: 1099px) {
	.avm-foot-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media screen and (max-width: 679px) {
	.avm-foot-grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

.avm-foot-col,
.avm-foot-col p,
.avm-footer .foot-widget {
	float: none !important;
	width: auto !important;
	margin: 0;
}

.avm-foot-logo {
	display: inline-block;
	line-height: 0;
	margin: 0 0 16px;
}

.avm-foot-logo img {
	display: block;
	height: 36px;
	width: auto;
	max-width: 200px;
}

.avm-foot-about p {
	margin: 0 0 14px;
	color: #c5c5c5;
	font-size: 14px;
	line-height: 1.55;
}

.avm-foot-contact,
.avm-foot-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.avm-foot-contact li,
.avm-foot-list li {
	margin: 0 0 8px;
	float: none !important;
	width: auto !important;
}

.avm-foot-contact a,
.avm-foot-list a {
	color: #ddd;
	text-decoration: none;
}

.avm-foot-contact a:hover,
.avm-foot-list a:hover {
	color: #fff;
	text-decoration: underline;
}

.avm-footer h3.foot-head {
	float: none !important;
	color: #fff;
	font-family: Montserrat, sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	margin: 0 0 16px;
	width: auto;
}

.avm-foot-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin: 14px 0 0;
	padding: 0;
	font-size: 13px;
}

.avm-foot-meta a {
	color: #ddd;
	text-decoration: none;
	font-weight: 400;
}

.avm-foot-meta a:hover {
	color: #fff;
	text-decoration: underline;
}

.avm-foot-meta .fa {
	margin-right: 5px;
	font-size: 12px;
}

.avm-foot-meta-sep {
	color: #777;
	font-weight: 400;
}

.avm-foot-count {
	color: #888;
	font-size: 12px;
	margin-left: 6px;
}

.avm-foot-recent a,
.avm-footer .avm-foot-recent a,
.avm-footer .avm-foot-list.avm-foot-recent li a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	line-height: 1.4;
	font-weight: 400 !important;
}

.avm-foot-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 8px;
}

.avm-foot-tags a {
	display: inline-block;
	background: #2a2a2a;
	border: 1px solid #3a3a3a;
	border-radius: 999px;
	color: #ddd !important;
	font-size: 12px;
	line-height: 1;
	padding: 6px 10px;
	text-decoration: none;
	float: none !important;
}

.avm-foot-tags a:hover {
	background: #fff !important;
	border-color: #fff;
	color: #111 !important;
}

.avm-foot-bot,
#foot-bot-wrap.avm-foot-bot {
	background: #111;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	overflow: visible;
}

.avm-foot-bot-in {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	padding-top: 16px;
	padding-bottom: 16px;
	min-width: 0;
	box-sizing: border-box;
}

.avm-footer .avm-foot-bot .foot-copy,
.avm-footer .avm-foot-bot .foot-copy p,
.avm-footer .avm-foot-bot .foot-menu {
	float: none !important;
	max-width: none;
	margin: 0;
	color: #999;
}

.avm-footer .avm-foot-bot .foot-copy,
.avm-footer .avm-foot-bot .foot-copy p {
	font-size: 12px;
	color: #999;
}

.avm-footer .avm-foot-bot .foot-menu,
.avm-footer .avm-foot-bot .foot-menu .menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	float: none !important;
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	margin: 0;
}

.avm-footer .avm-foot-bot .foot-menu .menu li {
	float: none !important;
	margin: 0;
}

.avm-footer .avm-foot-bot .foot-menu .menu li a {
	color: #aaa;
	font-size: 12px;
	text-transform: none;
}

.avm-footer .avm-foot-bot .foot-menu .menu li a:hover {
	color: #fff;
}

.avm-to-top,
footer.avm-footer a.avm-to-top {
	margin-left: auto;
	flex: 0 0 auto;
	white-space: nowrap;
	color: #ddd;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-decoration: none;
	text-transform: uppercase;
	display: inline-block !important;
	position: static !important;
	opacity: 1 !important;
	visibility: visible !important;
	width: auto !important;
	height: auto !important;
	overflow: visible;
}

.avm-to-top:hover {
	color: #fff;
	text-decoration: underline;
}

@media screen and (max-width: 679px) {
	.avm-foot-bot-in {
		flex-direction: column;
		align-items: flex-start;
	}

	.avm-to-top {
		margin-left: 0;
	}
}

/* =========================================================================
   Visited links 2.2.4 — Flex Mag prints `a, a:visited { color: #eb0254 }`
   after this stylesheet (same specificity as many of our `a` rules), so
   visited footer/nav/sidebar links turned magenta-red. Keep each link’s
   normal color for :link / :visited / :focus / :active. Hover may lighten
   or underline, never the accent red.
   ========================================================================= */
footer.avm-footer a:link,
footer.avm-footer a:visited,
footer.avm-footer a:focus,
footer.avm-footer a:active {
	color: #ddd;
}

footer.avm-footer a:hover {
	color: #fff;
}

footer.avm-footer .avm-foot-tags a:link,
footer.avm-footer .avm-foot-tags a:visited,
footer.avm-footer .avm-foot-tags a:focus,
footer.avm-footer .avm-foot-tags a:active {
	color: #ddd !important;
}

footer.avm-footer .avm-foot-tags a:hover {
	color: #111 !important;
	background: #fff !important;
}

footer.avm-footer .avm-foot-bot a:link,
footer.avm-footer .avm-foot-bot a:visited,
footer.avm-footer .avm-foot-bot a:focus,
footer.avm-footer .avm-foot-bot a:active {
	color: #aaa;
}

footer.avm-footer .avm-foot-bot a:hover {
	color: #fff;
}

footer.avm-footer a.avm-to-top:link,
footer.avm-footer a.avm-to-top:visited,
footer.avm-footer a.avm-to-top:focus,
footer.avm-footer a.avm-to-top:active {
	color: #ddd;
}

footer.avm-footer a.avm-to-top:hover {
	color: #fff;
}

/* Header menu (entertainment already uses #222 !important; this covers :visited too). */
#main-nav-cont nav.main-menu-wrap ul li a:link,
#main-nav-cont nav.main-menu-wrap ul li a:visited,
#main-nav-cont nav.main-menu-wrap ul li a:focus,
#main-nav-cont nav.main-menu-wrap ul li a:active,
#main-nav-cont nav.main-menu-wrap ul li ul.sub-menu li a:link,
#main-nav-cont nav.main-menu-wrap ul li ul.sub-menu li a:visited,
#main-nav-cont nav.main-menu-wrap ul li ul.sub-menu li a:focus,
#main-nav-cont nav.main-menu-wrap ul li ul.sub-menu li a:active {
	color: #222;
}

nav.fly-nav-menu ul li a:link,
nav.fly-nav-menu ul li a:visited,
nav.fly-nav-menu ul li a:focus,
nav.fly-nav-menu ul li a:active {
	color: #555;
}

nav.fly-nav-menu ul li a:hover {
	color: #bbb;
}

/* Sidebar widgets + homepage cards: stay on their designed color, not #eb0254. */
/* Only :visited/:focus/:active — do not restyle unvisited accent links. */
#sidebar-wrap a:visited,
#sidebar-wrap a:focus,
#sidebar-wrap a:active,
#post-right-col a:visited,
#post-right-col a:focus,
#post-right-col a:active,
#arch-right-col a:visited,
#arch-right-col a:focus,
#arch-right-col a:active,
aside.avm-side a:visited,
aside.avm-side a:focus,
aside.avm-side a:active {
	color: #111;
}

#sidebar-wrap .tagcloud a:link,
#sidebar-wrap .tagcloud a:visited,
#sidebar-wrap .tagcloud a:focus,
#sidebar-wrap .tagcloud a:active,
#sidebar-wrap .tag-cloud a:link,
#sidebar-wrap .tag-cloud a:visited,
#sidebar-wrap .tag-cloud a:focus,
#sidebar-wrap .tag-cloud a:active,
.widget_tag_cloud .tagcloud a:link,
.widget_tag_cloud .tagcloud a:visited,
.widget_tag_cloud a.tag-cloud-link:link,
.widget_tag_cloud a.tag-cloud-link:visited,
.widget_tag_cloud a.tag-cloud-link:focus,
.widget_tag_cloud a.tag-cloud-link:active {
	color: #333 !important;
}

#sidebar-wrap .tagcloud a:hover,
.widget_tag_cloud .tagcloud a:hover {
	color: #fff !important;
}

#avm-home a:link,
#avm-home a:visited,
#avm-home a:focus,
#avm-home a:active {
	color: inherit;
}

/* =========================================================================
   AVmag.cz brand layer — dark navigation bar, white logo plate, pink accent.
   ========================================================================= */
#main-nav-wrap,
#main-nav-wrap.fixed,
#main-nav-wrap .nav-out,
#main-nav-wrap .nav-in,
#main-nav-cont,
nav.main-menu-wrap,
.nav-right-wrap,
.nav-menu-out,
.nav-logo-out {
	background-color: #262626 !important;
}

#main-nav-cont .fly-but-wrap {
	background: #eb0254 !important;
}

#main-nav-cont .nav-logo {
	background: #fff;
	padding: 0 10px !important;
	max-width: 220px;
}

#main-nav-cont .nav-logo img {
	max-height: 40px;
}

#main-nav-cont nav.main-menu-wrap ul li a,
#main-nav-cont nav.main-menu-wrap ul li a:link,
#main-nav-cont nav.main-menu-wrap ul li a:visited,
#main-nav-cont nav.main-menu-wrap ul li a:focus,
#main-nav-cont nav.main-menu-wrap ul li a:active {
	color: #fff !important;
	font-family: Montserrat, Arial, sans-serif;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

#main-nav-cont nav.main-menu-wrap ul li a {
	font-size: 12.5px;
	padding: 19px 11px;
}

#main-nav-cont nav.main-menu-wrap ul li a:hover,
#main-nav-cont nav.main-menu-wrap ul li.current-menu-item a,
#main-nav-cont nav.main-menu-wrap ul li.current-post-ancestor a,
#main-nav-cont nav.main-menu-wrap ul li.current-category-ancestor a {
	color: #fff !important;
	box-shadow: inset 0 -3px 0 #eb0254;
}

#main-nav-cont span.nav-search-but i,
#main-nav-cont .nav-search-but i {
	color: #fff !important;
}

/* Fly (hamburger) menu — Dark skin */
nav.fly-nav-menu ul li a:link,
nav.fly-nav-menu ul li a:visited,
nav.fly-nav-menu ul li a:focus,
nav.fly-nav-menu ul li a:active {
	color: #eee;
}

nav.fly-nav-menu ul li a:hover {
	color: #eb0254;
}

/* Leaderboard under the bar: centred, never wider than the screen. */
#body-main-cont {
	display: flow-root;
}

#leader-wrap {
	float: none !important;
	width: 100% !important;
	background: transparent !important;
	margin: 0 !important;
	padding: 16px 0 0;
	text-align: center;
	overflow: hidden;
	clear: both;
}

#leader-wrap > div {
	display: flex;
	justify-content: center;
}

#leader-wrap [id^="div-gpt-ad"] {
	max-width: 100%;
	margin: 0 auto;
}

@media screen and (max-width: 789px) {
	#leader-wrap {
		display: none !important;
	}
}

/* Sidebar ad (300×600 / 300×300) centred inside the 330px column */
#sidebar-wrap .side-widget.mvp_ad_widget,
#sidebar-wrap .mvp_ad_widget,
.avm-side .avm-ad {
	text-align: center;
	border-bottom: 0 !important;
}

#sidebar-wrap [id^="div-gpt-ad"] {
	display: flex;
	justify-content: center;
	margin: 0 auto;
	min-height: 0;
}

/* White reading surface on the grey AVmag background */
body.custom-background {
	background-color: #f0f0f0;
}

#body-main-cont {
	background: #fff;
}

#avm-home {
	padding-top: 20px;
}

/* Section headings with pink rule */
.avm-section-head {
	border-bottom: 2px solid #111;
	position: relative;
}

.avm-section-head::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 56px;
	height: 2px;
	background: #eb0254;
}

#sidebar-wrap h4.post-header,
#post-right-col h4.post-header,
#arch-right-col h4.post-header {
	position: relative;
}

#sidebar-wrap h4.post-header::after,
#post-right-col h4.post-header::after,
#arch-right-col h4.post-header::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 40px;
	height: 2px;
	background: #eb0254;
}

#sidebar-wrap .tagcloud a:hover,
.widget_tag_cloud .tagcloud a:hover {
	background: #eb0254 !important;
	border-color: #eb0254;
}

/* Archive / search heading aligned with the list, pink rule */
h1.cat-head {
	float: none !important;
	display: block;
	width: auto !important;
	margin: 0 !important;
	padding: 22px 18px 10px !important;
	font-size: 28px;
	line-height: 1.2;
	text-align: left;
	position: relative;
}

h1.cat-head::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin-top: 10px;
	background: #eb0254;
}

/* AVmag v3: 9 rubrik (delší popisky) — vejdou se do jednoho řádku od 1024 px. */
@media screen and (min-width: 1024px) and (max-width: 1279px) {
	#main-nav-cont nav.main-menu-wrap ul li a,
	#main-nav-cont nav.main-menu-wrap ul li a:link,
	#main-nav-cont nav.main-menu-wrap ul li a:visited {
		font-size: 11px;
		letter-spacing: 0;
		padding: 19px 6px;
	}
}
@media screen and (min-width: 1280px) and (max-width: 1439px) {
	#main-nav-cont nav.main-menu-wrap ul li a,
	#main-nav-cont nav.main-menu-wrap ul li a:link,
	#main-nav-cont nav.main-menu-wrap ul li a:visited {
		font-size: 12px;
		letter-spacing: 0.01em;
		padding: 19px 8px;
	}
}
