/**
 * Eventi page — layout aligned with Personale.
 */

.cbr-evt {
	--cbr-evt-gutter: 24px;
	--cbr-evt-max: 1320px;
	--cbr-evt-divider: rgba(201, 162, 39, 0.12);
	--cbr-evt-bg-a: #000000;
	--cbr-evt-bg-b: #000000;
	background: #000000;
	color: #ffffff;
}

.cbr-evt-wrap {
	width: 100%;
	max-width: var(--cbr-evt-max);
	margin: 0 auto;
	padding-left: var(--cbr-evt-gutter);
	padding-right: var(--cbr-evt-gutter);
}

.cbr-evt-image-ph,
.cbr-evt-icon-ph {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #2b2b2b;
	border: 1px solid #444444;
	color: #888888;
	text-align: center;
}

.cbr-evt-image-ph span,
.cbr-evt-icon-ph span {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.cbr-evt-icon-ph {
	width: 48px;
	height: 48px;
	border-radius: 4px;
	flex-shrink: 0;
	margin-bottom: 16px;
}

/* Hero */
.cbr-evt-hero {
	padding: 0 var(--cbr-evt-gutter) 0;
	background: var(--cbr-evt-bg-a);
	overflow: hidden;
}

.cbr-evt-hero__grid {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.cbr-evt-hero__copy {
	width: 100%;
}

.cbr-evt-hero__title {
	margin: 0;
	font-family: var(--cbr-serif);
	font-weight: 400;
	line-height: 1.12;
	color: var(--cbr-white);
}

@media (max-width: 1023px) {
	.cbr-evt-hero__copy {
		order: 2;
	}

	.cbr-evt-hero__media {
		order: 1;
	}

	.cbr-evt-hero__title {
		font-size: var(--cbr-hero-title-size);
	}
}

.cbr-evt-hero__text {
	margin: 0;
	max-width: 540px;
}

.cbr-evt-hero__media {
	position: relative;
	width: calc(100% + (var(--cbr-evt-gutter) * 2));
	max-width: none;
	margin-left: calc(-1 * var(--cbr-evt-gutter));
	margin-right: calc(-1 * var(--cbr-evt-gutter));
	overflow: hidden;
}

.cbr-evt-hero__fade {
	display: block;
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		to bottom,
		#000000 0%,
		#000000 8%,
		rgba(0, 0, 0, 0.92) 16%,
		rgba(0, 0, 0, 0.72) 28%,
		rgba(0, 0, 0, 0.35) 42%,
		rgba(0, 0, 0, 0.08) 58%,
		transparent 72%
	);
}

.cbr-evt-hero__image,
.cbr-evt-hero__placeholder {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	object-position: center center;
	border-radius: 0;
	border: 0;
}

.cbr-evt-hero__placeholder {
	min-height: 224px;
}

/* Section title */
.cbr-evt-section-title {
	margin: 0;
	font-family: var(--cbr-serif);
	font-size: var(--cbr-section-title-size, clamp(1.5rem, 3.2vw, 1.875rem));
	font-weight: 400;
	line-height: 1.15;
}

.cbr-evt-showcase__header.cbr-section-header {
	align-items: center;
	margin-bottom: 24px;
	text-align: center;
}

.cbr-evt-showcase__header .cbr-title-group {
	align-items: center;
}

.cbr-evt-showcase__header .cbr-section-lead {
	max-width: 44rem;
	margin-inline: auto;
}

/* Showcase */
.cbr-evt-showcase {
	padding: 0;
	background: var(--cbr-section-bg, #000000);
	border-top: 0;
	overflow: hidden;
}

/* +32px top space above “I nostri eventi” */
body.cbr-theme .cbr-evt > section.cbr-evt-showcase {
	padding-top: calc(var(--cbr-section-gap, 20px) + 32px) !important;
	padding-block-start: calc(var(--cbr-section-gap, 20px) + 32px) !important;
}

@media (min-width: 1024px) {
	body.cbr-theme .cbr-evt > section.cbr-evt-showcase {
		padding-top: 32px !important;
		padding-block-start: 32px !important;
	}
}

.cbr-evt-showcase__carousel {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.cbr-evt-showcase__viewport {
	overflow: hidden;
	width: 100%;
}

.cbr-evt-showcase__grid {
	display: flex;
	gap: 0;
	transition: transform 450ms ease;
	will-change: transform;
}

.cbr-evt-showcase__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
}

.cbr-evt-showcase__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(201, 162, 39, 0.35);
	cursor: pointer;
	transition: background-color 300ms ease, transform 300ms ease;
}

.cbr-evt-showcase__dot.is-active {
	background: #C9A227;
	transform: scale(1.15);
}

/* Event cards — portrait photo + text block with bottom fade */
.cbr-evt-card {
	display: flex;
	flex-direction: column;
	flex: 0 0 100%;
	min-width: 0;
	padding: 0 !important;
	margin: 0;
	background: #000000;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	overflow: hidden;
	line-height: normal;
	font-size: inherit;
	text-align: left;
	cursor: pointer;
	transition: transform 300ms ease, border-color 300ms ease;
	aspect-ratio: 3 / 4;
}

.cbr-evt-card:focus {
	outline: none;
}

.cbr-evt-card:focus-visible {
	outline: 2px solid rgba(201, 162, 39, 0.65);
	outline-offset: 3px;
}

.cbr-evt-card:hover {
	transform: translateY(-4px);
	border-color: rgba(201, 162, 39, 0.35);
}

.cbr-evt-card__media {
	position: relative;
	display: block;
	flex: 0 0 62%;
	width: 100%;
	min-height: 0;
	padding: 0 !important;
	margin: 0 !important;
	border: 0;
	border-radius: 12px 12px 0 0;
	background: #111111;
	overflow: hidden;
	line-height: 0;
}

.cbr-evt-card:not(.cbr-evt-card--media) .cbr-evt-card__media {
	background: #1a1a1a;
}

.cbr-evt-card__image,
.cbr-evt-card img.cbr-evt-card__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0;
	border-radius: 0;
	aspect-ratio: auto !important;
	flex: none !important;
	object-fit: cover !important;
	object-position: top center !important;
	vertical-align: top;
	transition: transform 450ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cbr-evt-card:hover .cbr-evt-card__image {
	transform: scale(1.03);
}

.cbr-evt-card__fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	height: 48%;
	pointer-events: none;
	background: linear-gradient(
		to top,
		#000000 0%,
		rgba(0, 0, 0, 0.85) 28%,
		rgba(0, 0, 0, 0.35) 62%,
		transparent 100%
	);
}

.cbr-evt-card__media .cbr-evt-icon-ph {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	width: auto;
	height: auto;
	margin: 0;
}

.cbr-evt-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 0.35rem;
	flex: 1 1 auto;
	width: 100%;
	padding: 1.1rem 1.15rem 1.25rem;
	box-sizing: border-box;
	background: transparent;
	text-align: left;
}

.cbr-evt-card__title,
body.cbr-theme .cbr-evt-card__title {
	margin: 0 !important;
	font-family: var(--cbr-serif, "DM Serif Display", Georgia, serif) !important;
	font-size: clamp(1.25rem, 2.1vw, 1.5rem) !important;
	font-weight: 400 !important;
	letter-spacing: 0.02em;
	line-height: 1.2 !important;
	text-transform: none;
	color: #C9A227 !important;
	background: none !important;
	-webkit-text-fill-color: #C9A227 !important;
}

.cbr-evt-card__subtitle {
	margin: 0;
	font-family: var(--cbr-sans, system-ui, sans-serif);
	font-size: clamp(1rem, 1.55vw, 1.15rem);
	font-weight: 400;
	line-height: 1.3;
	color: #ffffff;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cbr-evt-card__location {
	margin: 0.45rem 0 0;
	font-family: var(--cbr-sans, system-ui, sans-serif);
	font-size: clamp(0.88rem, 1.35vw, 1rem);
	font-weight: 400;
	letter-spacing: 0.06em;
	line-height: 1.25;
	text-transform: uppercase;
	color: #ffffff;
}

/* Event detail modal (catalog object style) */
.cbr-modal--event {
	z-index: 10050;
}

.cbr-modal--event .cbr-catalog-modal__dialog {
	width: min(100%, 920px);
	max-height: calc(100dvh - var(--cbr-safe-top) - var(--cbr-safe-bottom));
	padding: 0;
	overflow: auto;
	background: #000000;
	border: 1px solid rgba(201, 162, 39, 0.2);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}

.cbr-modal--event .cbr-catalog-modal__layout {
	display: flex;
	flex-direction: column;
}

.cbr-modal--event .cbr-catalog-modal__main {
	display: grid;
	grid-template-columns: 1fr;
	align-items: stretch;
}

.cbr-modal--event .cbr-catalog-modal__gallery {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: stretch;
	min-height: 0;
	padding: 0.35rem 0.5rem;
	background: transparent;
	border-bottom: 1px solid rgba(201, 162, 39, 0.15);
}

.cbr-modal--event .cbr-catalog-modal__gallery[hidden] {
	display: none;
}

.cbr-modal--event .cbr-catalog-modal__carousel-frame {
	position: relative;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	max-height: none;
	margin: 0;
	flex: 0 0 auto;
}

.cbr-modal--event .cbr-catalog-modal__carousel-viewport {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.cbr-modal--event .cbr-catalog-modal__carousel-track {
	display: flex;
	width: 100%;
	height: 100%;
	transition: transform 300ms ease;
}

.cbr-modal--event .cbr-catalog-modal__carousel-slide {
	display: flex;
	flex: 0 0 100%;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 0;
}

.cbr-modal--event .cbr-catalog-modal__carousel-btn {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 1px solid rgba(201, 162, 39, 0.45);
	border-radius: 999px;
	background: rgba(8, 8, 8, 0.55);
	color: #C9A227;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	transform: translateY(-50%);
	transition: border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.cbr-modal--event .cbr-catalog-modal__carousel-btn:hover:not(:disabled),
.cbr-modal--event .cbr-catalog-modal__carousel-btn:focus-visible {
	border-color: #C9A227;
	background: rgba(8, 8, 8, 0.78);
	color: #C9A227;
}

.cbr-modal--event .cbr-catalog-modal__carousel-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.cbr-modal--event .cbr-catalog-modal__carousel-btn--prev {
	left: 0.4rem;
}

.cbr-modal--event .cbr-catalog-modal__carousel-btn--next {
	right: 0.4rem;
}

.cbr-modal--event .cbr-catalog-modal__carousel-dots {
	position: absolute;
	bottom: 0.55rem;
	left: 50%;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin: 0;
	padding: 0.3rem 0.55rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.5);
	transform: translateX(-50%);
	pointer-events: none;
}

.cbr-modal--event .cbr-catalog-modal__carousel-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.25);
	cursor: pointer;
	pointer-events: auto;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.cbr-modal--event .cbr-catalog-modal__carousel-dot.is-active {
	background: #C9A227;
	transform: scale(1.15);
}

.cbr-modal--event .cbr-catalog-modal__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	object-fit: contain;
	object-position: center center;
}

.cbr-modal--event .cbr-catalog-modal__details {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	padding: 1.25rem 1.35rem 1.5rem;
}

.cbr-modal--event .cbr-catalog-modal__title {
	margin: 0 0 calc(0.5rem + var(--cbr-text-v-gap));
	font-family: var(--cbr-serif);
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1.2;
	color: #ffffff;
}

.cbr-modal--event .cbr-catalog-modal__facts {
	margin: 0 0 calc(0.85rem + var(--cbr-text-v-gap));
	font-size: 13px;
	font-weight: 400;
	line-height: 1.55;
	color: #9a9a9a;
}

.cbr-modal--event .cbr-catalog-modal__facts:empty {
	display: none;
}

.cbr-modal--event .cbr-catalog-modal__description {
	flex: 0 1 auto;
	margin: 0;
	color: #d8d8d8;
	font-size: 15px;
	line-height: 1.7;
}

.cbr-modal--event .cbr-catalog-modal__description:empty {
	display: none;
}

.cbr-modal--event .cbr-modal__close {
	border: 1px solid rgba(201, 162, 39, 0.35);
	border-radius: 999px;
	background: rgba(8, 8, 8, 0.8);
	color: #C9A227;
}

.cbr-modal--event .cbr-modal__close:hover,
.cbr-modal--event .cbr-modal__close:focus-visible {
	border-color: #C9A227;
	background: rgba(8, 8, 8, 0.95);
	color: #C9A227;
}

@media (prefers-reduced-motion: reduce) {
	.cbr-evt-showcase__grid,
	.cbr-evt-card__image {
		transition: none;
	}

	.cbr-modal--event .cbr-catalog-modal__carousel-track {
		transition: none;
	}
}

/* Mobile: section header left-aligned; cards centered */
@media (max-width: 1023px) {
	.cbr-evt-showcase__header.cbr-section-header {
		align-items: flex-start;
		text-align: left;
	}

	.cbr-evt-showcase__header .cbr-title-group {
		align-items: flex-start;
		margin-inline: 0;
	}

	.cbr-evt-showcase__header :is(.cbr-section-title, .cbr-evt-section-title, .cbr-section-lead) {
		text-align: left;
	}

	.cbr-evt-showcase__header .cbr-section-lead {
		margin-inline: 0;
	}

	.cbr-evt-showcase__viewport {
		overflow: visible;
	}

	.cbr-evt-showcase__grid {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		justify-content: center;
		gap: 14px;
		transform: none !important;
		transition: none;
	}

	.cbr-evt-card {
		flex: unset;
		width: 100%;
		max-width: 520px;
		margin-inline: auto;
	}

	.cbr-evt-showcase__dots {
		display: none;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.cbr-evt-showcase__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px;
	}

	.cbr-evt-card {
		max-width: none;
		margin-inline: 0;
	}
}

/* Tablet */
@media (min-width: 768px) {
	.cbr-evt {
		--cbr-evt-gutter: 32px;
	}

	.cbr-evt-hero {
		padding: 0 var(--cbr-evt-gutter) 0;
	}

}

/* Desktop */
@media (min-width: 1024px) {
	.cbr-evt {
		--cbr-evt-gutter: 40px;
	}

	.cbr-evt-hero {
		padding: 0;
	}

	.cbr-evt-hero__grid {
		display: grid;
		grid-template-columns: minmax(0, var(--cbr-hero-desktop-split, 50%)) minmax(0, 1fr);
		grid-template-rows: 1fr;
		align-items: stretch;
		column-gap: var(--cbr-home-hero-column-gap, 24px);
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		min-height: var(--cbr-hero-desktop-min-height);
		max-height: none;
		gap: 0 var(--cbr-home-hero-column-gap, 24px);
		position: relative;
	}

	.cbr-evt-hero__copy {
		position: relative;
		z-index: 4;
		grid-column: 1;
		grid-row: 1;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		width: 100%;
		max-width: none;
		min-height: 100%;
		min-width: 0;
		overflow: visible;
		background: transparent;
	}

	.cbr-evt-hero__title {
		max-width: 100%;
	}

	.cbr-evt-hero__text {
		max-width: min(100%, 34rem);
		width: 100%;
		min-width: 0;
	}

	.cbr-evt-hero__media {
		position: relative;
		grid-column: 2;
		grid-row: 1;
		inset: auto;
		left: auto;
		right: auto;
		width: 100%;
		max-width: none;
		margin: 0;
		height: auto;
		min-height: 100%;
		border: 0;
		border-radius: 0;
		overflow: hidden;
		background: #000;
		z-index: 1;
	}

	.cbr-evt-hero__image,
	.cbr-evt-hero__placeholder {
		position: absolute;
		inset: var(--cbr-hero-desktop-media-pad-top, 20px) 0 0 0;
		z-index: 0;
		width: 100%;
		height: calc(100% - var(--cbr-hero-desktop-media-pad-top, 20px));
		min-height: 0;
		max-height: none;
		border: 0;
		border-radius: 0;
		object-fit: contain;
		object-position: center center;
	}

	.cbr-evt-hero__placeholder {
		min-height: 100%;
	}

	.cbr-evt-hero__fade {
		display: none;
	}

	.cbr-evt-showcase__viewport {
		overflow: visible;
	}

	.cbr-evt-showcase__grid {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 24px;
		transform: none !important;
		transition: none;
	}

	.cbr-evt-card {
		flex: 0 1 calc((100% - 48px) / 3);
		max-width: calc((100% - 48px) / 3);
		min-width: min(100%, 280px);
	}

	.cbr-evt-showcase__dots {
		display: none;
	}

	.cbr-modal--event .cbr-catalog-modal__main {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: stretch;
	}

	.cbr-modal--event .cbr-catalog-modal__gallery {
		flex-direction: column;
		align-self: stretch;
		align-items: stretch;
		justify-content: center;
		height: 100%;
		min-height: 0;
		padding: 0.35rem 0.5rem;
		border-bottom: 0;
		border-right: 1px solid rgba(201, 162, 39, 0.15);
	}

	.cbr-modal--event .cbr-catalog-modal__details {
		min-height: 0;
		height: 100%;
	}

	.cbr-modal--event .cbr-catalog-modal__carousel-frame {
		width: 100%;
		max-width: 100%;
		max-height: 100%;
		aspect-ratio: 1 / 1;
		flex: 0 1 auto;
		margin: 0 auto;
	}

	.cbr-modal--event .cbr-catalog-modal__title {
		font-size: 1.75rem;
	}
}
