/**
 * News Single Article - Layout e stili
 * Design da Figma: https://www.figma.com/design/nwkAydcd0DZtMURz6auVF5/-DEV--Donnafugata?node-id=1820-21705
 */

/* ========================================
   LAYOUT RESET
   ======================================== */

.news-single {
	margin: 0;
	padding: 0;
}

.news-article {
	margin: 0;
	padding: 0;
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.s4w-breadcrumbs {
	width: 100%;
	border-top: 1px solid var(--stroke-soft-200);
	border-bottom: 1px solid var(--stroke-soft-200);
	background-color: var(--bg-white-0);
}

.s4w-breadcrumbs__container {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	height: 36px;
	gap: 0 !important;
}

.s4w-breadcrumbs__item {
	display: flex;
	align-items: stretch;
	height: 100%;
}

.s4w-breadcrumbs__link,
.s4w-breadcrumbs__current {
	display: flex;
	align-items: center;
	padding: 10px;
	font-family: var(--font-secondary);
	font-size: var(--paragraph-xsmall);
	font-weight: var(--weight-regular);
	line-height: 16px;
	color: var(--text-soft-400);
	border-right: 1px solid var(--stroke-soft-200);
	transition: color 0.2s ease;
}

.s4w-breadcrumbs__item:first-child .s4w-breadcrumbs__link,
.s4w-breadcrumbs__item:first-child .s4w-breadcrumbs__current {
	border-left: 1px solid var(--stroke-soft-200);
}

.s4w-breadcrumbs__link:hover {
	color: var(--text-main-900);
}

.s4w-breadcrumbs__current {
	color: var(--text-main-900);
	font-weight: var(--weight-regular);
}

/* Mobile */
@media (max-width: 768px) {
	.s4w-breadcrumbs__container {
		padding-left: 20px;
		padding-right: 12px;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none; /* Firefox */
		-ms-overflow-style: none; /* IE/Edge */
	}

	.s4w-breadcrumbs__container::-webkit-scrollbar {
		display: none; /* Chrome/Safari */
	}

	.s4w-breadcrumbs__item {
		flex-shrink: 0; /* Previene il wrap degli item */
	}
}

/* ========================================
   TWO-COLUMN LAYOUT
   ======================================== */

.news-article__wrapper {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 80px;
	padding-top: 80px;
	padding-bottom: 120px;
}

/* ========================================
   SIDEBAR (SINISTRA)
   ======================================== */

.news-sidebar {
	/* Sticky positioning */
	position: sticky;
	top: 40px;
	align-self: start;
	padding-top: 32px;
}

/* STILE UNIFORME PER TUTTI GLI ITEM */
.news-sidebar__item {
	margin-bottom: 25px;
}

.news-sidebar__item:last-child {
	margin-bottom: 0;
}

/* Label comune per tutti gli item */
.news-sidebar__label {
	/* label-medium */
	font-family: var(--font-primary);
	font-size: var(--paragraph-small);
	font-weight: var(--weight-book);
	line-height: 20px;
	letter-spacing: 0.56px;
	text-transform: uppercase;
	color: var(--text-main-900);
	margin-bottom: 8px;
	display: block;
}

/* Contenuto comune */
.news-sidebar__content {
	font-family: var(--font-secondary);
	font-size: var(--paragraph-small);
	line-height: 1.6;
	color: var(--text-sub-500);
}

/* Data */
.news-sidebar__date {
	/* usa .news-sidebar__content */
}

/* Info custom repeater */
.news-sidebar__info-group {
	/* Container per repeater items */
}

.news-sidebar__info-subitem {
	margin-bottom: 0;
}

.news-sidebar__info-subitem:last-child {
	margin-bottom: 0;
}

.news-sidebar__info-title {
	display: none; /* Il titolo non è visibile nel design Figma */
}

.news-sidebar__info-text {
	font-family: var(--font-secondary);
	font-size: var(--paragraph-small);
	line-height: 1.6;
	color: var(--text-sub-500);
}

.news-sidebar__info-text p {
	margin: 0;
}

/* Tags - stile link sottolineati separati da " - " */
.news-sidebar__tags-list {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0;
	font-family: var(--font-primary);
	font-size: var(--paragraph-small);
	font-weight: var(--weight-book);
	line-height: 20px;
	letter-spacing: 0.56px;
	text-transform: uppercase;
}

.news-sidebar__tag {
	font-family: var(--font-primary);
	font-size: var(--paragraph-small);
	font-weight: var(--weight-book);
	line-height: 20px;
	letter-spacing: 0.56px;
	text-transform: uppercase;
	color: var(--text-sub-500);
	text-decoration: underline;
	text-decoration-skip-ink: none;
	transition: color 0.2s ease;
}

.news-sidebar__tag:hover {
	color: var(--text-main-900);
}

.news-sidebar__tag:not(:last-child)::after {
	content: ' -';
	margin-right: 4px;
	color: var(--text-sub-500);
	text-decoration: none;
	display: inline;
}

.news-sidebar__tag-separator {
	font-family: var(--font-primary);
	font-size: var(--paragraph-small);
	font-weight: var(--weight-book);
	line-height: 20px;
	letter-spacing: 0.56px;
	color: var(--text-sub-500);
}

/* Social Share - layout bottoni outline */
.news-sidebar__share-list {
	display: flex;
	gap: 0;
	align-items: stretch;
	width: 100%;
}

.news-sidebar__share-link,
.news-sidebar__share-copy {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 16px;
	border: 1px solid var(--stroke-soft-200);
	border-left: none;
	background: transparent;
	transition: all 0.2s ease;
	color: var(--text-sub-500);
	text-decoration: none;
	cursor: pointer;
	flex: 1;
	min-width: 0;
}

.news-sidebar__share-copy {
	white-space: nowrap;
	flex: 0 0 auto;
	color: var(--text-main-900);
}

.news-sidebar__share-list > *:first-child {
	border-left: 1px solid var(--stroke-soft-200);
}

.news-sidebar__share-link:hover,
.news-sidebar__share-copy:hover {
	background: var(--bg-weak-100);
	color: var(--text-main-900);
}

.news-sidebar__share-link svg,
.news-sidebar__share-copy svg {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.news-sidebar__share-copy-text {
	font-family: var(--font-primary);
	font-size: var(--paragraph-small);
	font-weight: var(--weight-book);
	line-height: 20px;
	letter-spacing: 0.56px;
	text-transform: uppercase;
	color: var(--text-main-900);
}

/* ========================================
   MAIN CONTENT (DESTRA)
   ======================================== */

.news-article__content {
	padding-right: 12px;
}

.news-article__content > * {
	width: 100%;
	padding-right: 120px;
}

/* Spacing tra blocchi Gutenberg */
.news-article__content > * + * {
	margin-top: 32px !important;
}

.news-article__html-content {
	margin-bottom: 32px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
	.news-article__wrapper {
		display: flex;
		flex-direction: column;
		gap: 60px;
		padding-top: 60px;
		padding-bottom: 80px;
	}

	.news-sidebar {
		position: static;
		order: 1; /* Sidebar va sopra content su mobile/tablet */
		align-self: stretch;
		width: 100%;
	}

	.news-article__content {
		order: 2;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.news-article__wrapper {
		gap: 40px;
		padding-top: 40px;
		padding-bottom: 60px;
	}

	.news-article__content {
		padding-right: 0;
	}

	.news-article__content > * {
		padding-right: 20px;
	}

	.news-sidebar {
		padding-top: 0;
		align-self: stretch;
		width: 100%;
	}

	.news-sidebar__item {
		margin-bottom: 20px;
	}

	.news-sidebar__label {
		font-size: var(--paragraph-xsmall);
		line-height: 18px;
		letter-spacing: 0.48px;
		margin-bottom: 6px;
	}

	.news-sidebar__content {
		font-size: var(--paragraph-small);
		line-height: 1.6;
	}

	.news-sidebar__tags-list {
		font-size: var(--paragraph-xsmall);
	}

	.news-sidebar__tag {
		font-size: var(--paragraph-xsmall);
	}

	.news-sidebar__share-list {
		flex-wrap: nowrap;
	}

	.news-sidebar__share-copy {
		flex: 1 1 auto;
		border-left: 1px solid var(--stroke-soft-200);
	}

	.news-sidebar__share-link {
		flex: 1 1 0;
		min-width: 0;
	}
}
