/* ============================================================
   Tidi Post Slider – slider.css  v1.1
   ============================================================ */

.tps-wrapper {
	position: relative;
	width: 100%;
	--tps-dot: #ffffff;
	--tps-dot-active: #ffffff;
   --tidi-flame: #f16234;
   --tidi-container-width: 1360px;
}

.tps-viewport {
	overflow: hidden;
	width: 100%;
}

.tps-track {
	display: flex;
	will-change: transform;
}

.tps-slide {
	flex: 0 0 100%;
	min-width: 0;
}

/* ============================================================
   LAYOUT 1 – overlay: testo sopra immagine, allineato a sx
   ============================================================ */

.tps-slide--layout1 {
	position: relative;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
}

/* Gradiente: forte a sinistra, sfuma verso destra */
.tps-slide--layout1 .tps-slide-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;       /* centrato verticalmente */
	background: linear-gradient(
		to right,
		rgba(0, 0, 0, 0.6) 0%,
		rgba(0, 0, 0, 0.4) 38%,
		rgba(0, 0, 0, 0.10) 65%,
		transparent 100%
	);
}

.tps-slide--layout1 .tps-slide-body {
	width: 100%;
	max-width: var(--tidi-container-width);
	margin: 0 auto;
	padding: 32px 20px;
}

.tps-slide--layout1 .tps-slide-body-inner {
	width: 60%;
	color: #fff;
}

/* Categorie – badge bianchi semitrasparenti */
.tps-slide--layout1 .tps-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}

.tps-slide--layout1 .tps-cat-tag {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: #fff;
	background: rgba(255,255,255,.20);
	border: 1px solid rgba(255,255,255,.40);
	padding: 3px 10px;
	border-radius: 999px;
	text-decoration: none;
	backdrop-filter: blur(4px);
	transition: background .2s;
}

.tps-slide--layout1 .tps-cat-tag:hover {
	background: rgba(255,255,255,.35);
}

/* Titolo */
.tps-slide--layout1 .tps-slide-title {
	margin: 0 0 12px;
	font-size: clamp(36px, 3vw, 52px);
	font-weight: 700;
	line-height: 1.25;
	text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.tps-slide--layout1 .tps-slide-title a {
	color: #fff;
	text-decoration: none;
}

.tps-slide--layout1 .tps-slide-title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Byline */
.tps-slide--layout1 .tps-byline {
	font-size: 13px;
	color: rgba(255,255,255,.75);
	margin-bottom: 12px;
	display: flex;
	gap: 6px;
	align-items: center;
}

.tps-slide--layout1 .tps-sep {
	opacity: .5;
}

/* Excerpt */
.tps-slide--layout1 .tps-excerpt {
	margin: 0;
	font-size: 14px;
	color: rgba(255,255,255,.85);
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ============================================================
   LAYOUT BASE (fallback / futuri layout)
   ============================================================ */

.tps-slide-image {
	overflow: hidden;
	background: #e2e8f0;
}

.tps-slide-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tps-slide-image--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
	font-size: 13px;
}

.tps-slide-body {
	padding: 16px;
}

.tps-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}

.tps-cat-tag {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #2563eb;
	background: #eff6ff;
	padding: 2px 8px;
	border-radius: 999px;
	text-decoration: none;
}

.tps-cat-tag:hover {
	background: #dbeafe;
}

.tps-slide-title {
	margin: 0 0 8px;
	font-size: 1.1rem;
	line-height: 1.35;
}

.tps-slide-title a {
	color: inherit;
	text-decoration: none;
}

.tps-slide-title a:hover {
	text-decoration: underline;
}

.tps-byline {
	font-size: 13px;
	color: #64748b;
	margin-bottom: 8px;
	display: flex;
	gap: 6px;
	align-items: center;
}

.tps-sep { opacity: .5; }

.tps-excerpt {
	margin: 0;
	font-size: 14px;
	color: #475569;
	line-height: 1.55;
}

/* ============================================================
   FRECCE
   ============================================================ */

.tps-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,.5);
	background: rgba(0,0,0,.25);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 0 6px 0;
	transition: background .2s, border-color .2s;
	backdrop-filter: blur(4px);
}

.tps-arrow:hover {
	background: rgba(0,0,0,.55);
	border-color: rgba(255,255,255,.9);
}

.tps-arrow--prev { left: 16px; }
.tps-arrow--next { right: 16px; }

/* Layout base: frecce scure */
.tps-wrapper:not(.tps-wrapper--layout1) .tps-arrow {
	border-color: #cbd5e1;
	background: #fff;
	color: #334155;
}

.tps-wrapper:not(.tps-wrapper--layout1) .tps-arrow:hover {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

/* ============================================================
   DOTS
   ============================================================ */

.tps-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding: 12px 0 4px;
}

/* Layout 1: dots assoluti sopra l'immagine, in basso al centro */
.tps-wrapper--layout1 .tps-dots {
	position: absolute;
	bottom: 16px;
	left: 0;
	right: 0;
	padding: 0;
	z-index: 10;
}

.tps-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid var(--tps-dot);
	background: transparent;
	padding: 0;
	cursor: pointer;
	transition: background .2s, transform .2s;
}

.tps-dot.is-active {
	background: var(--tps-dot-active);
	border-color: var(--tps-dot-active);
	transform: scale(1.3);
}

.tps-dot:hover {
	background: var(--tps-dot);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
	.tps-slide--layout1 .tps-slide-body {
		padding: 0 16px 150px 16px;
	}

	.tps-slide--layout1 .tps-slide-body-inner {
		width: 90%;
	}

	.tps-slide--layout1 .tps-slide-overlay {
		/* su mobile gradiente da basso verso alto invece che laterale */
		background: linear-gradient(
			to top,
			rgba(0, 0, 0, 0.80) 0%,
			rgba(0, 0, 0, 0.50) 50%,
			rgba(0, 0, 0, 0.10) 100%
		);
		align-items: flex-end;
	}

	.tps-arrow--prev { left: 8px; }
	.tps-arrow--next { right: 8px; }
}

/* ============================================================
   NO POST
   ============================================================ */

.tps-no-posts {
	text-align: center;
	color: #94a3b8;
	font-style: italic;
	padding: 24px;
}

/* ============================================================
   LAYOUT 1 – nuovi elementi contenuto
   ============================================================ */

/* Riga superiore: data · for · categorie */
.tps-slide--layout1 .tps-topline {
	font-size: 13px;
	color: rgba(255,255,255,.80);
	margin-bottom: 10px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}

.tps-slide--layout1 .tps-date {
	color: rgba(255,255,255,.80);
}

.tps-slide--layout1 .tps-for {
	font-style: italic;
	color: rgba(255,255,255,.60);
}

.tps-slide--layout1 .tps-cat-list {
	color: rgba(255,255,255,.80);
}

/* Autore: "Created by" (piccolo) + nome autore */
.tps-slide--layout1 .tps-author-block {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	line-height: 110%;
}

.tps-slide--layout1 .tps-created-by {
	font-size: 11px;
	color: rgba(255,255,255,.50);
	letter-spacing: .03em;
}

.tps-slide--layout1 .tps-author {
	font-size: 14px;
	font-weight: 600;
	color: #fff;
}

/* ============================================================
   HERO IMAGE – slide a tutta altezza viewport
   ============================================================ */

.tps-wrapper--hero .tps-slide--layout1 {
	height: 100vh;
}

/* ============================================================
   MINIATURE
   ============================================================ */

.tps-thumbnails {
	background: #fff;
	border-top: 1px solid #e2e8f0;
	overflow: hidden;
}

.tps-tn-track {
	display: flex;
	/* su desktop tutte visibili: nessuna transizione */
}

/* Ogni miniatura */
.tps-tn-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 20px;
	border-right: 1px solid #e2e8f0;
	cursor: pointer;
	transition: background .2s;
	flex-shrink: 0;
}

.tps-tn-item:last-child {
	border-right: none;
}

.tps-tn-item:hover {
	background: #f8fafc;
}

.tps-tn-item.is-active {
	background: #f1f5f9;
}

/* Thumbnail immagine */
.tps-tn-img {
	width: 80px;
	height: 60px;
	flex-shrink: 0;
	overflow: hidden;
	border-radius: 4px;
	background: #e2e8f0;
}

.tps-tn-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tps-tn-img--placeholder {
	background: #cbd5e1;
}

/* Testo miniatura */
.tps-tn-meta {
	flex: 1;
	min-width: 0;
}

.tps-tn-title {
	display: block;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 6px;
	color: #1e293b;
	/* tronca a 3 righe */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tps-tn-title a {
	color: inherit;
	text-decoration: none;
}

.tps-tn-title a:hover {
	text-decoration: underline;
}

.tps-tn-info {
	font-size: 12px;
	color: #64748b;
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
	align-items: center;
}

.tps-tn-info .tps-for {
	font-style: italic;
	color: #94a3b8;
}

.tps-tn-cats {
	color: #64748b;
}

/* ---- Layout responsive 4-2-1 ---- */

/* Desktop ≥ 1024px: 4 colonne fisse, nessun scorrimento */
@media (min-width: 1024px) {
	.tps-tn-track {
		/* larghezza esatta: 4 item */
	}
	.tps-tn-item {
		width: 25%;
	}
}

/* Tablet 600–1023px: 2 colonne, gli altri scorrono */
@media (min-width: 600px) and (max-width: 1023px) {
	.tps-tn-item {
		width: 50%;
	}
}

/* Mobile < 600px: 1 colonna, gli altri scorrono */
@media (max-width: 599px) {
	.tps-tn-item {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid #e2e8f0;
	}
}

/* ============================================================
   MINIATURE
   ============================================================ */

.tps-thumbs {
	overflow: hidden;
	background: #fff;
	border-top: 1px solid #e2e8f0;
}

.tps-thumbs-track {
	display: flex;
	will-change: transform;
}

/*
 * Ogni thumb occupa 1/4 del track su desktop, 1/2 su tablet, tutto su mobile.
 * Il track contiene N elementi → ogni elemento è largo 100%/N del track.
 * Ma noi vogliamo che N elementi riempiano esattamente la larghezza visibile,
 * quindi impostiamo ogni item a (100% / cols) dove cols = 4/2/1.
 * Usiamo CSS variables passate via media query.
 */
.tps-thumb {
	flex: 0 0 25%;   /* desktop: 4 visibili */
	min-width: 0;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 16px 20px;
	cursor: pointer;
	border-right: 1px solid #e2e8f0;
	transition: background .2s;
	box-sizing: border-box;
	background: #fcfcfc;
}

.tps-thumb:last-child {
	border-right: none;
}

.tps-thumb:hover {
	background: #f1f5f9;
}

.tps-thumb.is-active {
	background: #f1f5f9;
	border-top: 2px solid var(--tidi-flame);
	padding-top: 14px;
}

/* Immagine miniatura */
.tps-thumb-img {
	flex: 0 0 70px;
	width: 70px;
	height: 70px;
	overflow: hidden;
	border-radius: 4px;
	background: #e2e8f0;
}

.tps-thumb-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tps-thumb-img--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
	font-size: 11px;
}

/* Testo miniatura */
.tps-thumb-meta {
	flex: 1;
	min-width: 0;
}

.tps-thumb-title a {
    margin: 0;
    font-size: inherit;
    color: #111 !important;

    background-image: linear-gradient(var(--tidi-flame), var(--tidi-flame)) !important;
    background-position: 0 100% !important;
    background-repeat: no-repeat;
    background-size: 0 1px !important;
    transition: background-size .4s !important;
}

.tps-thumb-title a:hover {
    background-size: 100% 1px !important;
}

.tps-thumb-title {
	display: block;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
	margin-bottom: 5px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}


.tps-thumb-info {
	font-size: 11px;
	color: #64748b;
	line-height: 1.4;
}

.tps-thumb-date {
	color: #64748b;
}

.tps-thumb-cats {
	color: #64748b;
}

/* ---- Responsive ---- */




/* ============================================================
   HERO + MINIATURE – overlay in basso
   ============================================================ */

/*
 * In modalità hero il wrapper è position:relative (già lo è).
 * Le miniature escono dal flusso e si posizionano sul bordo inferiore
 * dell'immagine hero, sopra il contenuto della pagina.
 */
.tps-wrapper--hero .tps-thumbs {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 10;
	max-width: 1320px;
	margin: 0 auto;
	border-top-left-radius: 6px;
	border-top-right-radius: 6px;
}
