/*
Theme Name: Newspack Sport1
Theme URI: https://github.com/wpcomvip/sport1
Template: newspack-theme
Author: Damian Zamojski
Author URI: https://www.sport1.de/
Description: Child theme for Newspack, customized for Sport1 needs.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newspack-sport1-theme
Tags: Newspack, Child Theme, Sport
*/

:root {
	--newspack-theme-font-body: "Barlow Regular", sans-serif;
	--newspack-theme-font-heading: "Barlow Regular", sans-serif;
}

body {
	background-color: #f1f0f5;
}

/* Override parent theme's global a:hover underline.
   Specific components that intentionally use underline (breadcrumb, author)
   keep it via their own more-specific selectors. */
a:hover,
a:focus {
	text-decoration: none;
}

/* Teaser card / article title links — no underline on hover.
   !important needed: parent theme sets .entry-content a { text-decoration: underline }
   and newspack-blocks inline styles may load after external sheets. */
.entry-title a,
.entry-title a:hover,
.entry-title a:focus,
.wpnbha .entry-title a,
.wpnbha .entry-title a:hover,
.wpnbha .entry-title a:focus,
.sport1-weitere-news-section .entry-title a,
.sport1-weitere-news-section .entry-title a:hover,
.sport1-weitere-news-section .entry-title a:focus {
	text-decoration: none !important;
}

.rm-top-margin {
	margin-top: -35px;
}

.sport1-video-play-icon--fontello {
	align-items: center;
	background: #000;
	color: #fff;
	display: flex;
	height: 32px;
	justify-content: center;
	line-height: 1;
	width: 32px;
}

.sport1-video-play-btn.sport1-video-play-btn--autoplay,
.sport1-video-play-btn--sm.sport1-video-play-btn--autoplay {
	background: transparent;
	height: 32px;
	width: 32px;
}

.wp-block-newspack-blocks-homepage-articles.sport1-hero-teaser
	.sport1-video-play-btn--sm.sport1-video-play-btn--autoplay {
	height: 32px;
	width: 32px;
}

.sport1-video-play-icon--fontello .icon-autoplay {
	align-items: center;
	display: inline-flex;
	font-size: 24px;
	justify-content: center;
	line-height: 1;
}

.sport1-video-play-icon--fontello .icon-autoplay:before {
	line-height: 1;
	margin: 0;
	width: auto;
}

.sport1-article-meta {
	color: #000;
	font-family: "Barlow Regular", sans-serif;
	margin: 8px 0 0;
}

.sport1-video-posted-at,
.sport1-video-duration {
	font-size: 14px;
	line-height: 20px;
}

.sport1-article-page .site-main {
	padding: 24px 0 40px;
	background: #fff;
}

.sport1-article-wrap {
	width: min(100%, 1113px);
	margin: 0 auto;
	padding: 0 16px;
}

.sport1-article-container {
	width: min(100%, 1041px);
	margin: 0 auto;
}

.sport1-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	color: #666;
	font-size: 0.875rem;
	line-height: 1.4;
}

.sport1-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.sport1-breadcrumb a:hover,
.sport1-breadcrumb a:focus {
	color: #111;
	text-decoration: underline;
}

.sport1-breadcrumb-current {
	color: #111;
	font-weight: 700;
}

.sport1-article-header {
	margin-bottom: 20px;
}

.sport1-article-header .entry-title {
	margin: 10px 0 12px;
	font-size: clamp(1.9rem, 3vw, 2.7rem);
	line-height: 1.15;
}

/* =============================================
   Author block
   ============================================= */

.sport1-author-block {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
}

.sport1-author-avatar-wrap {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
}

.sport1-author-avatar-wrap img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	display: block;
}

.sport1-author-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1px;
}

.sport1-author-name {
	display: flex;
	flex-direction: row;
	align-items: baseline;
	gap: 4px;
	font-family: "Barlow Bold", sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.333;
	color: #000;
}

.sport1-author-von {
	font-weight: 700;
}

.sport1-author-link {
	color: inherit;
	text-decoration: none;
}

.sport1-author-link:hover,
.sport1-author-link:focus {
	text-decoration: underline;
}

.sport1-author-date {
	font-family: "Barlow Regular", sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.286;
	color: #000;
}

.sport1-article-hero {
	margin-bottom: 24px;
	border-radius: 10px;
	overflow: hidden;
}

/* Video block inside the hero already has its own border-radius */
.sport1-article-hero--video {
	border-radius: 0;
	overflow: visible;
}

.sport1-article-hero img {
	width: 100%;
	height: auto;
	display: block;
}

/* ── Video thumbnail overlay for teaser cards ───────────────────────────── */
.sport1-video-teaser-wrap {
	position: relative;
	display: block;
	line-height: 0;
}

.sport1-video-teaser-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sport1-video-teaser-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* Smaller play button variant for teaser thumbnails */
.sport1-video-play-btn--sm {
	position: absolute;
	bottom: 10px;
	left: 10px;
	width: 48px;
	height: 48px;
	background: #106bfe;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sport1-video-play-btn--sm .sport1-video-play-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.sport1-video-play-btn--sm .sport1-video-play-icon svg {
	width: 14px;
	height: 18px;
	fill: #fff;
	margin-left: 2px;
}

/* Duration badge — base styles copied from video/style.css so the badge is available
   on pages where the video block is not rendered (e.g. home page teaser thumbnails). */
.sport1-video-duration-badge {
	position: absolute;
	bottom: 24px;
	right: 16px;
	background: #fff;
	padding: 2px 6px 2px 4px;
	height: 22px;
	display: flex;
	align-items: center;
	font-family: "Barlow SC Black Italic", sans-serif;
	font-weight: 900;
	font-size: 14px;
	font-style: italic;
	text-transform: uppercase;
	line-height: 18px;
	color: #000;
	pointer-events: none;
	box-sizing: border-box;
}

/* Article action chips — Teilen / Feedback — below hero */
.sport1-article-actions {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.sport1-action-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	border-radius: 999px;
	border: 1px solid #e5e5e5;
	padding: 8px 10px;
	font-family: "Barlow Regular", sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.375;
	color: #000;
	background: none;
	cursor: pointer;
}

.sport1-action-chip:hover,
.sport1-action-chip:focus {
	border-color: #000;
	outline: none;
}

/* Article subtitle — shown below hero, above body content */
.sport1-article-subtitle {
	font-family: "Sport1 Variable", "Sport1", sans-serif;
	font-weight: 740;
	font-size: 22px;
	line-height: 1.364;
	color: #000;
	margin: 16px 0 0;
}

.sport1-article-content {
	max-width: 780px;
	margin: 0 auto;
}

.sport1-article-body {
	width: 100%;
}

.sport1-article-body > * {
	margin-bottom: 1.2rem;
}

/* Restore rounded media treatment on single article content. */
.sport1-article-body .wp-block-image img,
.sport1-article-body .wp-caption img,
.sport1-article-body
	.wp-block-gallery.has-nested-images
	figure.wp-block-image
	img,
.sport1-article-body .wp-block-gallery .wp-block-image img,
.sport1-article-body .gallery img,
.sport1-article-body .tiled-gallery__gallery img,
.sport1-article-body .sport1-article-hero img {
	border-radius: 12px;
}

.sport1-article-body .wp-block-gallery.has-nested-images figure.wp-block-image,
.sport1-article-body .wp-block-gallery .wp-block-image,
.sport1-article-body .gallery-item,
.sport1-article-body .wp-block-video,
.sport1-article-body .wp-block-embed,
.sport1-article-body .wp-block-cover,
.sport1-article-body figure.wp-block-embed,
.sport1-article-body .wp-block-media-text__media,
.sport1-article-body .wp-block-post-featured-image {
	border-radius: 12px;
	overflow: hidden;
}

.sport1-article-body .wp-block-video video,
.sport1-article-body .wp-block-embed iframe,
.sport1-article-body iframe {
	display: block;
	width: 100%;
	border: 0;
	border-radius: 12px;
}

.sport1-article-body .wp-block-embed__wrapper {
	border-radius: 12px;
	overflow: hidden;
}

/* =============================================
   Quote / Pullquote blocks — Sport1 Figma design
   Outer: #F1F0F5 grey card, border-radius 12px, padding 24px
   Inner: #fff white card, border-radius 8px, padding 24px
   ============================================= */

/* ── core/quote ─────────────────────────────────────────────────────────── */

.sport1-article-body .wp-block-quote {
	background: #f1f0f5; /* grey outer card */
	border-radius: 12px;
	padding: 48px; /* 24px grey outer + 24px white inner */
	border: none;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 0 1.2rem;
}

/* White inner card via ::after */
.sport1-article-body .wp-block-quote::after {
	content: "";
	position: absolute;
	inset: 24px;
	background: #fff;
	border-radius: 8px;
	z-index: 0;
	pointer-events: none;
}

/* ZITAT badge and all children sit above white card */
.sport1-article-body .wp-block-quote::before,
.sport1-article-body .wp-block-quote > * {
	position: relative;
	z-index: 1;
}

/* ── core/pullquote ──────────────────────────────────────────────────────── */

.sport1-article-body .wp-block-pullquote {
	background: #f1f0f5; /* grey outer card */
	border-radius: 12px;
	padding: 24px;
	border: none;
	margin: 0 0 1.2rem;
	text-align: left;
}

.sport1-article-body .wp-block-pullquote blockquote {
	background: #fff; /* white inner card */
	border-radius: 8px;
	padding: 24px;
	margin: 0;
	border: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* ZITAT badge — on inner blockquote for pullquote */
.sport1-article-body .wp-block-pullquote blockquote::before {
	content: "ZITAT";
	display: inline-flex;
	align-items: center;
	background: #000;
	color: #fff;
	font-family: "Barlow SC Black Italic", sans-serif;
	font-weight: 900;
	font-size: 14px;
	font-style: italic;
	text-transform: uppercase;
	line-height: 18px;
	padding: 2px 6px 2px 4px;
	height: 22px;
	width: fit-content;
}

/* ── ZITAT badge for core/quote (::before, above ::after white card) ─────── */
.sport1-article-body .wp-block-quote::before {
	content: "ZITAT";
	display: inline-flex;
	align-items: center;
	background: #000;
	color: #fff;
	font-family: "Barlow SC Black Italic", sans-serif;
	font-weight: 900;
	font-size: 14px;
	font-style: italic;
	text-transform: uppercase;
	line-height: 18px;
	padding: 2px 6px 2px 4px;
	height: 22px;
	width: fit-content;
}

/* ── Quote text ──────────────────────────────────────────────────────────── */
.sport1-article-body .wp-block-quote p,
.sport1-article-body .wp-block-pullquote blockquote p {
	font-family: "Barlow Bold", sans-serif;
	font-weight: 700;
	font-size: 24px;
	line-height: 1.333;
	color: #000;
	margin: 0;
	font-style: normal;
}

/* ── Author / cite ───────────────────────────────────────────────────────── */
.sport1-article-body .wp-block-quote cite,
.sport1-article-body .wp-block-quote footer,
.sport1-article-body .wp-block-pullquote cite {
	font-family: "Barlow Regular", sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.286;
	color: #000;
	font-style: normal;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 782px) {
	.sport1-article-body .wp-block-quote {
		padding: 32px; /* 16px grey outer + 16px white inner */
	}
	.sport1-article-body .wp-block-quote::after {
		inset: 16px;
	}
	.sport1-article-body .wp-block-pullquote {
		padding: 16px;
	}
	.sport1-article-body .wp-block-pullquote blockquote {
		padding: 16px;
	}
	.sport1-article-body .wp-block-quote p,
	.sport1-article-body .wp-block-pullquote blockquote p {
		font-size: 20px;
	}
}

/* =============================================
   Weitere News section — Sport1 Figma design
   Grey outer card, white teaser cards, row layout
   ============================================= */

.sport1-weitere-news-section {
	background: #f1f0f5;
	border-radius: 12px;
	padding: 24px;
	margin: 2.2rem 0 1.2rem;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Heading: Barlow Semi Condensed Black Italic 24px uppercase */
.sport1-weitere-news-section .sport1-section-heading {
	font-family: "Barlow SC Black Italic", sans-serif;
	font-weight: 900;
	font-style: italic;
	font-size: 24px;
	line-height: 1.167;
	text-transform: uppercase;
	color: #000;
	margin: 0;
	border: none;
	padding: 0;
}

/* Newspack block wrapper — 3-column row */
.sport1-weitere-news-section .wpnbha {
	display: flex !important;
	flex-direction: row !important;
	gap: 12px;
	width: 100%;
}

/* Each article card — white, rounded */
.sport1-weitere-news-section .wpnbha article {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	margin: 0 !important;
	padding: 0 !important;
}

/* Image: 3:2 ratio, full card width */
.sport1-weitere-news-section .post-thumbnail {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	flex-shrink: 0;
}

.sport1-weitere-news-section .post-thumbnail a {
	display: block;
	height: 100%;
}

.sport1-weitere-news-section .post-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Kill Newspack's injected margins that inflate the image→title gap */
.sport1-weitere-news-section .post-thumbnail {
	margin-bottom: 0 !important;
}

/* Content area fills remaining card height */
.sport1-weitere-news-section .entry-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	padding: 12px;
	gap: 6px 4px;
	flex: 1;
}

/* Title — full width, visually first */
.sport1-weitere-news-section .entry-title {
	order: 1;
	width: 100%;
	font-family: "Barlow Bold", sans-serif;
	font-weight: 700;
	font-size: 14px !important;
	line-height: 1.286;
	color: #000;
	margin: 0 !important;
}

.sport1-weitere-news-section .entry-title a {
	color: inherit;
	text-decoration: none;
}

/* Category chip — left side of bottom row */
.sport1-weitere-news-section .cat-links {
	order: 2;
	flex: 1;
	min-width: 0;
	font-family: "Barlow Regular", sans-serif;
	font-weight: 400;
	font-size: 10px !important;
	line-height: 1.4;
	color: #000;
	display: flex;
	align-items: center;
}

.sport1-weitere-news-section .cat-links a {
	color: inherit;
	text-decoration: none;
}

/* Date — right side of bottom row */
.sport1-weitere-news-section .entry-meta {
	order: 2;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	font-size: 10px !important;
}

.sport1-weitere-news-section .entry-meta time {
	font-family: "Barlow Regular", sans-serif;
	font-weight: 400;
	font-size: 10px;
	line-height: 1.4;
	color: #000;
	white-space: nowrap;
}

.sport1-category-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 26px;
}

.sport1-category-chip {
	display: inline-block;
	border-radius: 999px;
	border: 1px solid #e5e5e5;
	padding: 8px 10px;
	font-family: "Barlow Regular", sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.375;
	text-decoration: none;
	color: #000;
	background: none;
}

.sport1-category-chip:hover,
.sport1-category-chip:focus {
	border-color: #000;
	color: #000;
}

.sport1-outbrain-widget {
	width: 100%;
	margin-top: 32px;
}

/* ── Ad slot base classes ── */

.sport1-ad {
	box-sizing: border-box;
}

.sport1-ad--placeholder {
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	background: #f1f0f5;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: sans-serif;
	color: #999;
	font-size: 13px;
	width: 100%;
}

.sport1-ad--placeholder::before {
	content: "Werbung";
}

/* ── Ad preview mode (?ads_preview=1, admin only) ──
   Adds visible labelled placeholders for every ad slot so the layout can be
   verified on staging before Pubstack is whitelisted.
   These rules apply only when <body class="sport1-ads-preview"> is present. ── */

.sport1-ads-preview .sport1-sky-small,
.sport1-ads-preview .sport1-sky-large {
	background: #f1f0f5;
	border: 2px dashed #bbb;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: sans-serif;
	font-size: 11px;
	color: #888;
	text-align: center;
	line-height: 1.4;
}

.sport1-ads-preview .sport1-sky-small {
	width: 160px;
	height: 600px;
}

.sport1-ads-preview .sport1-sky-small::after {
	content: "sky1small / sky2small\A 160×600";
	white-space: pre;
}

.sport1-ads-preview .sport1-sky-large {
	width: 300px;
	height: 600px;
}

.sport1-ads-preview .sport1-sky-large::after {
	content: "sky1 / sky2\A 300×600";
	white-space: pre;
}

.sport1-ads-preview .sport1-top-leaderboard {
	outline: 2px dashed #bbb;
	outline-offset: -4px;
	min-height: 250px;
	align-items: center;
	justify-content: center;
	font-family: sans-serif;
	font-size: 11px;
	color: #888;
}

.sport1-ads-preview .sport1-top-leaderboard::after {
	content: "banner1 leaderboard\A 970×250";
	white-space: pre;
	text-align: center;
	line-height: 1.4;
}

@media (max-width: 782px) {
	.sport1-article-page .site-main {
		padding-top: 16px;
	}

	.sport1-article-wrap {
		padding: 0 12px;
	}

	.sport1-article-header .entry-title {
		font-size: clamp(1.6rem, 7vw, 2rem);
	}

	.sport1-breadcrumb {
		font-size: 0.8rem;
		gap: 6px;
	}
}

/* overriding styles globally */

p {
	margin-block: 0;
}

table td,
table th {
	border: none;
	word-break: normal;
	padding: 0;
}

table {
	margin: 0;
	border-collapse: collapse;
}
