/* Nexo Huila — estilos de la landing.
   Móvil primero: lo base es para celular; los @media (min-width) agregan columnas.
   Colores planos de marca, sin degradados. */

:root {
	--nx-ink: var(--wp--preset--color--ink, #0B1B2E);
	--nx-ink-2: var(--wp--preset--color--ink-2, #13263D);
	--nx-paper: var(--wp--preset--color--paper, #F7F5F0);
	--nx-white: #fff;
	--nx-green: var(--wp--preset--color--green, #4CC38A);
	--nx-green-dark: var(--wp--preset--color--green-dark, #1C7048);
	--nx-gold: var(--wp--preset--color--gold, #C9A44C);
	--nx-muted: var(--wp--preset--color--muted, #59626E);
	--nx-line: var(--wp--preset--color--line, #E2DDD2);
	--nx-line-dark: rgba(255, 255, 255, 0.14);
	--nx-pad-y: clamp(3.5rem, 9vw, 7rem);
	--nx-tap: 48px;
}

html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--nx-gold); outline-offset: 3px; }

/* ---------- Encabezado ---------- */
.nx-header-wrap { position: sticky; top: 0; z-index: 50; transition: box-shadow .2s; }
.nx-header-wrap.is-scrolled { box-shadow: 0 1px 0 var(--nx-line-dark); }
.nx-header .wp-block-site-logo img { width: 140px; height: auto; }
.nx-nav .wp-block-navigation-item__content { text-decoration: none; padding: .25rem 0; }
.nx-nav .wp-block-navigation-item__content:hover { color: var(--nx-green); }
.nx-nav .wp-block-navigation__responsive-container-open,
.nx-nav .wp-block-navigation__responsive-container-close { min-width: var(--nx-tap); min-height: var(--nx-tap); justify-content: center; align-items: center; }
.nx-nav .wp-block-navigation__responsive-container-open svg { width: 28px; height: 28px; }
/* Menú móvil a pantalla completa, enlaces grandes */
.nx-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 1.25rem 1.25rem 2rem; }
.nx-nav .is-menu-open .wp-block-navigation__container { gap: 0 !important; width: 100%; align-items: stretch !important; }
.nx-nav .is-menu-open .wp-block-navigation__responsive-container-content { align-items: stretch !important; }
.nx-nav .is-menu-open .wp-block-navigation-item { align-items: flex-start !important; }
.nx-nav .is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid var(--nx-line-dark); }
.nx-nav .is-menu-open .wp-block-navigation-item__content { display: block; padding: 1rem 0 !important; font-family: var(--wp--preset--font-family--serif); font-size: 1.6rem; font-weight: 500; }
.nx-nav .nx-nav-cta > a { color: var(--nx-green) !important; }
@media (min-width: 600px) {
	.nx-nav:not(.is-menu-open) .nx-nav-cta > a { border: 1px solid var(--nx-gold); padding: .5rem 1rem !important; color: var(--nx-white) !important; }
	.nx-nav:not(.is-menu-open) .nx-nav-cta > a:hover { background: var(--nx-gold); color: var(--nx-ink) !important; }
}
@media (min-width: 782px) { .nx-header .wp-block-site-logo img { width: 170px; } }

/* ---------- Secciones ---------- */
.nx-main > .wp-block-post-content > .nx-section:first-child { margin-top: 0; }
.wp-block-post-content > .nx-section { margin-block: 0 !important; }
.nx-section { padding-top: var(--nx-pad-y); padding-bottom: var(--nx-pad-y); }
.nx-light { background: var(--nx-paper); color: var(--nx-ink); }
.nx-white { background: var(--nx-white); color: var(--nx-ink); }
.nx-dark, .nx-hero { background: var(--nx-ink); color: var(--nx-white); }
.nx-dark a, .nx-hero a:not(.wp-element-button) { color: var(--nx-green); }
.nx-dark a:hover { color: var(--nx-white); }

.nx-kicker { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--nx-green-dark); margin: 0 0 1rem; display: flex; align-items: center; gap: .75rem; }
.nx-kicker span { color: var(--nx-gold); font-variant-numeric: tabular-nums; }
.nx-kicker::after { content: ""; flex: 0 0 2.5rem; height: 1px; background: var(--nx-gold); order: 3; }
.nx-dark .nx-kicker { color: var(--nx-green); }
.nx-eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--nx-gold); margin: 0; }
.nx-lead { font-size: 1.1rem; color: var(--nx-muted); max-width: 46ch; }
.nx-dark .nx-lead { color: rgba(255, 255, 255, .74); }
.nx-note { font-size: .85rem; color: var(--nx-muted); border-top: 1px solid var(--nx-line); padding-top: 1rem; margin-top: 1.5rem; }

/* Cabecera + texto de sección: apilado en móvil, 2 columnas en escritorio */
.nx-split { display: grid; gap: 1rem 4rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.nx-split .wp-block-heading { margin: 0; }
.nx-col-body > :first-child { margin-top: 0; }
@media (min-width: 900px) {
	.nx-split { grid-template-columns: 5fr 7fr; align-items: start; }
	.nx-split .nx-col-body { padding-top: 2.1rem; }
	.nx-split.is-contact .nx-col-body { padding-top: 0; }
	.nx-split.is-contact { grid-template-columns: 5fr 6fr; align-items: start; }
}
.nx-head { margin-bottom: 2rem; }
.nx-head .wp-block-heading { margin-top: 0; }

/* ---------- Hero ---------- */
.nx-hero { padding-top: 0; }
.nx-hero-banner { margin: 0 calc(-1 * var(--wp--style--root--padding-left, 1rem)) 2rem !important; max-width: none !important; width: auto !important; }
.nx-hero-banner img { width: 100%; display: block; }
@media (min-width: 1200px) { .nx-hero-banner { margin: 0 auto 3rem !important; max-width: 1200px !important; } }
.nx-hero-grid { display: grid; gap: 1.5rem 4rem; }
.nx-hero-title { font-size: clamp(2rem, 7.4vw, 3.6rem) !important; margin: .75rem 0 0; font-weight: 600; }
.nx-hero-lead { font-size: 1.1rem; color: rgba(255, 255, 255, .78); margin-top: 0; }
@media (min-width: 900px) { .nx-hero-grid { grid-template-columns: 7fr 5fr; align-items: end; } }

/* Botones: ancho completo en celular, área táctil ≥ 48px */
.wp-block-buttons { gap: .75rem; }
.wp-block-button .wp-block-button__link { min-height: var(--nx-tap); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--nx-white); border: 1px solid rgba(255, 255, 255, .5); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--nx-white); background: var(--nx-white); color: var(--nx-ink); }
@media (max-width: 599px) {
	.nx-hero .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.nx-hero .wp-block-button, .nx-hero .wp-block-button .wp-block-button__link { width: 100%; }
}

.nx-stats { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: clamp(2.5rem, 6vw, 4.5rem) !important; border-top: 1px solid var(--nx-line-dark); }
.nx-stat { padding: 1.25rem 0 0; }
.nx-stat:nth-child(odd) { padding-right: 1rem; }
.nx-stat > p { margin: 0; }
.nx-stat-num { font-family: var(--wp--preset--font-family--serif); font-size: clamp(2.2rem, 8vw, 3.2rem); line-height: 1; color: var(--nx-white); }
.nx-stat-label { font-size: .88rem; color: rgba(255, 255, 255, .66); margin-top: .4rem !important; max-width: 16ch; }
@media (min-width: 782px) {
	.nx-stats { grid-template-columns: repeat(4, 1fr); }
	.nx-stat { padding: 1.5rem 1.5rem 0 0; border-right: 1px solid var(--nx-line-dark); }
	.nx-stat + .nx-stat { padding-left: 1.5rem; }
	.nx-stat:last-child { border-right: 0; }
}

/* ---------- Propósito ---------- */
.nx-statement { font-family: var(--wp--preset--font-family--serif); font-size: clamp(1.25rem, 3.6vw, 1.7rem); line-height: 1.45; font-weight: 400; margin: 0; border-left: 2px solid var(--nx-gold); padding-left: 1.25rem; }
.nx-pillars { gap: 0 !important; border-top: 1px solid var(--nx-line); }
.nx-pillar { padding: 1.5rem 0; border-bottom: 1px solid var(--nx-line); }
.nx-pillar h3 { margin: 0 0 .5rem; font-size: 1.2rem; }
.nx-pillar p { margin: 0; color: var(--nx-muted); font-size: .98rem; }
@media (min-width: 782px) {
	.nx-pillars { grid-template-columns: repeat(4, 1fr) !important; border-bottom: 1px solid var(--nx-line); }
	.nx-pillar { padding: 1.75rem 1.5rem 1.75rem 0; border-bottom: 0; }
	.nx-pillar + .nx-pillar { padding-left: 1.5rem; border-left: 1px solid var(--nx-line); }
}

/* ---------- Organización (diagrama en HTML) ---------- */
.nx-org { display: grid; gap: 0; max-width: 820px; margin-left: auto !important; margin-right: auto !important; }
.nx-org-node { border: 1px solid var(--nx-ink); background: var(--nx-white); padding: 1.1rem 1.25rem; position: relative; }
.nx-org-node.is-top { background: var(--nx-ink); color: var(--nx-white); }
.nx-org-node.is-top .nx-org-text { color: rgba(255, 255, 255, .72); }
.nx-org > .nx-org-node + .nx-org-node,
.nx-org > .nx-org-node + .nx-org-pair { margin-top: 2rem !important; }
.nx-org > .nx-org-node + .nx-org-node::before,
.nx-org > .nx-org-node + .nx-org-pair::before { content: ""; position: absolute; left: 50%; top: -2rem; height: 2rem; border-left: 1px solid var(--nx-gold); }
.nx-org-pair { position: relative; display: grid; gap: 1rem; }
.nx-org-pair > .nx-org-node { margin: 0 !important; }
.nx-org-title { font-family: var(--wp--preset--font-family--serif); font-weight: 600; font-size: 1.2rem; margin: 0 !important; }
.nx-org-text { margin: .3rem 0 0 !important; font-size: .95rem; color: var(--nx-muted); }
@media (min-width: 640px) {
	.nx-org-pair { grid-template-columns: 1fr 1fr; gap: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--nx-gold); }
	.nx-org-pair .nx-org-node::before { content: ""; position: absolute; left: 50%; top: calc(-1.25rem - 1px); height: 1.25rem; border-left: 1px solid var(--nx-gold); }
	.nx-org-node { text-align: center; }
}

/* ---------- Junta ---------- */
.nx-president { display: grid; gap: 1.5rem; background: var(--nx-ink); color: var(--nx-white); padding: 0; margin-bottom: 2.5rem !important; }
.nx-president-photo { margin: 0 !important; }
.nx-president-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.nx-president-text { padding: 0 1.5rem 1.75rem; }
.nx-president-name { font-size: clamp(1.6rem, 5.5vw, 2.4rem) !important; margin: .5rem 0 .25rem; }
.nx-president-org { color: var(--nx-green); margin: 0; font-weight: 500; }
.nx-quote { font-family: var(--wp--preset--font-family--serif); font-size: 1.15rem; line-height: 1.5; color: rgba(255, 255, 255, .82); border-top: 1px solid var(--nx-line-dark); padding-top: 1.25rem; margin-top: 1.5rem; }
@media (min-width: 782px) {
	.nx-president { grid-template-columns: 360px 1fr; align-items: center; gap: 3rem; }
	.nx-president-text { padding: 2rem 3rem 2rem 0; }
}

.nx-members { grid-template-columns: 1fr !important; gap: 2.25rem !important; }
@media (min-width: 560px) { .nx-members { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 2rem 1.25rem !important; } }
@media (min-width: 900px) { .nx-members { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 2.5rem 1.5rem !important; } }
.nx-member > * { margin: 0 !important; }
.nx-member-photo img, .nx-member-photo-empty { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; filter: grayscale(1) contrast(1.04); transition: filter .3s; }
.nx-member:hover .nx-member-photo img, .nx-member:focus-within .nx-member-photo img { filter: none; }
@media (hover: none) { .nx-member-photo img { filter: none; } }
.nx-member-photo-empty { background: var(--nx-paper); border: 1px dashed #B9B2A3; }
.nx-white .nx-member-photo-empty { background: var(--nx-paper); }
.nx-light .nx-member-photo-empty { background: #ECE8DF; }
.nx-member-name { font-size: clamp(1.15rem, 4.6vw, 1.25rem) !important; margin-top: .85rem !important; line-height: 1.25; }
.nx-member-org { color: var(--nx-green-dark); font-weight: 500; font-size: .92rem; margin-top: .3rem !important; }
.nx-member-role { color: var(--nx-muted); font-size: .85rem; }
.nx-member.is-vacant .nx-member-name { color: var(--nx-muted); }

/* ---------- Mesas técnicas ---------- */
.nx-mesas { gap: 1rem !important; }
.nx-mesa { border: 1px solid var(--nx-line-dark); padding: 1.5rem; background: var(--nx-ink-2); }
.nx-mesa h3 { margin: .5rem 0 .75rem; font-size: 1.3rem; }
.nx-mesa > p { color: rgba(255, 255, 255, .74); font-size: .98rem; }
.nx-mesa-num { font-family: var(--wp--preset--font-family--serif); color: var(--nx-gold) !important; font-size: 1rem !important; margin: 0; }
.nx-mesa-label { font-size: .75rem !important; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--nx-gold) !important; margin: 1.5rem 0 .6rem; }
@media (min-width: 900px) { .nx-mesas { grid-template-columns: repeat(3, 1fr) !important; } .nx-mesa { padding: 2rem; } }

.nx-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.nx-chips li { font-size: .82rem; padding: .3rem .65rem; border: 1px solid var(--nx-line-dark); color: rgba(255, 255, 255, .9); }
.nx-chips.is-light li { border-color: var(--nx-line); color: var(--nx-ink); background: var(--nx-paper); font-size: .88rem; padding: .4rem .8rem; }

/* ---------- Capacidades ---------- */
.nx-caps { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0 !important; border-top: 1px solid var(--nx-line); }
.nx-cap { padding: 1rem .75rem 1.1rem 0; border-bottom: 1px solid var(--nx-line); display: flex; flex-direction: column; gap: .35rem; }
@media (min-width: 640px) { .nx-cap { flex-direction: row; align-items: baseline; gap: .75rem; } }
.nx-cap > p { margin: 0 !important; }
.nx-cap-num { font-family: var(--wp--preset--font-family--serif); font-size: 1.8rem; line-height: 1; color: var(--nx-green-dark); min-width: 2ch; font-variant-numeric: tabular-nums; }
.nx-cap-label { font-size: .92rem; line-height: 1.35; hyphens: auto; overflow-wrap: anywhere; }
@media (min-width: 640px) { .nx-caps { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (min-width: 1000px) { .nx-caps { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
.nx-sectores { margin-top: 2.5rem !important; }

/* ---------- Empresas (logos) ---------- */
.nx-logos { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 1px !important; background: var(--nx-line); border: 1px solid var(--nx-line); }
.nx-logo-cell { background: var(--nx-white); display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; padding: .75rem; margin: 0 !important; }
.nx-logo-img { margin: 0 !important; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.nx-logo-img a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.nx-logo-img img { max-width: 88%; max-height: 60px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .85; transition: filter .25s, opacity .25s; }
.nx-logo-cell:hover img, .nx-logo-cell:focus-within img { filter: none; opacity: 1; }
@media (hover: none) { .nx-logo-img img { filter: none; opacity: 1; } }
.nx-logo-text { margin: 0; font-family: var(--wp--preset--font-family--serif); font-size: 1.5rem; font-weight: 600; }
.nx-logo-text a { color: var(--nx-ink); text-decoration: none; }
@media (min-width: 640px) { .nx-logos { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } .nx-logo-img img { max-height: 72px; } }
@media (min-width: 1000px) { .nx-logos { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }

/* ---------- Contacto ---------- */
.nx-contact-data { line-height: 2; margin-top: 1.5rem; }
.nx-form-wrap { background: var(--nx-white); color: var(--nx-ink); padding: 1.5rem; }
@media (min-width: 640px) { .nx-form-wrap { padding: 2.25rem; } }

.nx-form { display: grid; gap: 1rem; }
.nx-form .nx-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .nx-form .nx-row { grid-template-columns: 1fr 1fr; } }
.nx-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; }
.nx-field label .req { color: #A4372A; }
.nx-field input, .nx-field select, .nx-field textarea {
	width: 100%; min-height: var(--nx-tap); padding: .75rem .85rem; font: inherit; font-size: 16px; /* 16px evita el zoom de iOS */
	color: var(--nx-ink); background: var(--nx-paper); border: 1px solid #CFC8B9; border-radius: 2px; box-sizing: border-box; }
.nx-field textarea { min-height: 120px; resize: vertical; }
.nx-field input:focus, .nx-field select:focus, .nx-field textarea:focus { outline: 2px solid var(--nx-green-dark); outline-offset: 0; border-color: var(--nx-green-dark); background: var(--nx-white); }
.nx-check { display: flex; gap: .75rem; align-items: flex-start; font-size: .85rem; color: var(--nx-muted); }
.nx-check input { width: 22px; height: 22px; margin-top: .1rem; flex: 0 0 auto; accent-color: var(--nx-green-dark); }
.nx-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.nx-submit { min-height: 52px; width: 100%; border: 0; border-radius: 2px; background: var(--nx-ink); color: var(--nx-white); font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer; }
.nx-submit:hover { background: var(--nx-green-dark); }
.nx-submit[disabled] { opacity: .6; cursor: progress; }
.nx-msg { padding: .9rem 1rem; font-size: .95rem; border-left: 3px solid; margin: 0 0 .5rem; }
.nx-msg.is-ok { border-color: var(--nx-green-dark); background: #E8F4EC; }
.nx-msg.is-error { border-color: #A4372A; background: #F8E9E6; }

/* ---------- Pie ---------- */
.wp-site-blocks > .wp-block-template-part, .wp-site-blocks > main { margin-block-start: 0 !important; }
.nx-footer .wp-block-site-logo img { width: 170px; }
.nx-footer a { color: var(--nx-white); }
.nx-footer a:hover { color: var(--nx-green); }
.nx-footer-lead { color: rgba(255, 255, 255, .7); max-width: 32ch; }
.nx-kicker-gold { color: var(--nx-gold); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.nx-footer-title { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--nx-gold); margin-bottom: .5rem; }
.nx-footer-bottom { border-top: 1px solid var(--nx-line-dark); margin-top: 2.5rem !important; padding-top: 1.25rem; color: rgba(255, 255, 255, .55); }
.nx-footer-bottom p { margin: 0; }

/* ---------- Botón fijo "Contáctenos" en celular ---------- */
.nx-sticky-cta { display: none; }
@media (max-width: 781px) {
	.nx-sticky-cta {
		display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
		min-height: 52px; align-items: center; justify-content: center; background: var(--nx-green); color: var(--nx-ink) !important;
		font-weight: 700; text-decoration: none !important; border-radius: 2px; box-shadow: 0 6px 18px rgba(11, 27, 46, .28);
		transition: transform .25s, opacity .25s; }
	.nx-sticky-cta.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
	.nx-footer { padding-bottom: 6rem !important; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } html { scroll-behavior: auto; } }

/* ---------- Modal de campaña (/#principal) ---------- */
.nx-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.nx-modal.is-open { display: block; }
.nx-modal-backdrop { position: absolute; inset: 0; background: rgba(11, 27, 46, .72); }
.nx-modal-dialog {
	position: absolute; left: 0; right: 0; bottom: 0; top: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
	background: var(--nx-white); color: var(--nx-ink); padding: 3.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
	border-top: 4px solid var(--nx-green); animation: nx-up .28s ease-out; }
.nx-modal-title { font-size: clamp(1.6rem, 6vw, 2.1rem) !important; margin: .5rem 0 .6rem; }
.nx-modal-text { color: var(--nx-muted); margin: 0 0 1.5rem; }
.nx-modal-close {
	position: absolute; top: .5rem; right: .5rem; width: var(--nx-tap); height: var(--nx-tap); border: 0; background: transparent;
	font-size: 2rem; line-height: 1; color: var(--nx-ink); cursor: pointer; }
.nx-modal-close:hover { color: var(--nx-green-dark); }
html.nx-modal-open, html.nx-modal-open body { overflow: hidden; }
html.nx-modal-open .nx-sticky-cta { display: none; }
@media (min-width: 700px) {
	.nx-modal-dialog { top: 50%; bottom: auto; left: 50%; right: auto; transform: translate(-50%, -50%); width: min(640px, 92vw); max-height: 92vh; padding: 2.75rem 2.5rem 2.25rem; animation: nx-fade .2s ease-out; }
}
@keyframes nx-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nx-fade { from { opacity: 0; } to { opacity: 1; } }
