/*
Theme Name:  SEOHermes Blog
Theme URI:   https://blog.seohermes.it
Description: Tema standalone per blog.seohermes.it — blog puro (home = articoli, navbar = categorie). Nessuna dipendenza esterna, SEO-first.
Author:      SEOHermes
Author URI:  https://seohermes.it
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: seohermes-blog
*/

/* ==========================================================
   1. Design Tokens (palette brand SEOHermes)
   ========================================================== */
:root {
	--shb-primary:      #FF5500;
	--shb-primary-dark: #E64A00;
	--shb-secondary:    #00D4AA;

	--shb-dark:   #0B0F1A;
	--shb-dark-2: #111827;
	--shb-dark-3: #1A2235;

	--shb-text:   #15181F;
	--shb-mid:    #3D4452;
	--shb-muted:  #5B6472;
	--shb-faint:  #97A0AF;

	--shb-bg:     #FFFFFF;
	--shb-bg-2:   #F7F8FA;
	--shb-bg-3:   #F0F1F4;
	--shb-line:   #E4E7ED;
	--shb-line-2: #D4D8E0;

	--shb-on-dark:       #F0F0F5;
	--shb-on-dark-muted: #8898B0;
	--shb-on-dark-line:  #1E2A3A;

	--shb-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

	--shb-container: 1180px;
	--shb-prose:     700px;
	--shb-radius:    8px;
	--shb-radius-lg: 14px;
}

/* ==========================================================
   2. Reset & base
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--shb-sans);
	color: var(--shb-text);
	background: var(--shb-bg);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

.screen-reader-text {
	position: absolute; width: 1px; height: 1px; margin: -1px;
	padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.shb-container {
	max-width: var(--shb-container);
	margin-inline: auto;
	padding-inline: 1.5rem;
}

.shb-section-label {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--shb-primary);
	margin-block-end: 1.25rem;
}

/* ==========================================================
   3. Header + navbar (categorie)
   ========================================================== */
.shb-header {
	background: var(--shb-dark);
	border-bottom: 1px solid var(--shb-on-dark-line);
	position: sticky;
	top: 0;
	z-index: 50;
}
.shb-header__inner {
	max-width: var(--shb-container);
	margin-inline: auto;
	padding-inline: 1.5rem;
	height: 68px;
	display: flex;
	align-items: center;
	gap: 2rem;
}
.shb-logo {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	font-weight: 800;
	font-size: 1.15rem;
	color: var(--shb-on-dark);
	white-space: nowrap;
}
.shb-logo span { color: var(--shb-primary); }
.shb-logo__badge {
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--shb-on-dark-muted);
	border: 1px solid var(--shb-on-dark-line);
	border-radius: 999px;
	padding: 0.15rem 0.55rem;
}

.shb-nav { flex: 1; min-width: 0; }
.shb-nav__list {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	overflow-x: auto;
	scrollbar-width: none;
}
.shb-nav__list::-webkit-scrollbar { display: none; }
.shb-nav__list li a {
	display: inline-block;
	padding: 0.45rem 0.85rem;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--shb-on-dark-muted);
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}
.shb-nav__list li a:hover,
.shb-nav__list li.current-cat a {
	background: var(--shb-dark-3);
	color: var(--shb-on-dark);
}

.shb-nav-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
	background: none;
	border: 0;
	padding: 0.5rem;
	margin-inline-start: auto;
}
.shb-nav-toggle__bar {
	width: 20px; height: 2px; background: var(--shb-on-dark); border-radius: 2px;
}

@media (max-width: 780px) {
	.shb-nav {
		position: absolute;
		top: 68px; left: 0; right: 0;
		background: var(--shb-dark);
		border-bottom: 1px solid var(--shb-on-dark-line);
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.2s ease;
	}
	.shb-nav.is-open { max-height: 60vh; overflow-y: auto; }
	.shb-nav__list { flex-direction: column; align-items: stretch; padding: 0.5rem 1.5rem 1rem; gap: 0.15rem; }
	.shb-nav__list li a { display: block; }
	.shb-nav-toggle { display: flex; }
}

/* ==========================================================
   4. Griglia articoli
   ========================================================== */
.shb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.75rem;
}

.shb-card {
	display: flex;
	flex-direction: column;
	background: var(--shb-bg);
	border: 1px solid var(--shb-line);
	border-radius: var(--shb-radius-lg);
	overflow: hidden;
	transition: border-color 0.15s, transform 0.15s;
}
.shb-card:hover { border-color: var(--shb-line-2); transform: translateY(-2px); }

.shb-card__thumb { aspect-ratio: 16/9; background: var(--shb-bg-3); overflow: hidden; }
.shb-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.shb-card__thumb--placeholder {
	background: linear-gradient(135deg, var(--shb-bg-3), var(--shb-bg-2));
}

.shb-card__body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }

.shb-cats { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.shb-cat {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--shb-primary-dark);
	background: rgba(255, 85, 0, 0.09);
	border-radius: 999px;
	padding: 0.2rem 0.6rem;
}

.shb-card__title { font-size: 1.1rem; }
.shb-card__title a:hover { color: var(--shb-primary); }

.shb-card__meta {
	font-size: 0.8rem;
	color: var(--shb-muted);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.shb-card__meta-sep::before { content: '·'; }

.shb-card__excerpt {
	font-size: 0.92rem;
	color: var(--shb-mid);
	line-height: 1.6;
}

.shb-card__read {
	margin-block-start: auto;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--shb-primary);
}
.shb-card__read:hover { color: var(--shb-primary-dark); }

/* ==========================================================
   5. Pagination
   ========================================================== */
.shb-pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-block-start: 3rem;
}
.shb-pagination a,
.shb-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding-inline: 0.5rem;
	border-radius: var(--shb-radius);
	border: 1px solid var(--shb-line);
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--shb-mid);
}
.shb-pagination a:hover { border-color: var(--shb-primary); color: var(--shb-primary); }
.shb-pagination span.current { background: var(--shb-primary); border-color: var(--shb-primary); color: #fff; }

/* ==========================================================
   6. Articolo singolo
   ========================================================== */
.shb-article-header { padding-block: 2.5rem 1.5rem; border-bottom: 1px solid var(--shb-line); }
.shb-article-header__inner { max-width: var(--shb-prose); margin-inline: auto; }

.shb-article-title {
	font-size: clamp(1.6rem, 3.4vw, 2.4rem);
	margin-block: 0.75rem;
}

.shb-article-meta {
	font-size: 0.85rem;
	color: var(--shb-muted);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.shb-article-thumb {
	max-width: var(--shb-prose);
	margin: 2rem auto 0;
	border-radius: var(--shb-radius-lg);
	overflow: hidden;
}

.shb-article-body {
	max-width: var(--shb-prose);
	margin-inline: auto;
	padding-block: 2.5rem;
	font-size: 1.05rem;
	line-height: 1.8;
	color: var(--shb-text);
}
.shb-article-body h2 { font-size: 1.5rem; margin-block: 2rem 0.75rem; }
.shb-article-body h3 { font-size: 1.2rem; margin-block: 1.5rem 0.6rem; }
.shb-article-body p { margin-block-end: 1.25rem; }
.shb-article-body ul, .shb-article-body ol { margin: 0 0 1.25rem 1.25rem; padding: 0; }
.shb-article-body li { margin-block-end: 0.4rem; }
.shb-article-body a { color: var(--shb-primary); text-decoration: underline; text-underline-offset: 2px; }
.shb-article-body img { border-radius: var(--shb-radius); margin-block: 1.5rem; }
.shb-article-body blockquote {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	border-left: 3px solid var(--shb-primary);
	background: var(--shb-bg-2);
	font-style: italic;
	color: var(--shb-mid);
}
.shb-article-body pre {
	background: var(--shb-dark-2);
	color: var(--shb-on-dark);
	padding: 1rem;
	border-radius: var(--shb-radius);
	overflow-x: auto;
	font-size: 0.85rem;
}

.shb-related { border-top: 1px solid var(--shb-line); padding-block: 3rem; }

/* ==========================================================
   7. Stati (404 / ricerca vuota)
   ========================================================== */
.shb-empty-state {
	max-width: var(--shb-prose);
	margin-inline: auto;
	padding-block: 5rem;
	text-align: center;
}
.shb-empty-state h1 { font-size: 1.8rem; margin-block-end: 0.75rem; }
.shb-empty-state p { color: var(--shb-muted); margin-block-end: 1.5rem; }

.shb-search-form { display: flex; gap: 0.5rem; max-width: 420px; margin-inline: auto; }
.shb-search-form input[type="search"] {
	flex: 1;
	padding: 0.65rem 0.9rem;
	border: 1px solid var(--shb-line);
	border-radius: var(--shb-radius);
	font-size: 0.95rem;
}
.shb-search-form button {
	padding: 0.65rem 1.1rem;
	border: 0;
	border-radius: var(--shb-radius);
	background: var(--shb-primary);
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
}
.shb-search-form button:hover { background: var(--shb-primary-dark); }

/* ==========================================================
   8. Footer
   ========================================================== */
.shb-footer {
	background: var(--shb-dark);
	color: var(--shb-on-dark-muted);
	margin-block-start: 4rem;
}
.shb-footer__inner {
	max-width: var(--shb-container);
	margin-inline: auto;
	padding: 2.5rem 1.5rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.85rem;
}
.shb-footer a { color: var(--shb-on-dark); font-weight: 600; }
.shb-footer a:hover { color: var(--shb-primary); }

/* ==========================================================
   9. Utility layout
   ========================================================== */
.shb-page-pad { padding-block: 2.5rem 1rem; }
