/* ============================================
   SERASAN ENGINEERING - V4
   Diseño Moderno con Video de Fondo y Animaciones
   ============================================ */

:root {
  --primary: #38a169;
  /* Verde más claro */
  --primary-dark: #2d8659;
  /* Verde medio (antes era primary) */
  --primary-light: #48bb78;
  /* Verde más claro aún */
  --accent: #ff6b35;
  --blue-gradient-1: #4a90e2;
  --blue-gradient-2: #357abd;
  --green-blue-mid: #3a9b85;
  --turquoise: #2dd4bf;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --dark: #0f1419;
  --dark-soft: #1a2332;
  --gray-900: #2d3748;
  --gray-800: #4a5568;
  --gray-700: #718096;
  --gray-600: #a0aec0;
  --gray-500: #cbd5e0;
  --gray-400: #e2e8f0;
  --gray-300: #edf2f7;
  --gray-200: #f7fafc;
  --white: #ffffff;

  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "DM Serif Display", Georgia, serif;

  --spacing-unit: 1rem;
  --spacing-xs: calc(var(--spacing-unit) * 0.5);
  --spacing-sm: calc(var(--spacing-unit) * 1);
  --spacing-md: calc(var(--spacing-unit) * 1.5);
  --spacing-lg: calc(var(--spacing-unit) * 2);
  --spacing-xl: calc(var(--spacing-unit) * 3);
  --spacing-2xl: calc(var(--spacing-unit) * 4);
  --spacing-3xl: calc(var(--spacing-unit) * 6);

  --radius: 12px;
  --radius-lg: 20px;

  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.12);

  --header-height: 70px;

  /* Variables de Fondos Premium (Intensificadas) */
  --bg-premium-1: #ffffff;
  --bg-premium-2: #f0f7ff;
  /* Azul hielo suave */
  --bg-premium-3: #fdfcf0;
  /* Crema/Amarillo muy suave */
  --bg-premium-4: #f0fdf9;
  /* Menta claro */
  --glow-primary: rgba(56, 161, 105, 0.12);
  /* Verde más visible */
  --glow-accent: rgba(55, 175, 210, 0.12);
  /* Azul más visible */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  line-height: 1.7;
  background: var(--white);
  overflow-x: hidden;
  padding-top: var(--header-height);
}

/* Clases de Utilidad */
.text-justify {
  text-align: justify !important;
  hyphens: auto;
}

/* ============================================
   HEADER - MODERNO Y MINIMALISTA
   ============================================ */

.header-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.header-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: -1;
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */

.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--primary);
  z-index: 1002;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(56, 161, 105, 0.3);
}

/* Colores Dinámicos por Página */
.page-mep .scroll-progress-bar {
  background: #37afd2;
  /* Azul MEP */
  box-shadow: 0 0 10px rgba(55, 175, 210, 0.3);
}

.page-energetica .scroll-progress-bar {
  background: #64b959;
  /* Verde Energética */
  box-shadow: 0 0 10px rgba(100, 185, 89, 0.3);
}

.page-innovacion .scroll-progress-bar {
  background: #9900ff;
  /* Púrpura Innovación */
  box-shadow: 0 0 10px rgba(153, 0, 255, 0.3);
}

.header-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  gap: var(--spacing-lg);
}

@media (min-width: 1201px) {
  .header-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-content: stretch;
  }

  .header-left {
    justify-self: start;
  }

  .header-nav {
    justify-self: center;
  }

  /* Elemento fantasma para equilibrar el grid si el header-left es el único otro elemento */
  .header-container::after {
    content: "";
    grid-column: 3;
  }
}

/* En desktop, permitir que el dropdown salga del header sin recortarse */
@media (min-width: 1201px) {
  .header-top {
    overflow: visible;
  }

  .header-container {
    overflow: visible;
  }
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  flex-shrink: 0;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  color: var(--dark);
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.header-logo:hover {
  transform: translateY(-2px);
}

.logo-image {
  height: 55px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)) brightness(1);
  transition: all 0.3s ease;
}

.header-logo:hover .logo-image {
  transform: scale(1.05);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  position: relative;
  z-index: 10;
}

.nav-item {
  position: relative;
}

.dropdown-parent {
  position: relative;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-sm);
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: visible;
}

/* Línea inferior para servicios en hover */
.nav-item:not(.dropdown-parent)>.nav-link::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: currentColor;
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
  opacity: 0;
}

.nav-item:not(.dropdown-parent)>.nav-link:hover::after,
.nav-item:not(.dropdown-parent)>.nav-link.active::after {
  width: calc(100% - 16px);
  opacity: 1;
}

/* Línea inferior solo para dropdown (no para servicios) */
.dropdown-parent>.nav-link::before {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.dropdown-parent>.nav-link:hover::before,
.dropdown-parent>.nav-link.active::before {
  width: calc(100% - 24px);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  transform: translateY(-1px);
}

/* Hover más evidente para servicios (sin recuadro) */
.nav-item:not(.dropdown-parent) .nav-link:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.nav-item:not(.dropdown-parent) .nav-link:hover .nav-link-text {
  font-weight: 600;
}

.nav-link-text {
  position: relative;
  z-index: 1;
}

/* Iconos circulares solo para servicios (no para dropdown) */
.nav-item:not(.dropdown-parent) .nav-link i {
  font-size: 0.85rem;
  color: var(--white);
  background: linear-gradient(135deg,
      var(--primary) 0%,
      var(--primary-light) 100%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* Iconos normales para dropdown */
.dropdown-parent .nav-link i {
  font-size: 0.85rem;
  color: var(--primary);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

/* Colores específicos y más distintivos para cada servicio */
.nav-item:nth-child(1) .nav-link i {
  /* Azul claro - Ingeniería MEP */
  background: linear-gradient(135deg, #37afd2 0%, #2a8fb8 100%);
}

.nav-item:nth-child(2) .nav-link i {
  /* Verde claro - Eficiencia Energética */
  background: linear-gradient(135deg, #64b959 0%, #4fa344 100%);
}

.nav-item:nth-child(3) .nav-link i {
  /* Púrpura vibrante - Digitalización 4.0 */
  background: linear-gradient(135deg, #9900ff 0%, #7a00cc 100%);
}

/* Hover y active solo para iconos de servicios con colores específicos */
.nav-item:nth-child(1):not(.dropdown-parent) .nav-link:hover i,
.nav-item:nth-child(1):not(.dropdown-parent) .nav-link.active i {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(55, 175, 210, 0.5);
  filter: brightness(1.1);
}

.nav-item:nth-child(2):not(.dropdown-parent) .nav-link:hover i,
.nav-item:nth-child(2):not(.dropdown-parent) .nav-link.active i {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(100, 185, 89, 0.5);
  filter: brightness(1.1);
}

.nav-item:nth-child(3):not(.dropdown-parent) .nav-link:hover i,
.nav-item:nth-child(3):not(.dropdown-parent) .nav-link.active i {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(153, 0, 255, 0.5);
  filter: brightness(1.1);
}

/* Hover para iconos del dropdown */
.dropdown-parent .nav-link:hover i {
  color: var(--primary);
  transform: scale(1.1);
}

.nav-chevron {
  font-size: 0.7rem;
  margin-left: 4px;
  transition: transform 0.3s ease;
}

.dropdown-parent:hover .nav-chevron {
  transform: rotate(180deg);
}

/* Rotar chevron cuando el dropdown está activo (click) */
.dropdown-parent.active .nav-chevron {
  transform: rotate(180deg);
}

/* Rotar chevron cuando el dropdown está activo en móvil */
@media (max-width: 1200px) {
  .dropdown-parent.active .nav-chevron {
    transform: rotate(180deg);
  }
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
  padding: var(--spacing-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  list-style: none;
  z-index: 1000;
  border: 1px solid rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

/* En desktop, alinear el dropdown al lado derecho del item (abre hacia la izquierda) */
@media (min-width: 1201px) {
  .dropdown-parent>.dropdown-menu {
    left: auto;
    right: 0;
  }
}

/* Dropdown visible al hacer click (class .active) */
.dropdown-parent.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Dropdown visible al hacer hover sobre el parent - SOLO en desktop */
@media (min-width: 1201px) {
  .dropdown-parent:hover .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
  }

  /* Crear un puente invisible para mantener el hover activo entre el link y el menú */
  .dropdown-parent::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
    z-index: 999;
    pointer-events: none;
  }

  .dropdown-parent:hover::before {
    pointer-events: auto;
  }

  /* Mantener dropdown visible cuando el mouse está sobre el menú */
  .dropdown-parent:hover .dropdown-menu:hover {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

.dropdown-menu li {
  margin: var(--spacing-xs) 0;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--gray-700);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.dropdown-menu a i {
  width: 18px;
  text-align: center;
  color: var(--primary);
  font-size: 0.85rem;
}

.dropdown-menu a::before {
  content: "";
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(45, 134, 89, 0.1),
      transparent);
  transition: left 0.5s ease;
}

.dropdown-menu a:hover::before {
  left: 100%;
}

.dropdown-menu a:hover {
  background: rgba(45, 134, 89, 0.05);
  color: var(--primary);
  padding-left: var(--spacing-lg);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.header-cta-mobile {
  display: none;
}

@media (max-width: 1200px) {
  .header-left {
    gap: var(--spacing-sm);
  }

  .btn-header {
    font-size: 0.85rem;
    padding: var(--spacing-xs) var(--spacing-md);
  }

  .btn-header span {
    white-space: nowrap;
  }
}

@media (max-width: 1200px) {

  /* Ocultar CTA del header-left cuando el menú móvil está activo */
  .header-left .header-cta {
    display: none;
  }

  /* Asegurar orden correcto de elementos en móvil */
  .header-left {
    order: 1;
  }

  /* Mostrar CTA móvil junto al botón móvil */
  .header-cta-mobile {
    display: flex !important;
    margin-left: auto;
    margin-right: var(--spacing-sm);
    order: 2;
    flex-shrink: 0;
    z-index: 10;
  }

  .mobile-menu-toggle {
    order: 3;
    flex-shrink: 0;
  }

  .header-container {
    gap: var(--spacing-sm);
  }

  .header-cta-mobile .btn-header {
    font-size: 0.75rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    min-width: auto;
    white-space: nowrap;
  }

  .header-cta-mobile .btn-header span {
    display: inline;
    font-size: 0.75rem;
  }

  .header-cta-mobile .btn-header i {
    margin-left: var(--spacing-xs);
    font-size: 0.7rem;
  }
}

@media (max-width: 600px) {

  /* Asegurar que el CTA móvil siempre sea visible */
  .header-cta-mobile {
    display: flex !important;
  }

  .header-cta-mobile .btn-header span {
    display: none;
  }

  .header-cta-mobile .btn-header {
    padding: var(--spacing-xs);
    min-width: 44px;
    height: 44px;
    justify-content: center;
    border-radius: 50%;
    position: relative;
  }

  /* Ocultar icono de flecha en modo mínimo */
  .header-cta-mobile .btn-header .fa-arrow-right {
    display: none;
  }

  /* Mostrar icono descriptivo (teléfono) */
  .header-cta-mobile .btn-header .btn-header-icon-mobile {
    display: inline-block !important;
    margin: 0;
    font-size: 1rem;
  }

  /* Tooltip para cuando solo muestra el icono */
  .header-cta-mobile .btn-header::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius);
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
  }

  .header-cta-mobile .btn-header:hover::after,
  .header-cta-mobile .btn-header:focus::after {
    opacity: 1;
    visibility: visible;
  }
}

/* Ocultar icono móvil por defecto */
.btn-header-icon-mobile {
  display: none;
}

/* Mantener el CTA móvil visible incluso en pantallas muy pequeñas */
/* @media (max-width: 400px) {
    .header-cta-mobile {
        display: none;
    }
} */

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-lg);
  background: linear-gradient(135deg,
      var(--primary-light) 0%,
      var(--primary) 100%);
  color: var(--white);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(45, 134, 89, 0.4);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: left 0.5s ease;
}

.btn-header:hover::before {
  left: 100%;
}

.btn-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(45, 134, 89, 0.4);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
  position: relative;
  z-index: 1001;
  flex-shrink: 0;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
  width: 100%;
  overflow-x: hidden;
}

/* ============================================
   HERO SECTION - VIDEO DE FONDO CON ANIMACIONES
   ============================================ */

.hero-video-section {
  position: relative;
  width: 100%;
  height: 92vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-video-bg video,
.hero-video-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  min-width: 100%;
  min-height: 100%;
}

.hero-video-bg .hero-video-desktop {
  display: block;
}

.hero-video-bg .hero-bg-image-mobile {
  display: none;
}

.hero-video-bg picture.hero-bg-image-mobile {
  display: none;
  width: 100%;
  height: 100%;
}

.hero-video-bg picture.hero-bg-image-mobile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-video-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
      rgba(15, 20, 25, 0.85) 0%,
      rgba(45, 134, 89, 0.6) 50%,
      rgba(15, 20, 25, 0.9) 100%);
  z-index: 1;
}

.hero-content-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  text-align: center;
  color: var(--white);
  transform: translateY(-18px);
}

.hero-title-animated {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: var(--spacing-lg);
  letter-spacing: -2px;
  color: var(--white);
  text-shadow:
    0 4px 30px rgba(0, 0, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-title-animated .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px) rotateX(90deg);
  animation: wordReveal 0.8s ease-out forwards;
}

.hero-title-animated .word:nth-child(1) {
  animation-delay: 0.1s;
}

.hero-title-animated .word:nth-child(2) {
  animation-delay: 0.2s;
}

.hero-title-animated .word:nth-child(3) {
  animation-delay: 0.3s;
}

.hero-title-animated .word:nth-child(4) {
  animation-delay: 0.4s;
}

.hero-title-animated .word:nth-child(5) {
  animation-delay: 0.5s;
}

.hero-title-animated .highlight {
  color: var(--primary-light);
  position: relative;
  display: inline-block;
}

.hero-title-animated .highlight::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-light);
  animation: underlineExpand 1s ease-out 1s forwards;
  transform: scaleX(0);
  transform-origin: left;
}

@keyframes wordReveal {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes underlineExpand {
  to {
    transform: scaleX(1);
  }
}

/* Hero Ticker Infinito (UI/UX Pro Max) */
.hero-subtitle-ticker {
  position: relative;
  width: 100%;
  max-width: 100vw;
  /* Asegura que no desborde el viewport */
  overflow: hidden;
  margin: var(--spacing-lg) 0;
  padding: 1rem 0;
  mask-image: linear-gradient(to right,
      transparent,
      black 15%,
      black 85%,
      transparent);
  -webkit-mask-image: linear-gradient(to right,
      transparent,
      black 15%,
      black 85%,
      transparent);
}

.hero-ticker-track {
  display: flex;
  gap: 4rem;
  white-space: nowrap;
  width: max-content;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--white);
  opacity: 1;
  font-weight: 500;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  text-shadow:
    0 2px 15px rgba(0, 0, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle::after {
  content: "•";
  color: var(--primary-light);
  font-size: 1.5rem;
  margin-left: 2rem;
}

.hero-subtitle:last-child::after {
  display: none;
}

.hero-subtitle.active {
  opacity: 1;
  visibility: visible;
  position: relative;
  pointer-events: auto;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  max-width: 600px;
  margin: 0 auto var(--spacing-xl);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease-out 1.1s forwards;
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-feature-item i {
  color: var(--primary-light);
  font-size: 1.1rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(56, 161, 105, 0.5));
  /* Actualizado para nuevo color primario */
  animation: checkPulse 2s ease-in-out infinite;
}

@keyframes checkPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.9;
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge-container {
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-md);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--white);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

@keyframes scaleIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 10px var(--primary-light);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 10px var(--primary-light);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.3);
    box-shadow: 0 0 20px var(--primary-light);
  }
}

.hero-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease-out 1.4s forwards;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-2xl);
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(45, 134, 89, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-hero-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s ease,
    height 0.6s ease;
}

.btn-hero-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(45, 134, 89, 0.5);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-2xl);
  background: rgba(255,
      255,
      255,
      0.25);
  /* Mejorado de 0.15 a 0.25 para mejor contraste (WCAG AA) */
  backdrop-filter: blur(10px);
  color: var(--white);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.4);
  /* Mejorado de 0.3 a 0.4 para mejor contraste */
}

.btn-hero-secondary:hover {
  background: rgba(255,
      255,
      255,
      0.35);
  /* Mejorado de 0.25 a 0.35 para mejor contraste en hover */
  border-color: rgba(255, 255, 255, 0.6);
  /* Mejorado de 0.5 a 0.6 */
  transform: translateY(-3px);
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.floating-element {
  position: absolute;
  opacity: 0.1;
  animation: float 20s infinite ease-in-out;
}

.floating-element:nth-child(1) {
  top: 20%;
  left: 10%;
  width: 100px;
  height: 100px;
  background: var(--primary-light);
  border-radius: 50%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  top: 60%;
  right: 15%;
  width: 150px;
  height: 150px;
  background: var(--accent);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation-delay: 2s;
}

.floating-element:nth-child(3) {
  bottom: 20%;
  left: 20%;
  width: 80px;
  height: 80px;
  background: var(--primary);
  border-radius: 50%;
  animation-delay: 4s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }

  66% {
    transform: translate(-30px, 30px) rotate(240deg);
  }
}

/* ============================================
   CONTAINER
   ============================================ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  position: relative;
  z-index: 2;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: var(--spacing-3xl) 0;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Eliminada la rejilla técnica por petición del usuario */

.section-alt {
  background-color: var(--bg-premium-2);
  border-top: 1px solid rgba(56, 161, 105, 0.08);
  border-bottom: 1px solid rgba(56, 161, 105, 0.08);
}

.section-alt::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--glow-accent) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
  filter: blur(40px);
}

.section-light-2 {
  background-color: var(--bg-premium-4);
  border-top: 1px solid rgba(56, 161, 105, 0.12);
  border-bottom: 1px solid rgba(56, 161, 105, 0.12);
}

.section-light-2::after {
  content: "";
  position: absolute;
  bottom: -15%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--glow-primary) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
  filter: blur(50px);
}

.section-light-2 .text-outline {
  -webkit-text-stroke: 1px var(--dark);
  /* Restaurar contorno oscuro para fondo claro */
  color: transparent;
}

.section-light-2 .card {
  background-color: var(--white);
  /* Usar background-color en lugar de background para no sobreescribir imágenes */
  border: 1px solid rgba(56, 161, 105, 0.15);
}

/* Showcase Premium (Sección Confianza) - Cero saltos */
.cards-reveal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.card-reveal {
  position: relative;
  height: 420px;
  /* Altura Fija Inmutable */
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-size: cover;
  background-position: center;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  /* Remueve overrides tipo flex que venían de .card base */
  padding: 0 !important;
}

/* Capa de Cristal/Sombras para Legibilidad (Fondo Oscuro Elegante) */
.card-reveal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Fondo sutil permanente que garantiza legibilidad base */
  background: linear-gradient(180deg,
      rgba(8, 20, 33, 0.1) 0%,
      rgba(8, 20, 33, 0.9) 100%);
  transition: opacity 0.6s ease;
  z-index: 1;
}

.card-reveal::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Capa extra que se activa en hover para OSCURIDAD TOTAL detrás del texto */
  background: rgba(8, 20, 33, 0.75);
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 1;
}

.card-reveal:hover::after {
  opacity: 1;
  backdrop-filter: blur(4px);
}

.card-reveal:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.card-reveal .card-body {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  /* Alineado a la izquierda para un look más moderno y consistente */
}

.card-reveal .card-header-inner {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  /* Ya no forzamos translateY, usaremos flexbox para empujar hacia arriba */
}

.card-reveal .card-icon {
  font-size: 2.5rem;
  color: var(--primary-light);
  margin: 0 0 var(--spacing-sm) 0;
  /* Centrado removido, alineado a la izquierda */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  transition: transform 0.6s ease;
}

.card-reveal .card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.card-reveal .card-description {
  opacity: 0;
  max-height: 0;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
  text-align: left;
}

/* Interacción Hover */
@media (min-width: 1024px) {
  .card-reveal:hover .card-icon {
    transform: scale(0.9);
  }

  .card-reveal:hover .card-description {
    opacity: 1;
    max-height: 250px;
    /* Expansión natural en flex-end empuja hacia arriba al header */
    visibility: visible;
    margin-top: var(--spacing-md);
  }
}

/* Fondos Fotográficos Exclusivos - Version 3 con encuadre superior */
.card-reveal.bg-conf-1 {
  background-image: url("../img/trust-commitment.jpg") !important;
  background-position: center center;
  background-size: cover;
  filter: brightness(0.8) contrast(1.1);
}

.card-reveal.bg-conf-2 {
  background-image: url("../img/trust-experience-v3.png") !important;
  background-position: center center;
  background-size: cover;
  filter: brightness(0.8) contrast(1.1);
}

.card-reveal.bg-conf-3 {
  background-image: url("../img/trust-technology-v3.jpg") !important;
  background-position: center center;
  background-size: cover;
  filter: brightness(0.8) contrast(1.1);
}

.card-reveal.bg-conf-4 {
  background-image: url("../img/trust-pyme.jpg") !important;
  background-position: center center;
  background-size: cover;
  filter: brightness(0.8) contrast(1.1);
}

/* Responsive */
@media (max-width: 1200px) {
  .cards-reveal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .cards-reveal-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .card-reveal {
    height: auto;
    min-height: 380px;
  }

  .card-reveal .card-header-inner {
    transform: translateY(0);
  }

  .card-reveal .card-description {
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 500px;
    margin-top: var(--spacing-sm);
  }
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-3xl);
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--spacing-md);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem,
      5vw,
      4rem);
  /* Aumentado para recuperar el impacto visual */
  font-weight: 400;
  color: var(--dark);
  margin-bottom: var(--spacing-md);
  letter-spacing: -1px;
}

.section-subtitle {
  font-size: 1.25rem;
  /* Ligeramente aumentado para legibilidad */
  color: var(--gray-700);
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
}

/* Tipografía Híbrida (UI/UX Pro Max) */
.font-serif {
  font-family: var(--font-display);
}

.font-sans {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8em;
  letter-spacing: 1px;
  color: var(--primary-dark);
}

.section-title--hybrid {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  line-height: 1;
}

.section-title--hybrid .font-serif {
  font-size: 1.1em;
  display: block;
}

.section-title--hybrid span.block {
  display: block;
  font-size: 0.6em;
  /* Escala relativa para que el bloque secundario no compita en tamaño */
}

/* Estilo Elegante Simplificado (Servicios) */
.section-title--elegant {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  max-width: 900px;
  margin: 0 auto var(--spacing-md);
}

.text-primary {
  color: var(--primary);
  font-style: italic;
}

/* Estilo Creativo: Proyectos (Contraste de Pesos) */
.section-title--creative {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
}

.section-title--creative .title-primary {
  font-family: var(--font-display);
  font-size: 1.25em;
  color: var(--dark);
}

#proyectos-section {
  background: linear-gradient(135deg, #ffffff 0%, #f0faf5 100%);
  border-top: 1px solid rgba(56, 161, 105, 0.15);
  border-bottom: 1px solid rgba(56, 161, 105, 0.15);
}

#proyectos-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 10% 20%,
      rgba(56, 161, 105, 0.08) 0%,
      transparent 40%),
    radial-gradient(circle at 90% 80%,
      rgba(55, 175, 210, 0.08) 0%,
      transparent 40%);
  z-index: 0;
  pointer-events: none;
}

#proyectos-section .container {
  position: relative;
  z-index: 1;
}

.section-title--creative .title-secondary {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.35em;
  letter-spacing: 5px;
  color: var(--primary);
  margin-top: 0.5rem;
  opacity: 0.8;
}

/* Estilo Moderno: Confianza (Outlined Text) */
.section-title--modern {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.section-title--modern .text-outline {
  color: var(--dark);
  font-style: normal;
  -webkit-text-stroke: 0;
}

.section-title--modern .text-fill {
  color: var(--primary);
}

/* CTA Final - Contraste Máximo y Legibilidad */
.section-title--cta {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.2rem) !important;
  color: var(--white) !important;
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.highlight-underline {
  position: relative;
  color: var(--primary-light);
  display: inline-block;
}

.highlight-underline::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  height: 4px;
  /* Más fino, menos pegote */
  background: var(--primary-light);
  border-radius: 2px;
  opacity: 0.6;
}

/* Encabezado compacto para páginas (título sutil + breadcrumbs) */
.page-header-compact {
  max-width: 900px;
  margin: 0 auto var(--spacing-xl);
  text-align: center;
}

.page-title-subtle {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.2px;
  margin-top: var(--spacing-sm);
}

/* ============================================
   CARDS GRID - MODERNO CON HOVER
   ============================================ */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.card {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-300);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(45, 134, 89, 0.05),
      transparent);
  transition: left 0.6s ease;
}

/* Cards de Servicios (solo en servicios.html): fondo con imagen + tinte difuminado */
.card--service {
  /* Defaults (se sobreescriben por servicio) */
  --card-accent: var(--primary);
  --card-accent-rgb: 45, 134, 89;
  --card-bg-image: none;

  background: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Capa de imagen con blur + overlay de color (sutil) */
.card--service::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(700px 420px at 50% 58%,
      rgba(255, 255, 255, 0.78) 0%,
      rgba(255, 255, 255, 0.52) 38%,
      rgba(255, 255, 255, 0) 72%),
    linear-gradient(135deg,
      rgba(var(--card-accent-rgb), 0.42) 0%,
      rgba(255, 255, 255, 0.58) 55%,
      rgba(255, 255, 255, 0.72) 100%),
    var(--card-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: normal, soft-light, normal;
  filter: blur(3px) saturate(1.2) contrast(1.05);
  transform: scale(1.04);
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
}

/* Mantener contenido por encima del fondo */
.card--service .card-icon,
.card--service .card-title,
.card--service .card-description,
.card--service .card-link,
.card--service .card-number {
  position: relative;
  z-index: 2;
}

.card--service .card-description {
  flex-grow: 1;
}

.card--service .card-link {
  margin-top: auto;
}

/* Acento por servicio */
.card--service:hover {
  border-color: var(--card-accent);
}

.card--service .card-link {
  color: var(--card-accent);
}

/* Texto bajo el título más oscuro (solo en Servicios) */
.card--service .card-description {
  color: var(--gray-800);
}

.card--service .card-icon {
  background: linear-gradient(135deg,
      rgba(var(--card-accent-rgb), 0.14) 0%,
      rgba(var(--card-accent-rgb), 0.07) 100%);
  color: var(--card-accent);
}

.card--service:hover .card-icon {
  background: linear-gradient(135deg,
      var(--card-accent) 0%,
      rgba(var(--card-accent-rgb), 0.82) 100%);
  box-shadow: 0 8px 25px rgba(var(--card-accent-rgb), 0.28);
}

/* Stock placeholders actuales (puedes cambiarlos luego por tus imágenes definitivas) */
.card--service-mep {
  --card-accent: #37afd2;
  --card-accent-rgb: 55, 175, 210;
  --card-bg-image: url("../img/mep-hero.jpg");
}

.card--service-caes {
  --card-accent: #64b959;
  --card-accent-rgb: 100, 185, 89;
  --card-bg-image: url("../img/caes-hero.jpg");
}

.card--service-innovacion {
  --card-accent: #9900ff;
  --card-accent-rgb: 153, 0, 255;
  --card-bg-image: url("../img/innovacion-hero.jpg");
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

/* En cards de Servicios, respetar el acento por servicio también en hover */
.card--service:hover {
  border-color: var(--card-accent);
}

.card-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 400;
  color: var(--gray-300);
  line-height: 1;
  margin-bottom: var(--spacing-md);
  transition: all 0.3s ease;
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  opacity: 0.3;
}

.card:hover .card-number {
  color: var(--primary);
  opacity: 0.6;
  transform: scale(1.1);
}

.card-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg,
      rgba(45, 134, 89, 0.1) 0%,
      rgba(45, 134, 89, 0.05) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--primary);
  margin: 0 auto var(--spacing-lg);
  /* Centrado global */
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 1;
}

.card:hover .card-icon {
  background: linear-gradient(135deg,
      var(--primary) 0%,
      var(--primary-light) 100%);
  color: var(--white);
  transform: rotate(5deg) scale(1.1);
  box-shadow: 0 8px 25px rgba(45, 134, 89, 0.3);
}

/* Override del hover global: en servicios, el icono usa su color específico */
.card--service:hover .card-icon {
  background: linear-gradient(135deg,
      var(--card-accent) 0%,
      rgba(var(--card-accent-rgb), 0.82) 100%);
  color: var(--white);
  transform: rotate(5deg) scale(1.1);
  box-shadow: 0 8px 25px rgba(var(--card-accent-rgb), 0.3);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--dark);
  margin-bottom: var(--spacing-md);
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.card-description {
  font-size: 1rem;
  color: var(--gray-700);
  /* Mejorado de gray-600 a gray-700 para mejor contraste (WCAG AA) */
  line-height: 1.7;
  margin-bottom: var(--spacing-lg);
  position: relative;
  z-index: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.3s ease;
  position: relative;
  z-index: 1;
}

.card-link:hover {
  gap: var(--spacing-md);
}

.card-link i {
  transition: transform 0.3s ease;
}

.card-link:hover i {
  transform: translateX(5px);
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

.about-image {
  position: relative;
  z-index: 1;
  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease;
  margin: 0 0 0 auto;
  /* Alineado a la derecha de su columna */
  width: 125%;
  /* Aumentamos el ancho significativamente */
  margin-left: -25%;
  /* El wrapper y la imagen principal ahora controlan el overflow y el look */
}




.about-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.6s ease;
}

.about-content {
  padding-left: var(--spacing-xl);
}

.text-large {
  font-size: 1.25rem;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
  font-weight: 500;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--dark-soft);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

.footer-brand {
  max-width: 400px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.footer-logo-image {
  height: 70px;
  width: auto;
  max-width: 420px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  opacity: 0.95;
}

@media (max-width: 600px) {
  .footer-logo-image {
    height: 54px;
    max-width: 320px;
  }
}

.footer-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg,
      var(--primary) 0%,
      var(--primary-light) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}

.footer-tagline {
  font-size: 0.95rem;
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-contact a {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.footer-contact a:hover {
  color: var(--primary-light);
  transform: translateX(5px);
}

.footer-contact i {
  color: var(--primary-light);
  width: 20px;
}

.footer-section h4 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  font-family: var(--font-display);
}

.footer-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  display: inline-block;
}

.footer-section a:hover {
  color: var(--primary-light);
  transform: translateX(5px);
}

.footer-bottom {
  padding-top: var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   MODAL LEGAL (Política / Aviso / Cookies)
   ============================================ */
.legal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 25, 0.45);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.legal-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.legal-modal {
  width: min(760px, 100%);
  max-height: 78vh;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s ease;
}

.legal-modal-overlay.active .legal-modal {
  transform: translateY(0) scale(1);
}

.legal-modal-header {
  position: relative;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.85);
}

.legal-modal-header h2 {
  margin: 0 44px 6px 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--dark);
  font-size: 1.35rem;
  letter-spacing: -0.5px;
}

.legal-modal-header p {
  margin: 0 44px 0 0;
  color: var(--gray-700);
  font-size: 0.88rem;
  line-height: 1.5;
  opacity: 0.85;
}

.legal-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-700);
  transition: all 0.2s ease;
}

.legal-modal-close:hover {
  background: rgba(45, 134, 89, 0.08);
  color: var(--primary);
  transform: translateY(-1px);
}

.legal-modal-body {
  padding: var(--spacing-lg);
  overflow: auto;
  max-height: calc(78vh - 72px);
  color: var(--gray-700);
  line-height: 1.65;
  font-size: 0.95rem;
}

.legal-modal-body h2 {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  color: var(--dark);
  font-size: 1.1rem;
}

.legal-modal-body h3 {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-xs);
  color: var(--dark);
  font-size: 1rem;
}

.legal-modal-body a {
  color: var(--primary);
}

@media (max-width: 600px) {
  .legal-modal-overlay {
    padding: var(--spacing-md);
    align-items: flex-end;
  }

  .legal-modal {
    max-height: 88vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .legal-modal-header {
    padding: var(--spacing-md) var(--spacing-lg);
  }

  .legal-modal-body {
    padding: var(--spacing-lg);
  }
}

/* ============================================
   BREADCRUMBS (compacto, dentro del hero)
   ============================================ */
.breadcrumbs-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0.85;
  margin-bottom: var(--spacing-md);
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumbs-inline a {
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none !important;
  transition: opacity 0.2s ease;
}

.breadcrumbs-inline a:hover {
  color: rgba(255, 255, 255, 1) !important;
  text-decoration: none !important;
}

.breadcrumbs-inline span:not(.sep) {
  color: rgba(255, 255, 255, 1);
  opacity: 1;
}

.breadcrumbs-inline .sep {
  opacity: 0.6;
}

@media (max-width: 600px) {
  .breadcrumbs-inline {
    font-size: 0.82rem;
    margin-bottom: var(--spacing-sm);
  }
}

/* ============================================
   CONTACTO - FORM COMPACTO (fit viewport)
   ============================================ */
.contact-form-card {
  padding: var(--spacing-lg);
}

.contact-form-field {
  margin-bottom: var(--spacing-sm);
}

.contact-form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.95rem;
}

.contact-form-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.contact-form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.contact-form-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  align-items: center;
  margin-top: var(--spacing-sm);
}

.contact-form-privacy {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.contact-form-privacy input {
  margin-top: 4px;
  cursor: pointer;
}

.contact-form-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.contact-form-status {
  margin-top: var(--spacing-sm);
  text-align: center;
  font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Breakpoint intermedio para reducir tamaño de fuente antes del menú móvil */
@media (max-width: 1400px) {
  .nav-link {
    font-size: 0.85rem;
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  .nav-link-text {
    white-space: nowrap;
  }
}

@media (max-width: 1200px) {
  .header-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    flex-direction: column;
    align-items: stretch;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 999;
    display: flex;
  }

  .header-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* Deshabilitar hover en móvil - solo para dropdown */
  /* El hover solo funciona en desktop (>1200px) */

  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-xs);
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    gap: var(--spacing-sm);
    color: var(--gray-700);
    padding: var(--spacing-md);
    border-radius: var(--radius);
  }

  .nav-link:hover {
    background: rgba(45, 134, 89, 0.05);
    color: var(--primary);
  }

  .dropdown-menu {
    position: static;
    opacity: 0;
    visibility: hidden;
    transform: none;
    box-shadow: none;
    background: rgba(45, 134, 89, 0.03);
    margin-top: var(--spacing-xs);
    margin-left: var(--spacing-md);
    max-height: 0;
    overflow: hidden;
    transition:
      max-height 0.3s ease,
      opacity 0.3s ease,
      visibility 0.3s ease;
    border: none;
    display: block;
    pointer-events: none;
  }

  .dropdown-parent.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    max-height: 500px;
    pointer-events: auto;
  }

  /* Asegurar que el enlace del dropdown sea clickable en móvil */
  .dropdown-parent>a[href="#"] {
    pointer-events: auto;
    cursor: pointer;
  }
}

@media (max-width: 1024px) {
  .hero-video-section {
    height: 86vh;
    min-height: 480px;
  }

  .hero-grid,
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .about-content {
    padding-left: 0;
  }

  .about-image {
    width: 100%;
    margin-left: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-video-section {
    height: auto;
    min-height: 82vh;
    max-height: none;
    overflow-y: visible;
    overflow-x: hidden;
    padding: var(--spacing-xl) 0;
    align-items: flex-start;
  }

  .hero-content-overlay {
    padding: var(--spacing-lg) var(--spacing-md);
    transform: translateY(0);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    min-height: calc(82vh - var(--header-height));
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
  }

  .hero-title-animated {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: var(--spacing-md);
  }

  .hero-subtitle {
    margin-bottom: var(--spacing-md);
  }

  .hero-features {
    max-width: 100%;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
  }

  .hero-feature-item {
    font-size: 0.95rem;
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  .section {
    padding: var(--spacing-2xl) 0;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 var(--spacing-md);
    gap: var(--spacing-xs);
  }

  /* Asegurar que el CTA móvil sea visible en pantallas pequeñas */
  .header-cta-mobile {
    display: flex !important;
    margin-right: var(--spacing-xs);
  }

  /* Reducir tamaño del logo si es necesario para dar espacio */
  .logo-image {
    max-height: 48px;
  }

  .logo-text {
    display: none;
  }

  .hero-video-section {
    height: auto;
    min-height: 78vh;
    max-height: none;
    padding: var(--spacing-lg) 0;
  }

  .hero-content-overlay {
    padding: var(--spacing-md);
    min-height: calc(78vh - var(--header-height));
  }

  .hero-title-animated {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
  }

  .hero-subtitle {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    margin-bottom: var(--spacing-sm);
  }

  .hero-badge {
    font-size: 0.75rem;
    margin-bottom: var(--spacing-md);
  }

  .hero-features {
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
  }

  .hero-feature-item {
    font-size: 0.9rem;
  }

  .hero-feature-item i {
    font-size: 1rem;
  }

  .hero-actions {
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
  }

  .section-title {
    font-size: 1.75rem;
  }

  .card {
    padding: var(--spacing-lg);
  }
}

/* ============================================
   OPTIMIZACIONES MÓVILES ADICIONALES
   ============================================ */

/* Grid de contacto responsive */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--spacing-xl);
  align-items: start;
}

@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
}

/* Optimización del video del hero para móviles */
@media (max-width: 768px) {
  .hero-video-bg .hero-video-desktop {
    /* Desactivar video en móviles para mejor rendimiento */
    display: none !important;
  }

  .hero-video-bg .hero-bg-image-mobile,
  .hero-video-bg picture.hero-bg-image-mobile {
    /* Mostrar imagen estática en móvil */
    display: block !important;
  }

  /* Fallback con imagen de fondo (por si acaso) */
  .hero-video-bg {
    background-image: url("../img/main-hero-bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .hero-video-bg::after {
    /* Overlay más oscuro para mejor legibilidad en móvil */
    background: linear-gradient(135deg,
        rgba(15, 20, 25, 0.85) 0%,
        rgba(45, 134, 89, 0.65) 50%,
        rgba(15, 20, 25, 0.9) 100%);
  }
}

/* Mejoras del formulario de contacto */
@media (max-width: 768px) {
  .contact-form-card {
    padding: var(--spacing-md);
  }

  /* Scroll padding para que el formulario quede bien visible al hacer scroll */
  #contact-form-container {
    scroll-margin-top: calc(var(--header-height) + 20px);
  }

  .contact-form-input,
  .contact-form-textarea {
    font-size: 16px;
    /* Evita zoom automático en iOS */
    padding: 12px 14px;
  }

  /* Dropdown de servicios mejorado para móvil */
  #servicios-dropdown {
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #servicios-dropdown label {
    padding: var(--spacing-md);
    font-size: 0.95rem;
  }

  .contact-form-field {
    margin-bottom: var(--spacing-md);
  }

  .contact-form-actions {
    gap: var(--spacing-md);
  }
}

/* Botones con mejor tamaño táctil (mínimo 44x44px) */
@media (max-width: 768px) {

  .btn-hero-primary,
  .btn-hero-secondary {
    min-height: 48px;
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
    touch-action: manipulation;
  }

  .btn-header {
    min-height: 44px;
    padding: var(--spacing-sm) var(--spacing-lg);
    touch-action: manipulation;
  }

  .card-link {
    min-height: 44px;
    padding: var(--spacing-xs) 0;
    touch-action: manipulation;
  }

  .mobile-menu-toggle {
    min-width: 44px;
    min-height: 44px;
    padding: var(--spacing-sm);
  }
}

/* Tipografía mejorada para móvil */
@media (max-width: 768px) {
  .hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
    line-height: 1.6;
  }

  .section-subtitle {
    font-size: 1rem;
    line-height: 1.7;
  }

  .card-description {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .text-large {
    font-size: 1.1rem;
    line-height: 1.7;
  }

  .footer-contact a,
  .footer-section a {
    font-size: 0.9rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* Espaciado mejorado */
@media (max-width: 768px) {
  .hero-content-overlay {
    padding: 0 var(--spacing-md);
    transform: translateY(-10px);
  }

  .section-header {
    margin-bottom: var(--spacing-xl);
  }

  .about-content {
    padding-left: 0;
    padding-top: var(--spacing-lg);
  }

  .page-header-compact {
    margin-bottom: var(--spacing-lg);
  }
}

/* Cards grid optimizado para tablets */
@media (min-width: 601px) and (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }

  .card {
    padding: var(--spacing-lg);
  }
}

/* Footer mejorado para móvil */
@media (max-width: 768px) {
  .footer {
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
  }

  .footer-grid {
    gap: var(--spacing-xl);
  }

  .footer-brand {
    max-width: 100%;
  }

  .footer-contact {
    gap: var(--spacing-md);
  }

  .footer-section {
    margin-top: var(--spacing-lg);
  }

  .footer-bottom {
    padding-top: var(--spacing-lg);
    font-size: 0.8rem;
  }
}

/* Mejoras adicionales para pantallas muy pequeñas */
@media (max-width: 360px) {
  .hero-title-animated {
    font-size: 1.75rem;
    letter-spacing: -1px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .card-title {
    font-size: 1.25rem;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  .section {
    padding: var(--spacing-xl) 0;
  }
}

/* Optimización de imágenes para móvil */
@media (max-width: 768px) {

  .about-image img,
  .card img {
    max-width: 100%;
    height: auto;
  }

  .logo-image {
    max-height: 50px;
  }
}

/* Mejoras de accesibilidad táctil */
@media (max-width: 768px) {

  a,
  button,
  input,
  textarea,
  select {
    -webkit-tap-highlight-color: rgba(45, 134, 89, 0.2);
  }

  .nav-link,
  .dropdown-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* Optimización de animaciones en móvil */
@media (max-width: 768px) {
  .floating-elements {
    display: none;
    /* Ocultar elementos flotantes en móvil para mejor rendimiento */
  }

  /* Asegurar que los cards de servicios se vean igual en móvil */
  .card--service {
    position: relative;
    overflow: hidden;
  }

  .card--service::after {
    filter: blur(2px) saturate(1.1) contrast(1.02);
    transform: scale(1.02);
    opacity: 0.9;
  }

  .card:hover {
    transform: none;
    /* Desactivar transformaciones en hover para móvil */
  }

  .card:hover .card-icon {
    transform: none;
  }
}

/* ============================================
   ACCESIBILIDAD Y WCAG
   ============================================ */

/* Respetar preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-title-animated .word,
  .hero-subtitle-animated,
  .hero-bullet-item,
  .hero-cta-animated {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .floating-elements {
    display: none !important;
  }
}

/* Mejorar contraste de enlaces - solo para enlaces en contenido de texto, excluir todos los componentes */
a:not(.btn-hero-primary):not(.btn-hero-secondary):not(.btn-header):not(.card-link):not(.nav-link):not(.header-logo):not(.footer-logo):not(.footer a):not(.dropdown-menu a):not(.hero-actions a):not(.section-header a):not(header a):not(nav a) {
  color: var(--primary-dark);
  /* Color más oscuro para mejor contraste */
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:not(.btn-hero-primary):not(.btn-hero-secondary):not(.btn-header):not(.card-link):not(.nav-link):not(.header-logo):not(.footer-logo):not(.footer a):not(.dropdown-menu a):not(.hero-actions a):not(.section-header a):not(header a):not(nav a):hover,
a:not(.btn-hero-primary):not(.btn-hero-secondary):not(.btn-header):not(.card-link):not(.nav-link):not(.header-logo):not(.footer-logo):not(.footer a):not(.dropdown-menu a):not(.hero-actions a):not(.section-header a):not(header a):not(nav a):focus {
  color: var(--primary);
  text-decoration-thickness: 2px;
}

/* Mejorar contraste de texto en botones */
.btn-hero-primary,
.btn-header {
  color: var(--white);
  background: var(--primary-dark);
  /* Color más oscuro para mejor contraste */
  border: 2px solid var(--primary-dark);
}

.btn-hero-primary:hover,
.btn-hero-primary:focus,
.btn-header:hover,
.btn-header:focus {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  outline: 3px solid rgba(45, 134, 89, 0.3);
  outline-offset: 2px;
}

/* Mejorar visibilidad del foco */
*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Navegación por teclado mejorada */
.nav-link:focus,
.mobile-menu-toggle:focus,
button:focus,
a:focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Mejorar contraste de texto en cards */
.card-description {
  color: var(--gray-700);
  /* Ya actualizado arriba, pero asegurar aquí también */
}

/* Asegurar contraste mínimo en títulos */
h1,
h2,
h3,
h4,
h5,
h6,
.section-title,
.card-title {
  color: var(--dark);
  font-weight: 600;
  /* Aumentar peso para mejor legibilidad */
}

/* Ocultar elementos decorativos de lectores de pantalla */
.decorative,
.floating-elements {
  pointer-events: none;
  /* Mejoramos la intención de 'decorativo' en CSS */
}

/* Mejorar visibilidad de campos de formulario */
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
}

input:invalid:not(:focus):not(:placeholder-shown),
textarea:invalid:not(:focus):not(:placeholder-shown),
input.invalid,
textarea.invalid {
  border-color: #dc2626;
  background-color: #fef2f2;
  border-width: 2px;
}

/* Mejorar contraste en mensajes de error */
.error-message,
.invalid-feedback {
  color: #dc2626;
  font-weight: 600;
  display: block;
  margin-top: var(--spacing-xs);
}

/* Mejoras del hero badge en móvil */
@media (max-width: 768px) {
  .hero-badge {
    font-size: 0.8rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    margin-bottom: var(--spacing-md);
  }

  .hero-content-overlay>* {
    flex-shrink: 0;
  }
}

/* Mejoras de los elementos de contacto en móvil */
@media (max-width: 768px) {

  /* Estilos inline en contacto.html necesitan ser sobrescritos */
  section .container>div[style*="display: grid"]>div:first-child h2 {
    font-size: 1.75rem !important;
  }

  section .container>div[style*="display: grid"]>div:first-child>div[style*="display: flex"] {
    gap: var(--spacing-md) !important;
  }

  section .container>div[style*="display: grid"]>div:first-child>div[style*="display: flex"]>div[style*="width: 50px"] {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0;
  }
}

/* ============================================
   ANIMACIONES HERO SERVICIOS
   ============================================ */

/* Las animaciones de .hero-title-animated se mantienen aquí por ser específicas de servicios */
.hero-title-animated {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

.hero-subtitle-animated {
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
  opacity: 0;
  transform: translateY(30px);
}

.hero-bullet-item {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

.hero-bullet-item:nth-child(1) {
  animation-delay: 0.4s;
}

.hero-bullet-item:nth-child(2) {
  animation-delay: 0.5s;
}

.hero-bullet-item:nth-child(3) {
  animation-delay: 0.6s;
}

.hero-bullet-item:nth-child(4) {
  animation-delay: 0.7s;
}

.hero-bullet-item:nth-child(5) {
  animation-delay: 0.8s;
}

.hero-bullet-item:nth-child(6) {
  animation-delay: 0.9s;
}

.hero-cta-animated {
  animation: fadeInUp 0.8s ease-out 1s forwards;
  opacity: 0;
  transform: translateY(30px);
}

/* ============================================
   DISEÑO MINIMALISTA TÉCNICO (SERVICIOS)
   ============================================ */

.tech-section {
  padding: var(--spacing-3xl) 0;
  position: relative;
  overflow: hidden;
}

.tech-h2 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: var(--spacing-xl);
  max-width: 800px;
}

@media (max-width: 768px) {
  .tech-h2 {
    font-size: 2.5rem;
  }
}

/* --- Títulos Premium Simplificados --- */
.tech-h2-premium {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: var(--spacing-xl);
  letter-spacing: -1px;
}

.tech-h2-premium .font-serif-italic {
  font-style: normal;
  /* Quitar itálica */
  font-weight: inherit;
  color: var(--primary);
  /* Mantener color de acento */
}

.tech-h2-premium .font-sans-bold {
  display: none;
  /* Quitar etiqueta superior */
}

/* Heros de Servicios Simplificados */
.hero-title-premium {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  color: var(--white);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  letter-spacing: -1.5px;
}

.hero-title-premium .hero-tag-superior {
  display: none;
  /* Quitar etiqueta superior */
}

.hero-title-premium .hero-subtitle-inline {
  display: block;
  font-size: 0.65em;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  margin-top: var(--spacing-xs);
  letter-spacing: -0.5px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title-premium .hero-accent {
  font-style: normal;
  /* Quitar itálica */
  font-weight: inherit;
}

@media (max-width: 768px) {
  .hero-title-premium {
    letter-spacing: -0.5px;
    font-size: 2.2rem;
  }
}

.tech-h2-premium .highlight-box {
  background: linear-gradient(120deg,
      rgba(var(--primary-rgb), 0.1) 0%,
      rgba(var(--primary-rgb), 0.05) 100%);
  padding: 0 0.2em;
  border-radius: 4px;
  display: inline-block;
}

/* Overrides de color por página */
.page-energetica .tech-h2-premium .font-serif-italic,
.page-energetica .hero-title-premium .hero-accent {
  color: #64b959;
}

.page-mep .tech-h2-premium .font-serif-italic,
.page-mep .hero-title-premium .hero-accent {
  color: #37afd2;
}

.page-innovacion .tech-h2-premium .font-serif-italic,
.page-innovacion .hero-title-premium .hero-accent {
  color: #9900ff;
}

.tech-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-3xl);
  margin-top: var(--spacing-3xl);
  justify-content: center;
  align-items: start;
}

/* Centrar el último elemento si es impar */
.tech-grid-item:last-child:nth-child(odd) {
  grid-column: 1 / span 2;
  justify-self: center;
  max-width: calc(50% - (var(--spacing-3xl) / 2));
}

@media (max-width: 900px) {
  .tech-grid-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .tech-grid-item:last-child:nth-child(odd) {
    grid-column: auto;
    justify-self: stretch;
    max-width: none;
  }
}

.tech-grid-item {
  position: relative;
  padding: var(--spacing-md) var(--spacing-lg);
  /* Padding más ligero y editorial */
  background: transparent;
  /* Sin fondo para integración total */
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border-left: 1px solid #e2e8f0;
  /* Línea de precisión sutil */
}

/* Efecto de hover solo en la línea y el icono, sin tarjeta */
.tech-grid-item:hover {
  border-left-color: var(--primary);
  transform: translateX(8px);
  /* Sutil desplazamiento lateral tipo índice */
}

.tech-grid-item h4 {
  font-family: "DM Serif Display", serif;
  /* Títulos profesionales serif */
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

.tech-grid-item p {
  color: #64748b;
  /* Gris texto técnico */
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

.tech-icon-box {
  width: 32px;
  /* Más pequeño e integrado */
  height: 32px;
  background: transparent;
  /* Sin fondo de caja */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: var(--spacing-sm);
  color: var(--primary);
  border: none;
}

/* Bloques de Color Asimétricos */
.bg-tech-light {
  background-color: #f8fafc;
}

.bg-tech-white {
  background-color: var(--white);
}

.tech-split-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

@media (max-width: 1100px) {
  .tech-split-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
}

.tech-image-wrapper {
  position: relative;
  border-radius: 4px;
  /* Bordes más rectos y técnicos */
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.tech-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  filter: contrast(1.05) brightness(1.02);
}

/* Decoración Técnica (Líneas de Guía) */
.tech-guide-line {
  position: absolute;
  background: var(--primary);
  opacity: 0.3;
}

.tech-guide-h {
  height: 1px;
  width: 100px;
}

.tech-guide-v {
  width: 1px;
  height: 100px;
}

/* ============================================
   PROCESO EDITORIAL - FLUJO TÉCNICO
   ============================================ */

.process-flow-editorial {
  position: relative;
  padding: var(--spacing-3xl) 0;
  max-width: 1000px;
  margin: 0 auto;
}

/* Línea central sutil */
.process-flow-editorial::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom,
      transparent,
      rgba(56, 161, 105, 0.2) 10%,
      rgba(56, 161, 105, 0.2) 90%,
      transparent);
  transform: translateX(-50%);
}

.process-step {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-4xl);
  position: relative;
  z-index: 1;
}

.process-step:last-child {
  margin-bottom: 0;
}

.process-step-content {
  width: 45%;
  position: relative;
}

.process-step:nth-child(odd) .process-step-content {
  text-align: right;
  padding-right: var(--spacing-2xl);
}

.process-step:nth-child(even) {
  flex-direction: row-reverse;
}

.process-step:nth-child(even) .process-step-content {
  text-align: left;
  padding-left: var(--spacing-2xl);
}

/* Número y Marcador Central */
.process-marker {
  width: 10%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.marker-dot {
  width: 12px;
  height: 12px;
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 6px var(--white);
}

.process-step-number {
  position: absolute;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 5rem;
  color: var(--primary);
  opacity: 0.05;
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
  pointer-events: none;
}

.process-step:nth-child(odd) .process-step-number {
  right: -20px;
}

.process-step:nth-child(even) .process-step-number {
  left: -20px;
}

.process-step-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--dark);
  margin-bottom: var(--spacing-sm);
  display: block;
}

.process-step-icon {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: var(--spacing-xs);
  display: inline-block;
}

.process-step:nth-child(odd) .process-step-icon {
  margin-right: 0;
}

.process-step-desc {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.6;
}

/* Adaptación Móvil */
@media (max-width: 850px) {
  .process-flow-editorial::before {
    left: 20px;
    transform: none;
  }

  .process-step {
    flex-direction: row !important;
    margin-bottom: var(--spacing-3xl);
  }

  .process-marker {
    width: 40px;
    justify-content: flex-start;
  }

  .marker-dot {
    margin-left: 14px;
  }

  .process-step-content {
    width: calc(100% - 40px);
    text-align: left !important;
    padding: 0 0 0 var(--spacing-lg) !important;
  }

  .process-step-number {
    font-size: 3rem;
    left: auto !important;
    right: 0 !important;
    top: 0;
    transform: none;
  }
}

/* ============================================
   RESOURCES - RIBBON V6 ROBUST FIX
   ============================================ */

.ribbon-v6-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  padding: 20px 0 !important;
  gap: 20px !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: center !important;
}

.ribbon-v6-item {
  flex: 0 0 auto !important;
  width: 400px !important;
  display: flex !important;
  align-items: center;
  background: white;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--gray-100);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  cursor: pointer;
}

.ribbon-v6-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-light);
}

.ribbon-v6-thumb-wrapper {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 16px;
}

.ribbon-v6-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ribbon-v6-body {
  flex-grow: 1;
  text-align: left;
}

.ribbon-v6-meta {
  margin-bottom: 4px;
}

.ribbon-v6-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 1px;
}

.ribbon-v6-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
  line-height: 1.2;
}

.ribbon-v6-desc {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.4;
  margin: 0;
}

.ribbon-v6-action {
  margin-left: 12px;
}

.ribbon-v6-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: all 0.3s ease;
}

.ribbon-v6-item:hover .ribbon-v6-btn {
  background: var(--primary);
  color: white;
  transform: translateX(3px);
}

/* ============================================
   ABOUT SECTION - CLEAN ENGINEERING MOSAIC
   ============================================ */

.eng-mosaic-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(12, 1fr);
  gap: 4px;
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
}

.mosaic-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.mosaic-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s ease;
}

.mosaic-item:hover img {
  transform: scale(1.05);
}

/* Grid Positioning for Maximum Visibility */
.mosaic-main {
  grid-column: 1 / span 7;
  grid-row: 1 / span 12;
}

.mosaic-secondary {
  grid-column: 8 / span 5;
  grid-row: 1 / span 5;
}

.mosaic-tertiary {
  grid-column: 8 / span 5;
  grid-row: 6 / span 7;
}

/* Imagen cuaternaria opcional en diseño asimétrico para evitar recortes raros */
.mosaic-quaternary {
  display: none; /* Simplificamos a 3 para máxima limpieza si el cuarto rompe la estética */
}

/* Layout con 4 imágenes si se prefiere */
@media (min-width: 1200px) {
  .mosaic-tertiary {
    grid-row: 6 / span 3;
  }
  .mosaic-quaternary {
    display: block;
    grid-column: 8 / span 5;
    grid-row: 9 / span 4;
  }
}

/* Media Queries */
@media (max-width: 1024px) {
  .eng-mosaic-grid {
    aspect-ratio: auto;
    height: 550px;
  }
}

@media (max-width: 600px) {
  .eng-mosaic-grid {
    height: 450px;
    gap: 4px;
    grid-template-columns: repeat(6, 1fr);
  }
  
  .mosaic-main {
    grid-column: 1 / span 6;
    grid-row: 1 / span 6;
  }
  
  .mosaic-secondary {
    grid-column: 1 / span 3;
    grid-row: 7 / span 6;
  }
  
  .mosaic-tertiary {
    grid-column: 4 / span 3;
    grid-row: 7 / span 6;
  }

  .mosaic-quaternary {
    display: none;
  }
}

/* ============================================
   PHOTO STACK - SOBRE NOSOTROS
   ============================================ */

.photo-stack-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-stack-item {
  position: absolute;
  width: 85%;
  height: auto;
  background: #fff;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md, 8px);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  overflow: hidden;
}

.photo-stack-item img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

/* Posiciones iniciales (apiladas) */
.photo-1 {
  transform: rotate(-3deg) translate(-10px, -10px);
  z-index: 4;
}

.photo-2 {
  transform: rotate(2deg) translate(5px, 5px);
  z-index: 3;
}

.photo-3 {
  transform: rotate(-1deg) translate(0, 10px);
  z-index: 2;
}

.photo-4 {
  transform: rotate(3deg) translate(15px, 20px);
  z-index: 1;
}

/* Interacción Hover - Despliegue */
.photo-stack-container:hover .photo-1 {
  transform: rotate(-8deg) translate(-120px, -40px);
}

.photo-stack-container:hover .photo-2 {
  transform: rotate(6deg) translate(20px, -80px);
}

.photo-stack-container:hover .photo-3 {
  transform: rotate(3deg) translate(100px, -20px);
}

.photo-stack-container:hover .photo-4 {
  transform: rotate(-3deg) translate(60px, 70px);
}

/* Foto en primer plano vía JS */
.photo-stack-item.active-top {
  z-index: 100 !important;
  transform: scale(1.1) rotate(0deg) !important;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

/* Resaltar la foto al pasar el ratón por encima individualmente */
.photo-stack-item:hover {
  z-index: 10 !important;
  transform: scale(1.05) rotate(0deg) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.photo-stack-indicator {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0.8;
  animation: bounce-stack 2s infinite;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes bounce-stack {
  0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
  40% {transform: translateX(-50%) translateY(-5px);}
  60% {transform: translateX(-50%) translateY(-3px);}
}

@media (max-width: 992px) {
  .photo-stack {
    height: 350px;
    margin-bottom: var(--spacing-2xl);
  }
  
  .photo-stack-item img {
    height: 200px;
  }
  
  .photo-stack:hover .photo-1 { transform: rotate(-4deg) translate(-40px, -20px); }
  .photo-stack:hover .photo-2 { transform: rotate(2deg) translate(15px, -40px); }
  .photo-stack:hover .photo-3 { transform: rotate(1deg) translate(40px, -10px); }
  .photo-stack:hover .photo-4 { transform: rotate(-1deg) translate(20px, 30px); }
}

/* ============================================
   LEAD CAPTURE MODAL
   ============================================ */

.lead-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 20, 25, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.lead-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lead-modal-content {
    background: var(--white);
    width: 90%;
    max-width: 450px;
    padding: 40px;
    border-radius: 20px;
    position: relative;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lead-modal-overlay.active .lead-modal-content {
    transform: translateY(0);
}

.lead-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray-400);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.lead-modal-close:hover {
    color: var(--primary);
}

.lead-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.lead-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 15px;
}

.lead-modal-header h2 {
    font-family: var(--font-header);
    color: var(--dark);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.lead-modal-header p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.lead-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lead-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lead-input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
}

.lead-input-group input {
    padding: 12px 15px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.lead-input-group input:focus {
    border-color: var(--primary);
    outline: none;
    background: var(--primary-soft);
}

.lead-privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.lead-privacy input {
    margin-top: 3px;
    accent-color: var(--primary);
}

.lead-privacy a {
    color: var(--primary);
    text-decoration: underline;
}

.lead-submit-btn {
    background: var(--primary);
    color: var(--white);
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.lead-submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(45, 134, 89, 0.2);
}

.lead-submit-btn:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
    transform: none;
}

.lead-status {
    text-align: center;
    font-size: 0.85rem;
    min-height: 20px;
}

@media (max-width: 480px) {
    .lead-modal-content {
        padding: 30px 20px;
    }
}
