@font-face {
	font-family: 'Comfortaa';
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url(../fonts/comfortaa-latin-ext.woff2) format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Comfortaa';
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url(../fonts/comfortaa-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url(../fonts/open-sans-latin-ext.woff2) format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url(../fonts/open-sans-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--c-header: #31334c;
	--c-submenu: rgba(33, 33, 33, 0.9);
	--c-page: #202020;
	--c-news: #232326;
	--c-footer: #111;
	--c-light: #d6d6d6;
	--c-ink: #202020;
	--c-body: #404040;
	--c-accent: #fa0;
	--c-link: #f90;
	--c-link-on-light: #8a4f00;
	--c-card-overlay: rgba(0, 0, 0, 0.58);

	--font-body: 'Open Sans', system-ui, sans-serif;
	--font-heading: 'Comfortaa', var(--font-body);

	--container: 1120px;
	--gutter: 20px;
	--grid-gap: 48px;
	--grid-pad: 36px;
	--divider: 30px;
	--header-h: 82px;
	--radius-card: 12px;
	--radius-box: 18px;
}

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

html {
	background: var(--c-page);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	font: 400 16px/1.6 var(--font-body);
	color: var(--c-body);
	background: var(--c-page);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: 1.5;
}

a {
	color: var(--c-link);
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
}

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 8px 16px;
	background: #fff;
	color: var(--c-ink);
}

:focus-visible {
	outline: 2px solid var(--c-accent);
	outline-offset: 2px;
}

/* Header ---------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	background: var(--c-header);
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.site-header__inner {
	display: flex;
	align-items: center;
	min-height: var(--header-h);
}

.site-logo {
	flex: none;
	width: 220px;
	line-height: 0;
}

.site-logo img {
	width: 100%;
	opacity: 0.72;
}

.site-header__panel {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-left: 50px;
}

.site-nav .menu,
.site-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav .menu {
	display: flex;
}

.site-nav .menu-item {
	position: relative;
}

.site-nav a {
	display: block;
	padding: 18px 16px;
	border-top: 2px solid transparent;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.8);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.site-nav .menu > .menu-item > a:hover,
.site-nav .menu > .menu-item:focus-within > a {
	color: #fff;
	background: var(--c-submenu);
}

.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a {
	color: #fff;
	border-top-color: #fff;
}

.site-nav .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 5px;
	height: 5px;
	margin: 0 0 3px 6px;
	border: solid currentColor;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}

.site-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--c-submenu);
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.15s, visibility 0.15s;
}

.site-nav .menu-item:hover > .sub-menu,
.site-nav .menu-item:focus-within > .sub-menu {
	visibility: visible;
	opacity: 1;
}

.site-nav .sub-menu a {
	border-top: 0;
	text-align: left;
	white-space: nowrap;
}

.site-nav .sub-menu a:hover,
.site-nav .sub-menu a:focus-visible {
	color: #fff;
	background: var(--c-header);
}

.nav-toggle {
	display: none;
}

/* Search ---------------------------------------------------------------- */

.search-form {
	display: flex;
	align-items: center;
	gap: 8px;
}

.search-form__field {
	width: 184px;
	height: 36px;
	padding: 8px 12px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.2);
	color: var(--c-light);
	font: inherit;
	font-size: 15px;
}

.search-form__field::placeholder {
	color: rgba(214, 214, 214, 0.5);
}

.search-form__field:focus {
	outline: none;
	border-color: rgba(255, 170, 0, 0.6);
}

.search-form__submit {
	display: grid;
	place-items: center;
	padding: 2px;
	border: 0;
	background: none;
	color: var(--c-accent);
	cursor: pointer;
}

.search-form__submit svg {
	width: 32px;
	height: 32px;
}

/* Sections -------------------------------------------------------------- */

.site-main {
	flex: 1;
}

.section {
	position: relative;
}

/* Each section draws a downward chevron into the section that follows it. */
.section--divider::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 1;
	height: var(--divider);
	background: inherit;
	clip-path: polygon(0 0, 100% 0, 50% 100%);
	pointer-events: none;
}

.section--news,
.section--ads {
	padding: 30px var(--grid-pad) 120px;
}

.section--news {
	background: var(--c-news);
}

.section--ads {
	background: var(--c-header);
	padding-top: calc(var(--divider) + 70px);
}

.section--article {
	background: var(--c-page);
	padding: 75px 0 142px;
}

.section--related {
	background: var(--c-header);
	padding: calc(var(--divider) + 58px) 0 120px;
}

.section--page {
	background: var(--c-page);
	padding: 50px 0 100px;
}

.section__title {
	margin: 0 0 16px;
	font-size: 32px;
	color: var(--c-light);
	text-align: center;
	text-transform: uppercase;
}

.section__title--left {
	text-align: left;
	text-transform: none;
}

/* Post grid & cards ----------------------------------------------------- */

.post-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--grid-gap);
}

.card {
	position: relative;
	grid-column: span 3;
	aspect-ratio: 5 / 4;
	overflow: hidden;
	border-radius: var(--radius-card);
	background: repeating-linear-gradient(45deg, #333 0 10px, #444 10px 20px);
}

/* Featured grid: row of 2 large, row of 3 medium, then small (positions mirror gundem_card_image_sizes()). */
.post-grid--featured > .card:nth-child(-n+2) {
	grid-column: span 6;
	aspect-ratio: 32 / 25;
}

.post-grid--featured > .card:nth-child(n+3):nth-child(-n+5) {
	grid-column: span 4;
	aspect-ratio: 9 / 8;
}

.card__link {
	position: absolute;
	inset: 0;
	color: #fff;
}

.card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.card__link:hover .card__img,
.card__link:focus-visible .card__img {
	transform: scale(1.04);
}

.card__date {
	position: absolute;
	top: 16px;
	right: 16px;
	padding: 0.7em 1em;
	background: rgba(0, 0, 0, 0.5);
	font-size: 11.2px;
	font-weight: 700;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.card__title {
	position: absolute;
	left: 50%;
	bottom: 16px;
	width: max-content;
	max-width: calc(100% - 32px);
	margin: 0;
	padding: 16px;
	border-radius: 10px;
	background: var(--c-card-overlay);
	transform: translateX(-50%);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	text-shadow: 1px 1px #000;
}

.card__title-text {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
}

.post-grid--featured > .card:nth-child(-n+5) .card__title {
	font-size: 19.2px;
}

/* Cover: shown when a post has no visible photo ------------------------- */

.cover {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background:
		repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 14px),
		radial-gradient(120% 90% at 25% 15%, #474a72 0%, var(--c-header) 45%, #1b1c2a 100%);
}

.cover::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: linear-gradient(90deg, transparent, var(--c-accent), transparent);
	opacity: 0.6;
}

.cover img {
	width: 44%;
	max-width: 260px;
	opacity: 0.45;
	transform: translateY(-30%);
}

.card__link:hover .cover img {
	opacity: 0.6;
}

/* Single post ----------------------------------------------------------- */

.article__image {
	margin: 0;
}

.article__image img {
	display: block;
	width: 100%;
	border-radius: var(--radius-box);
}

.article__image--cover {
	position: relative;
	aspect-ratio: 21 / 9;
	overflow: hidden;
	border-radius: var(--radius-box);
}

.article__image--cover .cover img {
	width: 30%;
	border-radius: 0;
	transform: none;
}

.article__meta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin: 34px 0 20px;
	text-align: center;
	color: var(--c-light);
}

.article__meta-label {
	display: block;
}

.article__date {
	display: block;
	margin-top: 2px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.86);
}

.article__categories {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

.pill {
	display: inline-block;
	padding: 4px 15px;
	border: 1px solid var(--c-link);
	border-radius: 30px;
	font-weight: 600;
}

.pill:hover {
	background: var(--c-link);
	color: var(--c-ink);
}

.article__title {
	margin: 0 0 12px;
	font-size: 40px;
	color: #fff;
	text-align: center;
}

/* Content box (article & page body) ------------------------------------ */

.content-box {
	margin-top: 22px;
	padding: 30px;
	border-radius: var(--radius-box);
	background: var(--c-light);
	color: var(--c-ink);
	overflow-wrap: break-word;
}

.content-box--article {
	font-size: 18px;
}

.content-box--page {
	padding: 30px 60px;
	color: var(--c-body);
}

.content-box > :first-child {
	margin-top: 0;
}

.content-box > :last-child {
	margin-bottom: 0;
}

.content-box p {
	margin: 1em 0;
}

.content-box a {
	color: var(--c-link-on-light);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.content-box h2,
.content-box h3,
.content-box h4 {
	margin: 1.4em 0 0.6em;
	font-family: var(--font-body);
	font-size: 1em;
	line-height: 1.6;
}

.content-box ul,
.content-box ol {
	padding-left: 1.4em;
}

.content-box li::marker {
	color: #c47500;
}

.content-box img {
	border-radius: 8px;
}

.content-box figure {
	margin: 1.5em 0;
	max-width: 100%;
}

.content-box figcaption {
	font-size: 0.85em;
	color: var(--c-body);
}

.content-box blockquote {
	margin: 1.5em 0;
	padding: 16px 24px;
	border-left: 4px solid var(--c-accent);
	background: rgba(0, 0, 0, 0.05);
}

.content-box iframe {
	max-width: 100%;
}

.content-box .alignleft {
	float: left;
	margin: 0.4em 1.5em 1em 0;
}

.content-box .alignright {
	float: right;
	margin: 0.4em 0 1em 1.5em;
}

.content-box .aligncenter {
	display: block;
	margin-inline: auto;
}

.page__title {
	margin: 0 0 6px;
	font-size: 44px;
	color: var(--c-light);
}

/* Pagination & empty states -------------------------------------------- */

.pagination {
	margin-top: 56px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.pagination .page-numbers {
	min-width: 40px;
	padding: 8px 14px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--c-light);
	font-weight: 600;
	text-align: center;
}

.pagination a.page-numbers:hover {
	background: rgba(255, 255, 255, 0.16);
}

.pagination .page-numbers.current {
	background: var(--c-accent);
	color: var(--c-ink);
}

.pagination .page-numbers.dots {
	background: none;
}

.empty-state {
	max-width: 560px;
	margin: 0 auto 48px;
	color: var(--c-light);
	text-align: center;
}

.empty-state .search-form {
	justify-content: center;
}

.empty-state .search-form__field {
	width: 100%;
	max-width: 360px;
}

/* Footer ---------------------------------------------------------------- */

.site-footer {
	padding: calc(var(--divider) + 20px) 0 20px;
	background: var(--c-footer);
}

.site-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-inline: 40px;
}

.site-footer__brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	font-size: 10px;
	line-height: 1.6;
	color: #8e8e8e;
	text-align: center;
}

.site-footer__brand img {
	height: 36px;
	width: auto;
	opacity: 0.8;
}

.site-footer__legal {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.5);
	text-align: right;
}

.site-footer__legal p {
	margin: 0 0 4px;
}

.site-footer__link {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.site-footer__link:hover {
	color: #fff;
}

/* Responsive ------------------------------------------------------------ */

@media (max-width: 1120px) {
	:root {
		--grid-gap: 32px;
		--grid-pad: 24px;
	}

	.site-header__panel {
		margin-left: 24px;
	}

	.site-nav a {
		padding-inline: 12px;
	}

	.search-form__field {
		width: 140px;
	}
}

@media (max-width: 991px) {
	:root {
		--header-h: 64px;
		--divider: 20px;
	}

	.site-logo {
		width: 132px;
	}

	.nav-toggle {
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		margin-left: auto;
		padding: 0;
		border: 0;
		background: none;
		cursor: pointer;
	}

	.nav-toggle__bars,
	.nav-toggle__bars::before,
	.nav-toggle__bars::after {
		display: block;
		width: 22px;
		height: 2px;
		background: rgba(255, 255, 255, 0.9);
		transition: transform 0.2s, background 0.2s;
	}

	.nav-toggle__bars {
		position: relative;
	}

	.nav-toggle__bars::before,
	.nav-toggle__bars::after {
		content: '';
		position: absolute;
		left: 0;
	}

	.nav-toggle__bars::before {
		top: -7px;
	}

	.nav-toggle__bars::after {
		top: 7px;
	}

	.is-open .nav-toggle__bars {
		background: transparent;
	}

	.is-open .nav-toggle__bars::before {
		transform: translateY(7px) rotate(45deg);
	}

	.is-open .nav-toggle__bars::after {
		transform: translateY(-7px) rotate(-45deg);
	}

	.site-header__panel {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 8px;
		margin: 0;
		padding: 16px var(--gutter) 24px;
		max-height: calc(100vh - var(--header-h));
		overflow-y: auto;
		background: var(--c-header);
		box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
	}

	.is-open .site-header__panel {
		display: flex;
	}

	.site-nav .menu {
		flex-direction: column;
	}

	.site-nav a {
		padding: 12px 8px;
		border-top: 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	}

	.site-nav .current-menu-item > a {
		color: var(--c-accent);
	}

	.site-nav .menu-item-has-children > a::after {
		display: none;
	}

	.site-nav .sub-menu {
		position: static;
		visibility: visible;
		opacity: 1;
		background: none;
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.site-nav .sub-menu a {
		padding-left: 20px;
		font-size: 13px;
		color: rgba(255, 255, 255, 0.7);
		white-space: normal;
	}

	.search-form__field {
		flex: 1;
		width: auto;
		height: 44px;
	}

	.post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.card,
	.post-grid--featured > .card:nth-child(n+3):nth-child(-n+5) {
		grid-column: span 1;
		aspect-ratio: 5 / 4;
	}

	.post-grid--featured > .card:nth-child(-n+2) {
		grid-column: 1 / -1;
		aspect-ratio: 16 / 9;
	}

	.post-grid--featured > .card:nth-child(-n+5) .card__title {
		font-size: 17px;
	}

	.section--article {
		padding: 40px 0 90px;
	}

	.article__title {
		font-size: 32px;
	}

	.content-box--page {
		padding: 30px;
	}

	.page__title {
		font-size: 36px;
	}
}

@media (max-width: 600px) {
	:root {
		--grid-gap: 20px;
		--grid-pad: 16px;
		--gutter: 16px;
	}

	.section--news,
	.section--ads {
		padding-bottom: 80px;
	}

	.section__title {
		font-size: 26px;
	}

	.post-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.card,
	.post-grid--featured > .card:nth-child(n+3):nth-child(-n+5),
	.post-grid--featured > .card:nth-child(-n+2) {
		grid-column: auto;
		aspect-ratio: 4 / 3;
	}

	.card__title,
	.post-grid--featured > .card:nth-child(-n+5) .card__title {
		bottom: 12px;
		max-width: calc(100% - 24px);
		padding: 12px 14px;
		font-size: 16px;
	}

	.section--article {
		padding: 16px 0 72px;
	}

	.article__image img {
		border-radius: var(--radius-card);
	}

	.article__meta {
		grid-template-columns: 1fr;
		gap: 14px;
		margin: 20px 0 16px;
		font-size: 14px;
	}

	.article__title {
		font-size: 24px;
		line-height: 1.4;
	}

	.content-box {
		padding: 20px;
		border-radius: var(--radius-card);
	}

	.content-box--article {
		font-size: 17px;
	}

	.content-box--page {
		padding: 20px;
	}

	.content-box .alignleft,
	.content-box .alignright {
		float: none;
		margin: 1em 0;
	}

	.page__title {
		font-size: 30px;
	}

	.section--related {
		padding-bottom: 72px;
	}

	.site-footer__inner {
		flex-direction: column;
		padding-block: 12px;
		text-align: center;
	}

	.site-footer__legal {
		text-align: center;
	}
}

/* Ultra-wide: full-width grids get 3 large, 4 medium, then 6 per row. Article-column grids keep 4 per row. */
@media (min-width: 2000px) {
	:root {
		--grid-pad: 48px;
	}

	.section--news > .post-grid > .card,
	.section--ads > .post-grid > .card {
		grid-column: span 2;
		aspect-ratio: 5 / 4;
	}

	.section--news > .post-grid--featured > .card:nth-child(-n+3) {
		grid-column: span 4;
		aspect-ratio: 32 / 25;
	}

	.section--news > .post-grid--featured > .card:nth-child(n+4):nth-child(-n+7) {
		grid-column: span 3;
		aspect-ratio: 9 / 8;
	}

	.section--news > .post-grid--featured > .card:nth-child(-n+7) .card__title {
		font-size: 19.2px;
	}
}
