/*
Theme Name: NMCI Інжиніринг
Theme URI: https://nmcip.com.ua
Author: NMCI
Description: Тема для ТОВ «Науково-методичний центр інжиніринг»: головна з героєм, сіткою послуг, блоком відкритого листа та підвалом.
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nmci
Tags: custom-menu, custom-logo, featured-images, translation-ready, full-width-template
*/

/* -------------------------------------------------------------------------
   CSS variables & reset
   ------------------------------------------------------------------------- */
:root {
	--nmci-blue: #0a3d7a;
	--nmci-blue-mid: #1e5aa8;
	--nmci-blue-soft: #e8f1fb;
	--nmci-blue-line: #b8d4ef;
	--nmci-yellow: #f5c518;
	--nmci-text: #3d4a5c;
	--nmci-text-muted: #5c6b7a;
	--nmci-white: #ffffff;
	--nmci-shadow: 0 12px 40px rgba(10, 61, 122, 0.08);
	--nmci-radius: 14px;
	--nmci-max: 1180px;
	--nmci-font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	/* Hero — фон секції; ілюстрація PNG із прозорістю лежить зверху без blend */
	--nmci-hero-bg-1: #f6fafc;
	--nmci-hero-bg-2: #f5f9fb;
	--nmci-hero-bg-3: #f4f8fb;
	/* Таблиці: рамки в тон основного блакиту теми, не сірий */
	--nmci-table-border: rgba(30, 90, 168, 0.45);
	--nmci-table-border-inner: rgba(30, 90, 168, 0.22);
	--nmci-table-head-bg: #f0f5fb;
	--nmci-table-shell-bg: #ffffff;
	--nmci-table-radius: 9px;
	--nmci-table-radius-inner: 8px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--nmci-font);
	font-size: 1rem;
	line-height: 1.65;
	color: var(--nmci-text);
	background: var(--nmci-white);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--nmci-blue-mid);
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus-visible {
	color: var(--nmci-blue);
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: #fff;
	clip: auto !important;
	clip-path: none;
	height: auto;
	left: 8px;
	padding: 12px 16px;
	top: 8px;
	width: auto;
	z-index: 100000;
}

/* -------------------------------------------------------------------------
   Layout helpers
   ------------------------------------------------------------------------- */
.nmci-wrap {
	width: min(100% - 2.5rem, var(--nmci-max));
	margin-inline: auto;
}

/* -------------------------------------------------------------------------
   Site header
   ------------------------------------------------------------------------- */
.nmci-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(10, 61, 122, 0.06);
}

.nmci-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1rem 0;
	min-height: 72px;
}

.nmci-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--nmci-blue);
	max-width: min(100%, 420px);
}

.nmci-brand__mark {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
}

.nmci-brand__text {
	font-weight: 700;
	font-size: clamp(0.7rem, 1.5vw, 0.82rem);
	line-height: 1.35;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.nmci-brand img.custom-logo {
	max-height: 52px;
	width: auto;
}

.nmci-brand--asset .nmci-brand__img {
	display: block;
	height: auto;
	max-height: 56px;
	width: auto;
	max-width: min(100%, 420px);
	object-fit: contain;
	object-position: left center;
}

.nmci-brand--logo .custom-logo-link {
	display: inline-flex;
	align-items: center;
	max-width: min(100%, 460px);
}

.nmci-brand--logo .custom-logo-link img {
	max-height: 52px;
	width: auto;
}

.nmci-nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 2px solid var(--nmci-blue-line);
	border-radius: 10px;
	background: var(--nmci-white);
	cursor: pointer;
	color: var(--nmci-blue);
}

.nmci-nav-toggle .nmci-icon-menu,
.nmci-nav-toggle .nmci-icon-close {
	width: 22px;
	height: 22px;
}

.nmci-nav-toggle .nmci-icon-close {
	display: none;
}

.nmci-nav-toggle[aria-expanded="true"] .nmci-icon-menu {
	display: none;
}

.nmci-nav-toggle[aria-expanded="true"] .nmci-icon-close {
	display: block;
}

.nmci-nav {
	display: flex;
	align-items: center;
}

.nmci-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.35rem 1.35rem;
}

.nmci-nav a {
	display: inline-block;
	padding: 0.35rem 0;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--nmci-blue);
	border-bottom: 3px solid transparent;
	line-height: 1.2;
}

.nmci-nav a:hover,
.nmci-nav a:focus-visible,
.nmci-nav .current-menu-item > a,
.nmci-nav .current_page_item > a {
	border-bottom-color: var(--nmci-yellow);
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.nmci-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(
		135deg,
		var(--nmci-hero-bg-1) 0%,
		var(--nmci-hero-bg-2) 48%,
		var(--nmci-hero-bg-3) 100%
	);
	padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem);
}

/* Внутрішні сторінки: мінімум повітря по висоті; ілюстрація крупніша (полотно + масштаб PNG). */
.nmci-hero--page {
	padding: clamp(0.25rem, 1vw, 0.45rem) 0 clamp(0.3rem, 1.15vw, 0.55rem);
	margin-bottom: clamp(0.5rem, 1.75vw, 0.85rem);
	overflow: hidden;
}

.nmci-hero--page .nmci-hero__grid {
	gap: clamp(0.35rem, 1.35vw, 0.65rem);
	align-items: center;
}

.nmci-hero--page .nmci-hero__copy {
	padding-bottom: 0;
}

.nmci-hero--page .nmci-hero__visual {
	overflow: hidden;
}

.nmci-hero--page .nmci-hero__artboard {
	max-height: min(228px, 34vh);
	min-height: 112px;
}

.nmci-hero--page .nmci-hero__accent {
	width: 36px;
	height: 3px;
	margin-bottom: 0.3rem;
}

.nmci-hero--page .nmci-hero__lead {
	margin-bottom: 0;
	font-size: 0.9rem;
	line-height: 1.4;
}

/*
 * Hero-арт: полотно правої колонки; assets/img/hero.png з альфа-каналом (прозорий фон).
 */
.nmci-hero__grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(1.25rem, 4vw, 2.75rem);
	align-items: center;
}

.nmci-hero__copy {
	position: relative;
	z-index: 1;
	min-width: 0;
	padding-bottom: 0.25rem;
}

.nmci-hero__visual {
	min-width: 0;
	position: relative;
	z-index: 1;
	overflow: hidden;
}

/* Полотно під ілюстрацію: пропорція стабільна, масштаб лише з шириною колонки сітки */
.nmci-hero__artboard {
	width: 100%;
	aspect-ratio: 16 / 10;
	max-height: min(680px, 62vh);
	min-height: 340px;
}

.nmci-hero__artboard--photo {
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: 88% calc(100% + 60px);
	background-size: auto 150%;
}

.nmci-hero__artboard--fallback {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	opacity: 0.72;
	background-color: var(--nmci-hero-bg-3);
}

.nmci-hero__fallback-chart {
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
}

.nmci-hero__fallback-chart svg {
	display: block;
	width: 100%;
	height: auto;
	max-height: 100%;
}

.nmci-hero__accent {
	width: 48px;
	height: 4px;
	background: var(--nmci-yellow);
	border-radius: 2px;
	margin-bottom: 1.25rem;
}

.nmci-hero__title {
	margin: 0 0 1.25rem;
	font-size: clamp(1.65rem, 3.4vw, 2.45rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--nmci-blue);
	letter-spacing: -0.02em;
}

.nmci-hero__lead {
	margin: 0 0 2rem;
	max-width: 38rem;
	font-size: 1.02rem;
	color: var(--nmci-text-muted);
}

.nmci-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem 1rem;
}

.nmci-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.85rem 1.35rem;
	border-radius: 10px;
	font-weight: 700;
	font-size: 0.95rem;
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.nmci-btn svg {
	flex-shrink: 0;
}

.nmci-btn--primary {
	background: var(--nmci-blue);
	color: var(--nmci-white);
	border-color: var(--nmci-blue);
}

.nmci-btn--primary:hover,
.nmci-btn--primary:focus-visible {
	background: #082f63;
	border-color: #082f63;
	color: var(--nmci-white);
}

.nmci-btn--ghost {
	background: transparent;
	color: var(--nmci-blue);
	border-color: var(--nmci-blue);
}

.nmci-btn--ghost:hover,
.nmci-btn--ghost:focus-visible {
	background: rgba(10, 61, 122, 0.06);
}

.nmci-btn:active {
	transform: translateY(1px);
}

/* -------------------------------------------------------------------------
   Services grid
   ------------------------------------------------------------------------- */
.nmci-services {
	padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 4.5rem);
	background: var(--nmci-white);
}

.nmci-services__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

.nmci-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 1.65rem 1.5rem 1.4rem;
	background: var(--nmci-white);
	border-radius: var(--nmci-radius);
	box-shadow: var(--nmci-shadow);
	border: 1px solid rgba(10, 61, 122, 0.05);
	transition: box-shadow 0.25s ease, transform 0.2s ease;
	text-decoration: none;
	color: inherit;
}

.nmci-card:hover,
.nmci-card:focus-visible {
	box-shadow: 0 18px 50px rgba(10, 61, 122, 0.12);
	transform: translateY(-3px);
}

.nmci-card__icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--nmci-blue-mid), var(--nmci-blue));
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--nmci-white);
	margin-bottom: 1.1rem;
}

.nmci-card__icon svg {
	width: 26px;
	height: 26px;
}

.nmci-card__title {
	margin: 0 0 0.65rem;
	font-size: 1.08rem;
	font-weight: 800;
	color: var(--nmci-blue);
	line-height: 1.3;
}

.nmci-card__text {
	margin: 0 0 1.25rem;
	flex-grow: 1;
	font-size: 0.94rem;
	color: var(--nmci-text-muted);
}

.nmci-card__more {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 700;
	font-size: 0.88rem;
	color: var(--nmci-blue-mid);
	margin-top: auto;
}

.nmci-card__more svg {
	width: 18px;
	height: 18px;
}

/* -------------------------------------------------------------------------
   Відкритий лист (глобально перед підвалом)
   ------------------------------------------------------------------------- */
.nmci-open-letter {
	padding: clamp(2rem, 5vw, 3.25rem) 0;
	background: linear-gradient(180deg, #fafcfe 0%, #f5f9fc 100%);
}

.nmci-open-letter__card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: clamp(1rem, 3vw, 1.75rem);
	align-items: center;
	padding: clamp(1.25rem, 3vw, 1.65rem) clamp(1.25rem, 3vw, 1.85rem);
	border: 1px solid rgba(30, 90, 168, 0.28);
	border-radius: 10px;
	background: #f1f7fd;
	box-shadow: 0 1px 3px rgba(10, 61, 122, 0.06);
}

.nmci-open-letter__icon {
	flex-shrink: 0;
	color: var(--nmci-blue-mid);
	align-self: start;
	padding-top: 0.15rem;
}

.nmci-open-letter__icon svg {
	display: block;
}

.nmci-open-letter__body {
	min-width: 0;
}

.nmci-open-letter__title {
	margin: 0 0 0.55rem;
	font-size: clamp(1.05rem, 2vw, 1.28rem);
	font-weight: 800;
	line-height: 1.35;
	color: var(--nmci-blue);
	letter-spacing: -0.015em;
}

.nmci-open-letter__meta {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0 0 0.65rem;
	font-size: 0.88rem;
	color: var(--nmci-blue-mid);
}

.nmci-open-letter__meta svg {
	flex-shrink: 0;
	opacity: 0.85;
}

.nmci-open-letter__text {
	margin: 0;
	font-size: 0.96rem;
	line-height: 1.55;
	color: var(--nmci-text);
}

.nmci-open-letter__action {
	flex-shrink: 0;
	align-self: center;
}

.nmci-open-letter__btn {
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.nmci-footer {
	border-top: 1px solid rgba(10, 61, 122, 0.1);
	padding: 2.25rem 0 2.5rem;
	background: #fafcfe;
}

.nmci-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
	font-size: 0.92rem;
	color: var(--nmci-text-muted);
}

.nmci-footer__brand {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	max-width: 360px;
}

.nmci-footer__logo-img {
	flex-shrink: 0;
	height: auto;
	max-height: 44px;
	width: auto;
	max-width: 200px;
	object-fit: contain;
	object-position: left top;
}

.nmci-footer__brand .nmci-brand__mark {
	width: 40px;
	height: 40px;
}

.nmci-footer__brand .nmci-brand__text {
	font-size: 0.68rem;
}

.nmci-footer__copy {
	margin: 0.85rem 0 0;
	line-height: 1.5;
	color: var(--nmci-text);
}

.nmci-footer__item {
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
}

.nmci-footer__item svg {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	margin-top: 2px;
	color: var(--nmci-blue-mid);
}

.nmci-footer__item a {
	color: var(--nmci-blue);
	font-weight: 600;
	word-break: break-word;
}

/* -------------------------------------------------------------------------
   Generic content (index / page)
   ------------------------------------------------------------------------- */
.nmci-main {
	padding: 3rem 0 4rem;
}

/* Сторінки з hero: верхній падінг дає секція hero (як на головній без класу nmci-main). */
.nmci-main--page-sidebar {
	padding-top: 0;
}

.nmci-main--narrow .nmci-wrap {
	max-width: 760px;
}

.nmci-entry__title {
	margin: 0 0 1rem;
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	color: var(--nmci-blue);
}

.nmci-entry__content > *:first-child {
	margin-top: 0;
}

.nmci-entry__content > *:last-child {
	margin-bottom: 0;
}

/*
 * Таблиці: зовнішня рамка — основний блакит (mid); рядки — той самий тон, світліший.
 * Кути комірок підганяємо під radius оболонки, щоб не було «ламаних» кутів.
 */
.nmci-entry__content .wp-block-table {
	margin: 1.75rem 0;
	border-radius: var(--nmci-table-radius);
	border: 1px solid var(--nmci-table-border);
	background: var(--nmci-table-shell-bg);
	box-shadow: 0 1px 3px rgba(10, 61, 122, 0.08);
	overflow: hidden;
}

.nmci-entry__content .wp-block-table figcaption {
	margin: 0.65rem 0.75rem 0.75rem;
	font-size: 0.88rem;
	color: var(--nmci-text-muted);
}

.nmci-entry__content table {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--nmci-text);
	background: var(--nmci-white);
}

.nmci-entry__content .wp-block-table table {
	margin: 0;
	border: 0;
}

.nmci-entry__content > table {
	margin: 1.75rem 0;
	border-radius: var(--nmci-table-radius);
	border: 1px solid var(--nmci-table-border);
	background: var(--nmci-table-shell-bg);
	box-shadow: 0 1px 3px rgba(10, 61, 122, 0.08);
	overflow: hidden;
}

.nmci-entry__content thead {
	background: var(--nmci-table-head-bg);
}

.nmci-entry__content thead th {
	padding: 1rem 1.25rem;
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--nmci-blue);
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid var(--nmci-table-border-inner);
	border-left: none;
	border-right: none;
	border-top: none;
}

.nmci-entry__content thead tr:first-child th:first-child {
	border-top-left-radius: var(--nmci-table-radius-inner);
}

.nmci-entry__content thead tr:first-child th:last-child {
	border-top-right-radius: var(--nmci-table-radius-inner);
}

/* Заголовок у першому рядку tbody (коли немає thead) */
.nmci-entry__content table:not(:has(thead)) tbody tr:first-child:has(th) {
	background: var(--nmci-table-head-bg);
}

.nmci-entry__content table:not(:has(thead)) tbody tr:first-child th {
	padding: 1rem 1.25rem;
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--nmci-blue);
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid var(--nmci-table-border-inner);
	border-left: none;
	border-right: none;
	border-top: none;
	background: transparent;
}

.nmci-entry__content table:not(:has(thead)) tbody tr:first-child th:first-child {
	border-top-left-radius: var(--nmci-table-radius-inner);
}

.nmci-entry__content table:not(:has(thead)) tbody tr:first-child th:last-child {
	border-top-right-radius: var(--nmci-table-radius-inner);
}

.nmci-entry__content table:has(th:nth-child(3)) thead th:not(:first-child) {
	text-align: center;
}

.nmci-entry__content table:not(:has(thead)):has(th:nth-child(3)) tbody tr:first-child th:not(:first-child) {
	text-align: center;
}

.nmci-entry__content tbody td {
	padding: 1.05rem 1.25rem;
	vertical-align: middle;
	text-align: left;
	border-bottom: 1px solid var(--nmci-table-border-inner);
	border-left: none;
	border-right: none;
	background: var(--nmci-white);
}

.nmci-entry__content tbody tr:last-child td {
	border-bottom: none;
}

/* Довідник без thead: заокруглення верхніх/нижніх кутів таблиці всередині оболонки */
.nmci-entry__content table:not(:has(thead)) tbody tr:first-child td:first-child {
	border-top-left-radius: var(--nmci-table-radius-inner);
}

.nmci-entry__content table:not(:has(thead)) tbody tr:first-child td:last-child {
	border-top-right-radius: var(--nmci-table-radius-inner);
}

.nmci-entry__content table:not(:has(thead)) tbody tr:last-child td:first-child {
	border-bottom-left-radius: var(--nmci-table-radius-inner);
}

.nmci-entry__content table:not(:has(thead)) tbody tr:last-child td:last-child {
	border-bottom-right-radius: var(--nmci-table-radius-inner);
}

.nmci-entry__content table:not(:has(thead)) tbody tr:first-child td {
	border-top: none;
}

.nmci-entry__content table:has(thead) tbody tr:last-child td:first-child {
	border-bottom-left-radius: var(--nmci-table-radius-inner);
}

.nmci-entry__content table:has(thead) tbody tr:last-child td:last-child {
	border-bottom-right-radius: var(--nmci-table-radius-inner);
}

.nmci-entry__content table:has(td:nth-child(3)) tbody td:not(:first-child) {
	text-align: center;
}

.nmci-entry__content table:not(:has(td:nth-child(3))) tbody td:first-child {
	color: var(--nmci-text-muted);
	font-size: 0.92rem;
}

.nmci-entry__content table:not(:has(td:nth-child(3))) tbody td:nth-child(2) {
	color: var(--nmci-text);
	font-weight: 500;
}

@media (max-width: 782px) {
	.nmci-entry__content .wp-block-table {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		border-radius: var(--nmci-table-radius);
		border-color: var(--nmci-table-border);
	}
}

.nmci-main--narrow .nmci-entry:not(:last-child) {
	margin-bottom: 2.5rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid rgba(10, 61, 122, 0.08);
}

/* -------------------------------------------------------------------------
   Page + правий сайдбар (розділи)
   ------------------------------------------------------------------------- */
.nmci-page-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
	gap: clamp(1.75rem, 4vw, 3rem);
	align-items: start;
	max-width: var(--nmci-max);
}

.nmci-page-layout__main {
	min-width: 0;
}

.nmci-sidebar {
	position: sticky;
	top: calc(72px + 1rem);
}

.nmci-sidebar__nav {
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid rgba(10, 61, 122, 0.12);
	border-radius: 12px;
	background: #f7f9fb;
	overflow: hidden;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.nmci-sidebar__link {
	display: grid;
	grid-template-columns: 40px 1fr auto;
	gap: 0.75rem 0.65rem;
	align-items: center;
	padding: 1rem 1rem 1rem 1.1rem;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid rgba(10, 61, 122, 0.08);
	transition: background 0.15s ease;
}

.nmci-sidebar__link:last-child {
	border-bottom: 0;
}

.nmci-sidebar__link:hover,
.nmci-sidebar__link:focus-visible {
	background: rgba(255, 255, 255, 0.85);
}

.nmci-sidebar__link.is-active {
	background: rgba(255, 255, 255, 0.95);
	box-shadow: inset 3px 0 0 var(--nmci-yellow);
}

.nmci-sidebar__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--nmci-blue-mid);
}

.nmci-sidebar__icon svg {
	display: block;
	width: 24px;
	height: 24px;
}

.nmci-sidebar__body {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.nmci-sidebar__title {
	font-weight: 700;
	font-size: 0.92rem;
	line-height: 1.25;
	color: var(--nmci-blue);
}

.nmci-sidebar__desc {
	font-size: 0.78rem;
	line-height: 1.35;
	color: var(--nmci-text-muted);
}

.nmci-sidebar__arrow {
	flex-shrink: 0;
	font-size: 1.1rem;
	line-height: 1;
	font-weight: 600;
	color: var(--nmci-blue-mid);
}

.nmci-sidebar__link:hover .nmci-sidebar__arrow,
.nmci-sidebar__link:focus-visible .nmci-sidebar__arrow {
	color: var(--nmci-blue);
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.nmci-services__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.nmci-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.nmci-footer__grid > :first-child {
		grid-column: 1 / -1;
	}

	.nmci-page-layout {
		grid-template-columns: 1fr;
	}

	.nmci-sidebar {
		position: static;
		max-width: min(100%, 420px);
		margin-inline: auto;
		width: 100%;
	}
}

@media (max-width: 900px) {
	.nmci-hero__grid {
		grid-template-columns: 1fr;
		align-items: stretch;
	}

	.nmci-hero__visual {
		max-width: 100%;
		margin-inline: auto;
		padding-top: 0.35rem;
	}

	.nmci-hero__artboard {
		aspect-ratio: 16 / 10;
		max-height: min(520px, 58vh);
		min-height: 260px;
	}

	.nmci-hero--page .nmci-hero__artboard {
		max-height: min(195px, 32vh);
		min-height: 100px;
	}

	.nmci-hero--page .nmci-hero__visual {
		padding-top: 0;
	}

	.nmci-open-letter__card {
		grid-template-columns: 1fr;
		align-items: stretch;
	}

	.nmci-open-letter__icon {
		justify-self: start;
		padding-top: 0;
	}

	.nmci-open-letter__action {
		justify-self: stretch;
	}

	.nmci-open-letter__btn {
		width: 100%;
		justify-content: center;
		white-space: normal;
		text-align: center;
	}

	.nmci-nav-toggle {
		display: inline-flex;
	}

	.nmci-nav {
		position: fixed;
		inset: 0;
		top: 72px;
		background: rgba(255, 255, 255, 0.98);
		padding: 1.25rem 1.25rem 2rem;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.2s ease, visibility 0.2s ease;
		align-items: flex-start;
		justify-content: flex-start;
		overflow-y: auto;
		border-top: 1px solid rgba(10, 61, 122, 0.08);
	}

	body.nmci-nav-open .nmci-nav {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.nmci-nav ul {
		flex-direction: column;
		width: 100%;
		gap: 0;
	}

	.nmci-nav a {
		display: block;
		padding: 0.85rem 0;
		border-bottom: 1px solid rgba(10, 61, 122, 0.08);
		font-size: 1rem;
	}

	.nmci-nav .current-menu-item > a,
	.nmci-nav .current_page_item > a {
		border-bottom-color: rgba(10, 61, 122, 0.08);
		box-shadow: inset 3px 0 0 var(--nmci-yellow);
	}
}

@media (max-width: 640px) {
	.nmci-services__grid {
		grid-template-columns: 1fr;
	}

	.nmci-footer__grid {
		grid-template-columns: 1fr;
	}

	.nmci-hero__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.nmci-btn {
		justify-content: center;
	}
}
