.tpb-block-section + .tpb-block-section { border-top: 1px solid rgba(0,0,0,.08); }
.tpb-block-description > :last-child, .tpb-free-content > :last-child { margin-bottom: 0; }
.tpb-block-media { display: block; margin: 1.5rem auto; }
.tpb-card { overflow: hidden; }
.tpb-card .card-img-top { aspect-ratio: 16 / 10; object-fit: cover; }
.tpb-carousel-image { height: clamp(320px, 50vw, 560px); object-fit: cover; filter: brightness(.65); }
.tpb-content-carousel .carousel-caption { bottom: 2.5rem; }
.tpb-gallery img { max-height: 650px; object-fit: cover; }

.tpb-card {
    --tpb-paper: #fff;
    --tpb-rule: #ddd;
    --tpb-accent: #8c3a2b;
    --tpb-ink: #212529;
    --tpb-ink-muted: #6c757d;
}

.tpb-card__title {
    font-family: var(--tpb-font-serif);
}

.tpb-card__meta {
    letter-spacing: .18em;
}

/** css per  blocco "Gruppo di immagini" image cards */
.tpb-image-card {
	position: relative;
	display: block;
	overflow: hidden;
	min-height: 32rem;
	color: #fff;
	text-decoration: none;
	background-color: #222;
}

.tpb-image-card:hover,
.tpb-image-card:focus {
	color: #fff;
	text-decoration: none;
}

.tpb-image-card__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 300ms ease;
}

.tpb-image-card__overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			to bottom,
			rgba(0, 0, 0, 0.04) 25%,
			rgba(0, 0, 0, 0.74) 100%
		);
}

.tpb-image-card__top-icon {
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	border: 1px solid rgba(255,255,255,.35);
	color: #fff;
}

.tpb-image-card__top-icon svg {
	width: 1rem;
	height: 1rem;
	display: block;
}

.tpb-image-card__content {
	position: absolute;
	right: 2rem;
	bottom: 2rem;
	left: 2rem;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
}

.tpb-image-card__content-icon {
	margin-bottom: 1rem;
	font-size: 1.75rem;
	line-height: 1;
	width: 2.5rem;
}

.tpb-image-card__title {
	margin: 0;
	color: inherit;
	font-size: clamp(2rem, 3vw, 3rem);
	line-height: 1.05;
}

.tpb-image-card__subtitle {
	margin: 0.65rem 0 0;
	color: inherit;
	font-size: 1rem;
	line-height: 1.4;
}

.tpb-image-card:hover .tpb-image-card__image,
.tpb-image-card:focus .tpb-image-card__image {
	transform: scale(1.04);
}

@media (max-width: 767.98px) {
	.tpb-image-card {
		min-height: 26rem;
	}

	.tpb-image-card__content {
		right: 1.5rem;
		bottom: 1.5rem;
		left: 1.5rem;
	}
}

.tpb-post-carousel {
	--tpb-carousel-gap: 1.75rem;
	overflow: hidden;
	margin-top: 2rem;
}

.tpb-post-carousel__track {
	display: flex;
	gap: var(--tpb-carousel-gap);
	overflow-x: auto;
	padding: 0 0 1.25rem;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.tpb-post-carousel__track::-webkit-scrollbar {
	display: none;
}

.tpb-post-carousel__item {
	flex: 0 0 clamp(17rem, 27vw, 30rem);
	min-width: 0;
	scroll-snap-align: start;
}

.tpb-post-carousel-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.tpb-post-carousel-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background: #e9e7e3;
}

.tpb-post-carousel-card__image,
.tpb-post-carousel-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 450ms ease;
}

.tpb-post-carousel-card__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			to bottom,
			rgba(0, 0, 0, 0.24),
			transparent 28%
		);
	pointer-events: none;
}

.tpb-post-carousel-card__category {
	position: absolute;
	top: 1rem;
	left: 1rem;
	padding: 0.45rem 0.9rem;
	border-radius: 999px;
	color: #fff;
	background: rgba(20, 20, 20, 0.58);
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1;
	backdrop-filter: blur(5px);
}

.tpb-post-carousel-card__counter {
	position: absolute;
	top: 1.15rem;
	right: 1rem;
	color: #fff;
	font-family: monospace;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.04em;
}

.tpb-post-carousel-card__body {
	padding-top: 1rem;
}

.tpb-post-carousel-card__title {
	margin: 0;
	color: #171717;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.75rem, 2.2vw, 2.5rem);
	font-weight: 400;
	line-height: 1.05;
}

.tpb-post-carousel-card__location {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0.55rem 0 0;
	color: #746e65;
	font-size: 0.95rem;
}

.tpb-post-carousel-card:hover
.tpb-post-carousel-card__image {
	transform: scale(1.035);
}

.tpb-post-carousel__footer {
	display: flex;
	align-items: center;
	gap: 2rem;
	margin-top: 2.5rem;
}

.tpb-post-carousel__progress {
	position: relative;
	flex: 1;
	height: 2px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.12);
}

.tpb-post-carousel__progress span {
	position: absolute;
	inset: 0 auto 0 0;
	width: 20%;
	background: #1b1b1b;
	transform-origin: left center;
	transition: width 200ms ease;
}

.tpb-post-carousel__navigation {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: 0 0 auto;
}

.tpb-post-carousel__range {
	margin-right: 0.5rem;
	font-family: monospace;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
}

.tpb-post-carousel__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 50%;
	background: transparent;
	color: #1b1b1b;
	font-size: 1.25rem;
	transition:
		background-color 200ms ease,
		border-color 200ms ease;
}

.tpb-post-carousel__button:hover,
.tpb-post-carousel__button:focus-visible {
	border-color: #1b1b1b;
	background: #f3f1ed;
}

.tpb-post-carousel__button:disabled {
	opacity: 0.35;
	cursor: default;
}

@media (max-width: 991.98px) {
	.tpb-post-carousel__item {
		flex-basis: min(72vw, 25rem);
	}
}

@media (max-width: 575.98px) {
	.tpb-post-carousel {
		--tpb-carousel-gap: 1rem;
	}

	.tpb-post-carousel__item {
		flex-basis: 84vw;
	}

	.tpb-post-carousel__footer {
		align-items: flex-end;
		margin-top: 1.5rem;
	}

	.tpb-post-carousel__progress {
		margin-bottom: 1.5rem;
	}

	.tpb-post-carousel__range {
		display: none;
	}
}

.tpb-post-grid-card {
    border-radius: 0 !important;
}

.tpb-post-grid-card .card-img-top {
    border-radius: 0 !important;
}

.tpb-post-grid-card,
.tpb-post-grid-card > a {
    overflow: hidden;
    border-radius: 0 !important;
}

.tpb-post-table-item {
    border-bottom: 1px solid var(--bs-border-color);
}

.tpb-post-table-item article {
    min-height: 144px;
    padding: 1.75rem 2rem 1.75rem 0;
}

.tpb-post-table-date {
    width: 125px;
}

.tpb-post-table-day {
    font-family: serif;
    font-size: 3rem;
    line-height: .85;
}

.tpb-post-table-month {
    margin-top: .5rem;
    font-size: .75rem;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.tpb-post-table-title {
    margin: 0 0 .35rem;
    font-family: serif;
    font-size: 1.25rem;
}

.tpb-post-table-title a {
    color: inherit;
    text-decoration: none;
}

.tpb-post-table-meta {
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

.tpb-post-table-tags .badge {
    border: 1px solid var(--bs-border-color);
    border-radius: 2px;
    background: transparent;
    color: var(--bs-body-color);
    font-weight: 400;
    letter-spacing: .04em;
}

.tpb-post-table-action {
    margin-left: 2rem;
}

.tpb-post-table-action a {
    color: var(--bs-secondary-color);
    text-decoration: none;
    font-size: 1.25rem;
}

/* PAGINAZIONE POST GRID */
.tpb-post-grid-pagination {
    margin-top: 2rem;
}

.tpb-post-grid-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;

    margin: 0;
    padding: 0;
    list-style: none;
}

.tpb-post-grid-pagination .page-numbers li {
    margin: 0;
    padding: 0;
}

.tpb-post-grid-pagination .page-numbers a,
.tpb-post-grid-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 42px;
    height: 42px;
    padding: 0 12px;

    border: 1px solid #ddd;
    border-radius: 0;

    background: #fff;
    color: #222;

    text-decoration: none;
    font-size: 14px;
    font-weight: 500;

    transition: background-color 0.2s ease,
                color 0.2s ease,
                border-color 0.2s ease;
}

/* Hover */
.tpb-post-grid-pagination .page-numbers a:hover {
    background: #222;
    border-color: #222;
    color: #fff;
}

/* Pagina corrente */
.tpb-post-grid-pagination .page-numbers .current {
    background: #222;
    border-color: #222;
    color: #fff;
}

/* Precedente / successivo */
.tpb-post-grid-pagination .prev,
.tpb-post-grid-pagination .next {
    padding-left: 16px;
    padding-right: 16px;
}

/* Puntini ... */
.tpb-post-grid-pagination .dots {
    border-color: transparent;
    background: transparent;
    color: #777;
}

/* Mobile */
@media (max-width: 576px) {
    .tpb-post-grid-pagination .page-numbers {
        gap: 5px;
    }

    .tpb-post-grid-pagination .page-numbers a,
    .tpb-post-grid-pagination .page-numbers span {
        min-width: 36px;
        height: 36px;
        padding: 0 9px;
        font-size: 13px;
    }
}

.tpb-events-calendar {
    width: 100%;
}

.tpb-calendar-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #ddd8cf;
}

.tpb-calendar-heading {
    display: flex;
    align-items: center;
    gap: 18px;
}

.tpb-calendar-title {
    margin: 0;
    font-size: 28px;
    font-weight: 400;
}

.tpb-calendar-navigation {
    display: flex;
    gap: 6px;
}

.tpb-calendar-nav {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd8cf;
    border-radius: 0;
    color: inherit;
    text-decoration: none;
}

.tpb-calendar-weekdays,
.tpb-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.tpb-calendar-weekdays {
    border-bottom: 1px solid #ddd8cf;
}

.tpb-calendar-weekdays > div {
    padding: 18px 10px 10px;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.tpb-calendar-day {
    position: relative;
    min-height: 132px;
    padding: 10px;
    border-right: 1px solid #e3ded5;
    border-bottom: 1px solid #e3ded5;
}

.tpb-calendar-day:nth-child(7n + 1) {
    border-left: 1px solid #e3ded5;
}

.tpb-calendar-day-number {
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1;
}

.tpb-calendar-day.is-today .tpb-calendar-day-number {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #111;
    color: #fff;
}

.tpb-calendar-day.is-past {
    opacity: .35;
}

.tpb-calendar-events {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tpb-calendar-event {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: inherit;
    text-decoration: none;
}

.tpb-calendar-event:hover .tpb-calendar-event-title {
    text-decoration: underline;
}

.tpb-calendar-event-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-top: 3px;
    border-radius: 50%;
    background: currentColor;
}

.tpb-calendar-event-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.tpb-calendar-event-time {
    margin-bottom: 2px;
    font-size: 10px;
    letter-spacing: .08em;
}

.tpb-calendar-event-title {
    font-size: 12px;
    line-height: 1.25;
}

.tpb-gallery--masonry.tpb-gallery--cols-3 {
    column-count: 3;
}

.tpb-gallery--masonry.tpb-gallery--cols-4 {
    column-count: 4;
}

.tpb-gallery--masonry .tpb-gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
}

.tpb-gallery--masonry img {
    display: block;
    width: 100%;
    height: auto;
}

/* CSS per POST GRID EVIDENCE CON IMMAGINI */
.tpb-evidence-image-card {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.tpb-evidence-image-card__link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background: #222;
}
/* Immagine */
.tpb-evidence-image-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
/* Altezza card standard */
.tpb-evidence-image-card {
    height: 290px;
}
/* Card in evidenza */
.tpb-evidence-image-card--featured {
    height: 380px;
}
/* Se c'è una sola card in evidenza possiamo renderla più alta */
.tpb-evidence-image-featured-row
.col:only-child .tpb-evidence-image-card--featured {
    height: 430px;
}
/* Overlay */
.tpb-evidence-image-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, .78) 0%,
            rgba(0, 0, 0, .40) 35%,
            rgba(0, 0, 0, .08) 70%,
            rgba(0, 0, 0, 0) 100%
        );
}
/* Contenuto */
.tpb-evidence-image-card__content {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 70px;
    bottom: 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
/* Categoria */
.tpb-evidence-image-card__category {
    display: block;
    margin-bottom: 6px;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #fff;
}
/* Titolo */
.tpb-evidence-image-card__title {
    display: block;
    font-size: 1.6rem;
    line-height: 1.1;
    font-weight: 500;
    color: #fff;
}
.tpb-evidence-image-card--featured
.tpb-evidence-image-card__title {
    font-size: 2rem;
}
/* Freccia */
.tpb-evidence-image-card__arrow {
    position: absolute;
    z-index: 3;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .20);
    font-size: 1.15rem;
    line-height: 1;
    transition:
        background-color .25s ease,
        transform .25s ease;
}
/* Hover */
.tpb-evidence-image-card__link:hover
.tpb-evidence-image-card__image {
    transform: scale(1.035);
}
.tpb-evidence-image-card__link:hover
.tpb-evidence-image-card__arrow {
    transform: translateX(3px);
    background: rgba(255, 255, 255, .32);
}
/* Focus tastiera */
.tpb-evidence-image-card__link:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}
/* Responsive */
@media (max-width: 991.98px) {
    .tpb-evidence-image-card,
    .tpb-evidence-image-card--featured {
        height: 320px;
    }
    .tpb-evidence-image-card--featured
    .tpb-evidence-image-card__title {
        font-size: 1.7rem;
    }
}
@media (max-width: 575.98px) {
    .tpb-evidence-image-card,
    .tpb-evidence-image-card--featured {
        height: 260px;
    }
    .tpb-evidence-image-card__content {
        left: 18px;
        right: 60px;
        bottom: 18px;
    }
    .tpb-evidence-image-card__title,
    .tpb-evidence-image-card--featured
    .tpb-evidence-image-card__title {
        font-size: 1.4rem;
    }
}
/* POST GRID EVIDENCE TABLE - COLONNE */
@media (min-width: 992px) {
    /* Tutti gli elementi partono senza bordo verticale e senza padding sinistro. */
    .tpb-post-table .tpb-post-table-item {
        border-right: 0;
    }
    .tpb-post-table .tpb-post-table-item article {
        padding-left: 0;
        padding-right: 2rem;
    }
    /*  1 COLONNA */
    .tpb-post-table--cols-1 .tpb-post-table-item article {
        padding-left: 0;
        padding-right: 2rem;
    }
    /*  2 COLONNE: bordo dopo la prima colonna, padding sinistro sulla seconda 
       | 1 | 2 |
       | 3 | 4 |
    */
    .tpb-post-table--cols-2
    .tpb-post-table-item:nth-child(2n + 1) {
        border-right: 1px solid var(--bs-border-color);
    }
    .tpb-post-table--cols-2
    .tpb-post-table-item:nth-child(2n) article {
        padding-left: 2rem;
    }
    /* 3 COLONNE: bordo dopo colonna 1 e 2, padding sinistro su colonna 2 e 3
       | 1 | 2 | 3 |
       | 4 | 5 | 6 |
    */
    .tpb-post-table--cols-3
    .tpb-post-table-item:not(:nth-child(3n)) {
        border-right: 1px solid var(--bs-border-color);
    }
    .tpb-post-table--cols-3
    .tpb-post-table-item:nth-child(3n + 2) article,
    .tpb-post-table--cols-3
    .tpb-post-table-item:nth-child(3n) article {
        padding-left: 2rem;
    }
}
@media (min-width: 992px) {
    /* 3 colonne: prima colonna */
    .tpb-post-table--cols-3
    .tpb-post-table-item:nth-child(3n + 1) article {
        padding-left: 0;
        padding-right: 2rem;
    }
    /* 3 colonne: seconda */
    .tpb-post-table--cols-3
    .tpb-post-table-item:nth-child(3n + 2) article {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    /* 3 colonne: terza */
    .tpb-post-table--cols-3
    .tpb-post-table-item:nth-child(3n) article {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}