/* ==========================================================================
   ArcanePlayer — Shared card system
   Used everywhere a card/thumbnail grid appears: homepage genre sections,
   genre archive grids, and single-article related posts. Loaded
   unconditionally (like nav.css) so any template can use it.
   ========================================================================== */

/* ==========================================================================
   Section headers — heading + "VIEW ALL" link, used above any card grid
   ========================================================================== */

.sg-section {
	padding: 56px 6vw;
}

.sg-section__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 28px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--sg-color-border, #2A332A);
	max-width: 1280px;
	margin-left: auto;
	margin-right: auto;
}

.sg-section__title {
	font-family: var(--sg-font-display, 'Rajdhani', sans-serif);
	font-weight: 700;
	font-size: 28px;
	color: var(--sg-color-text-title, #FFFFFF);
	margin: 0;
}

.sg-section__viewall {
	font-family: var(--sg-font-display, 'Rajdhani', sans-serif);
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--sg-color-accent-start, #39FF14);
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}

.sg-section__viewall:hover,
.sg-section__viewall:focus-visible {
	opacity: 0.75;
}

/* ==========================================================================
   Signature clipped-corner card style — used for ALL content cards.
   Top-left and bottom-right corners are chamfered 45°, with a small
   "folded paper corner" triangle sitting in each notch.
   ========================================================================== */

.sg-card {
	position: relative;
	max-width: 1280px;
}

.sg-card::before,
.sg-card::after {
	content: "";
	position: absolute;
	width: var(--sg-card-notch-size, 24px);
	height: var(--sg-card-notch-size, 24px);
	background-color: var(--sg-color-card-notch, #1A231A);
	z-index: 0;
}

.sg-card::before {
	top: 0;
	left: 0;
	clip-path: polygon(0 0, 100% 0, 0 100%);
}

.sg-card::after {
	bottom: 0;
	right: 0;
	clip-path: polygon(100% 100%, 100% 0, 0 100%);
}

.sg-card__clip {
	position: relative;
	z-index: 1;
	background-color: var(--sg-color-card-bg, #121812);
	border: 1px solid var(--sg-color-border, #2A332A);
	clip-path: polygon(
		24px 0,
		100% 0,
		100% calc(100% - 24px),
		calc(100% - 24px) 100%,
		0 100%,
		0 24px
	);
	height: 100%;
	display: flex;
	flex-direction: column;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.sg-card:hover .sg-card__clip,
.sg-card:focus-within .sg-card__clip {
	border-color: var(--sg-color-accent-end, #00B140);
	transform: translateY(-3px);
}

.sg-card__thumb-link {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: #0d130d;
}

.sg-card__thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.sg-card:hover .sg-card__thumb {
	transform: scale(1.05);
}

/* Shown in place of <img> when no featured image has been uploaded yet —
   avoids a broken-image icon while keeping the same thumbnail footprint. */
.sg-card__thumb-placeholder {
	width: 100%;
	height: 100%;
	display: block;
	background: linear-gradient(135deg, #1A231A, #121812);
}

.sg-card__body {
	padding: 16px 18px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

/* Two-dash minimal category indicator */
.sg-card__dashes {
	display: flex;
	gap: 6px;
	margin-bottom: 10px;
}

.sg-card__dashes span {
	display: block;
	width: 14px;
	height: 2px;
	background-color: var(--sg-color-dash, #4A5A4A);
}

.sg-card__title {
	font-family: var(--sg-font-display, 'Rajdhani', sans-serif);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.3;
	color: var(--sg-color-text-title, #FFFFFF);
	margin: 0 0 10px;
}

.sg-card__title a {
	text-decoration: none;
	color: inherit;
}

.sg-card__title a:hover,
.sg-card__title a:focus-visible {
	color: var(--sg-color-accent-start, #39FF14);
}

.sg-card__excerpt {
	font-family: var(--sg-font-body, 'Manrope', sans-serif);
	font-size: 14px;
	line-height: 1.6;
	color: var(--sg-color-text-meta, #7C8A7C);
	margin: 0;
}

/* Compact variant used in smaller/denser grids */
.sg-card--compact .sg-card__body {
	padding: 14px 16px 16px;
}

.sg-card--compact .sg-card__title {
	font-size: 16px;
	margin-bottom: 6px;
}

.sg-card--compact .sg-card__excerpt {
	font-size: 13px;
}

/* Sidebar variant — thumbnail + title only (no excerpt, tighter body),
   used by the single-article sidebar's "Related in …" list. */
.sg-card--sidebar .sg-card__body {
	padding: 12px 14px 14px;
}

.sg-card--sidebar .sg-card__title {
	font-size: 14px;
	margin-bottom: 0;
	line-height: 1.35;
}

.sg-card--sidebar .sg-card__dashes {
	margin-bottom: 8px;
}

/* ==========================================================================
   Card grids
   ========================================================================== */

.sg-card-grid {
	display: grid;
	gap: 28px;
	max-width: 1280px;
	margin: 0 auto;
}

.sg-card-grid--3col {
	grid-template-columns: repeat(3, 1fr);
}

.sg-card-grid--compact {
	gap: 24px;
}

@media (max-width: 960px) {
	.sg-card-grid--3col {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.sg-card-grid--3col {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Video cards
   ========================================================================== */

.sg-video-card__thumb-wrap {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: #0d130d;
}

.sg-video-card__thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.sg-card:hover .sg-video-card__thumb {
	transform: scale(1.05);
}

/* Shown in place of <img> when no video thumbnail has been uploaded yet. */
.sg-video-card__thumb-placeholder {
	width: 100%;
	height: 100%;
	display: block;
	background: linear-gradient(135deg, #1A231A, #121812);
}

.sg-video-card__duration {
	position: absolute;
	bottom: 8px;
	left: 8px;
	background-color: rgba(0, 0, 0, 0.8);
	color: var(--sg-color-text-title, #FFFFFF);
	font-family: var(--sg-font-body, 'Manrope', sans-serif);
	font-size: 12px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 999px;
	line-height: 1.4;
	z-index: 2;
}

.sg-video-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.sg-video-card__play::after {
	content: "";
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 8px 0 8px 13px;
	border-color: transparent transparent transparent #0A0F0A;
	margin-left: 3px;
}

.sg-card:hover .sg-video-card__play {
	background-color: #fff;
	transform: translate(-50%, -50%) scale(1.08);
}

.sg-video-card__game {
	font-family: var(--sg-font-display, 'Rajdhani', sans-serif);
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--sg-color-accent-start, #39FF14);
	margin: 0 0 6px;
}

/* ==========================================================================
   Video carousel — horizontal scroll-snap, touch/trackpad swipe native
   ========================================================================== */

.sg-video-carousel {
	max-width: 1280px;
	margin: 0 auto;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	cursor: grab;
	scrollbar-width: thin;
	scrollbar-color: var(--sg-color-border, #2A332A) transparent;
}

.sg-video-carousel.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	scroll-behavior: auto;
}

.sg-video-carousel::-webkit-scrollbar {
	height: 6px;
}

.sg-video-carousel::-webkit-scrollbar-thumb {
	background-color: var(--sg-color-border, #2A332A);
}

.sg-video-carousel__track {
	display: flex;
	gap: 24px;
	padding-bottom: 8px;
	width: max-content;
}

.sg-video-carousel__item {
	flex: 0 0 auto;
	width: min(320px, 82vw);
	scroll-snap-align: start;
}

@media (max-width: 640px) {
	.sg-video-carousel__item {
		width: 78vw;
	}
}
