/*
Theme Name: Arcane Haven
Theme URI: http://thesweetsixties.com/
Author: ARCANE HAVEN
Description: Dark fantasy gaming-news theme for ARCANE HAVEN — hero slider, latest news grid, popular posts, live clock, newsletter and fully responsive layout.
Version: 1.0.3
Requires at least: 5.9
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: arcane-haven
Tags: dark, news, blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===================== Tokens ===================== */
:root {
	--bg: #060a22;
	--bg-2: #080d2a;
	--panel: #0c1238;
	--panel-2: #0a0f30;
	--line: rgba(118, 128, 255, .2);
	--line-2: rgba(130, 140, 255, .32);
	--text: #eef0ff;
	--muted: #b3b8dc;
	--dim: #8a90bd;
	--violet: #7c5cff;
	--violet-2: #a993ff;
	--blue: #5a78ff;
	--sky: #8fb4ff;
	--teal: #2fbfd2;
	--glow: 0 0 18px rgba(110, 90, 255, .55);
	--radius: 10px;
	--container: 1280px;
	--gutter: 24px;
	--f-display: "Cinzel", "Trajan Pro", Georgia, serif;
	--f-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--f-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--header-h: 76px;
}

/* ===================== Base ===================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background:
		radial-gradient(1200px 600px at 85% 40%, rgba(90, 60, 220, .10), transparent 60%),
		radial-gradient(900px 500px at 10% 80%, rgba(40, 70, 220, .08), transparent 60%),
		var(--bg);
	color: var(--text);
	font-family: var(--f-sans);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--violet-2); text-decoration: none; transition: color .2s ease; }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: middle; flex: none; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important;
	width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff; color: #000; clip: auto !important; clip-path: none; display: block;
	height: auto; left: 8px; top: 8px; padding: 12px 18px; width: auto; z-index: 100000; font-weight: 600;
}

/* ===================== Buttons ===================== */
.btn {
	display: inline-flex; align-items: center; gap: 14px;
	padding: 12px 22px;
	border: 1.5px solid #6f7dff;
	border-radius: 10px;
	background: linear-gradient(180deg, rgba(48, 36, 140, .55), rgba(20, 18, 80, .55));
	box-shadow: var(--glow), inset 0 0 12px rgba(120, 110, 255, .25);
	color: #fff;
	font-family: var(--f-sans);
	font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn .icon { width: 20px; height: 10px; }
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 0 26px rgba(120, 100, 255, .8), inset 0 0 14px rgba(140, 120, 255, .35); background: linear-gradient(180deg, rgba(70, 52, 190, .7), rgba(30, 24, 110, .7)); }
.btn--sm { padding: 0 14px; height: 34px; gap: 8px; font-size: 10.5px; border-radius: 6px; letter-spacing: .1em; }
.btn--sm .icon { width: 16px; height: 8px; }

.icon-btn {
	width: 40px; height: 40px; display: inline-grid; place-items: center;
	border-radius: 50%; border: 1px solid rgba(200, 205, 255, .3);
	background: rgba(12, 18, 56, .5); color: #fff; cursor: pointer;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.icon-btn .icon { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--violet-2); box-shadow: var(--glow); }

/* ===================== Top bar ===================== */
.topbar { background: #050920; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 30px; }
.topbar__left { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar__left span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__left .icon { color: var(--sky); width: 12px; height: 12px; }
.topbar__right { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #9db4ff; box-shadow: 0 0 8px #7f9bff; animation: pulse 2s infinite; }
.topbar__sep { opacity: .45; margin: 0 6px; }
@keyframes pulse { 50% { opacity: .35; } }

/* ===================== Header ===================== */
.site-header {
	position: sticky; top: 0; z-index: 900;
	background: linear-gradient(180deg, rgba(8, 12, 40, .97), rgba(6, 10, 34, .94));
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.header__inner { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.site-title { margin: 0; font-size: inherit; font-weight: inherit; line-height: 1; flex: none; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { color: #fff; }
.brand__logo { width: 70px; height: 70px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(120, 110, 255, .55)); margin: -6px 0 -6px -8px; }
.brand__text { font-family: var(--f-display); font-weight: 600; font-size: 37px; letter-spacing: .01em; line-height: 1; display: inline-flex; align-items: center; white-space: nowrap; }
.brand__a { background: linear-gradient(180deg, #ffffff 0%, #dfe3ff 55%, #aab4ef 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__b { background: linear-gradient(180deg, #e3e8ff 0%, #a9b8ff 50%, #7f93ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__star { width: 9px; height: 9px; margin: 0 3px; color: #b9c6ff; filter: drop-shadow(0 0 4px #8ea0ff); transform: translateY(-2px); }
.brand--sm .brand__logo { width: 50px; height: 50px; margin: -4px 0 -4px -4px; }
.brand--sm .brand__text { font-size: 25px; }

/* Primary nav */
.primary-nav { margin-left: auto; }
.primary-nav__head { display: none; }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 46px; }
.nav-menu > li { position: relative; }
.nav-menu a {
	display: block; position: relative;
	padding: 28px 2px;
	color: #e3e6ff; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.nav-menu > li > a::after {
	content: ""; position: absolute; left: -6px; right: -6px; bottom: 18px; height: 2px; border-radius: 2px;
	background: linear-gradient(90deg, transparent, #8f7bff 20%, #6f8cff 80%, transparent);
	box-shadow: 0 0 10px rgba(130, 110, 255, .9);
	transform: scaleX(0); transition: transform .25s ease;
}
.nav-menu > li > a:hover::after,
.nav-menu > .current-menu-item > a::after,
.nav-menu > .current-menu-ancestor > a::after,
.nav-menu > .current-category-ancestor > a::after,
.nav-menu > .current-post-ancestor > a::after { transform: scaleX(1); }
.nav-menu > .current-menu-item > a, .nav-menu > .current-menu-ancestor > a, .nav-menu a:hover { color: #fff; }

.nav-menu .sub-menu {
	list-style: none; margin: 0; padding: 8px 0; position: absolute; top: 100%; left: -14px; min-width: 220px;
	background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s ease; z-index: 10;
}
.nav-menu li:hover > .sub-menu, .nav-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav-menu .sub-menu a { padding: 10px 16px; font-size: 12px; }
.nav-menu .sub-menu a:hover { background: rgba(124, 92, 255, .14); }
.submenu-toggle { display: none; }

.header__actions { display: flex; align-items: center; gap: 10px; margin-left: 18px; }
.nav-toggle { display: none; }

.search-panel { border-top: 1px solid var(--line); background: rgba(6, 10, 34, .98); padding: 14px 0; }
.search-panel[hidden] { display: none; }

/* Search form */
.search-form { display: flex; align-items: center; max-width: 640px; margin: 0 auto; position: relative; }
.search-field {
	width: 100%; height: 46px; padding: 0 52px 0 18px;
	background: rgba(5, 8, 30, .85); border: 1px solid var(--line-2); border-radius: 10px; color: #fff; outline: none;
	-webkit-appearance: none; appearance: none;
}
.search-field:focus { border-color: var(--violet-2); box-shadow: var(--glow); }
.search-field::placeholder { color: var(--dim); }
.search-submit { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: rgba(124, 92, 255, .25); color: #fff; display: grid; place-items: center; cursor: pointer; }
.search-submit .icon { width: 17px; height: 17px; }

/* ===================== Hero ===================== */
.hero {
	position: relative; overflow: hidden;
	height: clamp(400px, 23vw, 540px);
	border-bottom: 1px solid var(--line);
	background: #070b26;
}
.hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.hero__slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; transform: scale(1.02); transition: transform 7s ease; }
.hero__slide.is-active .hero__img { transform: scale(1.06); }
.hero__slide::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background:
		linear-gradient(90deg, rgba(5, 8, 30, .92) 0%, rgba(5, 8, 30, .72) 26%, rgba(5, 8, 30, .18) 50%, rgba(5, 8, 30, 0) 70%),
		linear-gradient(0deg, rgba(6, 10, 34, .85) 0%, rgba(6, 10, 34, 0) 28%);
}
.hero__inner { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; }
.hero__content { position: relative; max-width: 470px; padding-left: 64px; }
.hero__content::before {
	content: ""; position: absolute; left: 42px; top: 8px; bottom: -14px; width: 1px;
	background: linear-gradient(180deg, rgba(160, 180, 255, .9), rgba(120, 130, 255, .35) 60%, transparent);
}
.hero__label { margin: 0 0 6px; display: flex; align-items: center; gap: 12px; color: var(--sky); font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; position: relative; }
.hero__label span::after { content: ""; display: inline-block; vertical-align: middle; width: 86px; height: 1px; margin-left: 14px; background: linear-gradient(90deg, rgba(143, 180, 255, .8), transparent); }
.hero__content .hero__label-star { position: absolute; left: -29px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: #c6d3ff; filter: drop-shadow(0 0 6px #7f9bff); }
.hero__title { font-family: var(--f-serif); font-weight: 700; font-size: clamp(44px, 5.1vw, 76px); line-height: .9; letter-spacing: -.005em; margin: 0 0 16px; max-width: 420px; }
.hero__title a { color: #f4f5ff; background: linear-gradient(180deg, #fff, #dfe2ff 70%, #c4caf3); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 2px 30px rgba(0, 0, 20, .35); }
.hero__title a:hover { filter: brightness(1.1); }
.hero__text { font-size: 15.5px; line-height: 1.42; color: #eceeff; max-width: 400px; margin: 0 0 22px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.hero__words {
	position: absolute; z-index: 3; top: 12%; right: max(var(--gutter), calc((100vw - var(--container)) / 2 + 30px));
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	font-family: var(--f-display); font-size: 11.5px; letter-spacing: .38em; color: #c3ccff; text-transform: uppercase;
	text-shadow: 0 0 10px rgba(80, 100, 255, .6); pointer-events: none;
}
.hero__words-line { display: block; position: relative; width: 100px; height: 16px; margin-top: 10px; color: #b5c4ff; font-style: normal; }
.hero__words-line::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, rgba(170, 185, 255, .8), transparent); }
.hero__words-line .icon { position: absolute; left: 50%; top: 0; width: 16px; height: 16px; margin-left: -8px; filter: drop-shadow(0 0 6px #8ea0ff); }

.hero__dots { position: absolute; z-index: 4; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; }
.hero__dot { width: 14px; height: 6px; padding: 0; border: 0; border-radius: 4px; background: rgba(200, 205, 255, .28); cursor: pointer; transition: width .3s ease, background .3s ease; }
.hero__dot.is-active { width: 44px; background: #fff; box-shadow: 0 0 10px rgba(160, 170, 255, .8); }

/* ===================== Layout ===================== */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 355px; gap: 26px; padding-top: 22px; padding-bottom: 22px; align-items: start; }
.layout__main { min-width: 0; }

.section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.section-title { display: flex; align-items: center; gap: 12px; margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: .1em; text-transform: uppercase; color: #f1f2ff; white-space: nowrap; }
.section-title__icon { width: 30px; height: 30px; filter: drop-shadow(0 0 8px rgba(120, 120, 255, .9)); }
.section-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(130, 140, 255, .45), rgba(130, 140, 255, .1)); }
.section-link { display: inline-flex; align-items: center; gap: 10px; font-size: 11.5px; color: #d6daf7; white-space: nowrap; }
.section-link .icon { width: 16px; height: 9px; }
.section-link:hover { color: #fff; }

/* News grid & cards */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
	position: relative; display: flex; flex-direction: column;
	background: linear-gradient(180deg, #0e1442 0%, #0a0f31 100%);
	border: 1px solid rgba(120, 130, 255, .3); border-radius: 8px; overflow: hidden;
	transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(150, 130, 255, .7); box-shadow: 0 10px 30px rgba(20, 10, 80, .5), 0 0 18px rgba(110, 90, 255, .25); }
.card__media { position: relative; display: block; aspect-ratio: 290 / 106; overflow: hidden; background: #0b1035; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 13px 12px 12px; }
.card__title { font-family: var(--f-serif); font-weight: 700; font-size: 21px; line-height: 1.04; margin: 0 0 7px; color: #fff; }
.card__title a { color: #fff; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__title a:hover { color: #e3e0ff; }
.card__excerpt { font-size: 12.8px; line-height: 1.38; color: var(--muted); margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 11.3px; color: #c3c7e6; }
.card__meta .dot { font-size: 9px; opacity: .8; }

.badge {
	position: absolute; z-index: 2; top: 9px; left: 10px;
	display: inline-block; padding: 3px 9px; border-radius: 4px;
	font-family: var(--f-sans); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.35; color: #fff;
	background: rgba(36, 22, 130, .88); border: 1px solid #806aff; box-shadow: 0 0 10px rgba(110, 90, 255, .45);
}
.badge:hover { color: #fff; filter: brightness(1.15); }
.badge--teal { background: rgba(6, 56, 78, .9); border-color: #37c6d8; box-shadow: 0 0 10px rgba(47, 191, 210, .35); }
.badge--indigo { background: rgba(22, 30, 120, .9); border-color: #6f86ff; }

/* Category tiles (empty state) */
.news-grid--cats { margin-top: 18px; }
.card--cat .card__title { font-size: 22px; }
.card--cat .card__meta { font-size: 11.5px; }

.empty { text-align: center; padding: 34px 22px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: rgba(12, 18, 56, .45); }
.empty__title { font-family: var(--f-serif); font-size: 26px; font-weight: 700; margin: 0 0 4px; color: #fff; }
.empty__text { color: var(--muted); margin-bottom: 16px; }

/* ===================== Sidebar ===================== */
.sidebar { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.box {
	background: linear-gradient(180deg, rgba(14, 20, 62, .96), rgba(10, 15, 48, .96));
	border: 1px solid var(--line-2); border-radius: var(--radius);
	padding: 16px 18px;
}
.box__title { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-family: var(--f-display); font-weight: 600; font-size: 15.5px; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.box__title .icon { width: 20px; height: 20px; }
.box__empty { color: var(--muted); font-size: 13px; margin: 0; }

.popular__list { list-style: none; margin: 0; padding: 0; }
.popular__item { display: grid; grid-template-columns: 28px 80px minmax(0, 1fr); align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(120, 130, 255, .14); }
.popular__item:last-child { border-bottom: 0; padding-bottom: 0; }
.popular__num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid #4d6bff; color: #b8c8ff; font-size: 13px; font-weight: 600; box-shadow: 0 0 8px rgba(77, 107, 255, .4), inset 0 0 6px rgba(77, 107, 255, .3); }
.popular__thumb { display: block; width: 80px; height: 50px; border-radius: 4px; overflow: hidden; border: 1px solid rgba(120, 130, 255, .25); }
.popular__thumb img { width: 100%; height: 100%; object-fit: cover; }
.popular__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.popular__title { font-size: 12px; line-height: 1.3; color: #eceeff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.popular__title:hover { color: var(--violet-2); }
.popular__reads { font-size: 11px; color: var(--dim); }

.clock {
	position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 14px 18px;
	background:
		radial-gradient(circle at 84% 50%, rgba(80, 110, 255, .08) 0 34px, transparent 35px),
		radial-gradient(circle at 84% 50%, transparent 0 52px, rgba(80, 110, 255, .12) 53px 54px, transparent 55px),
		radial-gradient(circle at 84% 50%, transparent 0 70px, rgba(80, 110, 255, .08) 71px 72px, transparent 73px),
		linear-gradient(180deg, rgba(14, 22, 72, .96), rgba(10, 15, 50, .96));
}
.clock__icon { width: 40px; height: 40px; display: grid; place-items: center; color: #6c95ff; flex: none; filter: drop-shadow(0 0 6px rgba(90, 130, 255, .8)); }
.clock__icon .icon { width: 36px; height: 36px; }
.clock__text { display: flex; flex-direction: column; min-width: 0; }
.clock__time { font-family: var(--f-serif); font-weight: 700; font-size: 29px; line-height: 1; color: #fff; letter-spacing: .01em; }
.clock__date { font-size: 13px; color: #d5d9f5; margin-top: 4px; white-space: nowrap; }
.clock__loc { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 13px; color: #dfe4ff; position: relative; }
.clock__loc .icon { width: 13px; height: 13px; color: #59c9ff; }

.newsletter { position: relative; overflow: hidden; }
.newsletter::before {
	content: ""; position: absolute; inset: 0; z-index: 0;
	background-image: var(--nl-bg); background-size: auto 270%; background-position: 61% 72%; background-repeat: no-repeat;
	-webkit-mask-image: linear-gradient(90deg, transparent 40%, #000 85%); mask-image: linear-gradient(90deg, transparent 40%, #000 85%);
	opacity: .75;
}
.newsletter > * { position: relative; z-index: 1; }
.newsletter__head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.newsletter__icon { color: #8ea6ff; flex: none; padding-top: 2px; }
.newsletter__icon .icon { width: 30px; height: 30px; }
.newsletter__title { font-family: var(--f-serif); font-weight: 700; font-size: 19px; margin: 0 0 2px; color: #fff; }
.newsletter__text { font-size: 10.8px; color: var(--muted); margin: 0; max-width: 220px; line-height: 1.4; }
.newsletter__form { display: flex; gap: 8px; }
.newsletter__form input[type="email"] {
	flex: 1; min-width: 0; height: 34px; padding: 0 12px; border-radius: 6px;
	background: rgba(5, 8, 30, .85); border: 1px solid rgba(160, 170, 255, .4); color: #fff; font-size: 12px; outline: none;
}
.newsletter__form input[type="email"]:focus { border-color: var(--violet-2); box-shadow: var(--glow); }
.newsletter__form input::placeholder { color: var(--dim); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.newsletter__msg { margin: 8px 0 0; font-size: 12px; color: #9ff0c9; }
.newsletter__msg--invalid { color: #ff9fae; }

.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 6px 0; border-bottom: 1px solid rgba(120, 130, 255, .12); font-size: 13px; }
.sidebar .widget li:last-child { border-bottom: 0; }

/* ===================== Footer ===================== */
.site-footer { position: relative; overflow: hidden; margin-top: 10px; background: #060a22; border-top: 1px solid var(--line); }
.site-footer__art {
	position: absolute; top: 0; right: 0; bottom: 0; width: 34%; z-index: 0;
	background-size: cover; background-position: 62% 35%;
	-webkit-mask-image: linear-gradient(90deg, transparent, rgba(0, 0, 0, .9) 60%); mask-image: linear-gradient(90deg, transparent, rgba(0, 0, 0, .9) 60%);
	opacity: .7;
}
.footer__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 300px 1fr minmax(260px, 340px); gap: 48px; padding-top: 16px; padding-bottom: 14px; }
.footer__brand p { font-size: 11.3px; line-height: 1.45; color: #cfd3f1; margin: 8px 0 0 0; max-width: 290px; }
.footer__title { font-family: var(--f-serif); font-weight: 700; font-size: 15px; margin: 6px 0 8px; color: #fff; }
.footer__links { padding-left: 16px; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { margin: 0; }
.footer-menu a { font-size: 11.3px; line-height: 1.6; color: #d5d8f4; }
.footer-menu a:hover { color: #fff; }
.footer__social { border-left: 1px solid var(--line); padding-left: 40px; }
.footer__social p { font-size: 11.3px; color: #cfd3f1; margin: 10px 0 0; text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
.footer__social .social { text-shadow: none; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .8)); }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; align-items: center; }
.social a, .social span { display: grid; place-items: center; color: #eef0ff; }
.social a:hover { color: var(--violet-2); filter: drop-shadow(0 0 6px rgba(130, 110, 255, .8)); }
.social .icon { width: 18px; height: 18px; }

.footer__bottom { position: relative; z-index: 1; border-top: 1px solid var(--line); background: rgba(5, 8, 28, .85); }
.footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; padding-top: 8px; padding-bottom: 8px; }
.copyright { margin: 0; font-size: 11px; color: #c9cdea; }
.legal-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.legal-menu li + li::before { content: "|"; margin: 0 14px; color: var(--dim); }
.legal-menu a { font-size: 11px; color: #c9cdea; }
.legal-menu a:hover { color: #fff; }

/* ===================== Archive / page hero ===================== */
.page-hero { position: relative; overflow: hidden; padding: 46px 0 40px; border-bottom: 1px solid var(--line); background: #070b26; }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--ph-bg); background-size: cover; background-position: 62% 40%; opacity: .55; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 8, 30, .95) 0%, rgba(5, 8, 30, .7) 45%, rgba(5, 8, 30, .3) 100%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero .hero__label { padding-left: 26px; }
.page-hero .hero__label-star { position: absolute; left: 0; width: 14px; height: 14px; color: #c6d3ff; }
.page-hero__title { font-family: var(--f-serif); font-size: clamp(34px, 4vw, 54px); line-height: 1; margin: 6px 0 8px; color: #fff; }
.page-hero__desc { color: var(--muted); max-width: 640px; }
.page-hero__desc p:last-child { margin: 0; }
.page-hero--404 { padding: 90px 0; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 22px; }
.page-hero__actions .search-form { margin: 0; flex: 1 1 320px; max-width: 460px; }

/* Pagination */
.pagination { margin-top: 26px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { min-width: 40px; height: 40px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: #dfe2ff; font-size: 13px; font-weight: 600; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { border-color: #7f6bff; color: #fff; box-shadow: var(--glow); background: rgba(60, 40, 170, .5); }

/* ===================== Single ===================== */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--dim); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span[aria-current] { color: #d9dcf6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.entry { padding: 26px 30px 30px; }
.entry__header { margin-bottom: 18px; }
.entry__header .badge { position: static; display: inline-block; margin-bottom: 12px; }
.entry__title { font-family: var(--f-serif); font-size: clamp(32px, 3.6vw, 48px); line-height: 1.02; color: #fff; margin: 0 0 14px; }
.entry__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12.5px; color: var(--muted); }
.entry__meta span { display: inline-flex; align-items: center; gap: 6px; }
.entry__meta .icon { width: 14px; height: 14px; color: var(--sky); }
.entry__meta a { color: #e3e6ff; }
.entry__thumb { margin: 0 0 22px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.entry__thumb img { width: 100%; }
.entry__thumb figcaption { font-size: 12px; color: var(--dim); padding: 8px 12px; background: var(--panel-2); }

.entry-content { font-size: 16.5px; line-height: 1.78; color: #dfe2fb; overflow-wrap: break-word; }
.entry-content > * { margin-top: 0; margin-bottom: 1.15em; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: var(--f-serif); color: #fff; margin-top: 1.5em; margin-bottom: .55em; }
.entry-content h2 { font-size: 32px; }
.entry-content h3 { font-size: 26px; }
.entry-content h4 { font-size: 21px; }
.entry-content a { color: var(--violet-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content a:hover { color: #fff; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .35em; }
.entry-content blockquote, .wp-block-quote { margin: 1.5em 0; padding: 14px 22px; border-left: 3px solid var(--violet); background: rgba(124, 92, 255, .08); border-radius: 0 8px 8px 0; font-family: var(--f-serif); font-size: 21px; line-height: 1.45; color: #fff; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content cite { display: block; font-family: var(--f-sans); font-size: 13px; color: var(--dim); font-style: normal; margin-top: 6px; }
.entry-content img, .entry-content figure img { border-radius: 8px; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption, .wp-caption-text, .wp-element-caption { font-size: 13px; color: var(--dim); text-align: center; margin-top: 6px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 14.5px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line-2); padding: 9px 12px; text-align: left; }
.entry-content th { background: rgba(124, 92, 255, .14); color: #fff; }
.entry-content pre { background: #050820; border: 1px solid var(--line); border-radius: 8px; padding: 16px; overflow-x: auto; font-size: 14px; }
.entry-content code { background: rgba(124, 92, 255, .15); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; height: 1px; background: var(--line-2); margin: 2em 0; }
.entry-content iframe, .entry-content embed, .entry-content video { max-width: 100%; }
.entry-content .wp-block-button__link { background: linear-gradient(180deg, #5b3ff0, #3a26b8); border-radius: 8px; color: #fff; text-decoration: none; }
.entry__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.entry__tags a { font-size: 12px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line-2); color: #dfe2ff; }
.entry__tags a:hover { border-color: var(--violet-2); color: #fff; }
.page-links { margin-top: 20px; display: flex; gap: 8px; align-items: center; }

.post-navigation { margin: 18px 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-navigation a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2); color: #fff; }
.post-navigation a:hover { border-color: var(--violet-2); box-shadow: var(--glow); }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.post-navigation .nav-sub { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sky); margin-bottom: 4px; }
.post-navigation .nav-title { font-family: var(--f-serif); font-size: 18px; font-weight: 700; line-height: 1.15; }
.related { margin: 26px 0; }

/* Comments */
.comments { margin-top: 22px; padding: 24px 26px; }
.comments__title, .comment-reply-title { font-family: var(--f-serif); font-size: 26px; color: #fff; margin-bottom: 14px; }
.comment-list { list-style: none; margin: 0 0 20px; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: #dfe2fb; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 12px; margin: 4px 0 8px; }
.comment-metadata a { color: var(--dim); }
.reply a { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.comment-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(5, 8, 30, .85); color: #fff; outline: none;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--violet-2); box-shadow: var(--glow); }
.comment-form .comment-form-cookies-consent label { display: inline; }

/* WP core alignment helpers */
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }
.wp-caption { max-width: 100%; }
.sticky, .bypostauthor, .gallery-caption { }
.nav-open .site-header { z-index: 1001; }
.nav-backdrop { position: fixed; inset: 0; background: rgba(2, 4, 16, .65); z-index: 950; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.nav-backdrop[hidden] { display: none; }

/* ===================== Responsive ===================== */
@media (max-width: 1279px) {
	.clock { gap: 12px; padding: 14px 14px; }
	.clock__time { font-size: 26px; }
	.clock__date { font-size: 12px; }
	.nav-menu { gap: 30px; }
	.brand__text { font-size: 32px; }
	.brand__logo { width: 62px; height: 62px; }
	.layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; }
	.card__title { font-size: 19.5px; }
	.footer__inner { grid-template-columns: 280px 1fr 300px; gap: 32px; }
}

@media (max-width: 1080px) {
	.header__inner { gap: 16px; }
	.nav-toggle { display: inline-grid; }
	.header__actions { margin-left: auto; }
	.primary-nav {
		position: fixed; top: 0; right: 0; bottom: 0; z-index: 1000;
		width: min(340px, 86vw); height: 100vh; height: 100dvh; overflow-y: auto;
		margin: 0; padding: 18px 22px 30px;
		background: linear-gradient(180deg, #0c1238, #070b26);
		border-left: 1px solid var(--line-2);
		box-shadow: -20px 0 50px rgba(0, 0, 0, .55);
		transform: translateX(105%); visibility: hidden;
		transition: transform .3s ease, visibility .3s;
	}
	.admin-bar .primary-nav { top: 46px; }
	.nav-open .primary-nav { transform: none; visibility: visible; }
	.nav-open { overflow: hidden; }
	.primary-nav__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
	.primary-nav__head .brand__logo { width: 40px; height: 40px; margin: 0; }
	.primary-nav__head .brand__text { font-size: 19px; }
	.primary-nav__head .nav-close { flex: none; }
	.nav-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.nav-menu > li { border-bottom: 1px solid rgba(120, 130, 255, .12); display: flex; flex-wrap: wrap; align-items: center; }
	.nav-menu > li > a { flex: 1; padding: 15px 4px; font-size: 13px; }
	.nav-menu > li > a::after { left: 0; right: auto; width: 34px; bottom: 8px; }
	.nav-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; display: none; width: 100%; min-width: 0; margin: 0 0 10px; box-shadow: none; background: rgba(5, 8, 30, .6); }
	.nav-menu .is-open > .sub-menu { display: block; }
	.submenu-toggle { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: transparent; color: #fff; cursor: pointer; font-size: 18px; }
	.is-open > .submenu-toggle span { display: inline-block; transform: rotate(45deg); }

	.hero__content { max-width: 440px; }
	.hero__words { display: none; }
	.layout { grid-template-columns: 1fr; }
	.sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
	.sidebar .popular { grid-column: 1 / -1; }
	.popular__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px; }
	.popular__item:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid rgba(120, 130, 255, .14); }
	.footer__inner { grid-template-columns: 1fr 1fr; gap: 24px 32px; }
	.footer__social { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
	.footer__links { padding-left: 0; }
	.site-footer__art { width: 55%; opacity: .45; }
}

@media (max-width: 820px) {
	.topbar__motto, .topbar__sep { display: none; }
	.news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hero__words { display: none; }
	.hero { height: auto; min-height: 440px; }
	.hero__slide { display: flex; }
	.hero__inner { padding-top: 40px; padding-bottom: 60px; }
	.hero__slide::after { background: linear-gradient(90deg, rgba(5, 8, 30, .9), rgba(5, 8, 30, .45) 75%, rgba(5, 8, 30, .2)), linear-gradient(0deg, rgba(6, 10, 34, .9), transparent 40%); }
	.hero__img { object-position: 66% 50%; }
}

@media (max-width: 640px) {
	:root { --gutter: 16px; --header-h: 64px; }
	body { font-size: 14.5px; }
	.topbar__inner { min-height: 28px; font-size: 11px; }
	.topbar__left { display: none; }
	.topbar__right { margin: 0 auto; }
	.brand__logo { width: 48px; height: 48px; margin: -2px 0 -2px -4px; }
	.brand__text { font-size: 22px; }
	.brand__star { width: 6px; height: 6px; margin: 0 2px; }
	.header__actions { gap: 8px; margin-left: auto; }
	.icon-btn { width: 38px; height: 38px; }

	.hero { min-height: 470px; }
	.hero__content { padding-left: 26px; max-width: 100%; }
	.hero__content::before { left: 6px; }
	.hero__content .hero__label-star { left: -27px; display: none; }
	.hero__label span::after { width: 50px; }
	.hero__title { font-size: 44px; }
	.hero__text { font-size: 14.5px; }
	.hero__img { object-position: 64% 50%; }
	.hero__dots { bottom: 18px; }

	.section-title { font-size: 17px; gap: 8px; }
	.section-title__icon { width: 24px; height: 24px; }
	.section-head { flex-wrap: wrap; row-gap: 6px; }
	.section-line { min-width: 30px; }
	.news-grid { grid-template-columns: 1fr; gap: 14px; }
	.card__media { aspect-ratio: 16 / 7; }
	.card__title { font-size: 22px; }
	.sidebar { grid-template-columns: 1fr; }
	.popular__list { display: block; }
	.popular__item:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid rgba(120, 130, 255, .14); }
	.box { padding: 14px 15px; }

	.footer__inner { grid-template-columns: 1fr; gap: 18px; text-align: left; }
	.footer-menu { display: flex; flex-wrap: wrap; gap: 4px 16px; }
	.site-footer__art { width: 100%; opacity: .25; }
	.footer__bottom-inner { flex-direction: column; text-align: center; gap: 6px; }
	.legal-menu { justify-content: center; }
	.legal-menu li + li::before { margin: 0 10px; }

	.entry { padding: 18px 16px 22px; }
	.entry-content { font-size: 16px; }
	.entry-content h2 { font-size: 27px; }
	.entry-content h3 { font-size: 23px; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.post-navigation .nav-next { grid-column: auto; }
	.comments { padding: 18px 16px; }
	.alignleft, .alignright { float: none; margin: 1em auto; }
	.page-hero { padding: 34px 0 30px; }
}

@media (max-width: 380px) {
	.brand__text { font-size: 17px; }
	.brand__logo { width: 40px; height: 40px; }
	.brand { gap: 6px; }
	.icon-btn { width: 34px; height: 34px; }
	.header__actions { gap: 6px; }
	.hero__title { font-size: 38px; }
	.newsletter__form { flex-direction: column; }
	.newsletter__form .btn { justify-content: center; }
	.clock__loc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
