/**
 * Services Accordion — front-end styles.
 */

.sa-accordion {
	--sa-primary: #16263f;
	--sa-icon-bg: #eef4fc;
	--sa-button: #ffffff;
	--sa-radius: 16px;
	--sa-border: #e6e9ef;

	max-width: 1180px;
	margin: 0 auto;
	box-sizing: border-box;
	font-family: inherit;
	color: var(--sa-primary);
}

.sa-accordion *,
.sa-accordion *::before,
.sa-accordion *::after {
	box-sizing: border-box;
}

.sa-accordion-heading {
	margin: 0 0 24px;
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 800;
	color: var(--sa-primary);
}

/* ---------- Item ---------- */
.sa-item {
	position: relative;
	border-top: 1px solid var(--sa-border);
}

.sa-item:first-child {
	border-top: 0;
}

.sa-item.is-open {
	border-top-color: transparent;
}

/* ---------- Collapsed bar ---------- */
.sa-bar {
	display: flex;
	align-items: center;
	gap: 22px;
	width: 100%;
	padding: 26px 8px;
	background: transparent;
	border: 0;
	cursor: pointer;
	text-align: left;
	font: inherit;
	color: var(--sa-primary);
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.sa-bar:hover {
	opacity: 0.88;
}

.sa-bar:focus-visible {
	outline: 2px solid var(--sa-primary);
	outline-offset: 2px;
	border-radius: 8px;
}

.sa-item.is-open .sa-bar {
	display: none;
}

.sa-bar-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background: var(--sa-icon-bg);
}

.sa-bar-icon img {
	width: 30px;
	height: 30px;
	object-fit: contain;
}

.sa-bar-title {
	flex: 1 1 auto;
	font-size: clamp(22px, 2.6vw, 34px);
	font-weight: 800;
	line-height: 1.15;
}

.sa-bar-plus {
	position: relative;
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
}

.sa-bar-plus::before,
.sa-bar-plus::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background: var(--sa-primary);
	transform: translate(-50%, -50%);
	border-radius: 2px;
}

.sa-bar-plus::before {
	width: 24px;
	height: 2.5px;
}

.sa-bar-plus::after {
	width: 2.5px;
	height: 24px;
}

/* ---------- Expandable wrapper (smooth height) ---------- */
.sa-panel-wrap {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.4s ease;
}

.sa-item.is-open .sa-panel-wrap {
	grid-template-rows: 1fr;
}

.sa-panel {
	min-height: 0;
	overflow: hidden;
}

/* ---------- Expanded media panel ---------- */
.sa-panel-media {
	position: relative;
	min-height: 330px;
	margin: 6px 0 18px;
	padding: 44px 48px;
	border-radius: var(--sa-radius);
	background-color: var(--sa-primary);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
	display: flex;
	align-items: flex-start;
}

.sa-panel-overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			90deg,
			color-mix(in srgb, var(--sa-primary) 92%, transparent) 0%,
			color-mix(in srgb, var(--sa-primary) 72%, transparent) 42%,
			color-mix(in srgb, var(--sa-primary) 30%, transparent) 100%
		);
}

/* Fallback for browsers without color-mix(). */
@supports not (background: color-mix(in srgb, red, blue)) {
	.sa-panel-overlay {
		background: linear-gradient(
			90deg,
			rgba(22, 38, 63, 0.92) 0%,
			rgba(22, 38, 63, 0.72) 42%,
			rgba(22, 38, 63, 0.3) 100%
		);
	}
}

.sa-panel-content {
	position: relative;
	z-index: 2;
	max-width: 620px;
	color: #fff;
}

.sa-panel-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 20px;
	border-radius: 12px;
	background: #fff;
}

.sa-panel-icon img {
	width: 34px;
	height: 34px;
	object-fit: contain;
}

.sa-panel-icon:empty {
	display: none;
}

.sa-panel-title {
	margin: 0 0 14px;
	font-size: clamp(26px, 3.4vw, 40px);
	font-weight: 800;
	line-height: 1.1;
	color: #fff;
}

.sa-panel-text {
	margin: 0 0 24px;
	font-size: clamp(15px, 1.5vw, 18px);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.92);
}

.sa-panel-text p {
	margin: 0 0 12px;
}

.sa-panel-text p:last-child {
	margin-bottom: 0;
}

.sa-panel-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 4px 0;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--sa-button);
	border-bottom: 2px solid var(--sa-button);
	transition: gap 0.2s ease, opacity 0.2s ease;
}

.sa-panel-btn:hover {
	gap: 18px;
	opacity: 0.9;
	color: var(--sa-button);
}

.sa-panel-btn .sa-arrow {
	transition: transform 0.2s ease;
}

.sa-panel-btn:hover .sa-arrow {
	transform: translateX(3px);
}

/* ---------- Close button ---------- */
.sa-close {
	position: absolute;
	top: 20px;
	right: 22px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	font-size: 30px;
	line-height: 1;
	color: #fff;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.sa-close:hover {
	background: rgba(255, 255, 255, 0.16);
	transform: rotate(90deg);
}

.sa-close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.sa-bar {
		gap: 16px;
		padding: 20px 4px;
	}

	.sa-bar-icon {
		width: 46px;
		height: 46px;
	}

	.sa-bar-icon img {
		width: 24px;
		height: 24px;
	}

	.sa-panel-media {
		min-height: 0;
		padding: 30px 24px;
	}

	.sa-panel-overlay {
		background: color-mix(in srgb, var(--sa-primary) 82%, transparent);
	}

	@supports not (background: color-mix(in srgb, red, blue)) {
		.sa-panel-overlay {
			background: rgba(22, 38, 63, 0.82);
		}
	}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.sa-panel-wrap,
	.sa-bar,
	.sa-panel-btn,
	.sa-close,
	.sa-arrow {
		transition: none;
	}
}
