/**
 * Block adaptations and theme extras.
 *
 * Loaded before style.css (front end and editor). It maps WordPress block
 * markup onto the design: core blocks carry the design's classes on their
 * wrapper, and these rules make the inner elements behave like the original.
 */

/* ---------------------------------------------------------------------------
 * Core blocks
 * ------------------------------------------------------------------------ */

.wp-block-image {
	margin: 0;
}

/* The design's classes sit on <figure>; the image fills it. */
.wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: inherit;
	object-position: inherit;
	vertical-align: middle;
}

.wp-block-image.w-auto img {
	width: auto;
}

.wp-block-image.h-auto img {
	height: auto;
}

.wp-block-image.nv-icon img {
	object-fit: contain;
}

/* Buttons: the wrapper carries the look, the link fills it. */
.wp-block-buttons {
	box-sizing: border-box;
}

.wp-block-button {
	position: relative;
	cursor: pointer;
}

.wp-block-button .wp-block-button__link {
	display: inline;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-align: inherit;
	text-decoration: none;
	text-transform: inherit;
	width: auto;
}

.wp-block-button .wp-block-button__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.wp-block-spacer {
	clear: none;
}

/* Highlight formats from the editor toolbar. */
.text-accent {
	color: #bbd069;
}

/* Bottom gradient caption aligned with the 80rem container. */
.nv-pl-container {
	padding-left: max(1rem, -38rem + 50vw);
}

/* Lists: the marker squares of the design, drawn with CSS. */
.nv-checks > li,
.nv-bullets > li {
	display: flex;
	gap: 1rem;
}

.nv-checks > li::before {
	content: "✓";
	flex-shrink: 0;
	width: 1.5rem;
	height: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #bbd069;
	color: #000;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
}

.nv-bullets > li::before {
	content: "";
	flex-shrink: 0;
	width: 0.5rem;
	height: 0.5rem;
	margin-top: 0.5rem;
	background: #bbd069;
}

/* ---------------------------------------------------------------------------
 * Header offset for the admin bar
 * ------------------------------------------------------------------------ */

.admin-bar .nv-site-header,
.admin-bar #nv-mobile-menu {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .nv-site-header,
	.admin-bar #nv-mobile-menu {
		top: 46px;
	}
}

.nv-menu-overlay[hidden] {
	display: none;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100;
	width: auto;
	height: auto;
	clip: auto;
	padding: 0.75rem 1rem;
	background: #bbd069;
	color: #000;
	font-size: 0.875rem;
	font-weight: 600;
}

/* ---------------------------------------------------------------------------
 * Contact Form 7 (Home "Get in Touch")
 * ------------------------------------------------------------------------ */

.nv-form .wpcf7-form-control-wrap {
	display: block;
}

.nv-form label {
	display: block;
	margin-bottom: 0.5rem;
	color: rgb(255 255 255 / 0.7);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.nv-form .nv-input {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid rgb(255 255 255 / 0.3);
	background: #fff;
	color: #000;
	font-size: 0.875rem;
	line-height: 1.25rem;
	transition: border-color 0.15s;
}

.nv-form textarea.nv-input {
	resize: none;
}

.nv-form .nv-input::placeholder {
	color: #9ca3af;
}

.nv-form .nv-input:focus {
	outline: none;
	border-color: #bbd069;
}

.nv-form .nv-submit {
	width: 100%;
	padding: 1rem 0;
	background: #bbd069;
	color: #000;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s;
}

.nv-form .nv-submit:hover {
	background: #a8c053;
}

.nv-form .wpcf7-spinner {
	display: block;
	margin: 0.75rem auto 0;
}

.nv-form .wpcf7-not-valid-tip {
	margin-top: 0.375rem;
	color: #fecaca;
	font-size: 0.75rem;
}

.nv-form .wpcf7-response-output {
	margin: 1rem 0 0 !important;
	padding: 0.75rem 1rem !important;
	border-color: #bbd069 !important;
	color: #fff;
	font-size: 0.875rem;
}

/* ---------------------------------------------------------------------------
 * Case study bodies (Sectors accordion)
 * ------------------------------------------------------------------------ */

.nv-case-content > * + * {
	margin-top: 1rem;
}

.nv-case-content p,
.nv-case-content li {
	color: #6d6e71;
	font-size: 0.875rem;
	line-height: 1.625;
}

.nv-case-content h4,
.nv-case-content h3 {
	padding-top: 1.25rem;
	color: #000;
	font-size: 1.125rem;
	font-weight: 700;
}

.nv-case-content > :first-child {
	padding-top: 0;
}

.nv-case-content .is-style-meta,
.nv-case-content p.nv-meta {
	color: #000;
	font-weight: 600;
}

.nv-case-content ul > * + * {
	margin-top: 0.75rem;
}

.nv-case-content ul > li {
	display: flex;
	gap: 1rem;
}

.nv-case-content ul > li::before {
	content: "";
	flex-shrink: 0;
	width: 0.5rem;
	height: 0.5rem;
	margin-top: 0.5rem;
	background: #bbd069;
}

@media (min-width: 48rem) {
	.nv-case-content h4,
	.nv-case-content h3 {
		font-size: 1.25rem;
	}
}

/* ---------------------------------------------------------------------------
 * Article content (single posts and plain pages)
 * ------------------------------------------------------------------------ */

.nv-prose {
	color: #6d6e71;
	font-size: 1rem;
	line-height: 1.75;
}

.nv-prose > * + * {
	margin-top: 1.25rem;
}

.nv-prose h2,
.nv-prose h3,
.nv-prose h4 {
	margin-top: 2.5rem;
	color: #000;
	font-weight: 700;
	line-height: 1.3;
}

.nv-prose h2 {
	font-size: 1.875rem;
}

.nv-prose h3 {
	font-size: 1.5rem;
}

.nv-prose h4 {
	font-size: 1.25rem;
}

.nv-prose a {
	color: #000;
	text-decoration: underline;
	text-decoration-color: #bbd069;
	text-underline-offset: 3px;
}

.nv-prose a:hover {
	color: #8a9e3a;
}

.nv-prose ul,
.nv-prose ol {
	padding-left: 1.25rem;
}

.nv-prose ul {
	list-style: square;
}

.nv-prose ol {
	list-style: decimal;
}

.nv-prose li::marker {
	color: #8a9e3a;
}

.nv-prose li + li {
	margin-top: 0.5rem;
}

.nv-prose blockquote {
	padding: 1.5rem 1.75rem;
	border-left: 4px solid #bbd069;
	background: #f8f8f6;
	color: #000;
	font-size: 1.125rem;
}

.nv-prose img {
	height: auto;
}

.nv-prose figcaption {
	margin-top: 0.5rem;
	color: #6d6e71;
	font-size: 0.75rem;
}

.nv-prose .alignleft {
	float: left;
	margin: 0.5rem 1.5rem 1rem 0;
}

.nv-prose .alignright {
	float: right;
	margin: 0.5rem 0 1rem 1.5rem;
}

.nv-prose .aligncenter {
	margin-left: auto;
	margin-right: auto;
}

/* Pagination */
.nv-pagination .page-numbers {
	min-width: 2.75rem;
	padding: 0.75rem 1rem;
	border: 1px solid rgb(0 0 0 / 0.1);
	color: #000;
	font-size: 0.875rem;
	font-weight: 600;
	text-align: center;
}

.nv-pagination .page-numbers.current,
.nv-pagination a.page-numbers:hover {
	border-color: #bbd069;
	background: #bbd069;
}

/* Comments and search form */
.nv-comments input[type="text"],
.nv-comments input[type="email"],
.nv-comments input[type="url"],
.nv-comments textarea,
.search-form .search-field {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid rgb(0 0 0 / 0.15);
	font-size: 0.875rem;
}

.nv-comments .comment-form > * + * {
	margin-top: 1rem;
}

.nv-comments .submit,
.search-form .search-submit {
	padding: 0.875rem 2rem;
	background: #000;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}

.nv-comments .submit:hover,
.search-form .search-submit:hover {
	background: #bbd069;
	color: #000;
}

.nv-comments .comment-list > li + li {
	margin-top: 1.5rem;
}

.nv-comments .children {
	margin: 1.5rem 0 0 1.5rem;
}

.search-form {
	display: flex;
	gap: 0.5rem;
}

/* ---------------------------------------------------------------------------
 * Single post: article + sidebar, previous/next links, sidebar widgets
 * ------------------------------------------------------------------------ */

.nv-single-grid {
	display: grid;
	gap: 3rem;
}

@media (min-width: 64rem) {
	.nv-single-grid {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		gap: 4rem;
	}
}

.nv-post-nav {
	margin-top: 3rem;
}

.nv-post-nav .nav-links {
	display: grid;
	gap: 1rem;
}

@media (min-width: 40rem) {
	.nv-post-nav .nav-links {
		grid-template-columns: 1fr 1fr;
	}
}

.nv-post-nav a {
	display: block;
	height: 100%;
	padding: 1.25rem 1.5rem;
	border: 1px solid rgb(0 0 0 / 0.1);
	transition: border-color 0.2s, background-color 0.2s;
}

.nv-post-nav a:hover {
	border-color: #bbd069;
	background: #f8f8f6;
}

.nv-post-nav .nav-next {
	grid-column: -2;
	text-align: right;
}

.nv-post-nav__label {
	display: block;
	margin-bottom: 0.5rem;
	color: #8a9e3a;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.nv-post-nav__title {
	display: block;
	color: #000;
	font-family: "Merriweather Sans", sans-serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
}

.nv-sidebar .widget {
	padding: 1.75rem;
	border-top: 3px solid #bbd069;
	background: #f8f8f6;
	color: #6d6e71;
	font-size: 0.875rem;
	line-height: 1.6;
}

.nv-sidebar .widget + .widget {
	margin-top: 1.5rem;
}

.nv-sidebar .widget-title,
.nv-sidebar .wp-block-heading,
.nv-sidebar .wp-block-search__label {
	display: block;
	margin: 0 0 1rem;
	color: #000;
	font-family: Poppins, sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.nv-sidebar ul li {
	padding: 0.625rem 0;
	border-bottom: 1px solid rgb(0 0 0 / 0.08);
}

.nv-sidebar ul li:first-child {
	padding-top: 0;
}

.nv-sidebar ul li:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.nv-sidebar a {
	color: #000;
	transition: color 0.2s;
}

.nv-sidebar a:hover {
	color: #8a9e3a;
}

.nv-sidebar .wp-block-search__inside-wrapper {
	display: flex;
	gap: 0.5rem;
}

.nv-sidebar .wp-block-search__input {
	flex: 1;
	min-width: 0;
	padding: 0.75rem 1rem;
	border: 1px solid rgb(0 0 0 / 0.15);
	background: #fff;
	color: #000;
	font-size: 0.875rem;
}

.nv-sidebar .wp-block-search__input:focus {
	outline: none;
	border-color: #bbd069;
}

.nv-sidebar .wp-block-search__button {
	margin: 0;
	padding: 0.75rem 1.25rem;
	border: 0;
	border-radius: 0;
	background: #000;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.nv-sidebar .wp-block-search__button:hover {
	background: #bbd069;
	color: #000;
}

.nv-sidebar .no-comments {
	font-style: italic;
}
