/* NEMF Core: estilos de los bloques dinámicos y componentes (front y editor). */
:root {
	--nemf-navy: var(--wp--preset--color--navy, #00216f);
	--nemf-blue: var(--wp--preset--color--blue, #0070b8);
	--nemf-orange: var(--wp--preset--color--orange, #f26a1b);
	--nemf-ink: var(--wp--preset--color--ink, #0f172a);
	--nemf-slate: var(--wp--preset--color--slate, #475569);
	--nemf-light: var(--wp--preset--color--light, #f3f6fb);
	--nemf-line: #dbe3ef;
	--nemf-radius: 10px;
	--nemf-shadow: 0 10px 30px -18px rgba(0, 33, 111, .45);
	--nemf-wa: #25d366;
}

.nemf-icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.2em; }
.nemf-empty { color: var(--nemf-slate); font-style: italic; }

/* Rejillas y tarjetas */
.nemf-grid { display: grid; gap: 24px; grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) { .nemf-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .nemf-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.nemf-card {
	display: flex; flex-direction: column; background: #fff; border: 1px solid var(--nemf-line);
	border-radius: var(--nemf-radius); overflow: hidden; text-decoration: none; color: var(--nemf-ink);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.nemf-card:hover, .nemf-card:focus-visible { transform: translateY(-3px); box-shadow: var(--nemf-shadow); border-color: var(--nemf-blue); color: var(--nemf-ink); }
.nemf-card__media { display: block; aspect-ratio: 20 / 13; background: var(--nemf-light); overflow: hidden; }
.nemf-card__media img, .nemf-img-placeholder { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.nemf-card:hover .nemf-card__media img { transform: scale(1.04); }
.nemf-img-placeholder { background: linear-gradient(135deg, var(--nemf-light), #dde6f3); }
.nemf-card__body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; }
.nemf-card__title { font-family: var(--wp--preset--font-family--heading, inherit); font-weight: 700; font-size: 1.2rem; line-height: 1.2; color: var(--nemf-navy); }
.nemf-card__text { color: var(--nemf-slate); font-size: .98rem; line-height: 1.5; }
.nemf-card__meta { color: var(--nemf-slate); font-size: .9rem; }
.nemf-card__tags { color: var(--nemf-blue); font-size: .85rem; font-weight: 600; letter-spacing: .01em; }
.nemf-card__more { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 6px; color: var(--nemf-blue); font-weight: 600; font-size: .95rem; }
.nemf-card--proyecto .nemf-card__media { aspect-ratio: 4 / 3; }
.nemf-card--proyecto.is-hidden { display: none; }
.nemf-tambien { margin-top: 28px; padding: 16px 20px; background: var(--nemf-light); border-left: 4px solid var(--nemf-orange); border-radius: 6px; color: var(--nemf-ink); }

/* Barra de confianza */
.nemf-trust__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: center; }
@media (min-width: 768px) { .nemf-trust__list { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.nemf-trust__item { display: flex; flex-direction: column; gap: 2px; }
.nemf-trust__big { font-family: var(--wp--preset--font-family--heading, inherit); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; color: #fff; line-height: 1.1; }
.nemf-trust__small { font-size: .9rem; color: rgba(255, 255, 255, .78); }

/* Filtros de proyectos */
.nemf-filters { display: flex; flex-wrap: wrap; gap: 14px 32px; margin: 0 0 26px; }
.nemf-filters__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nemf-filters__label { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--nemf-slate); margin-right: 4px; }
.nemf-chip { border: 1px solid var(--nemf-line); background: #fff; color: var(--nemf-ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .92rem; cursor: pointer; transition: all .15s ease; }
.nemf-chip:hover { border-color: var(--nemf-blue); color: var(--nemf-blue); }
.nemf-chip.is-active { background: var(--nemf-navy); border-color: var(--nemf-navy); color: #fff; }
.nemf-filters__empty { margin-top: 12px; }

/* Sectores */
.nemf-sector { display: flex; flex-direction: column; gap: 8px; padding: 26px 24px; background: #fff; border: 1px solid var(--nemf-line); border-radius: var(--nemf-radius); text-decoration: none; color: var(--nemf-ink); transition: transform .2s ease, box-shadow .2s ease; }
.nemf-sector:hover { transform: translateY(-3px); box-shadow: var(--nemf-shadow); color: var(--nemf-ink); }
.nemf-sector__icon { width: 52px; height: 52px; border-radius: 12px; background: var(--nemf-light); color: var(--nemf-navy); display: grid; place-items: center; }
.nemf-sector__icon .nemf-icon { width: 28px; height: 28px; }
.nemf-sector__title { font-family: var(--wp--preset--font-family--heading, inherit); font-weight: 700; font-size: 1.3rem; color: var(--nemf-navy); }
.nemf-sector__text { color: var(--nemf-slate); line-height: 1.5; }
.nemf-sector__count { margin-top: auto; padding-top: 8px; color: var(--nemf-blue); font-weight: 600; font-size: .9rem; }

/* Logos de clientes */
.nemf-logos { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; }
@media (min-width: 640px) { .nemf-logos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .nemf-logos { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.nemf-logos__item { display: flex; align-items: center; justify-content: center; height: 72px; padding: 10px 14px; background: #fff; border: 1px solid var(--nemf-line); border-radius: 8px; }
.nemf-logos__item img { height: 44px; max-width: 100%; width: auto; object-fit: contain; }
.nemf-logos--gray .nemf-logos__item img { filter: grayscale(1); opacity: .75; transition: filter .2s ease, opacity .2s ease; }
.nemf-logos--gray .nemf-logos__item:hover img { filter: none; opacity: 1; }

/* Certificaciones */
.nemf-certs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 768px) { .nemf-certs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nemf-cert { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: #fff; border: 1px solid var(--nemf-line); border-radius: var(--nemf-radius); }
.nemf-cert__icon { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--nemf-light); color: var(--nemf-navy); display: grid; place-items: center; overflow: hidden; }
.nemf-cert__icon .nemf-icon { width: 24px; height: 24px; }
.nemf-cert__icon img { width: 100%; height: 100%; object-fit: cover; }
.nemf-cert__body { display: flex; flex-direction: column; gap: 2px; }
.nemf-cert__title { font-weight: 700; color: var(--nemf-navy); line-height: 1.3; }
.nemf-cert__org { color: var(--nemf-ink); font-size: .92rem; }
.nemf-cert__vig { color: var(--nemf-slate); font-size: .85rem; }

/* Botones */
.nemf-btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 8px; font-weight: 700; text-decoration: none; line-height: 1.2; border: 2px solid transparent; transition: all .15s ease; cursor: pointer; font-family: inherit; font-size: 1rem; }
.nemf-btn .nemf-icon { width: 1.25em; height: 1.25em; }
.nemf-btn--primary { background: var(--nemf-wa); color: #0b3d1f; border-color: var(--nemf-wa); }
.nemf-btn--primary:hover { background: #1fb959; border-color: #1fb959; color: #0b3d1f; }
.nemf-btn--orange { background: var(--nemf-orange); color: #fff; border-color: var(--nemf-orange); }
.nemf-btn--orange:hover { background: #d95a12; border-color: #d95a12; color: #fff; }
.nemf-btn--outline { background: transparent; color: var(--nemf-navy); border-color: var(--nemf-navy); }
.nemf-btn--outline:hover { background: var(--nemf-navy); color: #fff; }
.nemf-btn--white { background: #fff; color: var(--nemf-navy); border-color: #fff; }
.nemf-btn--white:hover { background: var(--nemf-light); }
.nemf-wa.has-text-align-center { text-align: center; }
.nemf-wa.has-text-align-right { text-align: right; }

/* Listas de capacidades */
.nemf-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nemf-checklist li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.nemf-checklist .nemf-icon { color: var(--nemf-orange); margin-top: .15em; }
@media (min-width: 640px) { .nemf-checklist--2col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nemf-aside__title { font-size: 1.15rem; margin: 0 0 12px; }
.nemf-capacidades { padding: 22px 24px; background: var(--nemf-light); border-radius: var(--nemf-radius); }

/* Metadatos de proyecto */
.nemf-lead p, .nemf-lead__text { font-size: 1.15rem; line-height: 1.55; color: var(--nemf-slate); }
.nemf-meta { display: grid; gap: 12px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--nemf-line); }
.nemf-meta dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--nemf-slate); }
.nemf-meta dd { margin: 2px 0 0; font-weight: 600; color: var(--nemf-navy); }

/* Datos de contacto y redes */
.nemf-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.nemf-contact li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.nemf-contact .nemf-icon { color: var(--nemf-orange); margin-top: .1em; }
.nemf-contact a { color: inherit; text-decoration: none; }
.nemf-contact a:hover { text-decoration: underline; }
.nemf-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; }
.nemf-social a { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-weight: 600; }
.nemf-social a:hover { color: var(--nemf-orange); }

/* Botón flotante */
.nemf-float { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: inline-flex; align-items: center; gap: 8px; background: var(--nemf-wa); color: #0b3d1f; padding: 12px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.nemf-float .nemf-icon { width: 26px; height: 26px; }
.nemf-float:hover { background: #1fb959; color: #0b3d1f; }
@media (max-width: 640px) { .nemf-float__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .nemf-float { padding: 14px; } }

/* Formulario (Contact Form 7) */
.nemf-form__grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .nemf-form__grid { grid-template-columns: 1fr 1fr; } .nemf-form__full { grid-column: 1 / -1; } }
.nemf-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
.nemf-form input[type="text"], .nemf-form input[type="email"], .nemf-form input[type="tel"], .nemf-form select, .nemf-form textarea { width: 100%; box-sizing: border-box; max-width: 100%; font: inherit; font-weight: 400; padding: 11px 12px; border: 1px solid var(--nemf-line); border-radius: 8px; background: #fff; color: var(--nemf-ink); }
.nemf-form input[type="file"] { font-weight: 400; max-width: 100%; }
.nemf-form form, .nemf-form .wpcf7 { max-width: 100%; min-width: 0; }
.nemf-form input:focus, .nemf-form select:focus, .nemf-form textarea:focus { outline: 2px solid var(--nemf-blue); outline-offset: 1px; }
.nemf-form .wpcf7-form-control-wrap { display: block; }
.nemf-form .wpcf7-not-valid-tip { color: #c62828; font-size: .85rem; font-weight: 400; }
.nemf-form .wpcf7-response-output { margin: 14px 0 0; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--nemf-line); }
.nemf-form .wpcf7-submit { margin-top: 16px; }
.nemf-form__fallback { padding: 16px; background: var(--nemf-light); border-radius: 8px; }
.nemf-cta .nemf-form { background: #fff; color: var(--nemf-ink); padding: 24px; border-radius: var(--nemf-radius); }
.nemf-cta .nemf-form label { color: var(--nemf-ink); }

/* Tabla de productos */
.nemf-table table { font-size: .95rem; }
.nemf-table th { background: var(--nemf-navy); color: #fff; }
.nemf-table td a { font-weight: 600; color: var(--nemf-blue); }

/* Proyectos relacionados (sección a ancho completo) */
.nemf-relacionados { background: var(--nemf-light); padding: clamp(2.5rem, 6vw, 4.5rem) var(--wp--preset--spacing--30, 1rem); }
.nemf-relacionados__inner { max-width: 1160px; margin: 0 auto; }
.nemf-relacionados__inner > .nemf-section__title { margin-bottom: 1.25rem; }
