/**
 * Emergency Services page — light hero + red emergency card, capability band,
 * overview sections with 4-tile / 3-tile photo galleries.
 */

/* ---- Hero (light image + emergency card) ----------------------------- */
.em-hero {
	position: relative;
	background: var(--ne-secondary-a10);
	background-image: var(--em-hero-img, none);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}
.em-hero::before {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.7) 52%, rgba(255,255,255,0.28) 100%);
}
.em-hero__inner {
	position: relative;
	min-height: 360px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ne-space-3xl);
	padding-block: var(--ne-space-5xl);
}
.em-hero__lead { flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--ne-space-m); }
.em-hero__eyebrow {
	align-self: flex-start;
	background: var(--ne-red-200);
	color: var(--ne-neutral-100);
}
.em-hero__title { margin: 0; color: var(--ne-primary-500); font-size: var(--ne-h1-size); line-height: 1.08; max-width: 15ch; }
.em-hero__sub { margin: 0; color: var(--ne-neutral-900); font-size: var(--ne-h8-size); line-height: 1.6; max-width: 50ch; }

/* Emergency contact card */
.em-contact {
	flex: 0 0 320px;
	width: 320px;
	background: #fdeaec;
	border: 1px solid rgba(208,4,22,0.28);
	border-radius: 16px;
	padding: var(--ne-space-xl);
	box-shadow: var(--ne-shadow-deep);
	display: flex;
	flex-direction: column;
	gap: var(--ne-space-m);
}
.em-contact__row--head { display: flex; align-items: center; gap: var(--ne-space-s); }
.em-contact__icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border-radius: 12px;
	background: var(--ne-red-200); color: var(--ne-neutral-100);
	flex: 0 0 auto;
}
.em-contact__icon .ne-icon { width: 24px; height: 24px; }
.em-contact__hotline { font-size: var(--ne-h8-size); font-weight: 700; color: var(--ne-red-200); line-height: 1.2; }
.em-contact__phone {
	display: inline-flex; align-items: center; gap: var(--ne-space-xs);
	font-size: var(--ne-h6-size);
	font-weight: 700;
	color: var(--ne-primary-500);
	text-decoration: none;
}
.em-contact__phone .ne-icon { width: 20px; height: 20px; color: var(--ne-red-200); }
.em-contact__phone:hover { color: var(--ne-red-200); }
.em-contact__langs { display: flex; flex-direction: column; gap: 2px; padding-top: var(--ne-space-xs); border-top: 1px solid rgba(208,4,22,0.18); }
.em-contact__langs-label { font-size: var(--ne-b3-size); text-transform: uppercase; letter-spacing: var(--ne-h9-tracking); color: var(--ne-neutral-700); font-weight: 700; }
.em-contact__langs-value { font-size: var(--ne-b1-size); font-weight: 600; color: var(--ne-primary-500); }

/* ---- Capability band ------------------------------------------------- */
.em-feature { align-items: flex-start; }
.em-feature__body { display: flex; flex-direction: column; gap: var(--ne-space-2xs); min-width: 0; }
.em-feature__title { font-size: var(--ne-h8-size); font-weight: 700; color: var(--ne-primary-500); }
.em-feature__desc { font-size: var(--ne-b2-size); font-weight: 400; color: var(--ne-neutral-700); line-height: var(--ne-b2-line); }
.em-band__grid { align-items: stretch; }

/* ---- Accent heading (shared with single-hospital) -------------------- */
.ne-accent-head {
	position: relative;
	margin: 0 0 var(--ne-space-l);
	padding-left: var(--ne-space-m);
	font-size: var(--ne-h6-size);
	line-height: 1.25;
	color: var(--ne-primary-500);
}
.ne-accent-head::before {
	content: "";
	position: absolute; left: 0; top: 4px; bottom: 4px;
	width: 5px; border-radius: 3px;
	background: linear-gradient(var(--ne-secondary-400), var(--ne-tertiary-400));
}

/* ---- Overview sections ----------------------------------------------- */
.em-overview + .em-overview { padding-top: 0; }
.em-overview__body { max-width: 82ch; color: var(--ne-neutral-800); line-height: var(--ne-b1-line); margin-bottom: var(--ne-space-2xl); }
.em-overview__body p { margin: 0 0 var(--ne-space-m); }

/* Galleries */
.em-gallery { display: grid; gap: var(--ne-space-m); }
.em-gallery__item { margin: 0; border-radius: 14px; overflow: hidden; background: var(--ne-neutral-200); }
.em-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 3-tile even row */
.em-gallery--row { grid-template-columns: repeat(3, 1fr); }
.em-gallery--row .em-gallery__item { aspect-ratio: 4 / 3; }

/* 4-tile collage: two tall tiles + a stacked pair */
.em-gallery--collage {
	grid-template-columns: 1.4fr 1.4fr 1fr;
	grid-template-rows: repeat(2, 1fr);
	min-height: 420px;
}
.em-gallery--collage .em-gallery__item:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
.em-gallery--collage .em-gallery__item:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
.em-gallery--collage .em-gallery__item:nth-child(3) { grid-column: 3; grid-row: 1; }
.em-gallery--collage .em-gallery__item:nth-child(4) { grid-column: 3; grid-row: 2; }
.em-gallery--collage .em-gallery__item:nth-child(n+5) { display: none; }

/* fallback grid */
.em-gallery--grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.em-gallery--grid .em-gallery__item { aspect-ratio: 4 / 3; }

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 1024px) {
	.em-hero__inner { flex-direction: column; align-items: flex-start; min-height: 300px; padding-block: var(--ne-space-4xl); }
	.em-contact { flex-basis: auto; width: 100%; max-width: 420px; }
	.em-gallery--collage { min-height: 340px; }
}
@media (max-width: 640px) {
	.em-hero__title { font-size: 30px; }
	.em-contact { width: 100%; }
	.em-gallery--row { grid-template-columns: 1fr 1fr; }
	.em-gallery--collage {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: repeat(2, 1fr);
		min-height: 300px;
	}
	.em-gallery--collage .em-gallery__item:nth-child(1) { grid-column: 1; grid-row: 1; }
	.em-gallery--collage .em-gallery__item:nth-child(2) { grid-column: 2; grid-row: 1; }
	.em-gallery--collage .em-gallery__item:nth-child(3) { grid-column: 1; grid-row: 2; }
	.em-gallery--collage .em-gallery__item:nth-child(4) { grid-column: 2; grid-row: 2; }
}
