/* ==========================================================================
   Nhs Robin — responsive recomposition (not just shrinking the desktop layout)
   Large desktop → desktop → tablet (≤1024) → small tablet (≤900) → mobile (≤767) → narrow (≤480)
   ========================================================================== */

/* Large desktop: let the layout breathe a little */
@media (min-width: 1600px) {
	:root { --gutter: 48px; }
	.nhs-hero__title, .nhs-hero__title .elementor-heading-title { font-size: 5.5rem; }
}

/* Intro column stacks above the four profile cards */
@media (max-width: 1199px) {
	.nhs-sec-profiles > :is(.nhs-container, .e-con-inner) { grid-template-columns: minmax(0, 1fr); }
	.nhs-profiles__intro { max-width: 640px; }
	.nhs-profile-card .nhs-card__text { min-height: 0; }
}

/* Tablet */
@media (max-width: 1024px) {
	.nhs-grid--4 { --cols: 2; }

	/* Navigation becomes a drawer */
	.nhs-menu-toggle { display: inline-grid; }
	.nhs-nav {
		position: absolute;
		left: 0; right: 0; top: 100%;
		flex-direction: column;
		align-items: stretch;
		margin: 0;
		padding: 8px var(--gutter) 22px;
		max-height: calc(100vh - var(--header-height));
		overflow-y: auto;
		border-bottom: 1px solid var(--color-border);
		background: var(--color-surface);
		box-shadow: var(--shadow-md);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity var(--motion-duration) var(--motion-ease), transform var(--motion-duration) var(--motion-ease), visibility 0s linear var(--motion-duration);
	}
	.nhs-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
	.nhs-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.nhs-menu a { display: block; padding: 15px 2px; border-bottom: 1px solid var(--color-border); font-size: 1rem; }
	.nhs-menu a::after { display: none; }
	.nhs-menu .current-menu-item > a, .nhs-menu .current_page_item > a, .nhs-menu a.is-current { color: var(--color-primary); }
	.nhs-menu .sub-menu { position: static; min-width: 0; padding: 0 0 0 14px; border: 0; border-radius: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; background: transparent; }
	.nhs-header__actions { margin-left: auto; }
	.nhs-nav + .nhs-header__actions { margin-left: auto; }
	.nhs-icon-btn { width: 44px; height: 44px; }

	/* No-JS safety: show the menu inline instead of a drawer that can never open. */
	html:not(.js) .nhs-nav { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; flex-direction: row; flex-wrap: wrap; padding: 0; }
	html:not(.js) .nhs-menu { flex-direction: row; flex-wrap: wrap; gap: 0 18px; }
	html:not(.js) .nhs-menu a { border: 0; padding: 8px 0; font-size: .875rem; }
	html:not(.js) .nhs-menu-toggle { display: none; }
	html:not(.js) .nhs-header__inner { height: auto; padding-block: 10px; flex-wrap: wrap; }

	.nhs-footer__main { grid-template-columns: 1fr 1fr; }
	.nhs-footer__brand { grid-column: 1 / -1; }
}

/* Small tablet: single-column compositions */
@media (max-width: 900px) {
	.nhs-sec-hero > :is(.nhs-container, .e-con-inner),
	.nhs-sec-about > :is(.nhs-container, .e-con-inner),
	.nhs-sec-collab > :is(.nhs-container, .e-con-inner) { grid-template-columns: minmax(0, 1fr); }

	.nhs-hero__visual { justify-self: center; width: min(100%, 460px); }
	.nhs-hero__hand { right: 2%; }
	.nhs-about__visual { width: min(100%, 400px); }
	.nhs-about__hand { right: 0; }

	.nhs-grid--3 { --cols: 2; }

	.nhs-newsletter, .e-con.nhs-newsletter { grid-template-columns: minmax(0, 1fr); }
	.nhs-newsletter__icon { display: none; }

	.nhs-page-head__title { max-width: none; }
}

/* Mobile */
@media (max-width: 767px) {
	:root { --header-height: 68px; }

	.nhs-grid--4, .nhs-grid--3, .nhs-grid--2 { --cols: 1; }

	/* Project and testimonial rows become swipeable, snap-aligned strips. */
	.nhs-grid.nhs-slider {
		display: grid;
		grid-auto-flow: column;
		grid-template-columns: none;
		grid-auto-columns: minmax(80%, 1fr);
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		margin-inline: calc(var(--gutter) * -1);
		padding: 4px var(--gutter) 10px;
		scroll-padding-inline: var(--gutter);
	}
	.nhs-grid.nhs-slider::-webkit-scrollbar { display: none; }
	.nhs-grid.nhs-slider > * { scroll-snap-align: start; }
	.nhs-slider-controls { margin-left: 0; }

	.nhs-hero__actions .nhs-btn, .nhs-hero__actions .elementor-button { width: 100%; }
	.nhs-hero__actions { width: 100%; }
	.nhs-metrics { gap: 18px 28px; }

	.nhs-section-head { align-items: flex-start; }
	.nhs-collab__list { grid-template-columns: minmax(0, 1fr); }
	.nhs-form__row { flex-direction: column; }
	.nhs-form__row .nhs-btn { width: 100%; }

	.nhs-footer__bar { flex-direction: column; }
	.nhs-to-top { left: 12px; bottom: 12px; }
}

/* Narrow phones */
@media (max-width: 480px) {
	:root { --gutter: 18px; }
	.nhs-header__cta { display: none; }
	.nhs-btn.nhs-nav__cta { display: inline-flex; justify-content: center; margin-top: 16px; }
	.nhs-header__inner { gap: 10px; }
	.nhs-brand__name { font-size: 1rem; }
	.nhs-hero__title, .nhs-hero__title .elementor-heading-title { font-size: clamp(2.75rem, 15vw, 3.5rem); }
	.nhs-footer__main { grid-template-columns: 1fr; }
	.nhs-avail { left: -2px; bottom: 8%; padding: 10px 14px; }
	.nhs-grid.nhs-slider { grid-auto-columns: minmax(86%, 1fr); }
	.nhs-card { padding: 20px; }
}

/* Short, wide screens: keep the hero from towering over the fold */
@media (min-width: 901px) and (max-height: 700px) {
	.nhs-hero__visual { width: min(100%, 460px); }
}

/* Mobile drawer opened: lock page scroll behind it */
html.nhs-menu-open { overflow: hidden; }
@media (min-width: 1025px) { html.nhs-menu-open { overflow: visible; } }

@media print {
	.nhs-header, .nhs-footer, .nhs-to-top, .nhs-newsletter, .nhs-slider-controls { display: none !important; }
	body { color: #000; background: #fff; }
}
