/* ==========================================
   NOSOTROS.CSS - OPTIMIZADO
   Versión optimizada para PageSpeed Insights
========================================== */

/* ==========================================
   HERO SECTION - NOSOTROS
========================================== */
.hero-section-nosotros {
  position: relative;
  min-height: 50vh;
  padding-top: 100px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--voz-navy, #1e2a4a);
}

/* Imagen LCP - Optimizada */
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  /* Mejora el rendimiento en imágenes grandes */
  will-change: transform;
  transform: translateZ(0);
}

/* Overlay con gradiente */
.hero-section-nosotros::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 42, 74, 0.85) 0%,
    rgba(0, 156, 217, 0.6) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Contenido del hero */
.hero-section-nosotros > .container {
  position: relative;
  z-index: 2;
}

/* Badge del hero */
.hero-badge {
  display: inline-block;
  background: rgba(255, 193, 7, 0.2);
  color: var(--voz-yellow, #ffc107);
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  border: 2px solid var(--voz-yellow, #ffc107);
  backdrop-filter: blur(10px);
}

/* ==========================================
   CRONOLOGÍA / TIMELINE
========================================== */
.timeline-year {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  color: var(--voz-yellow, #ffc107);
  text-shadow: 2px 2px 0 var(--voz-navy, #1e2a4a);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}

.timeline-item {
  border-left: 3px solid var(--voz-cyan, #009cd9);
  padding-left: 1.5rem;
  margin-left: 0.5rem;
  position: relative;
  transition: border-color 0.3s ease;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0.5rem;
  width: 13px;
  height: 13px;
  background: var(--voz-cyan, #009cd9);
  border-radius: 50%;
  border: 3px solid var(--color-bg-surface, #ffffff);
  box-shadow: 0 0 0 3px rgba(0, 156, 217, 0.2);
}

.timeline-item:hover {
  border-left-color: var(--voz-yellow, #ffc107);
}

.timeline-item:hover::before {
  background: var(--voz-yellow, #ffc107);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
}

/* ==========================================
   STATS HIGHLIGHT (80+ Años)
========================================== */
.stats-highlight {
  background: var(--color-bg-surface, #ffffff);
  color: var(--color-text-primary, #1e2a4a);
  padding: 3rem 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 2;
  border: 1px solid rgba(0, 156, 217, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-highlight:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   VALUE CARDS (Tarjetas de Valores)
========================================== */
.value-card {
  background: var(--color-bg-surface, #ffffff);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  border-left: 4px solid var(--voz-cyan, #009cd9);
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  /* Optimización de rendimiento */
  will-change: transform;
  transform: translateZ(0);
}

.value-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 156, 217, 0.15);
  border-left-color: var(--voz-yellow, #ffc107);
}

.value-card:active {
  transform: translateY(-4px) scale(1.01);
}

/* Animación suave para iconos */
.value-card i {
  transition: transform 0.3s ease;
}

.value-card:hover i {
  transform: scale(1.1);
}

/* ==========================================
   SECTION DIVIDER
========================================== */
.section-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--voz-yellow, #ffc107) 0%,
    var(--voz-cyan, #009cd9) 100%
  );
  margin: 1.25rem auto;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

/* ==========================================
   SURFACE BACKGROUNDS
========================================== */
.surface {
  background-color: var(--color-bg-surface, #ffffff);
  color: var(--color-text-primary, #1e2a4a);
}

.surface-soft {
  background-color: var(--color-bg-soft, #f8f9fa);
  color: var(--color-text-primary, #1e2a4a);
}

/* ==========================================
   CARD STYLES
========================================== */
.card {
  border: none;
  border-radius: 1rem;
  background: var(--color-bg-surface, #ffffff);
  color: var(--color-text-primary, #1e2a4a);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  position: relative;
}

.card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* ==========================================
   RESPONSIVE DESIGN
========================================== */
@media (max-width: 768px) {
  .hero-section-nosotros {
    min-height: 35vh;
    padding-top: 80px;
  }

  .timeline-year {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  .timeline-item {
    margin-left: 0;
    padding-left: 1.25rem;
    border-left-width: 2px;
  }

  .timeline-item::before {
    left: -6px;
    width: 10px;
    height: 10px;
  }

  .stats-highlight {
    padding: 2rem 1.5rem;
  }

  .section-divider {
    width: 60px;
    height: 3px;
  }

  .display-4 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-section-nosotros {
    min-height: 30vh;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
  }

  .timeline-year {
    font-size: 1.75rem;
  }

  .value-card {
    border-left-width: 3px;
  }
}

/* ==========================================
   DARK MODE
========================================== */
[data-theme="dark"] .stats-highlight {
  background: rgba(30, 42, 74, 0.8);
  border: 1px solid rgba(0, 156, 217, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .value-card {
  background: rgba(30, 42, 74, 0.6);
  border-left-color: var(--voz-cyan, #009cd9);
}

[data-theme="dark"] .value-card:hover {
  box-shadow: 0 12px 24px rgba(0, 156, 217, 0.3);
  background: rgba(30, 42, 74, 0.8);
}

[data-theme="dark"] .timeline-item {
  border-left-color: rgba(0, 156, 217, 0.6);
}

[data-theme="dark"] .timeline-item::before {
  border-color: rgba(30, 42, 74, 0.8);
  box-shadow: 0 0 0 3px rgba(0, 156, 217, 0.3);
}

[data-theme="dark"] .surface {
  background-color: rgba(30, 42, 74, 0.5);
}

[data-theme="dark"] .surface-soft {
  background-color: rgba(30, 42, 74, 0.3);
}

[data-theme="dark"] .card {
  background: rgba(30, 42, 74, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .hero-section-nosotros::before {
  background: linear-gradient(
    135deg,
    rgba(30, 42, 74, 0.95) 0%,
    rgba(0, 156, 217, 0.7) 100%
  );
}

/* ==========================================
   PERFORMANCE OPTIMIZATIONS
========================================== */

/* Reducir repaints en animaciones */
.value-card,
.stats-highlight,
.timeline-item {
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Optimizar transiciones para GPU */
.value-card:hover,
.card:hover {
  transform: translateZ(0);
}

/* Lazy loading para contenido fuera de viewport */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================
   UTILITY CLASSES
========================================== */
.text-voz-navy {
  color: var(--voz-navy, #1e2a4a);
}

.text-voz-cyan {
  color: var(--voz-cyan, #009cd9);
}

.text-voz-yellow {
  color: var(--voz-yellow, #ffc107);
}

.fw-black {
  font-weight: 900;
}

.opacity-10 {
  opacity: 0.1;
}

.opacity-75 {
  opacity: 0.75;
}

/* ==========================================
   PRINT STYLES
========================================== */
@media print {
  .hero-section-nosotros {
    page-break-after: avoid;
  }

  .timeline-item {
    page-break-inside: avoid;
  }

  .value-card {
    page-break-inside: avoid;
  }
}