
/**
 * Eventi CQD
 * Frontend stylesheet
 * Versione 1.0.0
 */

/* =========================================================
   RESET / BASE
   ========================================================= */

.cqd-eventi,
.cqd-eventi * {
	box-sizing: border-box;
}

.cqd-eventi {
	width: 100%;
	margin: 0;
	padding: 0;
	font-family: inherit;
	color: #333333;
}

.cqd-eventi a {
	color: inherit;
	text-decoration: none;
}

.cqd-eventi img {
	display: block;
	max-width: 100%;
	height: auto;
}


/* =========================================================
   CONTENITORE
   ========================================================= */

.cqd-eventi-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.cqd-eventi-section {
	width: 100%;
	margin: 0 0 40px;
}


/* =========================================================
   GRIGLIA EVENTI
   ========================================================= */

.cqd-eventi-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	width: 100%;
}

.cqd-eventi-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cqd-eventi-grid--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}


/* =========================================================
   CARD EVENTO
   ========================================================= */

.cqd-event-card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #ffffff;
	border: 1px solid #e7e7e7;
	border-radius: 12px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
	transition:
		transform 0.25s ease,
		box-shadow 0.25s ease;
}

.cqd-event-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
}


/* =========================================================
   IMMAGINE CARD
   ========================================================= */

.cqd-event-card__image {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f1f1f1;
}

.cqd-event-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.cqd-event-card:hover .cqd-event-card__image img {
	transform: scale(1.04);
}

.cqd-event-card__image--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	background: #eeeeee;
	color: #777777;
}


/* =========================================================
   BADGE
   ========================================================= */

.cqd-event-card__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	padding: 6px 11px;
	border-radius: 20px;
	background: #ffffff;
	color: #333333;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.cqd-event-card__badge--featured {
	background: #d97745;
	color: #ffffff;
}


/* =========================================================
   CONTENUTO CARD
   ========================================================= */

.cqd-event-card__content {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px;
}

.cqd-event-card__title {
	margin: 0 0 12px;
	padding: 0;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.25;
	color: #292929;
}

.cqd-event-card__title a {
	transition: color 0.2s ease;
}

.cqd-event-card__title a:hover {
	color: #b5654a;
}

.cqd-event-card__excerpt {
	margin: 0 0 18px;
	color: #666666;
	font-size: 15px;
	line-height: 1.6;
}


/* =========================================================
   DATA / ORA
   ========================================================= */

.cqd-event-card__date {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 9px;
	color: #444444;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
}

.cqd-event-card__date-icon {
	flex: 0 0 auto;
	width: 18px;
	font-size: 16px;
	line-height: 1.4;
}

.cqd-event-card__time {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 9px;
	color: #555555;
	font-size: 14px;
	line-height: 1.45;
}


/* =========================================================
   LUOGO
   ========================================================= */

.cqd-event-card__location {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 12px;
	color: #555555;
	font-size: 14px;
	line-height: 1.45;
}

.cqd-event-card__location-icon {
	flex: 0 0 auto;
	width: 18px;
	font-size: 16px;
}


/* =========================================================
   PREZZO
   ========================================================= */

.cqd-event-card__price {
	margin-top: auto;
	margin-bottom: 16px;
	padding-top: 12px;
	color: #333333;
	font-size: 15px;
	font-weight: 700;
}

.cqd-event-card__price--free {
	color: #5f8068;
}


/* =========================================================
   CATEGORIA
   ========================================================= */

.cqd-event-card__category {
	display: inline-flex;
	align-self: flex-start;
	margin-bottom: 14px;
	padding: 5px 10px;
	border-radius: 15px;
	background: #f2eee9;
	color: #6c625a;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
}


/* =========================================================
   PULSANTI
   ========================================================= */

.cqd-event-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 16px;
}

.cqd-event-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: #b5654a;
	color: #ffffff !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition:
		background 0.2s ease,
		transform 0.2s ease;
}

.cqd-event-button:hover {
	background: #96503a;
	color: #ffffff !important;
	transform: translateY(-1px);
}

.cqd-event-button--secondary {
	background: transparent;
	border-color: #b5654a;
	color: #b5654a !important;
}

.cqd-event-button--secondary:hover {
	background: #b5654a;
	color: #ffffff !important;
}


/* =========================================================
   LISTA EVENTI
   ========================================================= */

.cqd-eventi-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cqd-event-list-item {
	display: grid;
	grid-template-columns: 180px minmax(0, 1fr);
	gap: 24px;
	padding: 20px;
	background: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
}

.cqd-event-list-item__image {
	width: 180px;
	height: 120px;
	overflow: hidden;
	border-radius: 8px;
	background: #eeeeee;
}

.cqd-event-list-item__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}


/* =========================================================
   FILTRI
   ========================================================= */

.cqd-event-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 15px;
	margin-bottom: 30px;
	padding: 20px;
	background: #f7f5f2;
	border-radius: 10px;
}

.cqd-event-filter {
	display: flex;
	flex: 1 1 180px;
	flex-direction: column;
	gap: 7px;
}

.cqd-event-filter label {
	color: #444444;
	font-size: 13px;
	font-weight: 600;
}

.cqd-event-filter select,
.cqd-event-filter input {
	width: 100%;
	min-height: 42px;
	padding: 9px 12px;
	border: 1px solid #d8d8d8;
	border-radius: 6px;
	background: #ffffff;
	color: #333333;
	font: inherit;
}

.cqd-event-filter select:focus,
.cqd-event-filter input:focus {
	outline: none;
	border-color: #b5654a;
	box-shadow: 0 0 0 2px rgba(181, 101, 74, 0.12);
}


/* =========================================================
   RICERCA
   ========================================================= */

.cqd-event-search {
	position: relative;
	width: 100%;
	margin-bottom: 25px;
}

.cqd-event-search__form {
	display: flex;
	gap: 10px;
}

.cqd-event-search__input {
	flex: 1;
	min-height: 44px;
	padding: 10px 14px;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	background: #ffffff;
	font: inherit;
}

.cqd-event-search__button {
	flex: 0 0 auto;
	min-height: 44px;
	padding: 10px 20px;
	border: 0;
	border-radius: 6px;
	background: #b5654a;
	color: #ffffff;
	font-weight: 600;
	cursor: pointer;
}


/* =========================================================
   RISULTATI RICERCA
   ========================================================= */

.cqd-event-search-results {
	position: relative;
	width: 100%;
}

.cqd-event-search-results__item {
	display: flex;
	gap: 15px;
	padding: 15px 0;
	border-bottom: 1px solid #eeeeee;
}

.cqd-event-search-results__image {
	flex: 0 0 90px;
	width: 90px;
	height: 65px;
	overflow: hidden;
	border-radius: 6px;
	background: #eeeeee;
}

.cqd-event-search-results__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}


/* =========================================================
   CALENDARIO
   ========================================================= */

.cqd-event-calendar {
	width: 100%;
}

.cqd-event-calendar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 20px;
}

.cqd-event-calendar__title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
}

.cqd-event-calendar__navigation {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cqd-event-calendar__navigation button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid #dddddd;
	border-radius: 6px;
	background: #ffffff;
	cursor: pointer;
}

.cqd-event-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	border-top: 1px solid #e5e5e5;
	border-left: 1px solid #e5e5e5;
}

.cqd-event-calendar__weekday,
.cqd-event-calendar__day {
	min-width: 0;
	padding: 10px;
	border-right: 1px solid #e5e5e5;
	border-bottom: 1px solid #e5e5e5;
}

.cqd-event-calendar__weekday {
	background: #f7f5f2;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
}

.cqd-event-calendar__day {
	min-height: 110px;
	background: #ffffff;
}

.cqd-event-calendar__day-number {
	display: block;
	margin-bottom: 7px;
	font-size: 13px;
	font-weight: 700;
}

.cqd-event-calendar__event {
	display: block;
	margin-bottom: 4px;
	padding: 5px 6px;
	border-radius: 4px;
	background: #b5654a;
	color: #ffffff;
	font-size: 11px;
	line-height: 1.3;
}


/* =========================================================
   CAROUSEL
   ========================================================= */

.cqd-event-carousel {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.cqd-event-carousel__track {
	display: flex;
	gap: 20px;
	transition: transform 0.35s ease;
}

.cqd-event-carousel__slide {
	flex: 0 0 calc(33.333% - 14px);
	min-width: 0;
}

.cqd-event-carousel__navigation {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 18px;
}

.cqd-event-carousel__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid #dddddd;
	border-radius: 50%;
	background: #ffffff;
	cursor: pointer;
	transition:
		background 0.2s ease,
		color 0.2s ease;
}

.cqd-event-carousel__button:hover {
	background: #b5654a;
	color: #ffffff;
}


/* =========================================================
   PAGINAZIONE
   ========================================================= */

.cqd-event-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 7px;
	margin-top: 35px;
}

.cqd-event-pagination a,
.cqd-event-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid #dddddd;
	border-radius: 5px;
	background: #ffffff;
	font-size: 14px;
}

.cqd-event-pagination .current {
	background: #b5654a;
	border-color: #b5654a;
	color: #ffffff;
}


/* =========================================================
   MESSAGGI
   ========================================================= */

.cqd-eventi-empty {
	width: 100%;
	padding: 40px 20px;
	border: 1px dashed #d6d6d6;
	border-radius: 10px;
	background: #fafafa;
	color: #666666;
	text-align: center;
}

.cqd-eventi-loading {
	padding: 30px;
	color: #666666;
	text-align: center;
}

.cqd-eventi-error {
	padding: 15px 18px;
	border: 1px solid #e3b5b5;
	border-radius: 6px;
	background: #fff5f5;
	color: #9b3b3b;
}


/* =========================================================
   SINGOLO EVENTO
   ========================================================= */

.cqd-single-event {
	width: 100%;
}

.cqd-single-event__header {
	margin-bottom: 30px;
}

.cqd-single-event__title {
	margin: 0 0 15px;
	font-size: clamp(30px, 5vw, 48px);
	line-height: 1.15;
}

.cqd-single-event__image {
	width: 100%;
	margin-bottom: 30px;
	overflow: hidden;
	border-radius: 12px;
}

.cqd-single-event__image img {
	width: 100%;
	max-height: 600px;
	object-fit: cover;
}

.cqd-single-event__meta {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 15px;
	margin-bottom: 30px;
	padding: 22px;
	border-radius: 10px;
	background: #f7f5f2;
}

.cqd-single-event__meta-item {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.cqd-single-event__meta-label {
	color: #777777;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.cqd-single-event__meta-value {
	color: #333333;
	font-size: 15px;
	font-weight: 600;
}

.cqd-single-event__content {
	font-size: 17px;
	line-height: 1.75;
}


/* =========================================================
   MAPPA
   ========================================================= */

.cqd-event-map {
	width: 100%;
	min-height: 350px;
	overflow: hidden;
	border-radius: 10px;
	background: #eeeeee;
}

.cqd-event-map iframe {
	display: block;
	width: 100%;
	min-height: 350px;
	border: 0;
}


/* =========================================================
   ACCESSIBILITÀ
   ========================================================= */

.cqd-eventi a:focus-visible,
.cqd-eventi button:focus-visible,
.cqd-eventi input:focus-visible,
.cqd-eventi select:focus-visible {
	outline: 3px solid rgba(181, 101, 74, 0.35);
	outline-offset: 2px;
}


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

@media (max-width: 991px) {

	.cqd-eventi-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cqd-eventi-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cqd-event-carousel__slide {
		flex-basis: calc(50% - 10px);
	}

	.cqd-single-event__meta {
		grid-template-columns: 1fr;
	}

}


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

@media (max-width: 767px) {

	.cqd-eventi-container {
		padding-right: 15px;
		padding-left: 15px;
	}

	.cqd-eventi-grid,
	.cqd-eventi-grid--2,
	.cqd-eventi-grid--4 {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.cqd-event-card__content {
		padding: 18px;
	}

	.cqd-event-card__title {
		font-size: 19px;
	}

	.cqd-event-list-item {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.cqd-event-list-item__image {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}

	.cqd-event-search__form {
		flex-direction: column;
	}

	.cqd-event-search__button {
		width: 100%;
	}

	.cqd-event-calendar__day {
		min-height: 75px;
		padding: 6px;
	}

	.cqd-event-calendar__weekday {
		padding: 7px 3px;
		font-size: 10px;
	}

	.cqd-event-calendar__event {
		font-size: 9px;
	}

	.cqd-event-carousel__slide {
		flex-basis: 100%;
	}

	.cqd-event-carousel__navigation {
		justify-content: center;
	}

	.cqd-single-event__title {
		font-size: 32px;
	}

}


/* =========================================================
   RIDUZIONE ANIMAZIONI
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

	.cqd-event-card,
	.cqd-event-card__image img,
	.cqd-event-carousel__track,
	.cqd-event-button {
		transition: none;
	}

}

