/* === SENTINEL SOC — Main design CSS ===
 * Copied 1:1 from the mockup styles.css, with WordPress-specific selector
 * additions where WP-generated markup differs from the static mockup.
 */

:root {
	--bg: #0a0e1a;
	--bg-2: #111726;
	--bg-3: #182033;
	--border: #1f2940;
	--border-2: #2a3552;
	--text: #e6ecf5;
	--text-dim: #8a96b3;
	--text-mute: #5a667f;
	--red: #e63946;
	--red-dim: #b22a36;
	--cyan: #00d4ff;
	--cyan-dim: #0099bb;
	--amber: #ffb547;
	--green: #4ade80;
	--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	--font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
	--container: 1280px;
	--radius: 4px;
	--radius-lg: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
	font-family: var(--font-sans);
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--cyan); }

img { max-width: 100%; display: block; height: auto; }

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

/* === TOP BAR === */
.topbar {
	background: linear-gradient(90deg, var(--red) 0%, var(--red-dim) 100%);
	color: #fff;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 6px 0;
}
.topbar-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.live-dot {
	display: inline-block;
	width: 8px; height: 8px;
	background: #fff;
	border-radius: 50%;
	animation: pulse 1.5s ease-in-out infinite;
	box-shadow: 0 0 8px rgba(255,255,255,0.8);
}
@keyframes pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.4; transform: scale(0.85); }
}
.topbar-right { display: flex; gap: 20px; opacity: 0.9; }
.topbar-right a { color: #fff; }

/* === HEADER === */
.site-header,
.header {
	background: var(--bg-2);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: blur(10px);
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 0;
}
.logo,
.site-branding .custom-logo-link {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-mono);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.logo-mark {
	width: 36px; height: 36px;
	background: var(--red);
	display: grid;
	place-items: center;
	color: #fff;
	font-weight: 900;
	font-size: 18px;
	border-radius: 4px;
	box-shadow: 0 0 16px rgba(230,57,70,0.4);
}
.logo-text { color: var(--text); }
.logo-text span { color: var(--red); }

.custom-logo {
	max-height: 48px;
	width: auto;
}

.nav,
.primary-menu {
	display: flex;
	gap: 28px;
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	list-style: none;
	margin: 0;
	padding: 0;
}
.nav a,
.primary-menu a { color: var(--text-dim); position: relative; padding: 4px 0; display: inline-block; }
.nav a:hover,
.primary-menu a:hover { color: var(--text); }
.nav a.active,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a { color: var(--cyan); }
.nav a.active::after,
.primary-menu .current-menu-item > a::after,
.primary-menu .current_page_item > a::after {
	content: '';
	position: absolute;
	bottom: -22px;
	left: 0; right: 0;
	height: 2px;
	background: var(--cyan);
	box-shadow: 0 0 8px var(--cyan);
}

.search-btn {
	background: var(--bg-3);
	border: 1px solid var(--border-2);
	color: var(--text-dim);
	padding: 8px 14px;
	border-radius: var(--radius);
	font-family: var(--font-mono);
	font-size: 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
}
.search-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* Search form (searchform.php) */
.search-form {
	display: flex;
	gap: 8px;
	align-items: center;
}
.search-form .search-field {
	background: var(--bg-3);
	border: 1px solid var(--border-2);
	color: var(--text);
	padding: 8px 12px;
	border-radius: var(--radius);
	font-family: var(--font-mono);
	font-size: 12px;
	min-width: 220px;
}
.search-form .search-field:focus { outline: none; border-color: var(--cyan); }
.search-form .search-submit {
	background: var(--red);
	color: #fff;
	border: none;
	padding: 9px 14px;
	border-radius: var(--radius);
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
	font-weight: 700;
}

/* Mobile menu toggle */
.menu-toggle {
	display: none;
	background: var(--bg-3);
	border: 1px solid var(--border-2);
	color: var(--text);
	padding: 8px 12px;
	border-radius: var(--radius);
	font-family: var(--font-mono);
	font-size: 12px;
	cursor: pointer;
}

/* === TICKER === */
.ticker {
	background: var(--bg-3);
	border-bottom: 1px solid var(--border);
	overflow: hidden;
	position: relative;
}
.ticker-inner {
	display: flex;
	align-items: center;
	font-family: var(--font-mono);
	font-size: 12px;
	height: 36px;
}
.ticker-label {
	background: var(--red);
	color: #fff;
	padding: 0 14px;
	height: 100%;
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	flex-shrink: 0;
	z-index: 2;
}
.ticker-track {
	display: flex;
	gap: 48px;
	padding-left: 24px;
	white-space: nowrap;
	animation: scroll 60s linear infinite;
}
@keyframes scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
.ticker-item { color: var(--text-dim); }
.ticker-item a { color: var(--text-dim); }
.ticker-item a:hover { color: var(--cyan); }
.ticker-item .sev {
	color: var(--amber);
	font-weight: 700;
	margin-right: 6px;
}
.ticker-item .sev.crit { color: var(--red); }
.ticker-item .sev.high { color: var(--amber); }
.ticker-item .sev.medium { color: var(--cyan); }
.ticker-item .sev.low { color: var(--green); }
.ticker-item .sep, .ticker-track .sep { color: var(--border-2); margin: 0 8px; }

/* === HERO === */
.hero {
	padding: 32px 0 24px;
}
.hero-card {
	position: relative;
	background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3) 100%);
	border: 1px solid var(--border-2);
	border-left: 4px solid var(--red);
	border-radius: var(--radius-lg);
	padding: 36px 40px;
	overflow: hidden;
}
.hero-card::before {
	content: '';
	position: absolute;
	top: 0; right: 0;
	width: 300px; height: 100%;
	background: radial-gradient(circle at top right, rgba(230,57,70,0.15), transparent 70%);
	pointer-events: none;
}
.hero-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 3px;
	font-weight: 700;
	font-family: var(--font-mono);
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}
.badge-live {
	background: var(--red);
	color: #fff;
}
.badge-live::before {
	content: '';
	width: 6px; height: 6px;
	background: #fff;
	border-radius: 50%;
	animation: pulse 1.5s ease-in-out infinite;
}
.badge-crit { background: var(--red); color: #fff; }
.badge-high { background: var(--amber); color: #1a1a1a; }
.badge-med, .badge-medium { background: var(--cyan); color: #001824; }
.badge-low { background: var(--green); color: #0a1a0a; }
.badge-cat {
	background: transparent;
	border: 1px solid var(--border-2);
	color: var(--text-dim);
}
.hero-title {
	font-size: 38px;
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin-bottom: 16px;
	color: var(--text);
}
.hero-title a { color: inherit; }
.hero-excerpt {
	font-size: 17px;
	color: var(--text-dim);
	max-width: 780px;
	margin-bottom: 20px;
}
.hero-footer {
	display: flex;
	gap: 24px;
	align-items: center;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-mute);
	flex-wrap: wrap;
}
.hero-footer .cve {
	color: var(--cyan);
}
.hero-footer .read-more { margin-left: auto; color: var(--cyan); }

/* === MAIN GRID === */
.main,
.site-main {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 40px;
	padding: 32px 0 60px;
}
.site-main.no-sidebar { grid-template-columns: 1fr; }

.section-title {
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--text-dim);
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.section-title .accent { color: var(--red); }
.section-title .count {
	background: var(--bg-3);
	color: var(--cyan);
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 10px;
}

/* === ARTICLE LIST === */
.feed { display: flex; flex-direction: column; gap: 20px; }

.card,
article.post {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 20px;
	background: var(--bg-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 18px;
	transition: all .2s;
}
.card:hover,
article.post:hover {
	border-color: var(--border-2);
	transform: translateY(-2px);
}
.card.alert,
article.post.sentinel-alert {
	border-left: 3px solid var(--red);
}
.card.editorial,
article.post.sentinel-editorial {
	border-left: 3px solid var(--cyan);
}

.card-img {
	aspect-ratio: 16/10;
	background: linear-gradient(135deg, var(--bg-3), var(--border));
	border-radius: var(--radius);
	position: relative;
	overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img.placeholder-alert {
	background:
		linear-gradient(135deg, rgba(230,57,70,0.2), rgba(10,14,26,0.9)),
		repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(230,57,70,0.05) 8px, rgba(230,57,70,0.05) 16px);
}
.card-img.placeholder-edit {
	background:
		linear-gradient(135deg, rgba(0,212,255,0.2), rgba(10,14,26,0.9)),
		repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(0,212,255,0.05) 8px, rgba(0,212,255,0.05) 16px);
}
.card-img-label {
	position: absolute;
	bottom: 10px; left: 10px;
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--text);
	background: rgba(0,0,0,0.7);
	padding: 3px 8px;
	border-radius: 2px;
	letter-spacing: 0.06em;
}

.card-body { display: flex; flex-direction: column; }
.card-meta {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-bottom: 10px;
	flex-wrap: wrap;
}
.card-title {
	font-size: 19px;
	line-height: 1.3;
	font-weight: 700;
	margin-bottom: 8px;
	letter-spacing: -0.01em;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--cyan); }
.card-excerpt {
	color: var(--text-dim);
	font-size: 14px;
	line-height: 1.55;
	margin-bottom: auto;
}
.card-footer {
	display: flex;
	gap: 16px;
	margin-top: 12px;
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--text-mute);
	flex-wrap: wrap;
}
.card-footer .source { color: var(--cyan-dim); }

/* Load more / pagination */
.load-more-wrap { text-align: center; margin-top: 32px; }
.load-more-wrap a,
.load-more-wrap .page-numbers {
	font-family: var(--font-mono);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--cyan);
	border: 1px solid var(--cyan);
	padding: 12px 24px;
	border-radius: 4px;
	display: inline-block;
}
.load-more-wrap .page-numbers.current { background: var(--cyan); color: var(--bg); }
.nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.nav-links .page-numbers {
	font-family: var(--font-mono);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--text-dim);
	border: 1px solid var(--border-2);
	padding: 8px 14px;
	border-radius: 4px;
	display: inline-block;
}
.nav-links .page-numbers.current {
	background: var(--cyan);
	color: var(--bg);
	border-color: var(--cyan);
}
.nav-links .page-numbers:hover { color: var(--cyan); border-color: var(--cyan); }

/* === SIDEBAR === */
.sidebar,
aside.sidebar { display: flex; flex-direction: column; gap: 32px; }

.widget {
	background: var(--bg-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
}
.widget-alert,
.widget_sentinel_live_alert { border-left: 3px solid var(--red); }

.widget-title {
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--text);
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	gap: 8px;
}

.widget ul { list-style: none; padding: 0; margin: 0; }

.alert-list { display: flex; flex-direction: column; gap: 14px; }
.alert-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-bottom: 14px;
	border-bottom: 1px dashed var(--border);
}
.alert-item:last-child { border: none; padding-bottom: 0; }
.alert-item-meta {
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--text-mute);
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}
.alert-item-meta .sev-crit { color: var(--red); font-weight: 700; }
.alert-item-meta .sev-high { color: var(--amber); font-weight: 700; }
.alert-item-meta .sev-medium { color: var(--cyan); font-weight: 700; }
.alert-item-meta .sev-low { color: var(--green); font-weight: 700; }
.alert-item-title {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--text);
}
.alert-item-title:hover { color: var(--cyan); }

.newsletter-box p {
	font-size: 13px;
	color: var(--text-dim);
	margin-bottom: 14px;
}
.newsletter-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.newsletter-form input {
	background: var(--bg);
	border: 1px solid var(--border-2);
	color: var(--text);
	padding: 10px 12px;
	border-radius: var(--radius);
	font-family: var(--font-sans);
	font-size: 13px;
}
.newsletter-form input:focus {
	outline: none;
	border-color: var(--cyan);
}
.newsletter-form button {
	background: var(--red);
	color: #fff;
	border: none;
	padding: 10px;
	border-radius: var(--radius);
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
	transition: background .15s;
}
.newsletter-form button:hover { background: var(--red-dim); }

.cve-list { font-family: var(--font-mono); font-size: 12px; }
.cve-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px dashed var(--border);
}
.cve-list li:last-child { border: none; }
.cve-list .cve-id { color: var(--cyan); }
.cve-list .cvss {
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 2px;
	font-size: 10px;
}
.cvss.crit { background: var(--red); color: #fff; }
.cvss.high { background: var(--amber); color: #1a1a1a; }
.cvss.medium { background: var(--cyan); color: #001824; }
.cvss.low { background: var(--green); color: #0a1a0a; }

.cat-list li {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid var(--border);
	font-size: 13px;
}
.cat-list li:last-child { border: none; }
.cat-list .cat-count {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--text-mute);
}

/* Generic widget lists (WP default widgets) */
.widget_categories ul li,
.widget_archive ul li,
.widget_pages ul li,
.widget_meta ul li,
.widget_recent_entries ul li,
.widget_nav_menu ul li {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid var(--border);
	font-size: 13px;
}
.widget_categories ul li:last-child,
.widget_archive ul li:last-child,
.widget_pages ul li:last-child,
.widget_meta ul li:last-child,
.widget_recent_entries ul li:last-child,
.widget_nav_menu ul li:last-child { border: none; }
.widget_tag_cloud a {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 11px !important;
	background: var(--bg-3);
	border: 1px solid var(--border-2);
	color: var(--text-dim);
	padding: 5px 10px;
	border-radius: 3px;
	margin: 2px 4px 2px 0;
}

/* === FOOTER === */
.footer,
.site-footer {
	background: var(--bg-2);
	border-top: 1px solid var(--border);
	padding: 50px 0 24px;
	margin-top: 40px;
}
.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 40px;
	margin-bottom: 40px;
}
.footer h4,
.site-footer h4,
.site-footer .widget-title {
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--text);
	margin-bottom: 14px;
	border: none;
	padding: 0;
}
.footer p, .footer li,
.site-footer p, .site-footer li {
	font-size: 13px;
	color: var(--text-dim);
	line-height: 1.7;
}
.footer ul, .site-footer ul { list-style: none; padding: 0; margin: 0; }
.footer-bottom {
	border-top: 1px solid var(--border);
	padding-top: 20px;
	display: flex;
	justify-content: space-between;
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--text-mute);
	flex-wrap: wrap;
	gap: 12px;
}

/* Footer widgets override the gray .widget box look */
.site-footer .widget {
	background: transparent;
	border: none;
	padding: 0;
}

/* === ARTICLE PAGE === */
.article-wrap {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 50px;
	padding: 32px 0 60px;
}
.breadcrumb {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--text-mute);
	margin-bottom: 20px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb .sep { margin: 0 8px; color: var(--border-2); }

.article h1,
.page-title-h1 {
	font-size: 42px;
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 16px 0 20px;
}
.article-meta {
	display: flex;
	gap: 20px;
	align-items: center;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-mute);
	padding-bottom: 20px;
	margin-bottom: 28px;
	border-bottom: 1px solid var(--border);
	flex-wrap: wrap;
}
.article-meta .author { color: var(--cyan); }
.article-img {
	aspect-ratio: 16/9;
	background: linear-gradient(135deg, rgba(230,57,70,0.15), rgba(10,14,26,0.95)),
		repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(230,57,70,0.04) 12px, rgba(230,57,70,0.04) 24px);
	border-radius: var(--radius-lg);
	margin-bottom: 30px;
	border: 1px solid var(--border-2);
	overflow: hidden;
}
.article-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-body {
	font-size: 17px;
	line-height: 1.75;
	color: #d4dce8;
}
.article-body p { margin-bottom: 1.4em; }
.article-body p:first-of-type::first-letter {
	font-size: 56px;
	font-weight: 800;
	float: left;
	line-height: 1;
	padding: 4px 10px 0 0;
	color: var(--red);
	font-family: var(--font-mono);
}
.article-body h2 {
	font-size: 26px;
	margin: 2em 0 0.6em;
	font-weight: 700;
	letter-spacing: -0.01em;
	border-left: 3px solid var(--red);
	padding-left: 14px;
}
.article-body h3 {
	font-size: 20px;
	margin: 1.6em 0 0.5em;
	font-weight: 700;
	color: var(--cyan);
}
.article-body strong { color: #fff; font-weight: 600; }
.article-body code {
	font-family: var(--font-mono);
	background: var(--bg-3);
	border: 1px solid var(--border);
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 0.9em;
	color: var(--cyan);
}
.article-body pre {
	background: var(--bg-3);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px;
	overflow-x: auto;
	margin: 1.4em 0;
}
.article-body pre code { background: transparent; border: none; padding: 0; }
.article-body blockquote {
	border-left: 3px solid var(--cyan);
	background: var(--bg-2);
	padding: 16px 20px;
	margin: 1.6em 0;
	font-style: italic;
	color: var(--text-dim);
}
.article-body ul, .article-body ol {
	padding-left: 24px;
	margin-bottom: 1.4em;
}
.article-body li { margin-bottom: 0.5em; }
.article-body a { color: var(--cyan); text-decoration: underline; }
.article-body img { border-radius: var(--radius); margin: 1.4em 0; }

/* Source attribution box */
.source-box {
	background: var(--bg-2);
	border: 1px solid var(--border-2);
	border-left: 4px solid var(--amber);
	border-radius: var(--radius);
	padding: 20px 24px;
	margin: 30px 0;
	display: flex;
	gap: 20px;
	align-items: flex-start;
}
.source-box-icon {
	font-family: var(--font-mono);
	background: var(--amber);
	color: #1a1a1a;
	font-weight: 800;
	font-size: 11px;
	padding: 6px 10px;
	border-radius: 3px;
	letter-spacing: 0.1em;
	flex-shrink: 0;
}
.source-box-text {
	font-size: 13px;
	color: var(--text-dim);
}
.source-box-text strong { color: var(--text); }
.source-box-text a { color: var(--cyan); text-decoration: underline; }

/* Tags */
.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 30px 0;
	padding: 20px 0;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}
.tag {
	font-family: var(--font-mono);
	font-size: 11px;
	background: var(--bg-3);
	border: 1px solid var(--border-2);
	color: var(--text-dim);
	padding: 5px 10px;
	border-radius: 3px;
}
.tag::before { content: '#'; color: var(--red); margin-right: 2px; }
.tag:hover { color: var(--cyan); border-color: var(--cyan); }

/* Related */
.related-section { margin-top: 40px; }
.related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.related-card {
	background: var(--bg-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 14px;
}
.related-card .badge { font-size: 9px; padding: 2px 6px; }
.related-card h4 {
	font-size: 14px;
	line-height: 1.35;
	margin-top: 8px;
}
.related-card h4 a { color: var(--text); }
.related-card h4 a:hover { color: var(--cyan); }

/* 404 / no results */
.error-404, .no-results {
	text-align: center;
	padding: 80px 20px;
}
.error-404 h1, .no-results h1 {
	font-size: 72px;
	color: var(--red);
	font-family: var(--font-mono);
	letter-spacing: -0.04em;
	margin-bottom: 16px;
}
.error-404 p, .no-results p {
	color: var(--text-dim);
	margin-bottom: 24px;
}

/* Comments */
.comments-area {
	background: var(--bg-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
	margin-top: 40px;
}
.comments-title, .comment-reply-title {
	font-family: var(--font-mono);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--text);
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
}
.comment-list { list-style: none; padding: 0; margin: 0 0 30px; }
.comment-list .comment { padding: 16px 0; border-bottom: 1px dashed var(--border); }
.comment-list .children { list-style: none; padding-left: 20px; margin-top: 16px; }
.comment-author { font-weight: 700; color: var(--cyan); font-size: 14px; }
.comment-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); margin-bottom: 8px; }
.comment-body p { font-size: 14px; color: var(--text-dim); }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
	width: 100%;
	background: var(--bg);
	border: 1px solid var(--border-2);
	color: var(--text);
	padding: 10px 12px;
	border-radius: var(--radius);
	font-family: var(--font-sans);
	font-size: 13px;
	margin-bottom: 12px;
}
.comment-respond input:focus, .comment-respond textarea:focus { outline: none; border-color: var(--cyan); }
.comment-respond .submit {
	background: var(--red);
	color: #fff;
	border: none;
	padding: 10px 24px;
	border-radius: var(--radius);
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
}
.comment-respond .submit:hover { background: var(--red-dim); }

/* Archive headers */
.archive-header, .page-header {
	padding: 32px 0 8px;
}
.archive-title, .page-title {
	font-size: 32px;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin-bottom: 8px;
}
.archive-description {
	color: var(--text-dim);
	font-size: 14px;
	max-width: 760px;
}

/* Responsive */
@media (max-width: 960px) {
	.main, .site-main, .article-wrap { grid-template-columns: 1fr; }
	.nav, .primary-menu { display: none; }
	.nav.is-open, .primary-menu.is-open {
		display: flex;
		flex-direction: column;
		position: absolute;
		top: 100%;
		left: 0; right: 0;
		background: var(--bg-2);
		border-bottom: 1px solid var(--border);
		padding: 16px 24px;
		gap: 14px;
	}
	.menu-toggle { display: inline-flex; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.card, article.post { grid-template-columns: 1fr; }
	.hero-title { font-size: 28px; }
	.hero-card { padding: 24px; }
	.article h1 { font-size: 30px; }
	.related-grid { grid-template-columns: 1fr; }
	.header-inner { gap: 12px; }
}

@media (max-width: 600px) {
	.footer-grid { grid-template-columns: 1fr; }
	.topbar-right { display: none; }
	.search-form .search-field { min-width: 140px; }
}


/* SW-MOBILE-PATCH v1 */
/* ==========================================================================
   RESPONSIVE MOBILE OVERRIDES — sardinia-sentinel
   Da appendere in coda a main.css. Non sovrascrive il desktop:
   agisce solo sotto le soglie 768px e 480px.
   ========================================================================== */

/* --- Reset difensivi globali: no scroll orizzontale, box-sizing coerente --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

img,
video,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   TABLET / SMARTPHONE GRANDE — max-width: 768px
   ========================================================================== */
@media (max-width: 768px) {

  /* --- Container a tutta larghezza con padding ridotto --- */
  .container {
    max-width: 100%;
    width: 100%;
    padding: 0 16px;
  }

  /* --- Layout principale: da 2 colonne (contenuto + sidebar) a colonna singola --- */
  .main,
  .site-main,
  .article-wrap {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 20px 0 40px;
  }

  /* --- Selettori difensivi generici: qualunque griglia/colonna multipla impila --- */
  [class*="grid"],
  [class*="cols"],
  [class*="columns"] {
    grid-template-columns: 1fr !important; /* necessario: copre griglie sconosciute con specificità variabile */
  }

  [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }

  /* --- Header: inner flessibile, padding ridotto --- */
  .header-inner {
    padding: 12px 0;
  }

  .site-header,
  .header {
    backdrop-filter: blur(8px);
  }

  /* --- Topbar: impilata e compatta --- */
  .topbar-inner {
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar-left {
    gap: 12px;
    flex-wrap: wrap;
  }

  /* --- Navigazione: a wrap, target tattili >=44px --- */
  .nav,
  .primary-menu {
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 14px;
  }

  .nav a,
  .primary-menu a,
  .nav li > a,
  .primary-menu li > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 4px;
  }

  /* Toggle menu hamburger come target tattile pieno (se attivato dal tema a 960px) */
  .menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  /* --- Hero: più basso, tipografia fluida --- */
  .hero {
    padding: 20px 0 16px;
  }

  .hero-card {
    padding: 24px 20px;
  }

  .hero-title {
    font-size: clamp(24px, 6.5vw, 34px);
    line-height: 1.2;
  }

  .hero-excerpt {
    font-size: 15px;
  }

  .hero-footer {
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  /* --- Card articolo: da [immagine | testo] a impilata --- */
  .card,
  article.post {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .feed {
    gap: 16px;
  }

  .card-img,
  .article-img {
    width: 100%;
    aspect-ratio: 16/9;
  }

  .card-title {
    font-size: 18px;
  }

  /* --- Pagina articolo: titoli e corpo fluidi --- */
  .article h1,
  .page-title-h1 {
    font-size: clamp(26px, 7vw, 36px);
    line-height: 1.2;
  }

  .article-body {
    font-size: 16px;
  }

  .article-body h2 {
    font-size: clamp(20px, 5.5vw, 24px);
    margin: 1.6em 0 0.5em;
  }

  .article-body h3 {
    font-size: 18px;
  }

  /* --- Sidebar: piena larghezza sotto il contenuto --- */
  .sidebar,
  aside.sidebar {
    width: 100%;
    gap: 24px;
  }

  .widget {
    padding: 16px;
  }

  /* --- Footer: griglia 4 colonne -> singola colonna --- */
  .footer,
  .site-footer {
    padding: 36px 0 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* --- Ticker: gap ridotto per non sforare --- */
  .ticker-track {
    gap: 32px;
  }
}

/* ==========================================================================
   SMARTPHONE PICCOLO — max-width: 480px
   ========================================================================== */
@media (max-width: 480px) {

  .container {
    padding: 0 12px;
  }

  .main,
  .site-main,
  .article-wrap {
    gap: 22px;
    padding: 14px 0 32px;
  }

  /* --- Hero ancora più contenuto --- */
  .hero-card {
    padding: 18px 16px;
  }

  .hero-title {
    font-size: clamp(21px, 7.5vw, 28px);
  }

  .hero-excerpt {
    font-size: 14px;
  }

  /* --- Card: padding minimo, titolo leggibile --- */
  .card,
  article.post {
    padding: 12px;
  }

  .card-title {
    font-size: 17px;
  }

  .card-excerpt {
    font-size: 13px;
  }

  /* --- Articolo: titolo principale fluido senza sforare --- */
  .article h1,
  .page-title-h1 {
    font-size: clamp(22px, 8vw, 30px);
  }

  .article-body {
    font-size: 15px;
    line-height: 1.7;
  }

  .article-body h2 {
    font-size: clamp(19px, 6vw, 22px);
  }

  /* --- Nav: link a piena riga per tap comodo --- */
  .nav,
  .primary-menu {
    gap: 4px 12px;
  }

  /* --- Widget e footer compatti --- */
  .widget {
    padding: 14px;
  }

  .footer,
  .site-footer {
    padding: 28px 0 16px;
  }

  .footer-grid {
    gap: 22px;
  }

  /* --- Topbar: nascondi elementi secondari se troppo stretti --- */
  .topbar-left {
    gap: 10px;
    font-size: 11px;
  }
}
