/*
 * BOC Featured Articles – editorial layout "A – Editorial-Zeilen" (SPEC §5).
 * Everything is scoped under .boc-articles so theme styles don't leak in and ours don't leak out.
 */

/*
 * Raleway variable (SIL OFL 1.1, ../fonts/OFL.txt) under its own family name: the theme declares Raleway only
 * with 400/500/900, so a 600 subtitle would fall back to 900 there.
 */
@font-face {
	font-family: "BOC Raleway";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/raleway-latin-wght-normal.woff2") format("woff2");
}

.boc-articles {
	--boc-red: #d70f0e; /* site red #fc1312 darkened for 4.5:1 with small white text */
	--boc-link-hover: #ed1d24; /* theme customizer link colour (Magazine Pro "magazine_link_color"); large text only */
	--boc-text: #222;
	--boc-muted: #444;
	--boc-muted-light: #666;
	--boc-line: #eee;
	--boc-past: #6b6b6b;
	--boc-past-hover: #555;
	--boc-display: "BOC Raleway", raleway, sans-serif; /* subtitle + concert bar */
	--boc-heading: raleway, sans-serif; /* title: the theme's own face, like its post titles */
	--boc-body: roboto, sans-serif;
	--boc-gap: 14px;
	--boc-radius: 4px;
	--boc-thumb: 150px; /* core "thumbnail" size, as in the GFWA widget */

	color: var(--boc-text);
	font-family: var(--boc-body);
}

/* Article row */
.boc-articles .boc-article {
	display: grid;
	grid-template-columns: var(--boc-thumb) minmax(0, 1fr);
	grid-template-rows: auto auto 1fr auto;
	grid-template-areas:
		"aside title"
		"aside subtitle"
		"aside excerpt"
		"aside footer";
	column-gap: 32px;
	row-gap: var(--boc-gap);
	margin: 0;
	padding: 32px 0;
	border-bottom: 1px solid var(--boc-line);
}

.boc-articles .boc-article:first-of-type {
	padding-top: 8px;
}

.boc-articles .boc-article:last-of-type {
	border-bottom: 0;
}

/* Image: thumbnail at its natural size; image and concert bar share the left column (concert bar stays last in the DOM) */
.boc-articles .boc-article__media {
	grid-area: aside;
	align-self: start;
	display: block;
	width: var(--boc-thumb);
	height: var(--boc-thumb);
	margin: 0;
	overflow: hidden;
	border-radius: var(--boc-radius) var(--boc-radius) 0 0;
	background: var(--boc-text);
}

.boc-articles .boc-article:not(:has(.boc-concert)) .boc-article__media {
	border-radius: var(--boc-radius);
}

.boc-articles .boc-article__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.boc-articles .boc-article:hover .boc-article__media img {
	transform: scale(1.05);
}

/* Title: same as the theme's post titles (Magazine Pro h2 in featured posts) */
.boc-articles .boc-article__title {
	grid-area: title;
	margin: 0;
	padding: 0;
	font-family: var(--boc-heading);
	font-size: 30px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
}

.boc-articles .boc-article--quote .boc-article__title {
	text-indent: -0.34em; /* hang the opening quote (Raleway „ = 0.34em) so the letters align */
}

.boc-articles .boc-article__title a {
	color: inherit;
	text-decoration: none;
}

/* Like the theme's titles: red, no underline (keyboard focus keeps the outline below) */
.boc-articles .boc-article__title a:hover,
.boc-articles .boc-article__title a:focus-visible {
	color: var(--boc-link-hover);
	text-decoration: none;
}

/* Subtitle */
.boc-articles .boc-article__subtitle {
	grid-area: subtitle;
	margin: 0;
	font-family: var(--boc-display);
	font-size: 18px;
	font-weight: 600;
	font-variant-numeric: lining-nums; /* Raleway defaults to old-style figures ("12.10.2025") */
	line-height: 1.4;
	color: var(--boc-red);
	text-wrap: pretty;
}

/* Excerpt */
.boc-articles .boc-article__excerpt {
	grid-area: excerpt;
	margin: 0;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.7;
	color: var(--boc-muted);
	text-wrap: pretty;
}

/* Footer: authors + Weiterlesen */
.boc-articles .boc-article__footer {
	grid-area: footer;
	align-self: end;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
}

.boc-articles .boc-article__authors {
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--boc-muted-light);
}

.boc-articles .boc-article__authors span {
	color: var(--boc-text);
	font-weight: 500;
}

.boc-articles .boc-article__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	font-size: 14px;
	font-weight: 500;
	color: var(--boc-red);
	text-decoration: none;
}

.boc-articles .boc-article__more:hover,
.boc-articles .boc-article__more:focus-visible {
	color: var(--boc-red);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.boc-articles .boc-article__more svg {
	flex: none;
	transition: transform 0.2s ease;
}

.boc-articles .boc-article__more:hover svg {
	transform: translateX(4px);
}

/* Concert bar, attached under the image: date on the first line, label + arrow on the second */
.boc-articles .boc-concert {
	grid-area: aside;
	align-self: start;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: var(--boc-thumb);
	padding: 10px 12px;
	border-radius: 0 0 var(--boc-radius) var(--boc-radius);
	background: var(--boc-red);
	color: #fff;
	text-decoration: none;
	transition: background-color 0.2s ease, filter 0.2s ease;
}

.boc-articles .boc-article:not(:has(.boc-article__media)) .boc-concert {
	margin-top: 0; /* no image: the bar alone in the left column */
	border-radius: var(--boc-radius);
}

.boc-articles .boc-concert:hover,
.boc-articles .boc-concert:focus-visible {
	color: #fff;
	filter: brightness(1.08);
}

.boc-articles .boc-concert__date {
	display: flex;
	flex: 1 0 100%;
	align-items: baseline;
	gap: 6px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.45);
	font-family: var(--boc-display);
	font-variant-numeric: lining-nums;
}

.boc-articles .boc-concert__day {
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
}

.boc-articles .boc-concert__month {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.boc-articles .boc-concert__label {
	flex: 1;
	min-width: 0;
	font-family: var(--boc-display);
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	white-space: nowrap;
}

.boc-articles .boc-concert svg {
	flex: none;
	width: 16px;
	height: 16px;
	transition: transform 0.2s ease;
}

.boc-articles .boc-concert:hover svg {
	transform: translateX(4px);
}

/* Past concerts: greyed out, still linked (SPEC FR-16) */
.boc-articles .boc-concert--past {
	background: var(--boc-past);
}

.boc-articles .boc-concert--past:hover,
.boc-articles .boc-concert--past:focus-visible {
	background: var(--boc-past-hover);
	filter: none;
}

/* Page navigation */
.boc-articles .boc-articles__nav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--boc-line);
	font-size: 14px;
	font-weight: 500;
}

.boc-articles .boc-articles__nav a {
	color: var(--boc-red);
	text-decoration: none;
}

.boc-articles .boc-articles__next {
	margin-left: auto;
}

.boc-articles .boc-articles__nav a:hover,
.boc-articles .boc-articles__nav a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Visible keyboard focus (SPEC M3) */
.boc-articles a:focus-visible {
	outline: 2px solid var(--boc-text);
	outline-offset: 3px;
	border-radius: 2px;
}

.boc-articles .boc-concert:focus-visible {
	border-radius: 0 0 var(--boc-radius) var(--boc-radius);
}

/* In case the theme doesn't define it */
.boc-articles .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Phones: thumbnail beside title + subtitle, then a full-width concert bar, excerpt and footer */
@media (max-width: 600px) {

	.boc-articles .boc-article {
		grid-template-rows: auto 1fr auto auto auto;
		grid-template-areas:
			"media   title"
			"media   subtitle"
			"concert concert"
			"excerpt excerpt"
			"footer  footer";
		column-gap: 16px;
	}

	.boc-articles .boc-article:not(:has(.boc-article__media)) {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
		grid-template-areas: "title" "subtitle" "concert" "excerpt" "footer";
	}

	.boc-articles .boc-article__media {
		grid-area: media;
		border-radius: var(--boc-radius);
	}

	.boc-articles .boc-article__subtitle {
		align-self: start;
		font-size: 16px;
	}

	.boc-articles .boc-concert {
		grid-area: concert;
		flex-wrap: nowrap;
		gap: 12px;
		margin-top: 0;
		padding: 12px 14px;
		border-radius: var(--boc-radius);
	}

	.boc-articles .boc-concert__date {
		flex: none;
		flex-direction: column;
		align-items: center;
		gap: 3px;
		padding: 0 12px 0 0;
		border-bottom: 0;
		border-right: 1px solid rgba(255, 255, 255, 0.45);
	}

	.boc-articles .boc-concert:focus-visible {
		border-radius: var(--boc-radius);
	}

	.boc-articles .boc-article__title {
		font-size: 20px; /* "Unaussprechlichen“" fits the 185px column at 390px */
		hyphens: auto; /* longer German words next to the thumbnail */
	}

	.boc-articles .boc-article--quote .boc-article__title {
		text-indent: 0; /* no hanging quote at the screen edge */
	}
}

@media (prefers-reduced-motion: reduce) {

	.boc-articles .boc-article__media img,
	.boc-articles .boc-concert,
	.boc-articles svg {
		transition: none;
	}

	.boc-articles .boc-article:hover .boc-article__media img,
	.boc-articles .boc-concert:hover svg,
	.boc-articles .boc-article__more:hover svg {
		transform: none;
	}
}
