/* ==========================================================================
   Post Carousel Block – Frontend (carousel.css)
   ========================================================================== */



/* =========================================================================
   Custom Properties
   ========================================================================= */
.pcb-carousel-wrapper {
    --tidi-pcb-gap:          40px;
    --tidi-pcb-radius:       3px;
    --tidi-pcb-shadow:       0 2px 12px rgba(0, 0, 0, 0.08);

    --very-small-spacing: 5px;
    --small-spacing: 10px;
    --std-spacing: 15px;
    --double-spacing: 30px;
    --triple-spacing: 60px;
    --large-spacing: 80px;

    --tidi-pcb-accent:       #2563eb;
    --tidi-pcb-text:         #1e293b;
    --tidi-pcb-meta:         #aaa;
    --tidi-pcb-syt-yellow:        #f16234;
    --tidi-pcb-syt-yellow:   #f16234;

    --tidi-pcb-cat:          #e6c55d;
    --tidi-pcb-bg:           #ffffff;
    --tidi-pcb-border:       #e2e8f0;
    --tidi-pcb-trans:        0.22s ease;
}


.pcb-carousel-wrapper {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;     /* in un parent flex, min-width:auto lascia il figlio crescere senza limiti */
	overflow: hidden;
}

.pcb-carousel-inner {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
}

.pcb-carousel-viewport {
	flex: 1 1 0%;
	min-width: 0;       /* fondamentale in flexbox per non crescere oltre il parent */
	overflow: hidden;
	box-sizing: border-box;
}

/* Il track scorre orizzontalmente */
.pcb-carousel-track {
	display: flex;
	will-change: transform;
	/* transition e transform impostati via JS */
}

/* Le slide: larghezza calcolata via CSS con variabili impostate da JS */
.pcb-slide {
	box-sizing: border-box;
	flex-shrink: 0;
	min-width: 0;
	/* --pcb-slide-w e --pcb-gap impostati inline sul wrapper via JS */
	width: var(--pcb-slide-w);
}

.pcb-slide + .pcb-slide {
	margin-left: var(--pcb-gap);
}

/* ---- Card ---- */
.pcb-card {
	background: #fff;
	overflow: hidden;
	height: 100%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	/*
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	*/
}

.pcb-card:hover {
	/*
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
	transform: translateY(-2px);
	*/
}

/* ---- Immagine ---- */
.pcb-card-image {
	aspect-ratio: var(--pcb-img-ratio, 4 / 3);
	overflow: hidden;
	flex-shrink: 0;
	background: #f3f4f6;
}

.pcb-card-image a {
	display: block;
	height: 100%;
}

.pcb-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.pcb-card:hover .pcb-card-image img {
	transform: scale(1.04);
}

.pcb-no-thumb {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

/* ---- Corpo card ---- */
.pcb-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

/* ---- Categorie ---- */
.pcb-card-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pcb-cat-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #2563eb;
	text-decoration: none;

	background: #eff6ff;
	padding: 2px 8px;
	margin-bottom: 5px;
	border-radius: 100px;
	transition: background 0.15s;
}

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

/* ---- Titolo ---- */
.pcb-card-title {
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
	font-weight: 700;
	text-align: center;
}

.pcb-card-title  a {
  margin: 0;
  font-size: inherit;
  color: #111 !important;
  background-image: linear-gradient(var(--tidi-pcb-syt-yellow), var(--tidi-pcb-syt-yellow)) !important;
  background-position: 0 100% !important;
  background-repeat: no-repeat;
  background-size: 0 1px !important;
  transition: background-size .4s !important;
}

.pcb-card-title a:hover {
	background-size: 100% 1px !important;
	/* color: #e6c55d; */
}


/* ---- Meta ---- */
.pcb-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 11px;
	color: #6b7280;
	align-items: center;
	justify-content: center;
	font-style: italic;
	margin-top: 10px;
}

.pcb-card-meta .pcb-meta-author {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border-right: 1px solid #f0f0f0;
	padding-right: 10px;
	color: #333;
}

.pcb-avatar-img {
	width: 24px !important;
	height: 24px !important;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	display: block;
}

.pcb-author-name {
	font-style: normal;
}

.pcb-author-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	color: inherit;
}

.pcb-author-link:hover .pcb-author-name {
	text-decoration: underline;
}

.pcb-card-meta .pcb-meta-date {
	color: #aaa;
}

/*
.pcb-meta-author::before { content: '✍ '; }
.pcb-meta-date::before   { content: '📅 '; }
.pcb-meta-author + .pcb-meta-date::before { content: '· 📅 '; }
*/

/* ---- Excerpt ---- */
.pcb-card-excerpt {
	margin: 0;
	font-size: 14px;
	color: #4b5563;
	line-height: 1.6;
}

/* ---- Frecce ---- */
.pcb-arrow {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid #e5e7eb;
	background: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: #374151;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pcb-arrow:hover:not(:disabled) {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

.pcb-arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.pcb-arrow svg {
	width: 18px;
	height: 18px;
}

/* ---- Dots ---- */
.pcb-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

.pcb-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid var(--pcb-dots-color, #2563eb);
	background: transparent;
	padding: 0;
	cursor: pointer;
	transition: opacity 0.2s;
}

.pcb-dot.is-active {
	background: var(--pcb-dots-color, #2563eb);
}

.pcb-dot:hover {
	background: var(--pcb-dots-hover-color, #93c5fd);
	border-color: var(--pcb-dots-hover-color, #93c5fd);
}

/* ---- Nessun post ---- */
.pcb-no-posts {
	text-align: center;
	color: #9ca3af;
	font-style: italic;
	padding: 24px;
}

/* ---- Allineamento contenuto card ---- */
.pcb-align-left   { text-align: left;   margin: 0 auto 0 0; }
.pcb-align-center { text-align: center; margin: 0 auto; }
.pcb-align-right  { text-align: right;  margin: 0 0 0 auto; }

.pcb-align-center .pcb-card-cats,
.pcb-align-center .pcb-card-meta {
	justify-content: center;
}

.pcb-align-left .pcb-card-cats,
.pcb-align-left .pcb-card-meta {
	justify-content: flex-start;
}

.pcb-align-right .pcb-card-cats,
.pcb-align-right .pcb-card-meta {
	justify-content: flex-end;
}

.pcb-align-center .pcb-card-title {	text-align: center; }
.pcb-align-left .pcb-card-title { text-align: left; }
.pcb-align-right .pcb-card-title { text-align: right; }


/* ==========================================================================
   Layout: "One box - All inside"
   Immagine a piena copertura del box, con categorie/titolo/riassunto/meta
   in overlay su gradiente e navigazione (frecce + dots) sovrapposta
   all'immagine, tutto contenuto nello stesso box.
   ========================================================================== */

/* Il wrapper diventa il contesto di posizionamento per frecce e dots */
.pcb-carousel-wrapper.pcb-layout-oneboxall {
	position: relative;
}

/* Il box: proporzioni governate da --pcb-img-ratio (stesso controllo "Aspect Ratio" del pannello) */
.pcb-layout-oneboxall .pcb-card {
	position: relative;
	aspect-ratio: var(--pcb-img-ratio, 16 / 9);
	background: #111827; /* fallback se l'immagine in evidenza è disattivata/assente */
}

/* L'immagine riempie tutto il box, in background */
.pcb-layout-oneboxall .pcb-card-image {
	position: absolute;
	inset: 0;
	height: 100%;
}

/* Corpo testuale in overlay, ancorato in basso, su gradiente scuro per leggibilità */
.pcb-layout-oneboxall .pcb-card-body {
	height: 100%;
	top: 50%;
	-webkit-transform: translateY(-50%);
	-ms-transform: translateY(-50%);
	transform: translateY(-50%);

	position: absolute;
	z-index: 2;
	padding: 28px 24px 22px;
	background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.55) 50%, rgba(15, 23, 42, 0) 100%);

	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	text-align: center;
}

/* Categorie: pillole semitrasparenti su sfondo scuro */
.pcb-layout-oneboxall .pcb-card-cats {
	justify-content: center;
}

.pcb-layout-oneboxall .pcb-cat-tag {
	/* background: rgba(255, 255, 255, 0.2); */
	background: rgba(221,54,67,1);
	background: rgba(0,0,0,1);
	color: #fff;
	padding: 0px 12px;
	font-size: 10px;
	margin-bottom: 2px;
	transition: background 0.3s;
}

.pcb-layout-oneboxall .pcb-cat-tag:hover {
	background: rgba(0,0,0,0.75);
	background: rgba(221,54,67,0.75);
}

/* Titolo bianco, leggibile sull'immagine */
.pcb-layout-oneboxall .pcb-card-title {
	color: #fff;
	font-size: 20px;
}

.pcb-layout-oneboxall .pcb-card-title a {
	color: #fff !important;
	font-size: 17px;
	line-height: 110%;
}

.pcb-layout-oneboxall .pcb-card-title a:hover {
	color: var(--pcb-dots-hover-color, #93c5fd);
}

/* Riassunto e meta info in tonalità chiare semitrasparenti */
.pcb-layout-oneboxall .pcb-card-excerpt {
	color: rgba(255, 255, 255, 0.85);
}

.pcb-layout-oneboxall .pcb-card-meta {
	color: rgba(255, 255, 255, 0.75);
}

.pcb-layout-oneboxall .pcb-card-meta .pcb-meta-author {
	color: #fff;
	border-right-color: rgba(255, 255, 255, 0.3);
}

.pcb-layout-oneboxall .pcb-avatar-img {
	outline: 1px solid rgba(255, 255, 255, 0.4);
}

.pcb-layout-oneboxall .pcb-card-meta .pcb-meta-date {
	color: rgba(255, 255, 255, 0.65);
}

/* Frecce sovrapposte all'immagine, ai lati del box */
.pcb-layout-oneboxall .pcb-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	background: rgba(15, 23, 42, 0.4);
	border-color: rgba(255, 255, 255, 0.5);
	color: #fff;
}

.pcb-layout-oneboxall .pcb-arrow-prev { left: 16px; }
.pcb-layout-oneboxall .pcb-arrow-next { right: 16px; }

.pcb-layout-oneboxall .pcb-arrow:hover:not(:disabled) {
	background: rgba(15, 23, 42, 0.65);
	border-color: #fff;
	color: #fff;
}

/* Dots sovrapposti in basso, dentro al box */
.pcb-layout-oneboxall .pcb-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14px;
	margin-top: 0;
	z-index: 6;
}
