/*
Theme Name: NM Fire Brasil
Description: Tema de blocos leve para o site NM Fire Brasil. Todas as seções são blocos nativos do WordPress e podem ser editadas pelo editor visual.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: nmfire
License: GPLv2 or later
*/

:root {
	--accent: #C8102E;
	--accent-dark: #a80c25;
	--steel: #1E3A5F;
	--graphite: #0F1419;
	--light: #F4F6F8;
	--border-brand: #DDE3EA;
	--muted: #5b6573;
	--body-text: #2d3643;
	--font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	--font-body: 'Inter', system-ui, sans-serif;
}

body { font-family: var(--font-body); background: var(--light); color: var(--graphite); }
h1, h2, h3, h4, .display { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
img { max-width: 100%; height: auto; }
a { color: var(--steel); }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--steel); outline-offset: 2px; }

/* Remove o espaçamento automático entre seções de largura total */
.wp-site-blocks > * { margin-block-start: 0; }
.wp-block-post-content > .alignfull,
.wp-block-post-content > .alignfull + * { margin-block-start: 0 !important; }

/* ---------- Cabeçalho ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid var(--border-brand); transition: box-shadow .25s ease; }
.site-header.scrolled { box-shadow: 0 6px 20px rgba(15,20,25,.12); }
.site-header .header-inner { min-height: 72px; }
.nm-logo { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .02em; margin: 0; }
.nm-logo a { color: var(--graphite); text-decoration: none; }
.nm-logo strong { color: var(--accent); font-weight: 800; }
.main-nav { font-family: var(--font-display); font-weight: 600; font-size: 1rem; text-transform: uppercase; }
.main-nav .wp-block-navigation-item__content { padding: 8px 12px; color: var(--graphite); text-decoration: none; border-bottom: 3px solid transparent; transition: color .2s, border-color .2s; }
.main-nav .wp-block-navigation-item__content:hover,
.main-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--accent); border-bottom-color: var(--accent); }
.main-nav.wp-block-navigation { gap: 4px; }

/* ---------- Seções ---------- */
.nm-section { padding-top: 56px; padding-bottom: 56px; }
.nm-section.nm-alt { background: #fff; }
.nm-section.nm-tall { padding-top: 90px; padding-bottom: 90px; }
.nm-narrow { max-width: 860px; margin-left: auto !important; margin-right: auto !important; }
.eyebrow { display: inline-block; background: rgba(200,16,46,.1); color: var(--accent); font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; margin-bottom: 0; }
.section-title { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--graphite); margin: 12px 0 8px; font-weight: 800; line-height: 1.05; }
.section-sub { color: #4a5563; font-size: 1.02rem; max-width: 760px; line-height: 1.6; margin: 0 0 28px; }
.nm-text { font-size: 1.02rem; line-height: 1.7; color: var(--body-text); }
.nm-note { color: var(--muted); max-width: 820px; margin: 20px auto 0 !important; line-height: 1.6; text-align: center; }
.nm-rounded img, img.nm-rounded { border-radius: 10px; }

/* ---------- Grades ---------- */
.grid-4, .grid-3, .grid-2, .product-grid, .gallery-4, .cert-grid, .stats-grid { display: grid; gap: 20px; }
.grid-4, .product-grid, .gallery-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.cert-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.grid-4 > *, .grid-3 > *, .grid-2 > *, .product-grid > *, .gallery-4 > *, .cert-grid > *, .stats-grid > * { margin: 0 !important; max-width: none !important; }

/* ---------- Hero / carrossel ---------- */
.nm-hero { background: #fff; text-align: center; padding-top: 48px; padding-bottom: 30px; }
.hero-brand { line-height: 1; margin: 0 auto 24px !important; color: var(--graphite); font-weight: 800; font-size: clamp(40px, 6.5vw, 84px); letter-spacing: .02em; }
.hero-brand em { display: block; font-style: normal; font-weight: 700; font-size: clamp(28px, 4.2vw, 54px); letter-spacing: .28em; color: var(--accent); margin-top: 6px; }
.nm-slider { position: relative; width: 100%; max-width: 1200px !important; margin: 0 auto; overflow: hidden; }
.nm-slider .nm-slide { margin: 0 !important; }
.nm-slider .nm-slide img { width: 100%; height: clamp(210px, 39vw, 520px); object-fit: contain; margin: 0 auto; display: block; }
.nm-slider.is-ready .nm-slide { display: none; }
.nm-slider.is-ready .nm-slide.is-active { display: block; animation: nmFade .6s ease; }
.nm-slider .nm-arrow { position: absolute; top: 45%; z-index: 2; border: 1px solid #ffffff80; border-radius: 50%; background: #101827b0; color: #fff; width: 42px; height: 42px; font-size: 30px; cursor: pointer; line-height: 1; padding: 0; }
.nm-slider .nm-prev { left: 8px; }
.nm-slider .nm-next { right: 8px; }
.nm-dots { display: flex; justify-content: center; gap: 10px; padding: 12px; }
.nm-dots button { width: 11px; height: 11px; border-radius: 50%; border: 1px solid #888; background: #aaa; cursor: pointer; padding: 0; }
.nm-dots button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); }
@keyframes nmFade { from { opacity: .2; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nm-slider.is-ready .nm-slide.is-active { animation: none; } }

/* ---------- Números ---------- */
.stats-bar { background: var(--steel); color: #fff; }
.stats-grid { grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { padding: 22px 16px; text-align: center; border-right: 1px solid rgba(255,255,255,.14); }
.stat:last-child { border-right: 0; }
.stat p { margin: 0; }
.stat .num { font-family: var(--font-display); font-size: 2.3rem; font-weight: 800; line-height: 1; }
.stat .lbl { font-size: .82rem; color: #cfd9e5; margin-top: 4px !important; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Institucional ---------- */
.nm-panel { background: #fff; border: 1px solid var(--border-brand); border-radius: 12px; box-shadow: 0 10px 26px rgba(15,20,25,.08); padding: 28px; }
.nm-big-num { font-family: var(--font-display); font-size: 4.2rem; font-weight: 800; line-height: 1; color: var(--accent); margin: 0; }
.nm-big-num.is-steel { font-size: 2.6rem; color: var(--steel); }
.nm-big-lbl { color: var(--body-text); font-size: .95rem; margin-top: 6px !important; }
.nm-panel .wp-block-separator { border: 0; border-top: 1px solid var(--border-brand); margin: 22px 0; opacity: 1; }
.nm-center { text-align: center; }
.nm-center h3 { font-size: 1.4rem; margin: 0 0 20px; }
.nm-logos img { display: block; width: 100%; max-width: 1100px; margin: 0 auto 24px; background: #fff; border-radius: 8px; }
.cert-pill { background: #fff; border: 1px solid var(--border-brand); border-radius: 8px; padding: 16px; text-align: center; font-weight: 700; color: var(--steel); font-family: var(--font-display); font-size: 1.1rem; text-transform: uppercase; }
.cert-pill em { display: block; font-style: normal; font-family: var(--font-body); font-weight: 500; color: var(--muted); font-size: .78rem; margin-top: 4px; text-transform: none; }

/* ---------- Vídeo ---------- */
.nm-video { border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 16px 40px rgba(15,20,25,.2); }
.nm-video .wp-block-embed__wrapper { margin: 0; }

/* ---------- FAQ (bloco Detalhes) ---------- */
.faq-item { background: #fff; border: 1px solid var(--border-brand); border-radius: 8px; margin: 0 0 10px !important; overflow: hidden; }
.faq-item summary { list-style: none; padding: 16px 20px; font-weight: 600; font-size: 1rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "▾"; color: var(--accent); font-size: 1.2rem; transition: transform .25s; }
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item > :not(summary) { padding: 0 20px; color: #4a5563; font-size: .95rem; line-height: 1.6; margin-top: 0; }
.faq-item > :last-child:not(summary) { padding-bottom: 16px; }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--border-brand); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15,20,25,.1); border-color: var(--steel); }
.card > * { margin: 0 !important; }
.card .card-img img { width: 100%; height: 190px; object-fit: contain; background: #fff; padding: 12px; box-sizing: border-box; display: block; }
.card .card-img.is-cover img { object-fit: cover; padding: 0; }
.card .card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .card-body > * { margin: 0; }
.card h3 { font-size: 1.3rem; margin: 0; color: var(--graphite); font-weight: 700; }
.card .muted { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.badge-cert { display: inline-block; background: var(--steel); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 4px; letter-spacing: .04em; align-self: flex-start; }
.spec-list { list-style: none; padding: 0; margin: 4px 0 8px; font-size: .88rem; color: var(--body-text); }
.spec-list li { padding: 4px 0; border-bottom: 1px dashed var(--border-brand); display: flex; justify-content: space-between; gap: 10px; }
.spec-list li strong { color: var(--graphite); text-align: right; }
.card-actions { margin-top: auto !important; gap: 8px; }
.card-actions .wp-block-button { flex: 1; }
.card-actions .wp-block-button__link { width: 100%; padding: 9px 8px; font-size: .92rem; }

/* ---------- Botões ---------- */
.wp-block-button__link { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; border-radius: 6px; font-size: 1.05rem; padding: 12px 20px; transition: transform .15s, background .2s, color .2s; text-decoration: none; }
.is-style-fill .wp-block-button__link, .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--accent); color: #fff; }
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: var(--accent-dark); transform: translateY(-1px); }
.is-style-outline .wp-block-button__link { background: #fff; color: var(--steel); border: 2px solid var(--steel); padding: 10px 18px; }
.is-style-outline .wp-block-button__link:hover { background: var(--steel); color: #fff; }

/* ---------- Filtros de produtos ---------- */
.nm-filters { gap: 8px; margin-bottom: 24px; }
.nm-filters .wp-block-button__link { background: #fff !important; border: 1px solid var(--border-brand); color: var(--graphite) !important; padding: 8px 14px; border-radius: 999px; font-family: var(--font-body); font-weight: 600; font-size: .9rem; text-transform: none; letter-spacing: 0; }
.nm-filters .wp-block-button__link:hover { border-color: var(--steel); transform: none; }
.nm-filters .is-active .wp-block-button__link { background: var(--steel) !important; color: #fff !important; border-color: var(--steel); }
.nm-product-banner { border-radius: 12px; margin-bottom: 30px !important; padding: clamp(30px,6vw,90px) clamp(20px,5vw,65px) !important; }
.nm-product-banner .eyebrow, .nm-product-banner .section-title, .nm-product-banner .section-sub { color: #fff !important; text-shadow: 0 2px 8px #0008; }
.nm-product-banner .section-sub { margin-bottom: 0; }

/* ---------- Chips (Aplicações) ---------- */
.nm-chips { gap: 6px; margin-top: 6px !important; }
.chip { background: #fff; border: 1px solid var(--border-brand); color: var(--graphite); padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .85rem; margin: 0 !important; }

/* ---------- Blocos informativos ---------- */
.steel-block { background: var(--steel); color: #fff; border-radius: 12px; padding: 32px; }
.steel-block.is-dark { background: var(--graphite); }
.steel-block h3 { color: #fff; font-size: 1.6rem; margin: 0 0 12px; }
.steel-block p { color: #e5ecf3; line-height: 1.6; margin: 0 0 12px; }
.steel-block ul { margin: 0; padding-left: 20px; line-height: 1.8; color: #e5ecf3; }
.info-box { background: #fff; border-left: 4px solid var(--accent); padding: 18px 20px; border-radius: 6px; }
.nm-alt .info-box { background: var(--light); }
.info-box h3 { font-size: 1.2rem; margin: 0 0 6px; }
.info-box p { margin: 0; color: #4a5563; font-size: .93rem; line-height: 1.55; }
.gallery-4 .wp-block-image { margin: 0; }
.gallery-4 img { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-brand); background: #e7ebf0; display: block; }

/* ---------- Contato ---------- */
.contact-block { background: var(--graphite); color: #fff; border-radius: 12px; padding: 28px; }
.contact-block h3 { color: #fff; font-size: 1.5rem; margin: 0 0 16px; }
.contact-block p { color: #aebccb; font-size: .92rem; margin: 0 0 8px; }
.contact-block .contact-row { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); color: #fff; font-weight: 600; font-size: 1rem; margin: 0; }
.contact-block .contact-row:last-child { border-bottom: 0; }
.contact-block .contact-row strong { display: block; font-size: .78rem; color: #aebccb; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.contact-block a { color: #fff; }

/* ---------- Formulário ---------- */
.form-card { background: #fff; border: 1px solid var(--border-brand); border-radius: 12px; padding: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; color: var(--graphite); }
.field .help { font-size: .8rem; color: var(--muted); }
.field input, .field select, .field textarea { font-family: var(--font-body); font-size: .95rem; padding: 11px 12px; border: 1px solid #c7d0db; border-radius: 6px; background: #fff; color: var(--graphite); }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--steel); outline: none; box-shadow: 0 0 0 3px rgba(30,58,95,.15); }
.field input:user-invalid { border-color: var(--accent); }
.nm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary, .btn-outline-dark { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 6px; font-weight: 700; cursor: pointer; font-family: var(--font-display); font-size: 1.05rem; text-transform: uppercase; letter-spacing: .02em; }
.btn-primary { background: var(--accent); color: #fff; border: 0; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline-dark { background: #fff; color: var(--graphite); border: 2px solid var(--graphite); padding: 10px 18px; }
.btn-outline-dark:hover { background: var(--graphite); color: #fff; }
.nm-alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 16px; font-weight: 600; }
.nm-alert.ok { background: #e7f6ec; color: #0a7a35; border: 1px solid #b6e2c4; }
.nm-alert.err { background: #fdecee; color: #a80c25; border: 1px solid #f5c2c9; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--graphite); color: #c3ccd6; padding-top: 48px; padding-bottom: 24px; margin-top: 0; }
.footer-grid { gap: 32px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin: 0 0 12px; letter-spacing: .05em; }
.site-footer p, .site-footer li { font-size: .9rem; line-height: 1.7; margin: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: #c3ccd6; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.copy-line { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px !important; padding-top: 18px; font-size: .8rem !important; color: #8a96a4; text-align: center; }

/* ---------- Modal ficha técnica ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,20,25,.65); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal-backdrop.open { display: flex; }
.nm-modal { background: #fff; border-radius: 12px; max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 30px 70px rgba(0,0,0,.4); animation: pop .25s ease; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border-brand); background: var(--light); }
.modal-head h3 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.modal-head .sub { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.modal-close { background: #fff; border: 1px solid var(--border-brand); width: 36px; height: 36px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; color: var(--graphite); flex-shrink: 0; }
.modal-close:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.modal-body { padding: 22px 24px; line-height: 1.65; }
.modal-body table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.modal-body td { padding: 10px 8px; border: 0; border-bottom: 1px solid var(--border-brand); }
.modal-body td:first-child { color: var(--muted); width: 42%; font-weight: 600; }
.modal-body figure { margin: 0 0 20px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--border-brand); }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
	.product-grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { flex-wrap: wrap !important; }
	.footer-grid > .wp-block-column { flex-basis: calc(50% - 32px) !important; }
}
@media (max-width: 860px) {
	.grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
	.gallery-4 { grid-template-columns: repeat(2, 1fr); }
	.stats-grid { grid-template-columns: repeat(2, 1fr); }
	.stat:nth-child(2) { border-right: 0; }
	.stat:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.14); }
	.nm-hero .hero-brand { font-size: clamp(32px, 9vw, 48px); }
	.hero-brand em { font-size: clamp(22px, 6vw, 32px); }
}
@media (max-width: 560px) {
	.product-grid, .grid-4, .gallery-4 { grid-template-columns: 1fr; }
	.footer-grid > .wp-block-column { flex-basis: 100% !important; }
	.nm-section.nm-tall { padding-top: 56px; padding-bottom: 56px; }
}

/* ---------- Ajustes de espaçamento ---------- */
.nm-gap-top { margin-top: 40px !important; }
.nm-center.nm-gap-top { margin-top: 56px !important; }
.nm-vcenter { align-items: center !important; }
.nm-top { align-items: start; }
.wp-block-cover.nm-product-banner { min-height: 260px; }
.site-footer .wp-block-list { padding-left: 0; }
