/* NHST bespoke modal — used by .front-hero__link[data-modal-target] */

.nhst-modal[hidden] {
	display: none;
}

.nhst-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.nhst-modal--open {
	opacity: 1;
}

.nhst-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.nhst-modal__panel {
	position: relative;
	background: #fff;
	width: 100%;
	max-width: 600px;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	padding: 2rem;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.nhst-modal__title {
	margin: 0 0 1rem;
	padding-right: 2rem;
}

.nhst-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 2.25rem;
	height: 2.25rem;
	background: transparent;
	border: 0;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: #333;
}

.nhst-modal__close:hover,
.nhst-modal__close:focus {
	color: #000;
	outline: none;
}

/* Front-hero background-size — class-driven so mobile can override */
.front-hero--cover { background-size: cover; }
.front-hero--contain { background-size: contain; }

/* On small viewports, a wide promotional banner contained leaves it tiny.
   Switch contained heroes to cover so the image fills the frame. */
@media (max-width: 640px) {
	.front-hero--contain { background-size: cover; }
}

/* Make the front-hero anchor a transparent overlay over the title area only */
.front-hero__link {
	display: block;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.front-hero__link:hover .front-hero__title,
.front-hero__link:focus .front-hero__title {
	opacity: 0.95;
}

/* Lock body scroll while modal open */
body.nhst-modal-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.nhst-modal {
		padding: 0.5rem;
	}
	.nhst-modal__panel {
		padding: 1.25rem;
		max-height: calc(100vh - 1rem);
	}
}
