/* article.css – singolo articolo. Distanza fascia titolo → contenuto: vedi layout.css (.site-main { padding-top: 1rem }), home esclusa. */
.article-full { padding-top: 0; padding-bottom: 2rem; padding-left: 0; padding-right: 0; }
.article-meta { font-size: 0.875rem; color: #555; }
.article-meta-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.75rem;
	align-items: center;
	min-width: 0;
	max-width: 100%;
}
.article-author-link,
.author-name-link { color: inherit; text-decoration: none; }
.article-author-link:hover,
.author-name-link:hover { text-decoration: underline; }
/* Distanze verticali fisse: come in vista mobile su tutti i viewport (etichette → fonte → testo) */
.article-original-source {
	margin-top: 0;
	margin-bottom: 1.25rem;
	padding: 0.75rem 1rem;
	font-size: 0.9375rem;
	color: #555;
	background: #f8f8f8;
	border-left: 3px solid #888;
	border-radius: 0 4px 4px 0;
}
.article-original-source a { color: #1a1a1a; text-decoration: underline; }
.article-original-source a:hover { color: #000; }
.article-featured-image {
	margin: 0 0 1rem;
	border-radius: 4px;
	overflow: hidden;
}
.article-featured-image img { width: 100%; display: block; }

.article-body-with-caption { position: relative; margin-top: 0; }
.article-body-with-caption .article-content {
	margin-top: 0;
	text-align: justify;
}
.article-featured-image-caption {
	position: static;
	width: 100%;
	max-width: 70ch;
	margin: 0.25rem auto 1.75rem;
	padding: 0;
	font-size: 0.75rem;
	line-height: 1.4;
	color: #666;
	text-align: justify;
}
.article-featured-image-copyright + .article-featured-image-caption-text {
	margin-top: 0.5rem;
}

/* Note a piè (blocco core/footnotes): stesso offset del documento per browser che usano scroll-margin sul target */
.wp-block-footnotes li[id],
.article-content sup.fn a[id] {
	scroll-margin-top: var(--header-height, 10.5rem);
}

/* Didascalie immagini inserite nel corpo dell'articolo (Gutenberg e shortcode [caption]) */
.article-content figure.wp-block-image figcaption,
.article-content .wp-caption-text {
	display: block;
	max-width: 70ch;
	margin: 0.25rem auto 1.75rem;
	font-size: 0.75rem;
	line-height: 1.4;
	color: #666;
	text-align: justify;
}
/* Crediti da Libreria media (copyright + didascalia allegato) nei blocchi Immagine / Galleria */
.article-content figure figcaption .editorialpress-inline-image-copyright + .editorialpress-inline-image-caption,
.article-content figure figcaption .editorialpress-from-attachment .editorialpress-inline-image-copyright + .editorialpress-inline-image-caption {
	margin-top: 0.35rem;
}
.article-content figure.wp-block-gallery figcaption {
	margin-left: auto;
	margin-right: auto;
}

/* Layout desktop largo: didascalia della featured image in colonna a destra del testo */
@media (min-width: 1200px) {
	.article-featured-image-caption {
		position: absolute;
		top: 0;
		right: 0;
		width: 12rem;
		max-width: none;
		margin: 0;
		/* Stesso bordo destro dell’immagine in evidenza (larghezza container): testo a destra nella colonna */
		text-align: right;
	}
}

@media (max-width: 899px) {
	.article-featured-image {
		margin: 0 0 1rem;
	}
	.article-content {
		margin-top: 0;
	}
}
.article-content {
	max-width: 70ch;
	margin-top: 1.25rem;
	margin-bottom: 0;
	margin-left: auto;
	margin-right: auto;
	text-align: justify;
}
/* Drop cap: prima lettera del primo paragrafo (desktop 4.9em, mobile 3.5em – stesso rapporto di prima) */
.article-content > p:first-of-type::first-letter {
	font-size: 4.9em;
	font-weight: 700;
	text-transform: uppercase;
	float: left;
	line-height: 1;
	margin-right: 0.08em;
	margin-top: 0.05em;
}
@media (max-width: 640px) {
	.article-content > p:first-of-type::first-letter {
		font-size: 3.5em;
	}
}
/* Condivisione: solo icone – copia link, WhatsApp, Facebook, Instagram (copia), X, Telegram */
.share-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 2rem 0;
}
.share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	font: inherit;
	color: #333;
	background: #f0f0f0;
	border: 1px solid #ddd;
	border-radius: 6px;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.share-btn:hover {
	background: #e5e5e5;
	color: #111;
	border-color: #ccc;
}
.share-btn:focus {
	outline: 2px solid #333;
	outline-offset: 2px;
}
.share-icon {
	flex-shrink: 0;
}
.share-btn.copied {
	background: #1a1a1a;
	color: #fff;
	border-color: #1a1a1a;
}
.author-box {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	margin: 2rem 0;
	padding: 1rem;
	background: #f5f5f5;
	border-radius: 4px;
}
.author-box-link {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	text-decoration: none;
	color: inherit;
	flex: 1;
	min-width: 0;
}
.author-box-link:hover {
	text-decoration: none;
	color: inherit;
}
.author-avatar { border-radius: 50%; }
.author-name { margin: 0 0 0.25em; font-size: 1rem; }
.author-bio { margin: 0; font-size: 0.9375rem; color: #444; }
.related-posts { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #ddd; }
.related-title { font-size: 1.25rem; margin-bottom: 1rem; }

/* Pagina autore (resetto header: lo spazio title bar → contenuto = .site-main in layout) */
body.editorialpress-author-page .author-page-header { margin-top: 0; }
.page-author { padding-bottom: 2rem; }
.author-page-header {
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
	margin-top: 0;
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid #eee;
	flex-wrap: wrap;
}
.author-page-avatar { border-radius: 50%; flex-shrink: 0; max-width: 120px; }
.author-page-info { min-width: 0; flex: 1 1 auto; }
.author-page-title { margin: 0 0 0.5rem; font-size: 1.75rem; overflow-wrap: break-word; word-break: break-word; min-width: 0; }
.author-page-bio { margin: 0; font-size: 1rem; color: #555; line-height: 1.6; overflow-wrap: break-word; word-break: break-word; min-width: 0; text-align: justify; }

/* Pagina Articoli (lista articoli): stesso respiro sotto l’ultima card della pagina autore */
.page-articles { padding-bottom: 2rem; }

/* Pagina Autori: lista autori (pagine figlie) – non sovrascrivere padding laterale del .container */
.page-authors-list { padding-bottom: 2rem; }
/* Intro Autori / Guest: niente min-height globale .page-content (300px); spazio sotto = margini reali degli ultimi blocchi (p, liste, ecc.) */
.page-authors-list .authors-list-page-intro.page-content,
.page-authors-list .authors-guest-section-intro.page-content {
	min-height: 0;
	margin-top: 0;
	margin-bottom: 0;
	text-align: justify;
}
.guest-intro-standalone .guest-intro-standalone-content.page-content {
	min-height: 0;
}
/* Pagina dedicata intro Guest (noindex): nota redazionale */
.guest-intro-standalone .guest-intro-standalone-note {
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem;
	font-size: 0.9375rem;
	color: #555;
	background: #f5f5f5;
	border-left: 3px solid #888;
	border-radius: 0 4px 4px 0;
}
.guest-intro-standalone .guest-intro-standalone-note a {
	text-decoration: underline;
}
.guest-intro-standalone-content {
	margin-bottom: 0;
}
.authors-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.authors-list-item { margin: 0; }

/* Pagina Autori: divisore tra sezione Autori e sezione Guest */
.authors-section-divider {
	margin: 2rem 0;
	border-top: 1px solid #eee;
}

.authors-guest-section {
	/* mantiene coerenza con altri divisori in home (margini simili) */
	padding: 0;
	margin: 0;
}
.authors-guest-section h2 {
	/* se nel page editor usi un H2 senza class, lo rendiamo coerente con i titoli tema */
	font-size: 1.5rem;
	margin: 0 0 1rem;
	line-height: 1.2;
	font-weight: 700;
}
/* Lista Guest: card compatte (stesso linguaggio visivo degli autori, senza avatar, più piccole) */
.authors-guest-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}
.authors-guest-list-item {
	margin: 0;
}
.authors-guest-card {
	display: block;
	padding: 0.45rem 0.75rem;
	background: #f0f0f0;
	border-radius: 6px;
	min-width: 0;
	transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.authors-guest-list-item:hover .authors-guest-card {
	background: #e8e8e8;
	transform: translateY(-1px);
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
}
.authors-guest-list-name {
	display: block;
	font-weight: 700;
	font-size: 0.9375rem;
	line-height: 1.35;
	min-width: 0;
	overflow-wrap: break-word;
	word-break: break-word;
}
.authors-guest-empty {
	margin: 0;
	color: #666;
	font-size: 1rem;
}
.authors-list-link {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.25rem;
	background: #f0f0f0;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
	min-width: 0;
	transition: transform 0.25s ease, background 0.2s ease, box-shadow 0.25s ease;
}
.authors-list-link:hover {
	background: #e8e8e8;
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.authors-list-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	flex-shrink: 0;
	object-fit: cover;
}
.authors-list-avatar-placeholder {
	display: block;
	width: 56px;
	height: 56px;
	background: #ccc;
	border-radius: 50%;
}
.authors-list-name { font-weight: 700; font-size: 1.0625rem; min-width: 0; overflow-wrap: break-word; word-break: break-word; }

/* Lista articoli nella pagina autore: titolo + prime 5 righe */
.author-articles-list {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	border-top: 1px solid #eee;
	min-width: 0;
}
.author-articles-list > li {
	border-bottom: 1px solid #eee;
	padding: 1.25rem 0;
	min-width: 0;
}
.post-list-item {
	min-width: 0;
}
.post-list-item-link {
	display: block;
	text-decoration: none;
	color: inherit;
}
.post-list-item-link:hover { text-decoration: none; }
.post-list-item-link:hover .post-list-item-title { text-decoration: underline; }
.post-list-item-title {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
	line-height: 1.3;
	overflow-wrap: anywhere;
	word-break: break-word;
	min-width: 0;
	max-width: 100%;
}
.post-list-item-lead {
	margin: 0;
	font-size: 0.9375rem;
	color: #555;
	line-height: 1.6;
	overflow-wrap: anywhere;
	word-break: break-word;
	min-width: 0;
	max-width: 100%;
}

/* Pagina articoli: filtri per categoria, tag, data e ricerca */
.articles-filters { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid #eee; }
.articles-filters-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}
.articles-filters-form .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}
.articles-filters-form .filter-select,
.articles-filters-form .filter-search {
	padding: 0.5rem 0.75rem;
	font-size: 1rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	min-width: 0;
}

/* Chrome spesso “mangia” spazio con l’arrow nativa: riserviamo più spazio a destra
   così la scritta non viene troncata e resta più simile a Safari. */
.articles-filters-form .filter-select {
	padding-left: 0.45rem;
	padding-right: 0;
	text-align: left;
}

/* Allinea l'inizio del testo dell'input con lo stesso punto dei select */
.articles-filters-form .filter-search {
	padding-left: 0.6rem;
}

/* Solo Chrome: offset interno del select nativo diverso da Safari */
.is-chrome .articles-filters-form .filter-select {
	padding-left: 0.35rem;
}

/* Controlli filtri: altezza uniforme (come il bottone "Filtra") */
.articles-filters-form .filter-select,
.articles-filters-form .filter-search,
.articles-filters-form .filter-submit {
	height: 2.5rem;
	min-height: 2.5rem;
	box-sizing: border-box;
	line-height: 1;
}
.articles-filters-form .filter-select,
.articles-filters-form .filter-search {
	padding-top: 0;
	padding-bottom: 0;
}
.articles-filters-form .filter-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding-top: 0;
	padding-bottom: 0;
}
/* Cerca… riempie lo spazio sulla riga: il tasto «Filtra» resta a larghezza naturale e si allinea al bordo destro del .container (come le card). */
.articles-filters-form .filter-search {
	flex: 1 1 auto;
	min-width: min(12ch, 100%);
}
.articles-filters-form .filter-submit {
	flex-shrink: 0;
	padding: 0.5rem 1rem;
	font-size: 1rem;
	font-weight: 600;
	border: 1px solid #333;
	border-radius: 4px;
	background: #333;
	color: #fff;
	cursor: pointer;
}
.articles-filters-form .filter-submit:hover { background: #111; }

/* Hover neutro sui dropdown: non renderli “neri” come il bottone */
.articles-filters-form .filter-select:hover {
	background: #f3f3f3;
	border-color: #333;
}
.articles-filters-form .filter-select:focus-visible {
	outline: 2px solid #333;
	outline-offset: 2px;
}
.articles-filters-reset { margin: 0.75rem 0 0; font-size: 0.9375rem; }
.articles-filters-reset a { text-decoration: underline; }
.articles-filters-reset a:hover { text-decoration: none; }

/* Mobile: filtri su due righe (4 select + riga Cerca/Filtra) */
@media (max-width: 640px) {
	.articles-filters-form {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.75rem;
		align-items: stretch;
	}

	/* 4 select in griglia 2×2 */
	.articles-filters-form .filter-select {
		width: 100%;
		padding-right: 1.75rem;
	}

	/* Riga Cerca/Filtra: a tutta larghezza su griglia a 2 colonne */
	.articles-filters-form .filter-search {
		width: 100%;
		grid-column: span 2;
	}

	.articles-filters-form .filter-submit {
		width: 100%;
		grid-column: span 2;
	}

	/* Reset proprietà flex ereditate (desktop) per evitare comportamenti inattesi */
	.articles-filters-form .filter-select,
	.articles-filters-form .filter-search,
	.articles-filters-form .filter-submit {
		flex: initial;
	}
}

/* Dal mobile verso l'alto (fino al desktop): stesso layout a due righe */
@media (min-width: 641px) {
	.articles-filters-form {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 0.75rem;
		align-items: stretch;
	}

	.articles-filters-form .filter-select {
		width: 100%;
	}

	.articles-filters-form .filter-search {
		width: 100%;
		grid-column: span 3;
	}

	.articles-filters-form .filter-submit {
		width: 100%;
	}

	.articles-filters-form .filter-select,
	.articles-filters-form .filter-search,
	.articles-filters-form .filter-submit {
		flex: initial;
	}
}
