/* ==========================================================================
   COMPONENTS.CSS · Componentes reutilizables (chrome común)
   ==========================================================================
   - Announce bar (banda superior)
   - Navegación principal
   - Footer
   - Subfinal (CTA común a subpáginas)
   - Botones (.btn, .btn--mint, .btn--lg, etc.)
   
   Cargado por TODAS las páginas del sitio.
   ========================================================================== */


/* ===== ANNOUNCE BAR · fondo claro con estilo refinado =====
   Rompe con el oscuro del nav y header. Cada beneficio en un "tag" pill, dot mint pulsando,
   CTA "Ver cómo" como pill mint. */
.announce {
  background: linear-gradient(180deg, var(--c-paper) 0%, #eef3ef 100%);
  color: var(--c-ink);
  padding: 7px var(--gutter);
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(168, 134, 46, .18);
  position: relative; z-index: 99;
  letter-spacing: -.005em;
}
/* Pequeño detalle decorativo: línea mint a la izquierda absoluta */
.announce::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--c-mint), var(--c-mint-deep));
  opacity: .9;
}
.announce-item {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.announce .dot {
  width: 6px; height: 6px;
  background: var(--c-mint-deep); border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(168, 134, 46, .55);
  flex-shrink: 0;
}
.announce-num {
  display: inline-flex; align-items: center;
  font-family: var(--ff-sans); font-weight: 700;
  font-size: 12.5px; color: var(--c-mint-deep);
  background: rgba(168, 134, 46, .12);
  padding: 1px 7px; border-radius: 5px;
  letter-spacing: -.02em;
}
.announce strong { color: var(--c-ink); font-weight: 600; }
.announce .sep {
  color: var(--c-grey-500); opacity: .7;
  margin: 0 2px;
}
.announce a {
  display: inline-flex; align-items: center; gap: 4px;
  color: white; background: var(--c-ink);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600; font-size: 11px;
  letter-spacing: -.005em;
  transition: background .25s var(--ease-out), transform .25s var(--ease-out);
  margin-left: 4px;
}
.announce a:hover {
  background: var(--c-mint-deep);
  transform: translateY(-1px);
}
.announce a svg { color: currentColor; width: 9px; height: 9px; }

@media (max-width: 640px) {
  .announce { font-size: 11.5px; padding: 6px 16px; gap: 7px; }
  .announce-num { font-size: 11.5px; padding: 1px 6px; }
  .announce a { font-size: 10.5px; padding: 3px 9px; }
}

.nav {
  position: sticky; top: 0; z-index: 90;
  background: rgba(3, 33, 40, .72);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(201, 168, 76, .06);
  padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  transition: padding .3s var(--ease-out);
}
.nav.is-scrolled { padding: 10px var(--gutter); }
/* ===== NAV LOGO: logo completo siempre visible + micro-animación al hover =====
   El icono y el wordmark se ven siempre. En hover, el icono hace una pequeña rotación/escala
   tipo saludo (sutil, no llamativo). */
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--c-bone);
  text-decoration: none;
  padding: 6px 8px;
  margin: -6px -8px;
  border-radius: 10px;
}
.nav-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--c-mint);
  flex-shrink: 0;
  transition: transform .35s cubic-bezier(.34, 1.4, .64, 1);
}
.nav-logo-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Wordmark: siempre visible */
.nav-logo-wordmark {
  display: inline-flex;
  align-items: center;
  height: 30px;
  color: var(--c-bone);
}
.nav-logo-wordmark svg {
  height: 30px;
  width: 65px;
  display: block;
  flex-shrink: 0;
  fill: currentColor;
}

/* Hover/focus: micro-animación sutil del icono (rotación leve y escala pequeña) */
.nav-logo:hover .nav-logo-icon,
.nav-logo:focus-visible .nav-logo-icon {
  transform: rotate(-8deg) scale(1.05);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .nav-logo-icon { transition: none; }
}

/* Helper accesibilidad */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--c-grey-100); transition: color .25s var(--ease-out); }
.nav-links a:hover { color: var(--c-mint); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px 11px 20px;
  background: var(--c-mint); color: var(--c-ink); border-radius: 999px;
  font-size: 14px; font-weight: 600; transition: all .3s var(--ease-out);
}
.nav-cta:hover { background: var(--c-mint-soft); transform: translateY(-1px); box-shadow: 0 8px 24px var(--c-mint-glow); }
.nav-cta svg { width: 14px; height: 14px; transition: transform .3s var(--ease-out); }
.nav-cta:hover svg { transform: translate(2px, -2px); }
@media (max-width: 880px) { .nav-links { display: none; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px;
  border-radius: 999px; font-size: 14px; font-weight: 600; font-family: var(--ff-sans);
  transition: all .3s var(--ease-out); cursor: pointer; border: 1px solid transparent; white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; transition: transform .3s var(--ease-out); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn--mint { background: var(--c-mint); color: var(--c-ink); }
.btn--mint:hover { background: var(--c-mint-soft); transform: translateY(-2px); box-shadow: 0 12px 32px var(--c-mint-glow); }
.btn--ghost { background: rgba(255, 255, 255, .04); color: var(--c-bone); border-color: rgba(255, 255, 255, .12); backdrop-filter: blur(8px); }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); }
.btn--lg { padding: 17px 28px; font-size: 15px; }

.brand-cross { position: absolute; pointer-events: none; color: var(--c-mint); opacity: .35; }
.brand-cross::before, .brand-cross::after { content: ''; position: absolute; background: currentColor; }
.brand-cross::before { left: 0; right: 0; top: 50%; height: 1px; transform: translateY(-50%); }
.brand-cross::after { top: 0; bottom: 0; left: 50%; width: 1px; transform: translateX(-50%); }
.brand-cross .diamond {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(45deg);
  width: 8px; height: 8px; background: currentColor; box-shadow: 0 0 16px currentColor;
}
.brand-cross--small { width: 80px; height: 80px; }
.brand-cross--med { width: 140px; height: 140px; }
.brand-cross--big { width: 220px; height: 220px; }


/* ===== SUBFINAL: CTA común para subpáginas ===== */
/* ===== SUBFINAL: CTA común para subpáginas (paper) ===== */
.subfinal {
  background: linear-gradient(180deg, var(--c-paper) 0%, #eef3ef 100%);
  position: relative; overflow: hidden;
  padding: clamp(80px, 11vh, 140px) 0;
}
.subfinal-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(3, 33, 40, .04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask: radial-gradient(ellipse at 50% 50%, black, transparent 80%);
  -webkit-mask: radial-gradient(ellipse at 50% 50%, black, transparent 80%);
}
.subfinal-glow {
  position: absolute; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(168, 134, 46, .12), transparent 60%);
  filter: blur(90px); top: -10%; right: -10%; pointer-events: none;
}
.subfinal-content {
  position: relative; z-index: 2; max-width: 880px; margin: 0 auto; text-align: center;
}
.subfinal-content h2 {
  font-family: var(--ff-sans); font-weight: 700;
  font-size: clamp(40px, 5.4vw, 76px); line-height: 1;
  letter-spacing: -.04em; color: var(--c-ink); margin: 24px 0 24px;
}
.subfinal-content h2 .italic { color: var(--c-mint-deep); font-style: italic; font-weight: 600; }
.subfinal-content > p {
  font-size: 17px; line-height: 1.6; color: var(--c-grey-700);
  max-width: 600px; margin: 0 auto 32px;
}
.subfinal-content > p strong { color: var(--c-ink); font-weight: 600; }
.subfinal-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.subfinal-trust {
  margin-top: 36px; padding-top: 28px;
  border-top: 1px solid rgba(3, 33, 40, .08);
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: center;
}
.subfinal-trust span {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .04em; color: var(--c-grey-700);
}
.subfinal-trust svg {
  width: 14px; height: 14px; color: white;
  background: var(--c-mint-deep); border-radius: 50%; padding: 2.5px;
}

/* Botón ghost para fondos claros */
.btn--ghost-ink {
  background: transparent; color: var(--c-ink);
  border-color: rgba(3, 33, 40, .2);
}
.btn--ghost-ink:hover {
  background: rgba(3, 33, 40, .04);
  border-color: var(--c-ink);
}

/* ===== FOOTER ===== */
.footer { background: var(--c-deep); color: var(--c-bone); padding: 64px 0 32px; border-top: 1px solid rgba(201, 168, 76, .06); position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .footer-logo { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.footer-brand .footer-logo-icon { display: inline-flex; width: 40px; height: 40px; color: var(--c-mint); flex-shrink: 0; }
.footer-brand .footer-logo-icon svg { width: 100%; height: 100%; display: block; }
.footer-brand .footer-logo-wordmark { display: inline-flex; height: 28px; color: var(--c-bone); }
.footer-brand .footer-logo-wordmark svg { height: 100%; width: auto; display: block; }
.footer-brand .footer-logo-hub { font-family: var(--ff-sans); font-weight: 400; font-style: italic; font-size: 20px; opacity: .7; color: var(--c-bone); margin-left: -4px; letter-spacing: -.015em; }
.footer-brand p { font-size: 14px; color: var(--c-grey-100); line-height: 1.55; max-width: 320px; }
.footer-col h5 { font-family: var(--ff-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-grey-500); margin-bottom: 16px; font-weight: 500; }
.footer-col ul li { padding: 5px 0; }
.footer-col ul a { font-size: 14px; color: var(--c-grey-100); font-weight: 400; transition: color .25s var(--ease-out); }
.footer-col ul a:hover { color: var(--c-mint); }
.footer-bottom { padding-top: 24px; border-top: 1px solid rgba(201, 168, 76, .06); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-family: var(--ff-mono); font-size: 11px; color: var(--c-grey-500); letter-spacing: .02em; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(201, 168, 76, .08); }
.footer-contact a { font-family: var(--ff-mono); font-size: 12px; color: var(--c-grey-100); letter-spacing: .03em; transition: color .25s var(--ease-out); }
.footer-contact a:hover { color: var(--c-mint); }
.footer-address { font-style: normal; font-family: var(--ff-mono); font-size: 11px; line-height: 1.5; color: var(--c-grey-300); margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(201, 168, 76, .08); letter-spacing: .02em; }
.footer-address strong { color: var(--c-grey-100); font-weight: 600; }
.footer-bottom-right a { color: var(--c-grey-300); transition: color .25s var(--ease-out); }
.footer-bottom-right a:hover { color: var(--c-mint); }

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 600px) {
  .hero h1 { font-size: 40px; }
  .section-head h2 { font-size: 36px; }
  .platform-mockup { transform: none; }
  .float-card-1, .float-card-2 { display: none; }
  .roi-controls, .roi-result-card { padding: 24px; }
  .brand-cross--big { width: 120px; height: 120px; }
  .brand-cross--med { width: 80px; height: 80px; }
}

/* ===== Tipografía: balance de líneas en titulares ===== */
/* text-wrap: balance reparte líneas de forma equilibrada en navegadores modernos
   (Chrome 114+, Safari 17.4+, Firefox 121+, ~95% de cuota). En navegadores antiguos
   se ignora silenciosamente y el texto se rompe como siempre. */
.page-hero h1,
.hero h1,
.section-head h2 {
  text-wrap: balance;
  /* Evita huérfanas (palabra suelta en última línea) en navegadores que lo soporten. */
  text-wrap: pretty;
}

/* ===== Page hero: alineación izquierda con max-width 1080px (opción B) =====
   Aplica a TODAS las páginas tipo (servicios/*, sectores/*, financiacion, casos,
   contacto, nosotros, auditoria-ia). NO aplica al hero de Home (.hero, diseño 2 cols)
   ni al hero de Recursos.

   Resultado: contenido alineado a la izquierda dentro de un contenedor de hasta
   1080px en desktop. Aprovecha más pantalla que 920px sin llegar a verse abierto.

   NOTA SOBRE ESPECIFICIDAD: usamos `header.page-hero .page-hero-inner` (0,2,1)
   para vencer al inline `.page-hero-inner` (0,1,0) y `.page-hero h1` (0,2,0). */
@media (min-width: 1100px) {
  header.page-hero .page-hero-inner {
    max-width: 1080px;
  }
}


/* ===== Resource cards (grid + tarjeta de artículo) =====
   Movido aquí desde article.css para que esté disponible globalmente:
   se usa en home (sección 'Antes de empezar, infórmate'), recursos, etc. */

/* Grid de cards */
.resources-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px) { .resources-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .resources-grid { grid-template-columns: repeat(3, 1fr); } }

/* Card de artículo */
.resource-card {
  background: white;
  border: 1px solid rgba(3, 33, 40, .08);
  border-radius: 18px;
  padding: 26px 26px 24px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s var(--ease-out);
  text-decoration: none; color: inherit;
}
.resource-card::before {
  content: ''; position: absolute; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--c-mint-deep), var(--c-mint));
  transition: width .4s var(--ease-out);
}
.resource-card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 134, 46, .22);
  box-shadow: 0 24px 48px -16px rgba(3, 33, 40, .12);
}
.resource-card:hover::before { width: 100%; }
.resource-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
  font-family: var(--ff-mono); font-size: 10.5px;
  letter-spacing: .04em; text-transform: uppercase;
}
.resource-card-meta .cat { color: var(--c-mint-deep); font-weight: 600; }
.resource-card-meta .read { color: var(--c-grey-500); font-weight: 500; }
.resource-card h3 {
  font-family: var(--ff-sans); font-weight: 700;
  font-size: 18.5px; line-height: 1.22;
  letter-spacing: -.025em; color: var(--c-ink);
  margin-bottom: 14px;
}
.resource-card p {
  font-size: 14px; line-height: 1.55; color: var(--c-grey-700);
  margin-bottom: 18px;
}
.resource-card-foot {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(3, 33, 40, .06);
}
.resource-card-date {
  font-family: var(--ff-mono); font-size: 10.5px;
  color: var(--c-grey-500); letter-spacing: .04em; text-transform: uppercase;
}
.resource-card-arrow {
  color: var(--c-mint-deep);
  transition: transform .25s var(--ease-out);
}
.resource-card:hover .resource-card-arrow { transform: translateX(3px); }
.resource-card.is-hidden { display: none; }


/* =========================================================================
   Menú móvil (hamburguesa + drawer)
   Añadido en v26.1 para arreglar nav inexistente en móvil.
   Breakpoint: por debajo de 900px el menú desktop se oculta y aparece
   el botón hamburguesa que abre un drawer lateral.
   ========================================================================= */

/* Botón hamburguesa — oculto en desktop por defecto */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 10px;
  color: var(--c-mint);
  cursor: pointer;
  padding: 0;
  margin-left: 10px;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle:hover, .nav-toggle:focus-visible {
  background: rgba(201, 168, 76, 0.08);
  border-color: rgba(201, 168, 76, 0.5);
  outline: none;
}
.nav-toggle svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Drawer / panel lateral */
.nav-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(86vw, 360px);
  height: 100dvh;
  background: var(--c-ink);
  border-left: 1px solid rgba(201, 168, 76, 0.15);
  transform: translateX(100%);
  transition: transform .32s var(--ease-out);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.4);
}
.nav-drawer.is-open { transform: translateX(0); }

.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter, 24px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}
.nav-drawer-head .nav-drawer-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--c-mint-deep);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav-drawer-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 8px;
  color: var(--c-mint);
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-drawer-close:hover, .nav-drawer-close:focus-visible {
  background: rgba(201, 168, 76, 0.08);
  outline: none;
}
.nav-drawer-close svg {
  width: 18px; height: 18px;
  stroke: currentColor; stroke-width: 2; stroke-linecap: round;
  fill: none;
}

.nav-drawer-links {
  display: flex;
  flex-direction: column;
  padding: 16px 0 8px;
  list-style: none;
  margin: 0;
}
.nav-drawer-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter, 24px);
  font-family: var(--ff-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--c-bone);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 168, 76, 0.06);
  transition: color .2s, background .2s;
}
.nav-drawer-links a:hover, .nav-drawer-links a:focus-visible {
  color: var(--c-mint);
  background: rgba(201, 168, 76, 0.04);
  outline: none;
}
.nav-drawer-links a::after {
  content: "›";
  color: var(--c-grey-500);
  font-size: 22px;
  font-weight: 300;
  transition: transform .2s, color .2s;
}
.nav-drawer-links a:hover::after {
  color: var(--c-mint-deep);
  transform: translateX(3px);
}

.nav-drawer-cta {
  padding: 24px var(--gutter, 24px) 32px;
  margin-top: auto;
}
.nav-drawer-cta .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: var(--c-mint);
  color: var(--c-ink);
  font-family: var(--ff-sans);
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  border: none;
}
.nav-drawer-cta .btn:hover {
  background: var(--c-mint-soft);
}
.nav-drawer-cta .btn svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  fill: none;
}
.nav-drawer-foot {
  padding: 0 var(--gutter, 24px) 24px;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--c-grey-500);
  line-height: 1.6;
}
.nav-drawer-foot a {
  color: var(--c-grey-300);
  text-decoration: none;
}
.nav-drawer-foot a:hover { color: var(--c-mint); }

/* Overlay oscuro detrás del drawer */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 21, 25, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-out);
  z-index: 999;
}
.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Bloquear scroll del body cuando el drawer está abierto */
body.nav-locked {
  overflow: hidden;
}

/* Breakpoint: 900px y por debajo, ocultar menú desktop, mostrar hamburguesa */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }   /* el CTA está dentro del drawer */
  .nav-toggle { display: inline-flex; }
}

/* En desktop el drawer y overlay no existen visualmente */
@media (min-width: 901px) {
  .nav-drawer, .nav-overlay { display: none; }
}
