/* New Age Staffing: section and component styles.
   Colors, fonts and type scale live in theme.json; this file styles nw-* classes.
   Look follows the existing newat.com homepage: white server-room banner,
   large centered logo, black-titled photo tiles, black footer. */

:root {
	--nw-radius: 6px;
	--nw-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.07);
	--nw-black: #111111;
}

.nw-main { margin-block-start: 0; padding: 0; }
.nw-main > :first-child,
.nw-main > .wp-block-post-content > :first-child { margin-block-start: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- Header ---------- */
.nw-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #fff;
	border-top: 6px solid var(--nw-black);
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	padding-block: 0.6rem;
}
.admin-bar .nw-header { top: 32px; }
.nw-logo { margin: 0; }
.nw-logo img { height: 52px; width: auto; display: block; }
.nw-nav {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.02rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	gap: 1.4rem;
}
.nw-nav a { color: var(--wp--preset--color--primary); text-decoration: none; white-space: nowrap; }
.nw-nav a:hover { color: var(--wp--preset--color--accent); }
.nw-nav .wp-block-navigation__submenu-container {
	border: 1px solid rgba(0, 0, 0, 0.1) !important;
	border-top: 3px solid var(--wp--preset--color--accent) !important;
	box-shadow: var(--nw-shadow);
	padding: 0.4rem 0;
	min-width: 240px !important;
	text-transform: none;
}
.nw-nav .wp-block-navigation__submenu-container a { padding: 0.5rem 1rem; }
.nw-header__cta .wp-block-button__link { padding: 0.6rem 1.1rem; font-size: 0.95rem; }
@media (max-width: 1100px) {
	.nw-header .wp-block-buttons.nw-header__cta { display: none; }
}

/* ---------- Sections ---------- */
.nw-section {
	padding-block: var(--wp--preset--spacing--60);
	margin-block: 0 !important;
}
.nw-section > * + * { margin-block-start: 1.25rem; }
.nw-section--light { background: var(--wp--preset--color--light); }

/* Hero: white with the server-room banner, centered like the current site */
.nw-section--hero {
	background: #fff url("../images/new-age-background.jpg") center top / 100% auto no-repeat;
	text-align: center;
	padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4.5rem);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
@media (max-width: 1200px) {
	.nw-section--hero { background-size: 1200px auto; }
}
.nw-section--hero .wp-block-buttons { justify-content: center; }
.nw-section--hero > p:not(.nw-eyebrow) {
	font-size: var(--wp--preset--font-size--large);
	max-width: 62ch;
	margin-inline: auto;
}
.nw-hero-logo img { width: min(365px, 80vw); height: auto; }
.nw-hero-logo + h1 { margin-top: 1.5rem; }
.nw-section--hero h1 { text-shadow: 0 0 18px #fff, 0 0 6px #fff; }

.nw-section--dark { background: var(--nw-black); color: #fff; }
.nw-section--dark h2, .nw-section--dark h3 { color: #fff; }
.nw-section--dark .nw-card { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); box-shadow: none; }

.nw-section--cta { background: var(--wp--preset--color--secondary); color: #fff; text-align: center; }
.nw-section--cta h2 { color: #fff; }
.nw-section--cta .wp-block-buttons { justify-content: center; }
.nw-section--cta .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: #fff; color: var(--wp--preset--color--primary); }

/* Outline buttons */
.is-style-outline > .wp-block-button__link {
	background: transparent;
	border: 2px solid currentColor;
	color: var(--wp--preset--color--secondary);
}
.nw-section--cta .is-style-outline > .wp-block-button__link,
.nw-section--dark .is-style-outline > .wp-block-button__link { color: #fff; }
.is-style-outline > .wp-block-button__link:hover { background: rgba(127, 127, 127, 0.12); color: inherit; }

.nw-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--wp--preset--color--secondary);
}

/* ---------- Homepage tiles (match current newat.com boxes) ---------- */
.nw-section--tiles { padding-block: clamp(2.5rem, 5vw, 4rem); }
.nw-section .nw-tiles { gap: 2rem; }
.nw-tiles { max-width: 1100px !important; }
.nw-tile { display: flex; flex-direction: column; }
.nw-tile > * { margin: 0 !important; }
.nw-tile__title {
	background: #000;
	text-align: center;
	padding: 1.1rem 1rem;
	font-family: var(--wp--preset--font-family--slab);
	font-weight: 700;
	font-size: 1.85rem;
	line-height: 1.2;
}
.nw-tile__title a { color: #fff; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nw-tile__title a:hover { color: var(--wp--preset--color--accent); }
.nw-tile__label {
	min-height: 150px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0.7rem 1rem;
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	font-size: 1.45rem;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	background-size: cover;
	background-position: center;
}
.nw-tile--jobs .nw-tile__label {
	background-image: linear-gradient(to bottom, transparent 55%, rgba(0, 0, 0, 0.78) 55%), url("../images/new-age-it-staffing-box-photo.jpg");
}
.nw-tile--hire .nw-tile__label {
	background-image: linear-gradient(to bottom, transparent 55%, rgba(0, 0, 0, 0.78) 55%), url("../images/new-age-background.jpg");
	background-position: 20% 30%;
	background-size: 260% auto;
}
.nw-tile--about .nw-tile__label {
	background-image: linear-gradient(to bottom, transparent 55%, rgba(0, 0, 0, 0.78) 55%), url("../images/new-age-network-photo.jpg");
}
.nw-tile__caption { padding: 1rem 0.25rem 0; }

/* ---------- Cards & steps ---------- */
.nw-section .nw-cards { gap: 1.25rem; margin-block-start: 2rem; }
.nw-card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-top: 4px solid var(--wp--preset--color--accent);
	border-radius: var(--nw-radius);
	box-shadow: var(--nw-shadow);
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}
.nw-card > * { margin: 0 !important; }
.nw-card h3 { font-size: 1.25rem; }
.nw-card__link { margin-top: auto !important; font-weight: 600; }
.nw-card__link a { text-decoration: none; }
.nw-step h3 { color: var(--wp--preset--color--secondary); }
.nw-section--dark .nw-step h3 { color: var(--wp--preset--color--accent); }

/* Lists in sections get cyan check marks */
.nw-section .wp-block-list { list-style: none; padding-left: 0; }
.nw-section .wp-block-list li { position: relative; padding-left: 1.75rem; margin-bottom: 0.5rem; }
.nw-section .wp-block-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.4em;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.2' d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E") center/100% no-repeat;
}

/* Placeholder blocks (job board, contact form) */
.nw-placeholder {
	border: 2px dashed var(--wp--preset--color--muted);
	border-radius: var(--nw-radius);
	padding: 1.5rem;
	background: #fffbea;
}

/* ---------- Footer (black, like the current site) ---------- */
.nw-footer {
	background: #000;
	color: rgba(255, 255, 255, 0.85);
	padding-block: 4rem 1.5rem;
	font-size: 0.95rem;
}
.nw-footer h3 { color: #fff; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; }
.nw-footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.nw-footer a:hover { color: var(--wp--preset--color--accent); }
.nw-footer__brand { font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: 1.5rem; color: #fff; }
.nw-footer__brand span { color: var(--wp--preset--color--accent); }
.nw-footer__links { list-style: none; padding: 0; }
.nw-footer__links li { margin-bottom: 0.4rem; }
.nw-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	margin-top: 2.5rem !important;
	padding-top: 1.25rem;
	font-size: 0.85rem;
}

/* ---------- Contact form (Contact Form 7) ---------- */
.nw-form { display: flex; flex-direction: column; gap: 1rem; }
.nw-form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.95rem; color: var(--wp--preset--color--primary); }
.nw-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.nw-form input[type="text"],
.nw-form input[type="email"],
.nw-form input[type="tel"],
.nw-form select,
.nw-form textarea {
	width: 100%;
	font: inherit;
	font-weight: 400;
	padding: 0.7rem 0.8rem;
	border: 1px solid #c5cdd3;
	border-radius: var(--nw-radius);
	background: #fff;
	color: var(--wp--preset--color--contrast);
}
.nw-form input:focus, .nw-form select:focus, .nw-form textarea:focus {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--accent);
}
.nw-form input[type="file"] { font-weight: 400; }
.nw-form .wpcf7-submit {
	align-self: flex-start;
	background: var(--wp--preset--color--secondary);
	color: #fff;
	border: 0;
	border-radius: var(--nw-radius);
	padding: 0.85rem 1.6rem;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.nw-form .wpcf7-submit:hover { background: var(--wp--preset--color--primary); }
.nw-form .wpcf7-not-valid-tip { font-weight: 400; font-size: 0.85rem; color: #b42318; }
.wpcf7 form .wpcf7-response-output { margin: 1rem 0 0; padding: 0.75rem 1rem; border-radius: var(--nw-radius); }
/* Keep CF7 fields inside their column: CF7 adds size="40", which sets a
   minimum width that grid/flex children won't shrink below. */
.nw-form, .nw-form * { box-sizing: border-box; }
.nw-form__row > *, .nw-form label { min-width: 0; }
.nw-form .wpcf7-form-control-wrap { display: block; width: 100%; }
.nw-form input:not([type="file"]):not([type="submit"]), .nw-form select, .nw-form textarea { max-width: 100%; min-width: 0; }

/* ---------- Responsive navigation ----------
   WordPress only switches to the menu button below 600px; the full menu
   doesn't fit beside the logo until ~1100px, so use the button below that. */
@media (max-width: 1099px) {
	.nw-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.nw-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
/* Comfortable 44px tap targets for the menu open/close buttons */
.nw-nav .wp-block-navigation__responsive-container-open,
.nw-nav .wp-block-navigation__responsive-container-close {
	padding: 10px;
	margin: -10px;
	border-radius: var(--nw-radius);
}
.nw-nav .wp-block-navigation__responsive-container-open svg,
.nw-nav .wp-block-navigation__responsive-container-close svg { width: 28px; height: 28px; }
/* Open mobile menu: bigger, left-aligned links that are easy to tap */
.nw-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: flex-start;
	padding-top: 1.5rem;
	gap: 0.25rem;
}
.nw-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.2rem;
	padding: 0.55rem 0;
}
.nw-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: 0 !important;
	box-shadow: none;
	padding: 0 0 0 1rem;
}
.nw-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 1.05rem;
	text-transform: none;
	padding: 0.4rem 0;
}
/* Mobile logo a touch smaller so the header stays compact */
@media (max-width: 599px) {
	.nw-logo img { height: 44px; }
	.nw-section--hero { padding-block: 2.5rem 2.25rem; }
	.nw-tile__title { font-size: 1.6rem; }
}
/* Open menu: left-align everything (the desktop menu is right-justified) */
.nw-nav .wp-block-navigation__responsive-container.is-menu-open {
	--navigation-layout-justification-setting: flex-start;
	--navigation-layout-justify: flex-start;
	--navigation-layout-align: flex-start;
	text-align: left;
	padding: 1.25rem 1.5rem;
}
.nw-nav .is-menu-open .wp-block-navigation__container,
.nw-nav .is-menu-open .wp-block-navigation-item { align-items: flex-start !important; width: 100%; }
.nw-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item { border-bottom: 1px solid rgba(0, 0, 0, 0.08); }

/* ---------- Grid centering ----------
   WordPress grid layout uses auto-fill, which keeps empty columns when there
   are fewer items than fit (e.g. 4 steps in a 5-column row), pushing the
   cards left. auto-fit collapses empty columns so cards fill the row. */
.nw-cards.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)) !important; }
.nw-steps.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)) !important; }
.nw-tiles.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)) !important; }
/* Center a section's heading and intro text when the section holds a wide grid */
.nw-section:has(> .nw-cards, > .nw-tiles) > h2,
.nw-section:has(> .nw-cards, > .nw-tiles) > p:not(.nw-eyebrow) { text-align: center; }
.nw-section:has(> .nw-cards, > .nw-tiles) > .wp-block-buttons { justify-content: center; }
.nw-section:has(> .wp-block-columns.alignwide) > h2 { text-align: center; }
/* Card grids hold 4 or 8 items: use 2 columns at tablet/laptop widths
   instead of an uneven 3 + 1, and 1 column on phones. */
@media (max-width: 1180px) {
	.nw-cards:not(.nw-steps).is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 600px) {
	.nw-cards:not(.nw-steps).is-layout-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
/* Tablets: 4 steps as 2 x 2; homepage tiles stacked and centered (no 2 + 1). */
@media (min-width: 601px) and (max-width: 900px) {
	.nw-steps.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.nw-tiles.is-layout-grid { grid-template-columns: minmax(0, 32rem) !important; justify-content: center; }
}

/* ---------- Centered text sections ----------
   Every section heading is centered. Short intro text and buttons center too;
   bullet lists become a centered block with left-aligned items (centered
   bullets are hard to read). Multi-paragraph sections (e.g. About "Our story")
   keep left-aligned paragraphs for readability. */
.nw-section:not(.nw-section--hero) > h2 { text-align: center; }
.nw-section:not(.nw-section--hero):not(:has(> p + p)) > p:not(.nw-eyebrow) { text-align: center; }
.nw-section:not(.nw-section--hero) > .wp-block-buttons { justify-content: center; }
.nw-section:not(.nw-section--hero) > .wp-block-list {
	width: fit-content;
	max-width: 100%;
	margin-inline: auto !important;
}
/* Long lists (8 IT roles on Home) read better in two columns on wider screens */
@media (min-width: 700px) {
	.nw-section > .wp-block-list:has(> li:nth-child(6)) { columns: 2; column-gap: 3rem; }
	.nw-section > .wp-block-list:has(> li:nth-child(6)) li { break-inside: avoid; }
}

/* ---------- Homepage tile labels (v1.3.2) ----------
   Labels can run to two lines ("Professional Staffing Solutions"). The dark
   band is now sized from the photo area down, so it always grows to hold the
   whole label instead of a fixed 45% strip. */
.nw-tile__label {
	min-height: 175px;
	box-sizing: border-box;
	padding: 85px 1rem 0.9rem;
	align-items: flex-end;
	text-align: center;
	line-height: 1.2;
	background-repeat: no-repeat, no-repeat;
}
.nw-tile--jobs .nw-tile__label,
.nw-tile--hire .nw-tile__label,
.nw-tile--about .nw-tile__label {
	background-size: 100% calc(100% - 85px), cover;
	background-position: bottom, center;
}
.nw-tile--jobs .nw-tile__label { background-image: linear-gradient(rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.78)), url("../images/new-age-it-staffing-box-photo.jpg"); }
.nw-tile--hire .nw-tile__label {
	background-image: linear-gradient(rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.78)), url("../images/new-age-background.jpg");
	background-size: 100% calc(100% - 85px), 260% auto;
	background-position: bottom, 20% 30%;
}
.nw-tile--about .nw-tile__label { background-image: linear-gradient(rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.78)), url("../images/new-age-network-photo.jpg"); }

/* ---------- Legal pages (v1.3.5) ----------
   Long-form text such as the Privacy Policy reads left-aligned. */
.nw-section--legal > h2,
.nw-section--legal > p { text-align: left !important; }
.nw-section--legal > h2 { font-size: 1.5rem; margin-block-start: 2.25rem; }
.nw-section--legal > .wp-block-list { width: 100% !important; max-width: var(--wp--style--global--content-size) !important; margin-inline: auto !important; columns: auto !important; }
