#services {
	background: white;
	color: #111;
}

.services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 40px;
	margin: auto;
}

.service-card {
	border-top: 1px solid #ddd;
	padding-top: 24px;
	container-type: inline-size;
}

.service-card h3 {
	margin-bottom: 1rem;
	font-weight: 500;
}

.service-card-preview {
	display: flex;
	flex-wrap: nowrap;
	gap: 1rem;
	align-items: flex-start;
	cursor: pointer;
}

.service-card-image {
	width: 100%;
	max-width: 33.333%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 18px;
	flex: 0 0 33.333%;
	min-width: 120px;
}

.service-card-meta {
	flex: 1 1 0;
	min-width: 0;
}

@container (max-width: 300px) {
	.service-card-preview {
		flex-direction: column;
	}

	.service-card-image {
		flex: 0 0 100%;
		max-width: 100%;
		min-width: auto;
	}

	.service-card-meta {
		flex: 1 1 100%;
		min-width: auto;
	}
}

@media (max-width: 520px) {
	.service-card-preview {
		flex-direction: column;
	}

	.service-card-image {
		flex: 0 0 auto;
		max-width: 100%;
		min-width: auto;
	}
}

.service-card p {
	line-height: 1.8;
}

.service-card {
	position: relative;
	container-type: inline-size;
}

.service-card details.service-details {
	margin: 1rem 0 0;
	display: block;
}

.service-card details.service-details summary {
	display: none;
}

.service-card .service-details-toggle {
	font: inherit;
	color: #0f4a6f;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	margin: 0;
	font-size: 1rem;
	line-height: 1;
	vertical-align: middle;
}

.service-card .service-details-toggle:hover,
.service-card .service-details-toggle:focus-visible {
	text-decoration: underline;
	outline: none;
}

.service-card .service-popup {
	display: none;
}

.service-card details.service-details[open] .service-popup {
	display: block;
}

.service-card .service-popup-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 34, 55, 0.25);
	z-index: 998;
}

.service-card .service-popup-panel {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: calc(100% - 4rem);
	max-width: 700px;
	max-height: calc(100vh - 4rem);
	overflow: auto;
	background: white;
	border: 1px solid #ddd;
	box-shadow: 0 16px 40px rgba(15, 34, 55, 0.12);
	border-radius: 24px;
	padding: 1.5rem;
	z-index: 999;
}

.service-card .service-popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin: -1.5rem -1.5rem 0;
	padding: 1.5rem;
	background: var(--accent);
	border-radius: 24px 24px 0 0;
}

.service-card .service-popup-header h4 {
	margin: 0;
	font-size: 1.3rem;
	color: white;
}

.service-card .service-popup-image {
	width: 100%;
	height: auto;
	border-radius: 18px;
	object-fit: cover;
	margin: 1rem 0;
	display: block;
	max-height: 320px;
}

.service-card .service-popup-description {
	margin: 1rem 0 0;
	color: var(--body);
	line-height: 1.6;
}

.service-card .service-popup-close {
	background: transparent;
	border: none;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	color: white;
	padding: 0;
}

.service-card details.service-details .service-popup-panel ul {
	margin: 0;
	padding-left: 1.25rem;
	line-height: 1.8;
}

.service-card details.service-details .service-popup-panel ul li {
	margin-bottom: 0.75rem;
	list-style-type: disc;
}

.service-card details.service-details .service-popup-panel ul li strong {
	font-weight: 600;
}

.service-card details.service-details ul li {
	margin-bottom: 0.75rem;
	list-style-type: disc;
}

.service-card details.service-details ul li strong {
	font-weight: 600;
}

@media (min-width: 1000px) {
	.services-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 900px) {
	.services-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.service-card ul {
		max-width: 100%;
	}
}

@container (max-width: 420px) {
	.service-card-preview {
		flex-direction: column;
	}

	.service-card-image {
		max-width: 100%;
		flex: 0 0 100%;
		min-width: auto;
	}
}
