/*
Theme Name: NEMF
Theme URI: https://www.nemfsolutions.com
Author: NEMF Solutions
Description: Tema de bloques a medida para NEMF Solutions: ligero, mobile-first, con tipografía industrial y los colores de la marca. Requiere el plugin NEMF Core.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nemf
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { height: auto; max-width: 100%; }
:focus-visible { outline: 3px solid var(--wp--preset--color--orange); outline-offset: 2px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 1000; }
.skip-link:focus { left: 8px; }

/* ---------- Secciones ---------- */
.nemf-section__lead, .nemf-page-header p, .nemf-hero__title, .nemf-hero__text { box-sizing: border-box; }
.nemf-section > * + * { margin-top: 1.25rem; }
.nemf-section__title { margin-bottom: .35em; }
.nemf-section__lead { padding-right: max(0px, calc(min(100%, 1160px) - 60ch)); color: var(--wp--preset--color--slate); margin-bottom: 2rem; }
.has-navy-background-color .nemf-section__lead, .has-navy-background-color .nemf-section__title { color: #fff; }
.nemf-section__subtitle { margin: 0 0 .6em; }
.nemf-section--trust { padding-top: 2rem !important; padding-bottom: 2rem !important; }
.nemf-page-header { padding-top: clamp(2.5rem, 6vw, 4.5rem) !important; padding-bottom: clamp(2.5rem, 6vw, 4.5rem) !important; background-image: linear-gradient(135deg, #00216f 0%, #0b3a9a 70%, #0070b8 100%); }
.nemf-page-header .nemf-page-title, .nemf-page-header h1 { color: #fff; margin: 0; }
.nemf-page-header .nemf-page-lead, .nemf-page-header p { color: rgba(255, 255, 255, .88); padding-right: max(0px, calc(min(100%, 1160px) - 62ch)); margin-top: .75rem; }
.nemf-breadcrumb a { color: rgba(255,255,255,.8); text-decoration: none; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.nemf-breadcrumb a:hover { color: #fff; }
.nemf-img-rounded img { border-radius: 10px; }
.wp-block-gallery.is-cropped img { border-radius: 8px; }

/* ---------- Hero ---------- */
.nemf-hero { position: relative; justify-content: center !important; }
.nemf-hero .wp-block-cover__inner-container { max-width: 1160px; margin-left: auto; margin-right: auto; }
.nemf-hero__title { padding-right: max(0px, calc(min(100%, 1160px) - 22ch)); font-size: var(--wp--preset--font-size--xx-large); line-height: 1.08; }
.nemf-hero__text { padding-right: max(0px, calc(min(100%, 1160px) - 58ch)); }
.nemf-hero .wp-block-buttons { margin-top: 1.75rem; }
.nemf-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(90deg, var(--wp--preset--color--orange) 0 30%, var(--wp--preset--color--blue) 30% 100%); }

/* ---------- Botones (núcleo) ---------- */
.wp-block-button__link { transition: background .15s ease, color .15s ease, border-color .15s ease; }
.wp-block-button.is-style-outline .wp-block-button__link { border: 2px solid currentColor; background: transparent; color: var(--wp--preset--color--navy); padding: calc(.8rem - 2px) calc(1.4rem - 2px); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--navy); color: #fff; }
.nemf-btn-light.is-style-outline .wp-block-button__link, .wp-block-button.nemf-btn-light .wp-block-button__link { color: #fff; }
.nemf-btn-light.is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--navy); }
.nemf-btn-wa .wp-block-button__link { background: #25d366; color: #0b3d1f; }
.nemf-btn-wa .wp-block-button__link:hover { background: #1fb959; color: #0b3d1f; }
.nemf-btn-wa .wp-block-button__link::before { content: ""; display: inline-block; width: 1.2em; height: 1.2em; margin-right: .5em; vertical-align: -.25em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.75.46 3.45 1.32 4.95L2.05 22l5.25-1.38c1.45.79 3.08 1.21 4.74 1.21 5.46 0 9.91-4.45 9.91-9.91S17.5 2 12.04 2m0 1.67c4.54 0 8.24 3.7 8.24 8.24s-3.7 8.24-8.24 8.24c-1.5 0-2.97-.41-4.24-1.18l-.3-.18-3.12.82.83-3.04-.2-.31a8.2 8.2 0 0 1-1.26-4.35c0-4.54 3.7-8.24 8.25-8.24M8.53 7.33c-.16 0-.43.06-.66.31-.22.25-.87.86-.87 2.07 0 1.22.89 2.39 1 2.56.14.17 1.76 2.67 4.25 3.73.59.27 1.05.42 1.41.53.59.19 1.13.16 1.56.1.48-.07 1.46-.6 1.67-1.18.21-.58.21-1.07.15-1.18-.07-.1-.23-.16-.48-.27-.25-.14-1.47-.74-1.69-.82-.23-.08-.37-.12-.56.12-.16.25-.64.81-.78.97-.15.17-.29.19-.53.07-.26-.13-1.06-.39-2-1.23-.74-.66-1.23-1.47-1.38-1.72-.12-.24-.01-.39.11-.5.11-.11.27-.29.37-.44.13-.14.17-.25.25-.41.08-.17.04-.31-.02-.43-.06-.11-.56-1.35-.77-1.84-.2-.48-.4-.42-.56-.43-.14 0-.3-.01-.47-.01'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.75.46 3.45 1.32 4.95L2.05 22l5.25-1.38c1.45.79 3.08 1.21 4.74 1.21 5.46 0 9.91-4.45 9.91-9.91S17.5 2 12.04 2m0 1.67c4.54 0 8.24 3.7 8.24 8.24s-3.7 8.24-8.24 8.24c-1.5 0-2.97-.41-4.24-1.18l-.3-.18-3.12.82.83-3.04-.2-.31a8.2 8.2 0 0 1-1.26-4.35c0-4.54 3.7-8.24 8.25-8.24M8.53 7.33c-.16 0-.43.06-.66.31-.22.25-.87.86-.87 2.07 0 1.22.89 2.39 1 2.56.14.17 1.76 2.67 4.25 3.73.59.27 1.05.42 1.41.53.59.19 1.13.16 1.56.1.48-.07 1.46-.6 1.67-1.18.21-.58.21-1.07.15-1.18-.07-.1-.23-.16-.48-.27-.25-.14-1.47-.74-1.69-.82-.23-.08-.37-.12-.56.12-.16.25-.64.81-.78.97-.15.17-.29.19-.53.07-.26-.13-1.06-.39-2-1.23-.74-.66-1.23-1.47-1.38-1.72-.12-.24-.01-.39.11-.5.11-.11.27-.29.37-.44.13-.14.17-.25.25-.41.08-.17.04-.31-.02-.43-.06-.11-.56-1.35-.77-1.84-.2-.48-.4-.42-.56-.43-.14 0-.3-.01-.47-.01'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- Cabecera ---------- */
.nemf-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid #e3e9f2; padding-top: .6rem !important; padding-bottom: .6rem !important; }
body.admin-bar .nemf-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .nemf-header { top: 46px; } }
.nemf-header__inner { gap: 1.5rem; }
.nemf-header .wp-block-site-logo img { max-height: 44px; width: auto; }
.nemf-header .wp-block-navigation { flex: 1; justify-content: flex-end; }
.nemf-header .wp-block-navigation .wp-block-navigation-item__content { padding: .4rem .2rem; color: var(--wp--preset--color--ink); }
.nemf-header .wp-block-navigation .wp-block-navigation-item__content:hover, .nemf-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--blue); }
.nemf-header .nemf-wa { flex: none; }
.nemf-header .nemf-btn { padding: 10px 16px; font-size: .95rem; }
@media (max-width: 900px) { .nemf-header .nemf-btn span { display: none; } .nemf-header .nemf-btn { padding: 10px; border-radius: 999px; } }
.wp-block-navigation__responsive-container.is-menu-open { background: #fff; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 3.5rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.4rem; font-family: var(--wp--preset--font-family--heading); color: var(--wp--preset--color--navy); padding: .5rem 0; }

/* ---------- Pie ---------- */
.nemf-footer { background: var(--wp--preset--color--navy); color: rgba(255, 255, 255, .85); padding-top: clamp(2.5rem, 6vw, 4rem) !important; padding-bottom: 2rem !important; }
.nemf-footer a { color: #fff; }
.nemf-footer h3, .nemf-footer h4 { color: #fff; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .8rem; }
.nemf-footer .wp-block-image img { max-height: 48px; width: auto; }
.nemf-footer .wp-block-navigation { flex-direction: column; align-items: flex-start; gap: .4rem; }
.nemf-footer .wp-block-navigation .wp-block-navigation-item__content { color: rgba(255, 255, 255, .85); }
.nemf-footer .wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--orange); }
.nemf-footer .nemf-contact .nemf-icon { color: var(--wp--preset--color--orange); }
.nemf-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .88rem; color: rgba(255, 255, 255, .65); }
.nemf-footer__bottom p { margin: 0; }
.nemf-footer__tagline { color: rgba(255, 255, 255, .75); max-width: 36ch; }

/* ---------- Plantillas de servicio y proyecto ---------- */
.nemf-single__cols { gap: 2.5rem; }
.nemf-single__aside > * + * { margin-top: 1.25rem; }
.nemf-single .wp-block-post-featured-image img { border-radius: 10px; }
.nemf-single .wp-block-post-content > * + * { margin-top: 1.25rem; }
.nemf-single .nemf-capacidades { position: sticky; top: 90px; }
@media (max-width: 781px) { .nemf-single .nemf-capacidades { position: static; } }

/* ---------- Varios ---------- */
.nemf-cta .wp-block-columns { gap: 2.5rem; }
.nemf-cta__cols .wp-block-column > * + * { margin-top: 1.25rem; }
.nemf-cotizar__cols .wp-block-column > * + * { margin-top: 1.25rem; }
.wp-block-search__button { background: var(--wp--preset--color--navy); color: #fff; border: 0; border-radius: 8px; }
.nemf-404 { text-align: center; padding: 4rem 0; }
.wp-block-post-title a { text-decoration: none; }
.nemf-archive .wp-block-post-template { gap: 2rem; }
