/**
 * Loreto Horizontal Accordion — Elementor widget styles.
 *
 * Variables are scoped to the accordion (not :root) so several widgets with
 * different Elementor settings can live on the same page. Elementor control
 * selectors override these on {{WRAPPER}} .loreto-ha.
 */

.loreto-ha {
	--loreto-ha-navy: #16609e;
	--loreto-ha-navy-dark: #082d63;
	--loreto-ha-divider: #ffffff;
	--loreto-ha-divider-width: 1px;
	--loreto-ha-panel-closed: 62px;
	--loreto-ha-speed: 0.55s;

	display: flex;
	max-width: 1400px;
	margin: 0 auto;
	min-height: 780px;
	overflow: hidden;
}

/* ---- Each accordion item ---- */
.loreto-ha__item {
	position: relative;
	display: flex;
	background: var(--loreto-ha-navy);
	color: #ffffff;
	overflow: hidden;
	flex: 0 1 var(--loreto-ha-panel-closed);
	min-width: var(--loreto-ha-panel-closed);
	border-left: var(--loreto-ha-divider-width) solid var(--loreto-ha-divider);
	transition: flex-grow var(--loreto-ha-speed) cubic-bezier(0.22, 1, 0.36, 1);
}

.loreto-ha__item:first-child {
	border-left: none;
}

/* Open item expands to fill the row */
.loreto-ha__item.is-open {
	flex-grow: 1;
	cursor: default;
}

/* ---- Collapsed tab (vertical label) ---- */
.loreto-ha__tab {
	flex: 0 0 var(--loreto-ha-panel-closed);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 100%;
	padding: 50px 0;
	background: inherit;
	border: none;
	border-radius: 0 !important;
	color: #ffffff;
	cursor: pointer;
	font-family: "Noto Serif Display", sans-serif;
	font-size: 34px;
	font-weight: 400;
	text-transform: none;
	transition: background 0.3s ease;
}

.loreto-ha__item.is-open .loreto-ha__tab {
	display: none;
}

.loreto-ha__tab:hover,
.loreto-ha__tab:active,
.loreto-ha__tab:focus {
	background: var(--loreto-ha-navy-dark);
}

.loreto-ha__tab:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -4px;
}

.loreto-ha__tab-label {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-size: 28px;
	letter-spacing: 2.5px;
	white-space: nowrap;
}

/* ---- Expanded content ---- */
.loreto-ha__content {
	display: none;
	flex-direction: column;
	width: 100%;
	/* Hold a stable layout width so text doesn't reflow mid-expand */
	min-width: 640px;
	padding: 40px 48px 56px;
	opacity: 0;
	transform: translateX(-16px);
	transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
}

.loreto-ha__item.is-open .loreto-ha__content {
	display: flex;
	opacity: 1;
	transform: translateX(0);
}

.loreto-ha__image {
	display: block;
	width: 100%;
	max-width: 1010px;
	height: auto;
	aspect-ratio: 1010 / 402;
	object-fit: cover;
	background: var(--loreto-ha-navy-dark);
}

.loreto-ha__heading {
	margin: 34px 0 22px;
	color: #ffffff;
	font-size: 46px;
	font-weight: 400;
	letter-spacing: 0.5px;
}

.loreto-ha__text {
	max-width: 960px;
	color: #ffffff;
	font-family: "Noto Sans", sans-serif;
	font-size: 16px;
	line-height: 1.55;
}

.loreto-ha__text p {
	margin: 0 0 20px;
}

.loreto-ha__text p:last-child {
	margin-bottom: 0;
}

.loreto-ha__text a {
	color: inherit;
}

.loreto-ha__link {
	display: inline-block;
	width: fit-content;
	margin-top: 4px;
	padding-bottom: 12px;
	border-bottom: 1px solid #2793a9;
	color: #ffffff;
	fill: #ffffff;
	font-family: "Noto Sans", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1em;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
	transition: border-color 0.3s ease, color 0.3s ease;
}

.loreto-ha__link:hover,
.loreto-ha__link:focus {
	border-bottom-color: #ffffff;
	text-decoration: none;
}

/* ---- Responsive: stack vertically on small screens ---- */
@media (max-width: 768px) {
	.loreto-ha {
		flex-direction: column;
		min-height: 0 !important;
	}

	.loreto-ha__item {
		flex: 0 0 auto;
		border-left: none;
		border-top: var(--loreto-ha-divider-width) solid var(--loreto-ha-divider);
	}

	.loreto-ha__item:first-child {
		border-top: none;
	}

	.loreto-ha__tab {
		flex: 0 0 auto;
		padding: 20px;
		justify-content: flex-start;
		align-items: center;
	}

	.loreto-ha__tab-label {
		writing-mode: horizontal-tb;
		transform: none;
		font-size: 24px;
		letter-spacing: normal;
		white-space: normal;
	}

	.loreto-ha__content {
		min-width: 0 !important;
		padding: 24px;
	}

	.loreto-ha__heading {
		font-size: 34px;
	}
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
	.loreto-ha__item,
	.loreto-ha__content,
	.loreto-ha__tab,
	.loreto-ha__link {
		transition: none !important;
	}
}
