/* ═══════════════════════════════════════════════════════════════
   ELECTRIC CONTROL — PREMIUM PUBLIC LAYER
   Alineado visualmente con Minerva ERP (glass, grid, glow)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ec-premium-bg: #f8fafc;
  --ec-premium-surface: rgba(255, 255, 255, 0.72);
  --ec-premium-border: rgba(148, 163, 184, 0.22);
  --ec-premium-glow: 0 0 40px rgba(37, 99, 235, 0.12);
  --ec-premium-hero: linear-gradient(145deg, #020617 0%, #0f172a 35%, #1e3a5f 70%, #0f172a 100%);
  --ec-premium-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── SITE SHELL ─────────────────────────────────────────── */
.ec-public-site {
  background: var(--ec-premium-bg);
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.ec-public-site .ec-section-alt {
  background: rgba(241, 245, 249, 0.65);
  backdrop-filter: blur(8px);
}

/* ─── PREMIUM PAGE HERO ──────────────────────────────────── */
.ec-page-hero--premium,
.ec-sector-hero,
.ec-vacante-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--ec-header-h) + var(--ec-space-12)) 0 var(--ec-space-12);
  background-image:
    linear-gradient(135deg, rgba(10, 18, 36, 0.76) 0%, rgba(15, 28, 54, 0.50) 45%, rgba(30, 58, 100, 0.68) 100%),
    var(--ec-hero-bg, url('/assets/public/page-hero.jpg'));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── Hero specific background images ───────────────────── */
.ec-hero--nosotros { --ec-hero-bg: url('/assets/public/heroes/hero-nosotros.jpg'); }
.ec-hero--servicios { --ec-hero-bg: url('/assets/public/heroes/hero-servicios.jpg'); }
.ec-hero--proyectos { --ec-hero-bg: url('/assets/public/heroes/hero-proyectos.jpg'); }
.ec-hero--sectores { --ec-hero-bg: url('/assets/public/heroes/hero-sectores.jpg'); }
.ec-hero--tecnologia { --ec-hero-bg: url('/assets/public/heroes/hero-tecnologia.jpg'); }
.ec-hero--contacto { --ec-hero-bg: url('/assets/public/heroes/hero-contacto.jpg'); }
.ec-hero--trabaja { --ec-hero-bg: url('/assets/public/heroes/hero-trabaja.jpg'); }
.ec-hero--cotizacion { --ec-hero-bg: url('/assets/public/heroes/hero-cotizacion.jpg'); }
.ec-hero--partners { --ec-hero-bg: url('/assets/public/heroes/hero-partners.jpg'); }
.ec-hero--noticias { --ec-hero-bg: url('/assets/public/heroes/hero-noticias.jpg'); }
.ec-hero--casos { --ec-hero-bg: url('/assets/public/heroes/hero-casos.jpg'); }
.ec-hero--portales { --ec-hero-bg: url('/assets/public/portales-hero.jpg'); }

/* Dynamic Hero Per Service */
.ec-hero--svc-ingenieria-electrica { --ec-hero-bg: url('/assets/public/services/ingenieria-electrica.jpg'); }
.ec-hero--svc-electricidad-industrial { --ec-hero-bg: url('/assets/public/services/electricidad-industrial.jpg'); }
.ec-hero--svc-instrumentacion { --ec-hero-bg: url('/assets/public/services/instrumentacion.jpg'); }
.ec-hero--svc-automatizacion-control { --ec-hero-bg: url('/assets/public/services/automatizacion-control.jpg'); }
.ec-hero--svc-construccion-montaje { --ec-hero-bg: url('/assets/public/services/construccion-montaje.jpg'); }
.ec-hero--svc-comisionamiento-puesta-marcha { --ec-hero-bg: url('/assets/public/services/comisionamiento-puesta-marcha.jpg'); }
.ec-hero--svc-energia { --ec-hero-bg: url('/assets/public/services/energia.jpg'); }
.ec-hero--svc-software-tecnologia { --ec-hero-bg: url('/assets/public/services/software-tecnologia.jpg'); }
.ec-hero--svc-mantenimiento-industrial { --ec-hero-bg: url('/assets/public/services/mantenimiento-industrial.jpg'); }
.ec-hero--svc-ingenieria-multidisciplinaria { --ec-hero-bg: url('/assets/public/services/ingenieria-multidisciplinaria.jpg'); }
.ec-hero--svc-energia-solar-fotovoltaica { --ec-hero-bg: url('/assets/public/services/energia-solar-fotovoltaica.jpg'); }
.ec-hero--svc-pruebas-electricas-especializadas { --ec-hero-bg: url('/assets/public/services/pruebas-electricas-especializadas.jpg'); }
.ec-hero--svc-telecomunicaciones-it-seguridad { --ec-hero-bg: url('/assets/public/services/telecomunicaciones-it-seguridad.jpg'); }
.ec-hero--svc-proyectos-epc-llave-en-mano { --ec-hero-bg: url('/assets/public/services/proyectos-epc-llave-en-mano.jpg'); }
.ec-hero--svc-consultoria-diseno-licitaciones { --ec-hero-bg: url('/assets/public/services/consultoria-diseno-licitaciones.jpg'); }

/* Dynamic Hero Per Sector */
.ec-hero--sector-oil-gas { --ec-hero-bg: url('/assets/public/sectors/oil-gas.jpg'); }
.ec-hero--sector-energia { --ec-hero-bg: url('/assets/public/sectors/energia.jpg'); }
.ec-hero--sector-mineria { --ec-hero-bg: url('/assets/public/sectors/mineria.jpg'); }
.ec-hero--sector-petroquimica { --ec-hero-bg: url('/assets/public/sectors/petroquimica.jpg'); }
.ec-hero--sector-infraestructura { --ec-hero-bg: url('/assets/public/sectors/infraestructura.jpg'); }
.ec-hero--sector-agroindustria { --ec-hero-bg: url('/assets/public/sectors/agroindustria.jpg'); }

.ec-page-hero--premium::before,
.ec-sector-hero::before,
.ec-vacante-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 85%);
  pointer-events: none;
}

.ec-page-hero--premium::after,
.ec-sector-hero::after,
.ec-vacante-hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.ec-page-hero--premium .ec-container,
.ec-sector-hero .ec-container,
.ec-vacante-hero .ec-container {
  position: relative;
  z-index: 1;
}

.ec-page-hero--premium .ec-heading-xl,
.ec-sector-hero .ec-heading-xl,
.ec-vacante-hero .ec-heading-xl {
  color: #fff;
  max-width: 820px;
}

.ec-page-hero--premium .ec-subtitle,
.ec-sector-hero .ec-subtitle,
.ec-vacante-hero .ec-subtitle {
  color: rgba(255, 255, 255, 0.72);
  max-width: 640px;
}

.ec-page-hero--premium .ec-breadcrumb a,
.ec-sector-hero .ec-breadcrumb a,
.ec-vacante-hero .ec-breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
}

.ec-page-hero--premium .ec-breadcrumb a:hover,
.ec-sector-hero .ec-breadcrumb a:hover,
.ec-vacante-hero .ec-breadcrumb a:hover {
  color: #fff;
}

.ec-page-hero--premium .ec-breadcrumb span,
.ec-sector-hero .ec-breadcrumb span,
.ec-vacante-hero .ec-breadcrumb span {
  color: rgba(255, 255, 255, 0.35);
}

.ec-page-hero--premium .ec-breadcrumb span:last-child,
.ec-sector-hero .ec-breadcrumb span:last-child,
.ec-vacante-hero .ec-breadcrumb span:last-child {
  color: rgba(255, 255, 255, 0.88);
}

.ec-highlight {
  background: linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── GLASS COMPONENTS ───────────────────────────────────── */
.ec-glass-card {
  background: var(--ec-premium-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--ec-premium-border);
  border-radius: var(--ec-radius-xl);
  box-shadow: var(--ec-shadow-md), var(--ec-premium-glow);
}

.ec-form-card.ec-glass-card,
.ec-form-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 24px;
  padding: var(--ec-space-8);
  box-shadow: 0 20px 50px -20px rgba(15, 23, 42, 0.15), var(--ec-premium-glow);
}

.ec-input,
.ec-textarea,
select.ec-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--ec-gray-200);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ec-text);
  transition: border-color var(--ec-duration) var(--ec-ease),
              box-shadow var(--ec-duration) var(--ec-ease);
}

.ec-input:focus,
.ec-textarea:focus,
select.ec-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ec-form-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ec-gray-500);
}

/* ─── ALERTS ─────────────────────────────────────────────── */
.ec-alert {
  padding: var(--ec-space-4) var(--ec-space-5);
  border-radius: var(--ec-radius);
  margin-top: var(--ec-space-4);
  font-size: 0.9375rem;
  line-height: 1.5;
  border: 1px solid transparent;
}

.ec-alert--error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.ec-alert--info {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

.ec-alert--success {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.ec-alert--warning {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

/* ─── FEATURE / ICON CARDS ───────────────────────────────── */
.ec-feature-card {
  padding: var(--ec-space-8);
  text-align: center;
  border-radius: var(--ec-radius-xl);
  border: 1px solid var(--ec-border-light);
  background: rgba(255, 255, 255, 0.85);
  transition: transform var(--ec-duration-slow) var(--ec-premium-ease),
              box-shadow var(--ec-duration-slow) var(--ec-premium-ease);
}

.ec-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ec-shadow-lg);
}

.ec-feature-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--ec-space-4);
  background: var(--ec-blue-50);
  color: var(--ec-blue);
}

.ec-feature-card__icon--green {
  background: #ecfdf5;
  color: var(--ec-green);
}

.ec-feature-card h3 {
  font-weight: 700;
  color: var(--ec-text);
  margin-bottom: var(--ec-space-2);
}

.ec-feature-card p {
  color: var(--ec-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ─── SERVICE / PROJECT CARDS ────────────────────────────── */
.ec-premium-card {
  cursor: pointer;
  border-radius: var(--ec-radius-xl);
  border: 1px solid var(--ec-border-light);
  background: #fff;
  overflow: hidden;
  transition: transform var(--ec-duration-slow) var(--ec-premium-ease),
              box-shadow var(--ec-duration-slow) var(--ec-premium-ease),
              border-color var(--ec-duration) var(--ec-ease);
}

.ec-premium-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -20px rgba(15, 23, 42, 0.2);
  border-color: rgba(37, 99, 235, 0.2);
}

.ec-premium-card__visual {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ec-premium-card__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.04) 100%);
}

.ec-premium-card__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--ec-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.ec-premium-card__body {
  padding: var(--ec-space-6) var(--ec-space-6) var(--ec-space-8);
}

.ec-premium-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--ec-space-3);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ec-blue);
}

/* ─── TECH SHOWCASE ──────────────────────────────────────── */
.ec-tech-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ec-space-12);
  align-items: center;
}

.ec-tech-showcase--reverse {
  direction: rtl;
}

.ec-tech-showcase--reverse > * {
  direction: ltr;
}

.ec-tech-showcase__panel {
  border-radius: 24px;
  min-height: 320px;
  padding: var(--ec-space-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.5);
}

.ec-tech-showcase__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.6;
}

.ec-tech-showcase__panel::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  bottom: -60px;
  right: -40px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, transparent 70%);
}

.ec-tech-showcase__logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  margin-bottom: var(--ec-space-6);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
  position: relative;
  z-index: 1;
}

.ec-tech-showcase__badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: var(--ec-space-4);
  position: relative;
  z-index: 1;
}

.ec-tech-showcase__name {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: var(--ec-space-2);
  position: relative;
  z-index: 1;
}

.ec-tech-showcase__tag {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

/* ─── NEWS & CASES ───────────────────────────────────────── */
.ec-news-card,
.ec-case-card {
  cursor: pointer;
  border-radius: var(--ec-radius-xl);
  border: 1px solid var(--ec-border-light);
  background: #fff;
  overflow: hidden;
  transition: transform var(--ec-duration-slow) var(--ec-premium-ease),
              box-shadow var(--ec-duration-slow) var(--ec-premium-ease);
}

.ec-news-card:hover,
.ec-case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ec-shadow-lg);
}

.ec-news-card__cover,
.ec-case-card__cover {
  height: 160px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.55) 0%, rgba(30, 58, 95, 0.45) 100%), url('/assets/public/news-cover.jpg') center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

.ec-news-card__cover::before,
.ec-case-card__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.ec-case-card__cover {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.55) 0%, rgba(8, 145, 178, 0.45) 100%), url('/assets/public/case-cover.jpg') center/cover no-repeat;
}

.ec-news-card__body,
.ec-case-card__body {
  padding: var(--ec-space-6);
}

.ec-news-card__date,
.ec-case-card__client {
  font-size: 0.8125rem;
  color: var(--ec-gray-400);
  margin-top: var(--ec-space-4);
}

.ec-case-card__metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--ec-space-4);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #ecfdf5;
  color: #047857;
}

.ec-article-body {
  color: var(--ec-gray-600);
  line-height: 1.85;
  font-size: 1.0625rem;
}

.ec-article-body p {
  margin-bottom: var(--ec-space-5);
}

.ec-caso-grid {
  display: grid;
  gap: var(--ec-space-10);
}

.ec-caso-block {
  padding: var(--ec-space-8);
  border-radius: var(--ec-radius-xl);
  border: 1px solid var(--ec-border-light);
  background: rgba(255, 255, 255, 0.9);
}

.ec-caso-block h2 {
  display: flex;
  align-items: center;
  gap: var(--ec-space-3);
  margin-bottom: var(--ec-space-4);
}

.ec-caso-block__num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--ec-blue-50);
  color: var(--ec-blue);
}

/* ─── STAT CARDS ─────────────────────────────────────────── */
.ec-stat-card {
  padding: var(--ec-space-6);
  text-align: center;
  border-radius: var(--ec-radius-xl);
  border: 1px solid var(--ec-border-light);
  background: rgba(255, 255, 255, 0.9);
}

.ec-stat-card__value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--ec-blue);
  margin-bottom: var(--ec-space-2);
  letter-spacing: -0.03em;
}

.ec-stat-card__label {
  font-size: 0.9375rem;
  color: var(--ec-text-secondary);
}

/* ─── CTA BANNER ─────────────────────────────────────────── */
.ec-page-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #eff6ff 0%, #fff 40%, #ecfeff 100%) !important;
}

.ec-page-cta::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.ec-cta-banner {
  padding: var(--ec-space-8);
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(135deg, var(--ec-blue) 0%, #1d4ed8 100%);
  box-shadow: 0 20px 50px -16px rgba(37, 99, 235, 0.45);
}

.ec-cta-banner h3 {
  color: #fff;
  margin-bottom: var(--ec-space-4);
}

.ec-cta-banner p {
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: var(--ec-space-6);
}

/* ─── PORTAL DROPDOWN MENU ───────────────────────────────── */
.ec-portal-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  transition: background var(--ec-duration) var(--ec-ease);
}

.ec-portal-menu-item:hover {
  background: var(--ec-gray-50);
}

.ec-portal-menu-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ec-portal-menu-item__icon--empleados { background: linear-gradient(135deg, #0e7490, #06b6d4); }
.ec-portal-menu-item__icon--clientes { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.ec-portal-menu-item__icon--proveedores { background: linear-gradient(135deg, #0f766e, #14b8a6); }

.ec-portal-menu-item__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ec-portal-menu-item__text strong {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ec-text);
  line-height: 1.2;
}

.ec-portal-menu-item__text small {
  font-size: 0.75rem;
  color: var(--ec-text-secondary);
  line-height: 1.2;
}

.ec-portal-menu-divider {
  height: 1px;
  background: var(--ec-gray-200);
  margin: 6px 12px;
}

.ec-portal-menu-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 0.8125rem;
  color: var(--ec-blue);
  font-weight: 600;
  text-decoration: none;
}

/* ─── HOME HERO ENHANCEMENTS ─────────────────────────────── */
.ec-hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.ec-hero-slide::after {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  top: 10%;
  right: -10%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 65%);
  pointer-events: none;
}

/* ─── CONTACT INFO PREMIUM ───────────────────────────────── */
.ec-contact-info-item {
  padding: var(--ec-space-5);
  border-radius: var(--ec-radius-lg);
  border: 1px solid var(--ec-border-light);
  background: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--ec-space-4);
  transition: border-color var(--ec-duration) var(--ec-ease),
              box-shadow var(--ec-duration) var(--ec-ease);
}

.ec-contact-info-item:hover {
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: var(--ec-shadow-sm);
}

.ec-contact-info-item-icon {
  background: linear-gradient(135deg, var(--ec-blue-50), #ecfeff) !important;
}

/* ─── LEGAL PAGES ────────────────────────────────────────── */
.ec-legal-shell .ec-page-content {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--ec-border-light);
  border-radius: var(--ec-radius-xl);
  box-shadow: var(--ec-shadow-sm);
  margin-top: calc(var(--ec-header-h) + var(--ec-space-8));
  margin-bottom: var(--ec-space-16);
}

/* ─── EMPTY STATES ───────────────────────────────────────── */
.ec-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--ec-space-16) var(--ec-space-6);
  color: var(--ec-text-secondary);
}

.ec-container-narrow {
  max-width: var(--ec-container-narrow);
  margin-left: auto;
  margin-right: auto;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .ec-tech-showcase {
    grid-template-columns: 1fr;
    gap: var(--ec-space-8);
  }

  .ec-tech-showcase--reverse {
    direction: ltr;
  }

  .ec-page-hero--premium,
  .ec-sector-hero,
  .ec-vacante-hero {
    min-height: 44vh;
  }
}

@media (max-width: 640px) {
  .ec-form-card {
    padding: var(--ec-space-6);
  }
}

/* ─── HEADER TOOLBAR (nav links + action buttons) ─────────── */

/* Nav links — ghost pills, unified across links / Servicios / Más */
.ec-header-nav .ec-header-nav-link,
.ec-header-nav a.ec-header-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 var(--ec-space-4);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  border: none;
  border-radius: var(--ec-radius-sm);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--ec-duration) var(--ec-ease), background var(--ec-duration) var(--ec-ease);
}

.ec-header-nav .ec-header-nav-link:hover,
.ec-header-nav .ec-header-nav-link:focus-visible,
.ec-header-nav a.ec-header-nav-link:hover,
.ec-header-nav a.ec-header-nav-link:focus-visible {
  color: var(--ec-white);
  background: rgba(255, 255, 255, 0.1);
}

.ec-header-nav .ec-header-nav-link:focus-visible,
.ec-header-nav a.ec-header-nav-link:focus-visible {
  outline: 2px solid var(--ec-blue);
  outline-offset: 2px;
}

.ec-header.scrolled .ec-header-nav .ec-header-nav-link,
.ec-header.scrolled .ec-header-nav a.ec-header-nav-link {
  color: var(--ec-text-secondary);
}

.ec-header.scrolled .ec-header-nav .ec-header-nav-link:hover,
.ec-header.scrolled .ec-header-nav .ec-header-nav-link:focus-visible,
.ec-header.scrolled .ec-header-nav a.ec-header-nav-link:hover,
.ec-header.scrolled .ec-header-nav a.ec-header-nav-link:focus-visible {
  color: var(--ec-text);
  background: var(--ec-gray-100);
}

.ec-header-nav .ec-header-nav-link svg,
.ec-header-nav a.ec-header-nav-link svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  transition: transform var(--ec-duration) var(--ec-ease);
}

.ec-megamenu-trigger.ec-header-nav-link svg {
  width: 14px;
  height: 14px;
}

/* Action buttons — Minerva, Portales, CTA */
.ec-header-actions .ec-header-btn,
.ec-header-actions button.ec-header-btn,
.ec-header-actions a.ec-header-btn,
.ec-header-mobile-actions .ec-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--ec-radius);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--ec-duration) var(--ec-ease), background var(--ec-duration) var(--ec-ease),
    border-color var(--ec-duration) var(--ec-ease), box-shadow var(--ec-duration) var(--ec-ease),
    transform var(--ec-duration) var(--ec-ease);
}

.ec-header-actions .ec-header-btn--ghost,
.ec-header-mobile-actions .ec-header-btn--ghost {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.ec-header-actions .ec-header-btn--ghost:hover,
.ec-header-mobile-actions .ec-header-btn--ghost:hover {
  color: var(--ec-white);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.ec-header.scrolled .ec-header-actions .ec-header-btn--ghost {
  color: var(--ec-text-secondary);
  background: var(--ec-gray-50);
  border-color: var(--ec-gray-200);
}

.ec-header.scrolled .ec-header-actions .ec-header-btn--ghost:hover {
  color: var(--ec-gray-900);
  background: var(--ec-white);
  border-color: var(--ec-gray-300);
}

.ec-header-actions .ec-header-btn--primary,
.ec-header-mobile-actions .ec-header-btn--primary {
  color: var(--ec-white);
  background: var(--ec-blue);
  border-color: var(--ec-blue);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.ec-header-actions .ec-header-btn--primary:hover,
.ec-header-mobile-actions .ec-header-btn--primary:hover {
  background: var(--ec-blue-dark);
  border-color: var(--ec-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.ec-header-btn.ec-nav-dropdown-trigger {
  font-weight: 600;
}

.ec-header-btn__chevron {
  margin-left: 2px;
}

.ec-megamenu-trigger.ec-header-nav-link {
  font-family: inherit;
}

/* Legacy class aliases (pages not yet migrated to ec-header-btn) */
a.ec-header-minerva:not(.ec-header-btn) {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--ec-radius);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

a.ec-header-cta:not(.ec-header-btn) {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--ec-radius);
  color: var(--ec-white);
  background: var(--ec-blue);
}

/* Dropdown panels — class-based open state */
.ec-header,
.ec-header-inner,
.ec-header-nav,
.ec-header-actions {
  overflow: visible;
}

.ec-nav-dropdown,
.ec-nav-megamenu {
  position: relative;
}

/* Invisible bridge so hover survives the gap between trigger and panel */
@media (min-width: 1025px) {
  .ec-nav-dropdown::after,
  .ec-nav-megamenu::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
  }
}

.ec-nav-dropdown .ec-nav-dropdown-menu,
.ec-megamenu-panel {
  z-index: calc(var(--ec-z-sticky) + 10);
  pointer-events: auto;
}

.ec-nav-dropdown .ec-nav-dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--ec-duration) var(--ec-ease), visibility var(--ec-duration) var(--ec-ease),
    transform var(--ec-duration) var(--ec-ease), max-height var(--ec-duration-slow) var(--ec-ease);
}

@media (min-width: 1025px) {
  .ec-nav-dropdown.is-open .ec-nav-dropdown-menu,
  .ec-nav-dropdown:hover .ec-nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .ec-nav-megamenu:hover .ec-megamenu-panel,
  .ec-nav-megamenu:focus-within .ec-megamenu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  .ec-nav-dropdown--inline .ec-nav-dropdown-menu {
    left: 0;
    right: auto;
  }

  .ec-nav-dropdown--action .ec-nav-dropdown-menu {
    right: 0;
    left: auto;
  }

  .ec-nav-dropdown.is-open .ec-header-btn__chevron,
  .ec-nav-dropdown:hover .ec-header-btn__chevron,
  .ec-nav-dropdown.is-open .ec-header-nav-link--dropdown svg,
  .ec-nav-dropdown:hover .ec-header-nav-link--dropdown svg,
  .ec-nav-dropdown.is-open .ec-nav-dropdown-trigger svg:last-child,
  .ec-nav-dropdown:hover .ec-nav-dropdown-trigger svg:last-child {
    transform: rotate(180deg);
  }
}

.ec-nav-dropdown-menu--inline {
  min-width: 220px;
}

.ec-nav-dropdown-menu--inline a {
  display: block;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ec-text);
  text-decoration: none;
}

.ec-nav-dropdown-menu--inline a:hover {
  background: var(--ec-gray-50);
  color: var(--ec-blue);
}

.ec-nav-dropdown-menu__cta {
  margin-top: 4px;
  padding-top: 12px !important;
  border-top: 1px solid var(--ec-border-light);
  color: var(--ec-blue) !important;
  font-weight: 600 !important;
}

/* Mobile nav actions + dropdown accordion */
.ec-header-mobile-actions {
  display: none;
}

@media (max-width: 1024px) {
  .ec-header-actions > .ec-header-btn,
  .ec-header-actions > a.ec-header-minerva,
  .ec-header-actions > a.ec-header-cta,
  .ec-header-actions > .ec-nav-dropdown--action {
    display: none;
  }

  .ec-header-mobile-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--ec-space-3);
    width: 100%;
    margin-top: var(--ec-space-6);
    padding: var(--ec-space-6) var(--ec-space-8) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .ec-header-mobile-actions .ec-header-btn {
    width: 100%;
    justify-content: center;
    height: 48px;
    font-size: 1rem;
  }

  .ec-header-mobile-actions .ec-header-btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
  }

  .ec-header-nav .ec-header-nav-link {
    font-size: 1.25rem;
    height: auto;
    padding: var(--ec-space-4) var(--ec-space-8);
    color: rgba(255, 255, 255, 0.8);
    width: 100%;
    justify-content: flex-start;
  }

  .ec-header-nav .ec-header-nav-link:hover {
    color: var(--ec-white);
    background: rgba(255, 255, 255, 0.05);
  }

  .ec-header-nav .ec-nav-dropdown {
    width: 100%;
  }

  .ec-header-nav .ec-header-nav-link--dropdown {
    justify-content: space-between;
    width: 100%;
  }

  .ec-header-nav .ec-nav-dropdown-menu--inline {
    position: static;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
  }

  .ec-header-nav .ec-nav-dropdown.is-open .ec-nav-dropdown-menu--inline {
    opacity: 1;
    visibility: visible;
    max-height: 360px;
    padding: var(--ec-space-2) 0 var(--ec-space-4) var(--ec-space-4);
  }

  .ec-header-nav .ec-nav-dropdown.is-open .ec-header-nav-link--dropdown svg {
    transform: rotate(180deg);
  }

  .ec-header-nav .ec-nav-dropdown-menu--inline a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.0625rem;
    padding: var(--ec-space-2) var(--ec-space-6);
  }

  .ec-header-nav .ec-nav-dropdown-menu--inline a:hover {
    color: var(--ec-white);
    background: rgba(255, 255, 255, 0.08);
  }

  .ec-header-nav .ec-nav-dropdown-menu__cta {
    border-top-color: rgba(255, 255, 255, 0.1);
    color: var(--ec-blue-light) !important;
  }
}

/* ─── HOME INSIGHTS ──────────────────────────────────────── */
.ec-home-insights-desc {
  max-width: 560px;
  color: var(--ec-text-secondary);
  margin-bottom: var(--ec-space-10);
}

.ec-home-insights-actions {
  display: flex;
  gap: var(--ec-space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--ec-space-10);
}

.ec-insight-card {
  cursor: pointer;
  border-radius: var(--ec-radius-xl);
  border: 1px solid var(--ec-border-light);
  background: #fff;
  overflow: hidden;
  transition: transform var(--ec-duration-slow) var(--ec-premium-ease),
              box-shadow var(--ec-duration-slow) var(--ec-premium-ease);
}

.ec-insight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ec-shadow-lg);
}

.ec-insight-card__cover {
  height: 140px;
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
}

.ec-insight-card__cover--caso {
  background: linear-gradient(135deg, #0f766e, #0891b2);
}

.ec-insight-card__body {
  padding: var(--ec-space-6);
}

.ec-insight-card__meta {
  font-size: 0.8125rem;
  color: var(--ec-gray-400);
  margin-top: var(--ec-space-4);
}

/* ─── VISUAL PANEL (Nosotros) ────────────────────────────── */
.ec-visual-panel {
  min-height: 360px;
  border-radius: var(--ec-radius-xl);
  background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 50%, #2563eb 100%);
  position: relative;
  overflow: hidden;
}

.ec-visual-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.ec-visual-panel::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  bottom: -40px;
  right: -20px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, transparent 70%);
}

/* ─── INTRO STATS GLASS ──────────────────────────────────── */
.ec-intro-stats .ec-stat {
  padding: var(--ec-space-4) var(--ec-space-5);
  border-radius: var(--ec-radius-lg);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--ec-border-light);
  backdrop-filter: blur(8px);
}

/* ─── CTA HOME PREMIUM ───────────────────────────────────── */
.ec-cta .ec-cta-inner {
  background: linear-gradient(145deg, #020617 0%, #0f172a 40%, #1e3a5f 100%);
  border-radius: var(--ec-radius-xl);
  margin: 0 var(--ec-space-6);
  position: relative;
  overflow: hidden;
}

.ec-cta .ec-cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.ec-cta .ec-cta-content h2,
.ec-cta .ec-cta-content h3 {
  color: #fff;
}

.ec-cta .ec-cta-content p {
  color: rgba(255, 255, 255, 0.72);
}

.ec-cta .ec-btn-primary-white {
  background: #fff;
  color: #1d4ed8;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ec-cta .ec-btn-primary-white:hover {
  background: #f8fafc;
  color: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.ec-cta .ec-btn-ghost-white {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.ec-cta .ec-btn-ghost-white:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

/* Chat header logo (SVG inline) */
.ec-chat-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.ec-chat-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .ec-chat-fab-pulse {
    animation: none;
  }
}

.ec-scroll-top {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35) !important;
}
