/* Expanding Panels
 * Title font assumes the custom "Didot" family (Elementor Custom Fonts).
 */

.bd-exp {
	--bd-active-h: 450px;
	--bd-active-title: #ffffff;
	--bd-desc: #e7ebf1;
	--bd-rule: #dcb276;
	--bd-card-title: #132a3e;
	--bd-toggle: #132a3e;
	--bd-overlay: rgba(9, 18, 32, 0.55);
	--bd-title-font: "Didot Font", Sans-serif;

	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.bd-exp__panel {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
	cursor: pointer;
	transition: flex-grow 0.4s ease;
	outline: none;
}

.bd-exp__panel.is-active {
	flex-grow: 2.4;
	cursor: default;
	height: var(--bd-active-h);
}

/* ---- Media ---- */
.bd-exp__media {
	position: relative;
	width: 100%;
	overflow: hidden;
}

/* Closed panels: image keeps its natural aspect ratio (masonry look). */
.bd-exp__img {
	width: 100%;
	height: auto;
	object-fit: cover;
	display: block;
}

/* Open panel: image fills the fixed-height panel. */
.bd-exp__panel.is-active .bd-exp__media {
	position: absolute;
	inset: 0;
}

.bd-exp__panel.is-active .bd-exp__img {
	height: 100%;
}

.bd-exp__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(9, 18, 32, 0) 35%, var(--bd-overlay) 100%);
	opacity: 0;
	transition: opacity 0.4s ease;
}

.bd-exp__panel.is-active .bd-exp__overlay {
	opacity: 1;
}

/* ---- Open content (over the image) ---- */
.bd-exp__open {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 30px;
	color: var(--bd-active-title);
	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
	transition: opacity 0.4s ease 0.05s, transform 0.4s ease;
}

.bd-exp__panel.is-active .bd-exp__open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.bd-exp__title {
	margin: 0 0 12px;
	font-family: var(--bd-title-font);
	font-weight: 400;
	font-size: clamp(22px, 1.7vw, 30px);
	line-height: 1.15;
	color: inherit;
}

/* Decorative rule under the open title: dot — line — dot — line — dot */
.bd-exp__rule {
	display: flex;
	align-items: center;
	gap: 6px;
	max-width: 300px;
	margin: 0 0 18px;
	color: var(--bd-rule);
}

.bd-exp__rule .dot {
	flex: 0 0 auto;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
}

.bd-exp__rule .line {
	flex: 1 1 auto;
	height: 1px;
	background: currentColor;
	opacity: 0.75;
}

.bd-exp__desc {
	color: var(--bd-desc);
	font-size: 14px;
	line-height: 1.6;
	max-width: 46ch;
}

.bd-exp__desc p {
	margin: 0 0 1em;
}

.bd-exp__desc p:last-child {
	margin-bottom: 0;
}

/* ---- Closed card (title + plus under the image) ---- */
.bd-exp__card {
	text-align: center;
	padding: 18px 10px 4px;
}

.bd-exp__panel.is-active .bd-exp__card {
	display: none;
}

.bd-exp__ctitle {
	margin: 0 0 16px;
	font-family: var(--bd-title-font);
	font-weight: 700;
	font-size: clamp(16px, 1.1vw, 19px);
	line-height: 1.25;
	color: var(--bd-card-title);
}

.bd-exp__toggle {
	padding: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--bd-toggle);
	background: transparent;
	color: var(--bd-toggle);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.bd-exp__toggle:hover {
	background: var(--bd-toggle);
	color: #fff;
}

/* ---- Stagger (odd/even closed columns pushed down) ---- */
.bd-exp {
	--bd-stagger: 60px;
}

.bd-exp--stagger-odd .bd-exp__panel:not(.is-active):nth-child(odd) {
	margin-top: var(--bd-stagger);
}

.bd-exp--stagger-even .bd-exp__panel:not(.is-active):nth-child(even) {
	margin-top: var(--bd-stagger);
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
	.bd-exp {
		flex-direction: column;
	}

	.bd-exp__panel,
	.bd-exp__panel.is-active {
		flex: 1 1 auto;
		width: 100%;
	}

	.bd-exp__panel:not(.is-active):nth-child(odd),
	.bd-exp__panel:not(.is-active):nth-child(even) {
		margin-top: 0;
	}
}

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

	.bd-exp__panel,
	.bd-exp__overlay,
	.bd-exp__open {
		transition: none;
	}
}