/*
Theme Name: D2 Horadric
Theme URI: https://d2horadric.com/
Author: D2 Horadric
Description: Custom catalog theme for Diablo II servers, mods and tools.
Version: 0.1.0
Requires at least: 6.7
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: d2-horadric
*/

:root {
	--d2h-bg: #090d12;
	--d2h-surface: #111821;
	--d2h-surface-2: #17212c;
	--d2h-line: #2b3744;
	--d2h-text: #e9edf2;
	--d2h-muted: #9aa8b7;
	--d2h-gold: #d6a84b;
	--d2h-orange: #f26a21;
	--d2h-red: #b7372f;
	--d2h-green: #51b87a;
	--d2h-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--d2h-bg);
	color: var(--d2h-text);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.65;
}
a { color: var(--d2h-gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #f2c96f; }
img { display: block; max-width: 100%; height: auto; }
button, input, select { font: inherit; }
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.d2h-container { width: min(calc(100% - 32px), var(--d2h-width)); margin-inline: auto; }

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(9, 13, 18, .94);
	border-bottom: 1px solid var(--d2h-line);
	backdrop-filter: blur(12px);
}
.admin-bar .site-header { top: 32px; }
.header-inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 28px;
	min-height: 74px;
}
.site-brand { color: #fff; text-decoration: none; font-family: Georgia, serif; font-size: 24px; font-weight: 700; letter-spacing: .02em; }
.site-brand span { color: var(--d2h-gold); }
.main-nav { display: flex; justify-content: center; gap: 8px; }
.main-nav a {
	color: var(--d2h-text);
	text-decoration: none;
	font-weight: 700;
	padding: 10px 14px;
	border-radius: 6px;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; background: var(--d2h-surface-2); }
.header-search { display: flex; width: 250px; }
.header-search input {
	min-width: 0;
	width: 100%;
	border: 1px solid var(--d2h-line);
	border-right: 0;
	border-radius: 6px 0 0 6px;
	background: var(--d2h-surface);
	color: #fff;
	padding: 9px 12px;
}
.header-search button {
	border: 1px solid var(--d2h-orange);
	border-radius: 0 6px 6px 0;
	background: var(--d2h-orange);
	color: #fff;
	cursor: pointer;
	padding: 9px 12px;
}

.site-main { min-height: 65vh; }
.hero {
	position: relative;
	overflow: hidden;
	padding: 92px 0;
	border-bottom: 1px solid var(--d2h-line);
	background:
		radial-gradient(circle at 80% 20%, rgba(183, 55, 47, .27), transparent 30%),
		radial-gradient(circle at 18% 80%, rgba(214, 168, 75, .13), transparent 28%),
		linear-gradient(135deg, #111821, #080b0f 65%);
}
.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
	background-size: 42px 42px;
	pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 760px; }
.eyebrow { color: var(--d2h-orange); font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero h1, .archive-hero h1, .resource-title { margin: 10px 0 16px; font-family: Georgia, serif; line-height: 1.12; color: #fff; }
.hero h1 { font-size: clamp(42px, 7vw, 72px); }
.hero p { max-width: 680px; color: #c6d0da; font-size: 19px; }
.button-row, .resource-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.d2h-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid var(--d2h-orange);
	border-radius: 6px;
	background: var(--d2h-orange);
	color: #fff;
	font-weight: 800;
	text-decoration: none;
	transition: transform .15s ease, background .15s ease;
}
.d2h-button:hover { color: #fff; background: #ff7b32; transform: translateY(-1px); }
.d2h-button.secondary { background: transparent; border-color: #566475; color: var(--d2h-text); }
.d2h-button.secondary:hover { background: var(--d2h-surface-2); }

.section { padding: 64px 0; }
.section-muted { background: #0d1219; border-block: 1px solid var(--d2h-line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head h2 { margin: 0; color: #fff; font-family: Georgia, serif; font-size: 32px; }
.section-head p { margin: 6px 0 0; color: var(--d2h-muted); }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.category-tile {
	position: relative;
	min-height: 210px;
	padding: 28px;
	border: 1px solid var(--d2h-line);
	border-radius: 10px;
	background: linear-gradient(150deg, var(--d2h-surface-2), var(--d2h-surface));
	color: var(--d2h-text);
	text-decoration: none;
}
.category-tile:hover { color: #fff; border-color: var(--d2h-gold); transform: translateY(-2px); }
.category-icon { font-family: Georgia, serif; color: var(--d2h-gold); font-size: 48px; line-height: 1; }
.category-tile h3 { margin: 38px 0 4px; color: #fff; font-size: 24px; }
.category-tile p { margin: 0; color: var(--d2h-muted); }

.resource-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.resource-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var(--d2h-line);
	border-radius: 9px;
	overflow: hidden;
	background: var(--d2h-surface);
}
.resource-card:hover { border-color: #596979; transform: translateY(-2px); }
.card-media { aspect-ratio: 16/10; background: #0c1117; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.resource-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	min-height: 220px;
	background:
		radial-gradient(circle at 68% 28%, rgba(242,106,33,.27), transparent 25%),
		radial-gradient(circle at 30% 72%, rgba(214,168,75,.18), transparent 24%),
		linear-gradient(145deg, #202b36, #0b1016 70%);
	color: var(--d2h-gold);
	font-family: Georgia, serif;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.card-media .resource-placeholder { min-height: 0; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.card-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--d2h-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.card-title { margin: 10px 0 8px; color: #fff; font-size: 18px; line-height: 1.3; }
.card-title a { color: inherit; text-decoration: none; }
.card-excerpt { margin: 0 0 18px; color: #b4bfca; font-size: 14px; }
.card-link { margin-top: auto; font-weight: 800; text-decoration: none; }

.archive-hero { padding: 54px 0; border-bottom: 1px solid var(--d2h-line); background: linear-gradient(135deg, #151e28, #090d12); }
.archive-hero h1 { font-size: clamp(38px, 5vw, 56px); }
.archive-hero p { max-width: 720px; color: var(--d2h-muted); font-size: 18px; }
.catalog-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 30px; align-items: start; }
.filter-panel { position: sticky; top: 100px; padding: 22px; border: 1px solid var(--d2h-line); border-radius: 9px; background: var(--d2h-surface); }
.filter-panel h2 { margin: 0 0 18px; font-size: 20px; }
.filter-group { margin-bottom: 16px; }
.filter-group label { display: block; margin-bottom: 6px; color: #c9d2dc; font-size: 13px; font-weight: 700; }
.filter-group select { width: 100%; padding: 9px 10px; border: 1px solid var(--d2h-line); border-radius: 5px; background: #0c1117; color: #fff; }
.filter-actions { display: grid; gap: 8px; }
.catalog-main .resource-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; color: var(--d2h-muted); }
.pagination { margin-top: 34px; }
.pagination .nav-links { display: flex; gap: 7px; flex-wrap: wrap; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 40px; min-height: 40px; padding: 4px 10px; border: 1px solid var(--d2h-line); border-radius: 5px; text-decoration: none; }
.pagination .current { border-color: var(--d2h-orange); background: var(--d2h-orange); color: #fff; }

.breadcrumbs { padding: 22px 0; color: var(--d2h-muted); font-size: 14px; }
.breadcrumbs a { color: #bdc8d3; text-decoration: none; }
.resource-header { padding: 26px 0 42px; border-bottom: 1px solid var(--d2h-line); }
.resource-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.resource-title { font-size: clamp(36px, 5vw, 58px); }
.resource-summary { max-width: 780px; margin: 0; color: #bdc7d1; font-size: 18px; }
.badge { display: inline-flex; padding: 6px 10px; border: 1px solid rgba(214,168,75,.55); border-radius: 999px; background: rgba(214,168,75,.1); color: #f1c86d; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.rating-block { flex: 0 0 auto; min-width: 132px; padding: 16px 18px; border: 1px solid var(--d2h-line); border-radius: 8px; background: var(--d2h-surface); text-align: center; }
.rating-number { display: block; color: var(--d2h-gold); font-family: Georgia, serif; font-size: 34px; font-weight: 700; line-height: 1; }
.rating-label { color: var(--d2h-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.resource-overview { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 34px; align-items: stretch; }
.resource-media { min-height: 380px; overflow: hidden; border: 1px solid var(--d2h-line); border-radius: 10px; background: var(--d2h-surface); }
.resource-media img { width: 100%; height: 100%; min-height: 380px; object-fit: cover; }
.details-panel { padding: 26px; border: 1px solid var(--d2h-line); border-radius: 10px; background: var(--d2h-surface); }
.details-panel h2 { margin: 0 0 18px; font-family: Georgia, serif; font-size: 26px; }
.details-list { margin: 0; }
.detail-row { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr); gap: 18px; padding: 12px 0; border-top: 1px solid var(--d2h-line); }
.detail-row:first-child { border-top: 0; }
.detail-row dt { color: var(--d2h-muted); }
.detail-row dd { margin: 0; color: #fff; font-weight: 700; overflow-wrap: anywhere; }
.status-active, .status-maintained { color: var(--d2h-green); }
.resource-actions { padding-top: 20px; border-top: 1px solid var(--d2h-line); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag-chip { padding: 5px 10px; border-radius: 999px; background: var(--d2h-surface-2); color: #c8d2dc; font-size: 13px; }
.resource-content { max-width: 850px; margin-inline: auto; }
.resource-content h2 { color: #fff; font-family: Georgia, serif; font-size: 32px; }
.resource-content p { color: #c4ced8; font-size: 17px; }
.empty-state { padding: 48px; border: 1px dashed var(--d2h-line); border-radius: 9px; color: var(--d2h-muted); text-align: center; }

.site-footer { padding: 52px 0 24px; border-top: 1px solid var(--d2h-line); background: #070a0e; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 38px; }
.footer-grid h2, .footer-grid h3 { margin-top: 0; color: #fff; }
.footer-grid p, .footer-grid li { color: var(--d2h-muted); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 7px 0; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid #202832; color: #7f8b98; font-size: 13px; }

@media (max-width: 980px) {
	.header-inner { grid-template-columns: auto 1fr; }
	.header-search { display: none; }
	.main-nav { justify-content: flex-end; }
	.resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.catalog-layout { grid-template-columns: 1fr; }
	.filter-panel { position: static; }
	.catalog-main .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.resource-overview { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
	.admin-bar .site-header { top: 46px; }
	.header-inner { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-block: 12px; }
	.site-brand { margin-right: auto; }
	.main-nav { order: 2; width: 100%; justify-content: flex-start; overflow-x: auto; }
	.main-nav a { padding: 8px 10px; white-space: nowrap; }
	.hero { padding: 66px 0; }
	.category-grid, .resource-grid, .catalog-main .resource-grid, .footer-grid { grid-template-columns: 1fr; }
	.resource-heading-row { display: block; }
	.rating-block { display: inline-block; margin-top: 22px; }
	.detail-row { grid-template-columns: 1fr; gap: 3px; }
	.section { padding: 46px 0; }
}

