/*
Theme Name: GDH Hub
Theme URI: https://gamersdiscussionhub.com
Author: Gamers Discussion Hub
Author URI: https://gamersdiscussionhub.com
Description: Crisp, high-contrast editorial magazine block theme for gaming, PC hardware, and anime publications. Built for Core Web Vitals, typographic hierarchy, and long-form readability.
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
Version: 1.2.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gdh-hub
Tags: full-site-editing, block-patterns, blog, news, light, dark, editorial
*/

/* Aspect-ratio stability (prevents CLS) */
.gdh-thumb-16x9 .wp-block-post-featured-image,
.gdh-lead-card .wp-block-post-featured-image {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--wp--preset--color--surface-alt);
}

.gdh-thumb-16x9 .wp-block-post-featured-image img,
.gdh-lead-card .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity 0.15s ease;
}

.gdh-thumb-16x9 .wp-block-post-featured-image a:hover img,
.gdh-lead-card .wp-block-post-featured-image a:hover img {
	opacity: 0.9;
}

/* Editorial kicker links */
.gdh-kicker a {
	color: var(--wp--preset--color--primary) !important;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	font-size: 0.75rem;
}

.gdh-kicker a:hover {
	text-decoration: underline;
}

/* Clean headline links */
.wp-block-post-title a {
	text-decoration: none;
	color: inherit;
	transition: color 0.15s ease;
}

.wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary) !important;
}

/* Hairline list stack */
.gdh-headline-stack .wp-block-post {
	padding-bottom: 0.9rem;
	margin-bottom: 0.9rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.gdh-headline-stack .wp-block-post:last-child {
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 0;
}

/* Sticky desktop sidebar on single posts */
@media (min-width: 782px) {
	.gdh-sidebar-sticky {
		position: sticky;
		top: 1.5rem;
	}
}

.gdh-sidebar-cats ul {
	list-style: none;
	padding-left: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.gdh-sidebar-cats li a {
	display: inline-block;
	padding: 0.25rem 0.65rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--wp--preset--color--contrast) !important;
	text-decoration: none;
	background: var(--wp--preset--color--base);
}

.gdh-sidebar-cats li a:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary) !important;
}

/* Long-form article readability */
.entry-content {
	font-size: 1.0625rem;
	line-height: 1.75;
}

.entry-content p {
	margin-bottom: 1.35rem;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 2.25rem;
	margin-bottom: 0.85rem;
}

.entry-content img {
	border-radius: 6px;
	height: auto;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--border);
	text-align: left;
}

.entry-content th {
	background: var(--wp--preset--color--surface-alt);
	font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* Gentle, high-viewability Ad Inserter / AdSense framing + CLS protection */
.code-block {
	min-height: 270px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 1.75rem auto !important;
	padding: 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	background-color: var(--wp--preset--color--surface-alt) !important;
	contain: layout;
	overflow: hidden;
}

.code-block-label {
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--muted);
	margin-bottom: 0.45rem;
	user-select: none;
}

.code-block ins.adsbygoogle {
	display: block;
	width: 100%;
	min-height: 250px;
}

/* Collapse unfilled AdSense slots so readers never see empty boxes */
.code-block:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
	display: none !important;
	min-height: 0 !important;
}
