/* =========================================================
   New Mix CMS additions
   Only styles for elements that did not exist in the approved design
   (detail pages, pagination, positions, consent). Uses the approved tokens.
   ========================================================= */

/* width/height attributes are output for CLS; keep the approved CSS in control of sizing (zero specificity). */
:where(img[width][height]) { height: auto; }

/* links inside card headings inherit the approved heading styles */
.mix-card-body h3 a, .project-grid h3 a, .project-card__body h3 a, .blog-card-inner__body h3 a, .equipment-card__body h3 a { color: inherit; }
.mix-card-body h3 a:hover, .project-card__body h3 a:hover, .blog-card-inner__body h3 a:hover { color: var(--red); }

/* ---------- Rich text (blog posts, project & product descriptions) ---------- */
.nm-article { max-width: 820px; }
.nm-article__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
.nm-article__meta b { color: var(--red); font-weight: 800; }
.nm-article__image { margin: 0 0 30px; background: #fff; }
.nm-article__image img { width: 100%; height: auto; }
.nm-prose { color: var(--text); font-size: 16px; line-height: 1.8; }
.nm-prose h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; color: var(--navy); font-weight: 600; letter-spacing: -.02em; margin: 34px 0 12px; }
.nm-prose h3 { font-size: 20px; color: var(--navy); margin: 26px 0 10px; }
.nm-prose h4 { font-size: 17px; color: var(--navy); margin: 22px 0 8px; }
.nm-prose p, .nm-prose ul, .nm-prose ol, .nm-prose blockquote, .nm-prose table, .nm-prose figure { margin: 0 0 18px; }
.nm-prose ul, .nm-prose ol { padding-left: 22px; }
.nm-prose li { margin-bottom: 6px; }
.nm-prose a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.nm-prose blockquote { border-left: 4px solid var(--red); background: #fff; padding: 16px 20px; color: var(--navy); }
.nm-prose img { height: auto; }
.nm-prose table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; display: block; overflow-x: auto; }
.nm-prose th, .nm-prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.nm-prose th { background: var(--navy); color: #fff; }
.nm-prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.nm-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.nm-tags a { display: inline-block; border: 1px solid var(--line); background: #fff; padding: 5px 12px; font-size: 12px; color: var(--navy); }
.nm-tags a:hover { border-color: var(--red); color: var(--red); }
.nm-author { display: flex; gap: 16px; align-items: flex-start; margin-top: 34px; padding: 22px; background: #fff; border-top: 3px solid var(--red); }
.nm-author strong { display: block; color: var(--navy); }
.nm-author p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Detail facts list (projects / products) ---------- */
.nm-facts { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.nm-facts li { background: #fff; padding: 14px 16px; }
.nm-facts small { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); font-weight: 800; }
.nm-facts strong { color: var(--navy); font-size: 15px; }
.nm-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.nm-gallery figure { margin: 0; background: #fff; }
.nm-gallery img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.nm-gallery figcaption { font-size: 12px; padding: 8px 10px; color: var(--muted); }

/* ---------- Pagination & search ---------- */
.nm-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 40px; }
.nm-pagination a, .nm-pagination span { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); background: #fff; color: var(--navy); font-size: 13px; font-weight: 700; }
.nm-pagination a:hover, .nm-pagination a:focus-visible { border-color: var(--red); color: var(--red); }
.nm-pagination [aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.nm-search { display: flex; gap: 8px; max-width: 480px; margin: 0 0 30px; }
.nm-search input { flex: 1; min-width: 0; border: 1px solid var(--line); background: #fff; padding: 12px 14px; font: inherit; font-size: 14px; }
.nm-search input:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
.nm-empty { padding: 40px; text-align: center; background: #fff; border: 1px dashed var(--line); color: var(--muted); }

/* ---------- Careers: open positions ---------- */
.nm-positions { display: grid; gap: 14px; margin-bottom: 60px; }
.nm-position { background: #fff; border-left: 3px solid var(--red); padding: 22px 24px; }
.nm-position h3 { margin: 0 0 6px; color: var(--navy); font-size: 19px; }
.nm-position__meta { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--red); font-weight: 800; margin-bottom: 8px; }
.nm-position p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- FAQ (only rendered when FAQs exist) ---------- */
.nm-faq { max-width: 900px; }
.nm-faq details { background: #fff; border-bottom: 1px solid var(--line); }
.nm-faq summary { cursor: pointer; padding: 18px 22px; font-weight: 700; color: var(--navy); list-style: none; }
.nm-faq summary::-webkit-details-marker { display: none; }
.nm-faq summary::after { content: "+"; float: right; color: var(--red); }
.nm-faq details[open] summary::after { content: "−"; }
.nm-faq details > div { padding: 0 22px 18px; color: var(--muted); }

/* ---------- Form states ---------- */
.ajax-form .is-invalid { border-color: var(--red) !important; }
.form-status.is-error, .form-note.is-error { color: var(--red); }
.form-status.is-success, .form-note.is-success { color: #1d7a3a; }
.nm-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.nm-contact-form { margin-top: 60px; }

/* ---------- Cookie consent (only when enabled in admin) ---------- */
.nm-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 999; max-width: 560px; background: var(--navy2); color: #fff; padding: 18px 20px; box-shadow: 0 10px 40px rgba(0,0,0,.25); font-size: 13px; }
.nm-consent p { margin: 0 0 12px; }
.nm-consent div { display: flex; gap: 10px; flex-wrap: wrap; }
.nm-consent .btn:not(.red) { color: #fff; border-color: #fff; }

@media (max-width: 767px) {
    .nm-gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .nm-gallery { grid-template-columns: 1fr; }
}

/* Hide the reCAPTCHA v3 badge (a text notice is shown on the forms instead) */
.grecaptcha-badge { visibility: hidden !important; }

.nm-recaptcha-note { font-size: 12px; color: #888; margin: 10px 0 0; }
.nm-recaptcha-note a { color: inherit; text-decoration: underline; }