/* ==========================================================================
   Arquivo /events/ (template Elementor "Events Archive" 2384) + cartão de evento (loop item 636).
   O cartão (.on-event-card, .on-events-grid) também é usado no carrossel da homepage:
   este ficheiro é carregado lá quando há eventos futuros (ver inc/autoload/events.php).
   ========================================================================== */

/* ---------- Imagem de topo ---------- */
.on-ev-hero__img img { width: 100%; height: 50vh; object-fit: cover; border-radius: var(--radius); }

/* ---------- Intro: texto + 2 imagens ---------- */
.on-ev-intro { flex-direction: row; gap: 60px; }
.on-ev-intro > * { flex: 1 1 0; min-width: 0; }
.on-ev-intro__text { display: flex; flex-direction: column; justify-content: center; gap: 20px; }
/* Tipografia "45f6a75" do kit: Libre 17/1.4 cinzento */
.on-ev-lead,
.on-ev-box__text {
	font-family: var(--f-serif);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--c-muted);
}
.on-ev-intro__imgs { display: flex; gap: 20px; }
.on-ev-intro__imgs > * { flex: 1 1 0; min-width: 0; }
.on-ev-intro__img img { width: 100%; height: 30vh; object-fit: cover; border-radius: var(--radius); }

/* ---------- Números (contadores do Elementor, já no valor final) ---------- */
.on-ev-numbers { flex-direction: row; flex-wrap: wrap; }
.on-ev-numbers > .on-title { flex: 0 0 100%; }
.on-counter {
	display: flex;
	flex-direction: column;
	justify-content: center;
	flex: 1 0 20%;
	min-width: 0;
	padding: 20px;
	background-color: var(--c-grey);
	border-radius: var(--radius);
	text-align: center;
}
.on-counter__num {
	font-family: var(--f-serif);
	font-size: 60px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--c-primary);
}
.on-counter__label {
	font-family: var(--f-sans);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--c-muted);
}

/* ---------- Instalações (image-box: imagem à esquerda, 50% com encolhimento do Elementor) ---------- */
.on-ev-facilities { flex-direction: row; gap: 60px; }
.on-ev-facilities__intro {
	position: sticky;
	top: 100px;
	align-self: flex-start;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	flex: 1 0 30%;
	min-width: 0;
	padding-bottom: 60px;
}
.on-ev-facilities__intro > .on-title { align-self: stretch; }
.on-ev-facilities__list { display: flex; flex-direction: column; gap: 40px; flex: 1 0 50%; min-width: 0; }
.on-facility {
	display: flex;
	align-items: center;
	padding: 10px;
	background-color: var(--c-grey);
	border-radius: var(--radius);
}
.on-page .on-facility__img { width: 50%; margin: 0 40px 0 0; }
.on-facility__img img { width: 100%; border-radius: var(--radius); }
.on-facility__body { width: 100%; }
.on-page .on-facility__title {
	margin: 8px 0 10px;
	font-family: var(--f-serif);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--c-primary);
}
.on-facility__text {
	font-family: var(--f-sans);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--c-muted);
}

/* ---------- Experiências à medida (3 caixas) ---------- */
.on-ev-custom { flex-direction: row; flex-wrap: wrap; }
.on-ev-custom > .on-title,
.on-ev-custom > .on-text { flex: 0 0 100%; }
.on-ev-box {
	display: flex;
	flex-direction: column;
	justify-content: center;
	flex: 1 0 25%;
	min-width: 0;
	padding: 20px 40px;
	background-color: var(--c-grey);
	border-radius: var(--radius);
}
.on-ev-box__text { text-align: center; }

/* ---------- Próximos eventos: grelha + mensagem quando não há ---------- */
.on-events-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: 1fr; /* "equal height" da Loop Grid: todas as linhas com a altura da mais alta */
	gap: 20px;
}
/* Sem eventos: cartão .on-event-empty (estilos em blocks.css, também usado na homepage). */

/* ---------- Chamada final (fundo com camada em gradiente, como no Elementor) ---------- */
.on-ev-cta__box { align-items: center; }
.on-ev-cta__box .on-cta__bg img { object-position: center bottom; }
.on-ev-cta__box::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background-image: linear-gradient(180deg, #01132345 0%, var(--c-dark) 70%);
	opacity: .4;
	border-radius: inherit;
	pointer-events: none;
}

@media (max-width: 1024px) {
	.on-ev-hero__img img { height: 30vh; }
	.on-ev-intro { gap: 40px; }
	.on-ev-intro__text { justify-content: flex-start; }
	.on-ev-intro__imgs { flex-direction: column; }
	.on-events-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.on-ev-hero { padding-bottom: 20px; }
	.on-ev-hero__img img { height: 25vh; }
	.on-ev-intro { flex-direction: column; gap: 20px; }
	.on-ev-intro__imgs { flex-direction: column; }
	.on-counter { flex-basis: 40%; text-align: start; }
	.on-counter__num { font-size: 32px; }
	.on-ev-facilities { flex-direction: column; gap: 20px; }
	.on-ev-facilities__intro { position: static; padding-bottom: 0; }
	.on-ev-facilities__list { gap: 20px; }
	.on-facility { display: block; }
	.on-page .on-facility__img { width: 100%; margin: 0 0 14px; }
	.on-page .on-facility__title { margin-top: 0; }
	.on-facility__text { font-size: 16px; }
	.on-ev-box { flex-basis: 100%; }
	.on-events-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Cartão de evento (loop item 636)
   ========================================================================== */
.on-event-card {
	display: flex;
	align-items: center;
	gap: 30px;
	height: 100%;
	padding: 10px 20px 10px 10px;
	background-color: var(--c-grey);
	border-radius: var(--radius);
}
/* Imagem 80% e texto 100%, encolhidos em proporção (como os widgets do contentor Elementor). */
.on-event-card__media { flex: 0 1 80%; min-width: 0; }
.on-event-card__body { display: flex; flex-direction: column; gap: 20px; flex: 0 1 100%; min-width: 0; }
.on-event-card .on-event-card__img { display: block; width: 100%; height: 220px; object-fit: cover; border-radius: var(--radius); }

.on-event-card__countdown {
	align-self: flex-start;
	margin: 0 0 -8px -10px;
	font-family: var(--f-system);
	font-size: 16px;
	line-height: 24px;
	color: var(--c-primary);
}
.on-event-card__pill {
	display: inline-block;
	padding: 0 12px;
	border-radius: var(--radius);
	background-color: var(--c-white-hover);
	text-align: center;
}
.on-event-card__days,
.on-event-card__label { font-family: Montserrat, sans-serif; font-size: 13px; line-height: 1; }
.on-event-card__days { font-weight: 600; }
.on-event-card__now {
	display: block;
	padding: 2px 12px;
	border-radius: var(--radius);
	background-color: var(--c-text);
	font-family: Montserrat, sans-serif;
	font-size: 13px;
	line-height: 1.5;
}
.on-event-card [hidden] { display: none !important; }

.on-event-card__title {
	margin: 0;
	font-family: var(--f-serif);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--c-primary);
}
.on-event-card__title a { color: inherit; text-decoration: none; }

.on-event-card__dates {
	display: flex;
	align-items: flex-start;
	margin: 0;
	font-family: var(--f-sans);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--c-muted);
}
.on-event-card__dates::before {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	margin: .5px 5px 0 0;
	background-color: var(--c-primary);
	-webkit-mask: url("../../../../../uploads/2025/11/calendar-dots-light.svg") center / contain no-repeat;
	mask: url("../../../../../uploads/2025/11/calendar-dots-light.svg") center / contain no-repeat;
}
.on-event-card__date { white-space: pre; }

.on-event-card__more {
	margin-top: 10px;
	font-family: var(--f-system);
	font-size: 16px;
	line-height: 24px;
}
.on-event-card__more a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--f-sans);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	color: var(--c-primary);
	text-decoration: none;
	transition: transform .25s ease;
}
.on-event-card__more a:hover { transform: scale(1.02); }
.on-event-card__more a::after {
	content: "";
	width: 1em;
	height: 1em;
	background-color: currentColor;
	-webkit-mask: url("../../icons/ui/arrow-up-right-light.svg") center / contain no-repeat;
	mask: url("../../icons/ui/arrow-up-right-light.svg") center / contain no-repeat;
}

/* Carrossel da homepage (Loop Carousel do Elementor: 3 / 2 / 1 cartões por vista) */
.on-carousel--events { --per-view: 3; }
@media (max-width: 1024px) {
	.on-carousel--events { --per-view: 2; }
}
@media (max-width: 767px) {
	.on-event-card { gap: 20px; }
	.on-event-card__days,
	.on-event-card__label,
	.on-event-card__now { font-size: 14px; }
	.on-carousel--events { --per-view: 1; }
}
