/* =========================================================
   Primo Piano – Macro News: Front-End Styles
   ========================================================= */

/* ── Macro Header ─────────────────────────────────────── */
.pp-macro-header {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
}

.pp-macro-header__hero {
	position: relative;
	height: 340px;
	background-size: cover;
	background-position: center;
}

.pp-macro-header__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0,0,0,.15) 0%, rgba(0,0,0,.70) 100%);
}

/* Body: layout base (una colonna) */
.pp-macro-header__body {
	padding: 1.5rem 2rem 2rem;
	background: #fff;
}

/* Body: layout due colonne (quando mini-lista attiva) */
.pp-macro-header__body--cols {
	display: grid;
	grid-template-columns: 1fr minmax(260px, 340px);
	gap: 0;
	padding: 0;
	background: #1a1a2e;
}

.pp-macro-header__body--cols .pp-macro-header__info {
	padding: 1.75rem 2rem 2rem;
	background: #fff;
}

/* Colonna sinistra – info macro */
.pp-macro-header__info {
	padding: 1.5rem 2rem 2rem;
}

.pp-macro-header__counter {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .3em .75em;
	border-radius: 50px;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	margin-bottom: .75rem;
}

.pp-macro-header__title {
	margin: 0 0 .5rem;
	font-size: 2rem;
	line-height: 1.25;
}

.pp-macro-header__excerpt {
	font-size: 1rem;
	opacity: .8;
	line-height: 1.6;
}

/* Colonna destra – sidebar con toggle + mini-lista */
.pp-macro-header__sidebar {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #1a1a2e;
	padding: 1.5rem 1.25rem;
	gap: .75rem;
}

/* Toggle button */
.pp-macro-header__toggle {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .5em 1.1em;
	border: 1.5px solid rgba(255,255,255,.65);
	border-radius: 50px;
	background: transparent;
	color: #fff;
	font-size: .8rem;
	font-weight: 600;
	cursor: pointer;
	align-self: flex-start;
	transition: background .2s, color .2s;
}

.pp-macro-header__toggle:hover {
	background: rgba(255,255,255,.12);
}

/* Mini-lista – nascosta di default */
.pp-macro-header__mini-list {
	display: flex;
	flex-direction: column;
	gap: .75rem;
	max-height: 0;
	overflow: hidden;
	transition: max-height .35s ease, opacity .3s ease;
	opacity: 0;
}

.pp-macro-header__mini-list.is-open {
	max-height: 600px;
	opacity: 1;
}

/* Singolo articolo nella mini-lista */
.pp-mh-article {
	display: flex;
	gap: .75rem;
	align-items: flex-start;
	padding-bottom: .75rem;
	border-bottom: 1px solid rgba(255,255,255,.12);
}

.pp-mh-article:last-of-type {
	border-bottom: none;
	padding-bottom: 0;
}

.pp-mh-article__thumb-link {
	flex: 0 0 64px;
	text-decoration: none;
}

.pp-mh-article__thumb {
	width: 64px;
	height: 64px;
	border-radius: 6px;
	background-size: cover;
	background-position: center;
}

.pp-mh-article__body {
	flex: 1;
	min-width: 0;
}

.pp-mh-article__date {
	display: block;
	font-size: .7rem;
	opacity: .65;
	margin-bottom: .2rem;
}

.pp-mh-article__title {
	margin: 0;
	font-size: .85rem;
	line-height: 1.35;
	word-break: break-word;
}

.pp-mh-article__title a {
	text-decoration: none;
	color: #fff;
}

.pp-mh-article__title a:hover {
	text-decoration: underline;
}

/* Link "Vedi tutti" */
.pp-macro-header__view-all {
	display: block;
	margin-top: .5rem;
	font-size: .8rem;
	font-weight: 700;
	color: rgba(255,255,255,.8);
	text-decoration: none;
}

.pp-macro-header__view-all:hover {
	color: #fff;
	text-decoration: underline;
}

/* Combined hero + body */
.pp-macro-header__hero + .pp-macro-header__body {
	background: #fff;
}
.pp-macro-header__hero + .pp-macro-header__body--cols {
	background: #1a1a2e;
}

/* ── Correlati Grid ───────────────────────────────────── */
.pp-correlati-container {
	width: 100%;
}

.pp-correlati-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

.pp-correlati-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Card */
.pp-correlati-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
}

.pp-correlati-card--shadow {
	box-shadow: 0 2px 12px rgba(0,0,0,.1);
}

.pp-correlati-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 24px rgba(0,0,0,.15);
}

.pp-correlati-card__thumb-link {
	display: block;
}

.pp-correlati-card__thumb {
	height: 180px;
	background-size: cover;
	background-position: center;
}

.pp-correlati-card__body {
	padding: 1rem 1.25rem 1.25rem;
}

.pp-correlati-card__meta {
	display: flex;
	align-items: center;
	gap: .75rem;
	font-size: .75rem;
	color: #888;
	margin-bottom: .5rem;
}

.pp-correlati-card__date::before {
	content: '📅 ';
}

.pp-correlati-card__author::before {
	content: '✍️ ';
}

.pp-correlati-card__title {
	margin: 0 0 .5rem;
	font-size: 1rem;
	line-height: 1.4;
}

.pp-correlati-card__title a {
	text-decoration: none;
	color: inherit;
}

.pp-correlati-card__title a:hover {
	text-decoration: underline;
}

.pp-correlati-card__excerpt {
	font-size: .875rem;
	color: #555;
	line-height: 1.5;
	margin: 0 0 .75rem;
}

.pp-correlati-card__readmore {
	font-size: .8rem;
	font-weight: 600;
	text-decoration: none;
}

/* List layout overrides */
.pp-correlati-list .pp-correlati-card {
	display: flex;
	flex-direction: row;
}

.pp-correlati-list .pp-correlati-card__thumb-link {
	flex: 0 0 140px;
}

.pp-correlati-list .pp-correlati-card__thumb {
	height: 100%;
	min-height: 100px;
	border-radius: 0;
}

/* Empty state */
.pp-correlati-empty {
	padding: 2rem;
	text-align: center;
	color: #888;
	font-style: italic;
}

/* Pagination */
.pp-correlati-pagination {
	margin-top: 1.5rem;
	text-align: center;
}

.pp-correlati-load-more {
	display: inline-block;
	padding: .7em 2em;
	border: 2px solid currentColor;
	background: transparent;
	border-radius: 4px;
	cursor: pointer;
	font-size: .9rem;
	font-weight: 600;
	transition: background .2s ease, color .2s ease;
}

.pp-correlati-load-more:hover {
	background: #111;
	color: #fff;
	border-color: #111;
}

.pp-correlati-load-more:disabled {
	opacity: .5;
	cursor: not-allowed;
}

/* ── Macro Badge ──────────────────────────────────────── */
.pp-macro-badge-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.pp-macro-badge {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	border-left: 4px solid #e02b20;
	font-size: .85rem;
	font-weight: 500;
	background: #1a1a2e;
	color: #fff;
	padding: .45em 1em;
	border-radius: 4px;
	text-decoration: none;
}

.pp-macro-badge a {
	color: inherit;
	font-weight: 700;
	text-decoration: none;
}

.pp-macro-badge a:hover {
	text-decoration: underline;
}

.pp-macro-badge__icon {
	font-size: 1em;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
	.pp-correlati-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.pp-macro-header__hero {
		height: 220px;
	}

	.pp-macro-header__title {
		font-size: 1.5rem;
	}
}

@media (max-width: 480px) {
	.pp-correlati-grid {
		grid-template-columns: 1fr;
	}

	.pp-correlati-list .pp-correlati-card {
		flex-direction: column;
	}
}
