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

.tps-wrapper {
	position: relative;
	width: 100%;
	--tps-dot: #ffffff;
	--tps-dot-active: #ffffff;
   --tidi-main-color: #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;
}

.tps-slide--layout1 .tps-slide-title a {
	color: #fff;
	text-decoration: none;
	overflow: hidden;
	margin: 0;
	font-size: inherit;
}


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

/* 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: avatar + colonna "Created by" / nome */
.tps-slide--layout1 .tps-author-block {
	margin-top: calc( 20px + var(--tidi-avatar-mt, 0px) );
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
}

.tps-slide--layout1 .tps-author-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	line-height: 100%;
}

.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: 13px;
	font-weight: 600;
	color: #fff;
}

/* Avatar comune a tutti i layout */
.tps-avatar-img {
	width: var(--tidi-avatar-w, 20px) !important;
	height: var(--tidi-avatar-h, 20px) !important;
	border-radius: var(--tidi-avatar-radius, 50%);
	margin-right: 5px;
	object-fit: cover;
	flex-shrink: 0;
	display: block;
}

/* Link autore */
.tps-author-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
}

.tps-author {
}

/* Avatar + nome nella byline degli altri layout */
.tps-author-meta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: var(--tidi-avatar-mt, 0px);
}

/* Link categorie nella topline layout1 */
.tps-cat-link {
	color: var(--tidi-meta);
	text-decoration: none;
	transition: color .3s ease-in-out !important;
}

.tps-cat-link:hover {
	color: var(--tidi-text);
}

/* ============================================================
   ALLINEAMENTO CONTENUTO
   ============================================================ */

/* Layout 1 — allineamento centrato */
.tps-slide--layout1 .tps-slide-overlay--center {
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.65) 0%,
		rgba(0, 0, 0, 0.40) 50%,
		rgba(0, 0, 0, 0.10) 100%
	);
	align-items: flex-end;
}

.tps-slide--layout1 .tps-slide-overlay--center .tps-slide-body {
	padding-bottom: 64px;
}

/* Layout 1 — allineamento destra */
.tps-slide--layout1 .tps-slide-overlay--right {
	background: linear-gradient(
		to left,
		rgba(0, 0, 0, 0.6) 0%,
		rgba(0, 0, 0, 0.4) 38%,
		rgba(0, 0, 0, 0.10) 65%,
		transparent 100%
	);
	justify-content: flex-end;
}

.tps-slide--layout1 .tps-slide-overlay--right .tps-slide-body {
	text-align: right;
}


/* Allineamento testo e flex sul body-inner */
.tps-align-left   { text-align: left;   margin: 0 auto 0 0; }
.tps-align-center { text-align: center; margin: 0 auto; }
.tps-align-right  { text-align: right;  margin: 0 0 0 auto; }


.tps-align-center .tps-author-info{ text-align: left; }

/* Flex items (categorie, topline, byline) vanno allineati di conseguenza */
.tps-align-center .tps-cats,
.tps-align-center .tps-topline,
.tps-align-center .tps-byline,
.tps-align-center .tps-author-block {
	justify-content: center;
}

.tps-align-right .tps-cats,
.tps-align-right .tps-topline,
.tps-align-right .tps-byline,
.tps-align-right .tps-author-block {
	justify-content: flex-end;
}



.tps-align-right .tps-author-block{
	flex-direction: row-reverse;
	justify-content: end;
}

/* ============================================================
   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-main-color);
	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;
}

.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;
}

/* =========================================================================
   Layout: FASHION WIDE POSTS
   —
   Stesso stile grafico dell'omonimo layout di Latest Posts Polylang:
   immagine full-bleed, sotto un box bianco centrato che si sovrappone
   leggermente all'immagine, con meta (data + categorie) centrati, titolo
   grande centrato e "by Autore" in corsivo sotto.
   ========================================================================= */

.tps-slide--fashionwide {
	position: relative;
}

.tps-fw-thumb-link {
	display: block;
	width: 100%;
	overflow: hidden;
	border-radius: 3px;
	position: relative;
}

.tps-fw-thumb-link img {
	width: 100%;
	height: 100%;
	max-width: none !important;
	object-fit: cover;
	display: block;
}

.tps-fw-thumb-link--placeholder {
	background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

/* Box contenuto — centrato, si sovrappone leggermente al bordo inferiore dell'immagine */
.tps-fw-body {
	position: relative;
	z-index: 2;
	max-width: 700px;
	margin: -70px auto 0;
	background: #fff;
	border-radius: 3px;
	padding: 32px 40px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	text-align: center;
}

.tps-fw-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 11px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--tidi-meta, #888);
}

.tps-fw-meta .tps-date {
	font-size: 11px;
	letter-spacing: 0.5px;
	color: var(--tidi-meta, #888);
}

.tps-fw-meta .tps-sep {
	color: #ccc;
}

.tps-fw-cat-single a {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--tidi-meta, #888);
	text-decoration: none;
}

.tps-fw-cat-single a:hover {
	color: #111;
}

.tps-fw-title {
	margin: 0;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.3;
}

.tps-fw-title a {
	color: #111;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	text-decoration: none;
}

.tps-fw-title a:hover {
}

.tps-fw-author-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--tidi-meta, #888);
	text-decoration: none;
	margin-top: var(--tidi-avatar-mt, 0px);
}

.tps-fw-author-link:hover {
}

.tps-fw-avatar {
	width: var(--tidi-avatar-w, 20px) !important;
	height: var(--tidi-avatar-h, 20px) !important;
	border-radius: var(--tidi-avatar-radius, 50%);
	margin-right: 5px;
	object-fit: cover;
	flex-shrink: 0;
	display: block;
}

.tps-fw-by {
	font-style: italic;
	text-transform: none;
	letter-spacing: normal;
	font-size: 15px;
}

.tps-fw-author-name {
}

/* Tablet e sotto: box più stretto, sovrapposizione minore */
@media ( max-width: 959px ) {
	.tps-fw-body {
		max-width: 85%;
		margin-top: -50px;
		padding: 24px 28px;
	}

	.tps-fw-title {
		font-size: 1.5rem;
	}
}

/* Mobile: box quasi a piena larghezza, sovrapposizione minima */
@media ( max-width: 640px ) {
	.tps-fw-body {
		max-width: 92%;
		margin-top: -30px;
		padding: 18px 20px;
		gap: 10px;
	}

	.tps-fw-title {
		font-size: 1.25rem;
	}
}

/* =========================================================================
   Tooltip autore (avatar + nome + biografia)
   —
   Attivabile con l'opzione "Tooltip autore" (default disattivata),
   disponibile su tutti i layout del modulo. A differenza degli altri
   moduli della suite, qui il tooltip NON può uscire dal viewport della
   slide: .tps-viewport ha overflow:hidden, necessario al meccanismo dello
   slider (una slide alla volta) — non è sicuro rimuoverlo.
   ========================================================================= */
.tps-author-tooltip {
	position: absolute;
	left: 50%;
	bottom: calc( 100% + 10px );
	transform: translateX(-50%) translateY(4px);
	z-index: 20;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	width: 260px;
	max-width: 80vw;
	padding: 16px;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.16);
	text-align: left;
	font-style: normal;
	text-transform: none;
	letter-spacing: normal;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.tps-author-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 7px solid transparent;
	border-top-color: #fff;
}

[class*="author-link"]:hover .tps-author-tooltip,
[class*="author-link"]:focus-within .tps-author-tooltip {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

.tps-tooltip-avatar {
	width: 48px !important;
	height: 48px !important;
	border-radius: var(--tidi-avatar-radius, 50%);
	overflow: hidden;
	object-fit: cover;
	flex-shrink: 0;
}

.tps-tooltip-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.tps-tooltip-name {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	color: #111;
}

.tps-tooltip-bio {
	font-size: 12px;
	line-height: 1.5;
	color: #555;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Il tooltip deve poter uscire dal blocco autore e dalla slide (non dal
   viewport, che resta clippato per forza). Non tocchiamo .tps-slide: in
   layout1 ha overflow:hidden necessario al clipping dell'immagine di
   sfondo, che romperemmo con una regola generica qui. */
.tps-author-block,
.tps-fw-body {
	overflow: visible;
}
