/*
Theme Name: Nauruvirasto-theme
Description: Nauruviraston lohkoteema WordPressin Sivustoeditorille.
Version: 0.3.13
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: nauruvirasto-theme
*/

:root {
	--nv-site-width: 112rem;
	--nv-site-gutter: clamp(1rem, 3vw, 2rem);
	--nv-site-inset: max(var(--nv-site-gutter), calc((100% - var(--nv-site-width)) / 2 + var(--nv-site-gutter)));
}

.nv-header-inner {
	box-sizing: border-box;
	width: min(100%, var(--nv-site-width));
	margin-inline: auto;
	padding-inline: var(--nv-site-gutter);
}

.nv-utility.has-background,
.nv-masthead.has-background {
	padding: 0;
}

.nv-utility-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem 2rem;
	min-height: 3.25rem;
	padding-block: 0.4rem;
}

.nv-utility .nv-popular,
.nv-utility .nv-social {
	margin: 0;
}

.nv-popular {
	font-size: clamp(0.875rem, 1.2vw, 1.25rem);
	line-height: 1.4;
}

.nv-popular a {
	color: inherit;
	text-underline-offset: 0.15em;
}

.nv-popular a:hover {
	color: var(--wp--preset--color--yellow);
}

.nv-utility .nv-social {
	flex: none;
	gap: clamp(0.5rem, 1.5vw, 1.5rem);
	font-size: 1.375rem;
}

.nv-social .wp-social-link a {
	padding: 0.3em;
}

.nv-masthead {
	margin-block-start: 0;
}

.nv-masthead-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: clamp(1rem, 2vw, 2rem);
	min-height: 6.5rem;
}

.nv-masthead .nv-brand,
.nv-masthead .nv-main-nav,
.nv-masthead .nv-newsletter {
	margin: 0;
}

.nv-masthead .nv-brand {
	width: min(100%, 22rem);
}

.nv-brand a,
.nv-brand img {
	display: block;
}

.nv-masthead .nv-brand img {
	width: 100%;
	height: auto;
	max-height: 5.525rem;
	object-fit: contain;
	object-position: left center;
}

.nv-main-nav {
	--navigation-layout-justification-setting: center;
	font-size: clamp(1rem, 1.35vw, 1.375rem);
	font-weight: 800;
	line-height: 1.25;
}

.nv-main-nav .wp-block-navigation__container {
	column-gap: clamp(1rem, 2.8vw, 3.5rem);
}

.nv-main-nav .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.nv-main-nav .wp-block-navigation__submenu-container {
	font-size: 1rem;
	font-weight: 400;
}

.nv-main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.7rem 1rem;
}

.nv-masthead .nv-newsletter {
	justify-self: end;
}

.nv-newsletter .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.65em;
	padding: 0.65em 1.15em;
	border-radius: 0.75rem;
	box-shadow: 0 2px 5px rgb(0 0 0 / 12%);
	font-size: clamp(0.875rem, 1.15vw, 1.25rem);
	font-weight: 800;
	line-height: 1.25;
	text-decoration: none;
	text-transform: uppercase;
}

.nv-newsletter .wp-block-button__link::before {
	width: 1.25em;
	height: 1.25em;
	flex: none;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m3 6 9 7 9-7'/%3E%3C/svg%3E") center / contain no-repeat;
	content: "";
}

.nv-newsletter .wp-block-button__link:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.nv-utility :focus-visible,
.nv-masthead :focus-visible,
.nv-footer :focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.nv-main {
	padding: clamp(1.25rem, 4vw, 3rem) var(--nv-site-gutter);
}

.wp-site-blocks > .nv-main:not(.nv-single-layout, :has(.nv-home-hero)) {
	box-sizing: border-box;
	max-width: var(--nv-site-width);
	margin-inline: auto;
}

.wp-site-blocks > .nv-main.is-layout-constrained:not(:has(.nv-home-hero)) > :not(.alignfull, .alignleft, .alignright) {
	max-width: none;
}

.nv-home-hero {
	container-type: inline-size;
}

.nv-main .nv-home-hero > .nv-hero-copy {
	padding-inline-start: max(var(--nv-site-gutter), calc((100cqw - var(--nv-site-width)) / 2 + var(--nv-site-gutter)));
}

.nv-main .wp-block-post-template > li + li {
	margin-block-start: 2rem;
}

@media (min-width: 600px) {
	.nv-main-nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		white-space: nowrap;
	}
}

@media (min-width: 600px) and (max-width: 1100px) {
	.nv-masthead-inner {
		grid-template-columns: 1fr 1fr;
		gap: 0.5rem 1rem;
		padding-block: 0.5rem 0.8rem;
	}

	.nv-masthead .nv-brand {
		width: min(100%, 16rem);
	}

	.nv-masthead .nv-main-nav {
		grid-row: 2;
		grid-column: 1 / -1;
		justify-self: center;
	}
}

@media (width < 768px) {
	.nv-utility,
	.nv-masthead .nv-newsletter {
		display: none;
	}
}

@media (max-width: 599px) {
	.nv-masthead-inner {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 0.4rem 1rem;
		min-height: 0;
		padding-block: 0.5rem 0.75rem;
	}

	.nv-masthead .nv-brand {
		width: min(100%, 13rem);
	}

	.nv-masthead .nv-main-nav {
		justify-self: end;
	}

	.nv-main-nav .wp-block-navigation__responsive-container.is-menu-open {
		padding: 1.5rem;
	}
}
