/* ===================================================================
   LA DEGRADACIÓN DE LA GUERRA - MICROSITIO
   Estilos cinematográficos y minimalistas
   =================================================================== */

/* ===================================================================
   VARIABLES CSS
   =================================================================== */
:root {
  /* Colores principales */
  --color-primary: #0a0a0a;
  --color-secondary: #1a1a1a;
  --color-accent: #ff6b35;
  --color-text: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.8);
  --color-text-subtle: rgba(255, 255, 255, 0.6);
  --color-overlay: rgba(0, 0, 0, 0.7);
  --color-overlay-heavy: rgba(0, 0, 0, 0.85);
  
  /* Tipografía */
  --font-primary: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-secondary: Georgia, 'Times New Roman', serif;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  
  /* Espaciado */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;
  --spacing-xxxl: 6rem;
  
  /* Transiciones */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.8s ease;
  --transition-very-slow: 1.2s ease;
  
  /* Sombras */
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.5);
  
  /* Bordes */
  --border-radius: 8px;
  --border-radius-lg: 12px;
  
  /* Configuración del carrusel elegante */
  --carousel-auto-duration: 4s;
  --carousel-transition-duration: 1.2s;
  --carousel-transition-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --carousel-scale-inactive: 0.95;
  --carousel-opacity-inactive: 0.8;
}

/* ===================================================================
   RESET Y BASE
   =================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

/* ===================================================================
   LAYOUT GENERAL
   =================================================================== */
.section {
  position: relative;
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.section.active {
  display: flex;
  opacity: 1;
}

/* ===================================================================
   SECCIÓN 1: VIDEO INICIAL
   =================================================================== */
.section-intro {
  padding: 0;
  background: var(--color-primary);
}

.video-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.fullscreen-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block; /* Asegurar que se comporte como bloque */
}

/* Ajuste específico para móviles - mostrar video horizontal completo */
@media (max-width: 768px) {
  .fullscreen-video {
    object-fit: contain; /* Mostrar video completo en móvil */
    background-color: #000; /* Fondo negro para barras laterales */
    width: 100%;
    height: 100%;
    max-width: 100vw; /* Asegurar que no se desborde horizontalmente */
    max-height: 100vh; /* Asegurar que no se desborde verticalmente */
  }
  
  .video-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden; /* Prevenir scroll */
  }
  
  /* Ajuste específico para el botón saltar en móvil */
  .skip-intro-btn {
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
  }
}

/* Para tablets y escritorio en landscape mantener comportamiento original */
@media (min-width: 769px), (max-width: 768px) and (orientation: landscape) and (min-height: 600px) {
  .fullscreen-video {
    object-fit: cover;
    object-position: center;
  }
  
  .video-container {
    overflow: hidden;
  }
  
  /* Aviso de sonido en landscape móvil - mantener en parte inferior del video */
  .sound-notice {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Botón Saltar Intro - Minimalista y casi imperceptible */
.skip-intro-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-subtle);
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: var(--font-weight-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-medium);
  opacity: 0.6;
  z-index: 10;
}

.skip-intro-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
  color: var(--color-text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.skip-intro-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: 2px;
}

.skip-icon {
  transition: transform var(--transition-fast);
}

.skip-intro-btn:hover .skip-icon {
  transform: translateX(2px);
}

/* Aviso de Sonido - Ubicado como subtítulos */
.sound-notice {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  opacity: 1;
  transition: all var(--transition-slow);
  pointer-events: none;
}

.sound-notice.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}

.sound-notice-content {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-text);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: var(--font-weight-light);
  box-shadow: var(--shadow-medium);
  animation: pulseGlow 2s ease-in-out infinite;
}

.sound-icon {
  flex-shrink: 0;
  opacity: 0.8;
}

.sound-text {
  white-space: nowrap;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow: 0 4px 30px rgba(255, 107, 53, 0.4);
    border-color: rgba(255, 107, 53, 0.3);
  }
}

/* ===================================================================
   SECCIÓN 2: MENSAJE
   =================================================================== */
.section-mensaje {
  position: relative;
  padding: var(--spacing-xxxl) var(--spacing-lg);
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* Video de fondo */
.background-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.background-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-overlay-heavy);
  z-index: -1;
}

/* Contenido del mensaje */
.mensaje-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  text-align: center;
}

.mensaje-wrapper {
  padding: var(--spacing-xl);
}

/* Título principal */
.mensaje-titulo {
  font-family: var(--font-secondary);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--font-weight-light);
  line-height: 1.2;
  margin-bottom: var(--spacing-xxl);
  color: var(--color-text);
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-very-slow);
}

.mensaje-titulo.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Subtítulo */
.mensaje-subtitulo {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: var(--font-weight-normal);
  line-height: 1.4;
  margin-bottom: var(--spacing-xl);
  color: var(--color-text-muted);
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-very-slow);
}

.mensaje-subtitulo.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Texto principal */
.mensaje-texto {
  margin-bottom: var(--spacing-xl);
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-very-slow);
}

.mensaje-texto.animate {
  opacity: 1;
  transform: translateY(0);
}

.mensaje-texto p {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  line-height: 1.7;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-light);
}

/* Llamado a la acción */
.llamado-accion {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-very-slow);
}

.llamado-accion.animate {
  opacity: 1;
  transform: translateY(0);
}

.llamado-texto {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
  font-weight: var(--font-weight-light);
}

/* Botón Escuchar */
.escuchar-btn {
  background: transparent;
  border: 2px solid var(--color-text);
  color: var(--color-text);
  padding: 1rem 2.5rem;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: var(--font-weight-medium);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all var(--transition-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: heartbeat 1.8s ease-in-out infinite;
}

@keyframes heartbeat {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.25); }
  14%  { transform: scale(1.08); box-shadow: 0 0 12px 2px rgba(255, 255, 255, 0.15); }
  28%  { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
  42%  { transform: scale(1.05); box-shadow: 0 0 8px 1px rgba(255, 255, 255, 0.1); }
  56%  { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.escuchar-btn:hover {
  background: var(--color-text);
  color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-heavy);
  animation: none;
}

.escuchar-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
}

.btn-icon {
  transition: transform var(--transition-fast);
}

.escuchar-btn:hover .btn-icon {
  transform: scale(1.1);
}

/* Documentos de la sala digital */
.documentos-sala {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.documento-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: var(--font-weight-light);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  transition: all var(--transition-medium);
  text-align: left;
  max-width: 480px;
}

.documento-link:hover {
  color: var(--color-text);
  border-color: var(--color-accent);
  background: rgba(255, 107, 53, 0.1);
  transform: translateY(-1px);
}

.documento-link svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.documento-link:hover svg {
  opacity: 1;
  stroke: var(--color-accent);
}

/* ===================================================================
   SECCIÓN 3: VÍCTIMAS
   =================================================================== */
.section-victimas {
  position: relative;
  padding: var(--spacing-xxxl) var(--spacing-lg);
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

/* Video de fondo específico para víctimas */
.section-background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.7;
}

.victimas-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  z-index: 1;
}

/* Introducción */
.victimas-intro {
  text-align: center;
  margin-bottom: var(--spacing-xxxl);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: var(--spacing-xl);
}

.victimas-titulo {
  font-family: var(--font-secondary);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--font-weight-light);
  line-height: 1.3;
  margin-bottom: var(--spacing-lg);
  color: var(--color-text);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.victimas-descripcion {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  line-height: 1.6;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-normal);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Carrusel de víctimas */
.victimas-carousel-container {
  position: relative;
  margin-bottom: var(--spacing-xxxl);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  overflow: hidden;
}

.victimas-carousel {
  flex: 1;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  position: relative;
  touch-action: pan-x; /* Permitir scroll horizontal en touch */
}

.carousel-track {
  display: flex;
  gap: var(--spacing-md);
  transition: transform var(--carousel-transition-duration) var(--carousel-transition-easing);
  will-change: transform;
  -webkit-overflow-scrolling: touch;
  align-items: flex-start;
  width: fit-content;
  transform: translateX(0); /* Posición inicial */
}

.victima-card {
  flex: 0 0 auto;
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-medium);
  border: 2px solid transparent;
  opacity: var(--carousel-opacity-inactive);
  transform: scale(var(--carousel-scale-inactive));
  will-change: transform, opacity; /* Optimización GPU */
}

/* Responsivo: Diferentes tamaños según pantalla */
@media (min-width: 1400px) {
  .victima-card {
    width: calc((100% - 8 * var(--spacing-md)) / 5); /* 5 fotos visibles */
    min-width: 160px;
    max-width: 200px;
  }
}

@media (min-width: 1200px) and (max-width: 1399px) {
  .victima-card {
    width: calc((100% - 6 * var(--spacing-md)) / 4); /* 4 fotos visibles */
    min-width: 150px;
    max-width: 180px;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .victima-card {
    width: calc((100% - 4 * var(--spacing-md)) / 3.5); /* 3.5 fotos visibles */
    min-width: 140px;
  }
}

@media (min-width: 769px) and (max-width: 899px) {
  .victima-card {
    width: calc((100% - 3 * var(--spacing-md)) / 2.5); /* 2.5 fotos visibles */
    min-width: 140px;
  }
}

.victima-card:hover {
  transform: translateY(-8px) scale(1.02);
  opacity: 1;
}

.victima-card.active {
  border-color: var(--color-accent);
  box-shadow: 0 0 30px rgba(255, 107, 53, 0.6);
  transform: scale(1.05);
  opacity: 1;
  z-index: 2;
}

.victima-card.visible {
  opacity: 1;
  transform: scale(1);
}

.card-image {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-slow);
  opacity: 1 !important; /* Asegurar visibilidad */
}

.victima-card:hover .card-image img {
  transform: scale(1.1);
  filter: brightness(1.1) contrast(1.05);
}

/* Efecto de transición suave entre slides */
.carousel-track.transitioning .victima-card {
  animation: smoothSlideTransition 0.8s ease-out;
}

@keyframes smoothSlideTransition {
  0% { 
    transform: scale(var(--carousel-scale-inactive)) translateY(0); 
    opacity: var(--carousel-opacity-inactive);
  }
  50% { 
    transform: scale(1.02) translateY(-5px); 
    opacity: 1;
  }
  100% { 
    transform: scale(1) translateY(0); 
    opacity: 1;
  }
}

/* Pausa de auto-avance en hover */
.victimas-carousel-container:hover .carousel-track {
  animation-play-state: paused;
}

/* Efecto de profundidad en las fotografías */
.victima-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 107, 53, 0.1) 0%, 
    transparent 50%, 
    rgba(255, 107, 53, 0.1) 100%);
  opacity: 0;
  transition: opacity var(--transition-medium);
  z-index: 1;
  pointer-events: none;
}

.victima-card.active::before,
.victima-card:hover::before {
  opacity: 1;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-md) var(--spacing-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  opacity: 0;
  transition: all var(--transition-medium);
  transform: translateY(20px);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.victima-card:hover .card-overlay {
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
}

.victima-card.active .card-overlay {
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(transparent, var(--color-accent));
}

.play-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.8);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  min-height: 44px; /* Tamaño mínimo para touch */
  min-width: 44px;
}

.play-btn:hover,
.play-btn:active {
  background: var(--color-accent);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.6);
  border-color: var(--color-accent);
}

.victim-name {
  font-size: 0.875rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  line-height: 1.2;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Controles del carrusel */
.carousel-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px; /* Tamaño mínimo para touch */
  min-width: 44px;
  -webkit-tap-highlight-color: transparent; /* Remover highlight en iOS */
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  z-index: 3;
}

.carousel-btn:hover,
.carousel-btn:active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5);
}

.carousel-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: not-allowed;
}

/* Controles adicionales del carrusel elegante */
.carousel-controls {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  z-index: 3;
}

.carousel-play-pause {
  background: var(--color-accent);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-medium);
}

.carousel-play-pause:hover {
  background: #e55a2b;
  transform: scale(1.1);
  box-shadow: var(--shadow-heavy);
}

.carousel-indicators {
  display: flex;
  gap: 8px;
  margin: 0 var(--spacing-sm);
}

.indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.indicator-dot.active {
  background: var(--color-accent);
  transform: scale(1.2);
}

.indicator-dot.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: dotProgress var(--carousel-auto-duration) linear infinite;
}

@keyframes dotProgress {
  from { transform: scale(0); opacity: 1; }
  to { transform: scale(1); opacity: 0; }
}

/* ===================================================================
   REPRODUCTOR DE AUDIO
   =================================================================== */

/* Indicadores de navegación del reproductor (móvil memorial) */
.player-dots {
  display: none; /* Oculto en desktop */
  justify-content: center;
  gap: 10px;
  padding: 0.75rem 0 0.5rem;
}

@media (max-width: 768px) {
  .player-dots {
    display: flex;
  }
}

.player-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  min-width: 9px;
  min-height: 9px;
}

.player-dot.active {
  background: var(--color-accent);
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(255, 107, 53, 0.5);
}

.player-dot:not(.active):hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.15);
}

/* Flechas de navegación sobre la foto (móvil) */
.swipe-arrow {
  display: none; /* Oculto en desktop */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
}

@media (max-width: 768px) {
  .swipe-arrow {
    display: flex;
  }
}

.swipe-arrow:active {
  background: rgba(255, 107, 53, 0.5);
  transform: translateY(-50%) scale(0.9);
}

.swipe-prev {
  left: -8px;
}

.swipe-next {
  right: -8px;
}

/* Enlace a YouTube */
.youtube-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  margin-top: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.youtube-link:hover {
  background: rgba(255, 0, 0, 0.08);
  border-color: rgba(255, 0, 0, 0.25);
  color: var(--color-text);
}

.youtube-link svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.youtube-link:hover svg {
  opacity: 1;
  fill: #ff0000;
}

.audio-player-container {
  margin-bottom: var(--spacing-xxxl);
  display: flex;
  justify-content: center;
}

.audio-player {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 100%;
  max-width: 600px;
}

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

/* Wrapper de foto con spinner de carga */
.current-photo-wrapper {
  position: relative;
  flex-shrink: 0;
}

.current-photo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background-image: url('../media/fotos/icono-perfil.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.3s ease;
}

.current-photo[src]:not([src=""]) {
  background-image: none;
}

.current-photo.loading {
  opacity: 0.5;
}

.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.current-info {
  flex: 1;
}

.current-name {
  font-size: 1.125rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.track-counter {
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
  margin-bottom: 0.15rem;
  letter-spacing: 0.3px;
}

.current-description {
  font-size: 0.875rem;
  color: var(--color-text-subtle);
}

/* Mensaje de error del reproductor */
.player-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: var(--spacing-sm);
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: var(--border-radius);
  color: #fca5a5;
  font-size: 0.8rem;
  animation: fadeIn 0.3s ease;
}

.player-error.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.control-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--color-text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px;
  min-width: 44px;
  -webkit-tap-highlight-color: transparent;
}

.control-btn:hover,
.control-btn:active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.play-pause-btn {
  width: 54px;
  height: 54px;
  border-width: 2px;
  min-height: 54px;
  min-width: 54px;
}

.play-pause-btn:hover,
.play-pause-btn:active {
  background: var(--color-text);
  color: var(--color-primary);
}

.progress-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: 0.75rem;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  touch-action: none; /* Prevenir scroll durante drag */
}

.progress-bar:before {
  content: '';
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: 0;
  right: 0;
  background: transparent;
  z-index: 1;
}

.progress-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 3px;
  transition: width 0.1s linear;
  width: 0%;
  position: relative;
}

.progress-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--color-text);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.progress-bar:hover .progress-thumb,
.progress-bar.dragging .progress-thumb {
  opacity: 1;
}

.progress-bar:hover .progress-fill,
.progress-bar.dragging .progress-fill {
  background: var(--color-text);
}

.time-display {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  min-width: 90px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Control de volumen */
.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.volume-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border: none;
  background: transparent;
  padding: 0;
}

.volume-btn:hover {
  background: transparent;
  border: none;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 120px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--color-text);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--color-text);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

/* ===================================================================
   INDICADOR DE SECCIÓN (Navigation dots)
   =================================================================== */
.section-nav {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.section-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.section-dot.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(255, 107, 53, 0.5);
}

.section-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

/* ===================================================================
   MENSAJE FINAL
   =================================================================== */
.mensaje-final {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
  padding: var(--spacing-xl);
}

.mensaje-final p {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  line-height: 1.7;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-normal);
  font-style: italic;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* ===================================================================
   CRÉDITOS
   =================================================================== */
.creditos {
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-lg) var(--spacing-md);
}

.creditos-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.creditos-texto {
  font-size: 0.875rem;
  color: var(--color-text-subtle);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.creditos-texto strong {
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
}

.creditos-desarrollo {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  font-style: italic;
  opacity: 0.8;
}

.creditos-desarrollo strong {
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
}

/* ===================================================================
   ANIMACIONES
   =================================================================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeUp var(--transition-slow) ease-out forwards;
}

/* Clases de utilidad para animaciones */
[data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-very-slow);
}

[data-animate="fade-up"].animate {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================================
   UTILIDADES
   =================================================================== */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Utilidades para móvil */
.touch-target {
  min-height: 44px;
  min-width: 44px;
  -webkit-tap-highlight-color: transparent;
}

.no-scroll {
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Mejoras para pantallas pequeñas */
@media (max-width: 375px) {
  .skip-intro-btn {
    top: 0.25rem;
    right: 0.25rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.7rem;
  }

  /* Carrusel en pantallas ultra pequeñas - mejoras sin !important */
  .victimas-carousel-container {
    gap: 8px;
    margin: 0 0.5rem;
  }

  .victima-card {
    width: 130px; /* Ligeramente más pequeño pero usable */
    min-width: 130px;
  }

  .card-image {
    height: 180px;
  }

  .victim-name {
    font-size: 0.75rem;
  }

  .carousel-track {
    gap: 8px;
  }

  .carousel-btn {
    width: 44px; /* Mantener tamaño mínimo touch */
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .carousel-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .audio-player {
    margin: 0 0.25rem !important;
    padding: 0.5rem !important;
  }
  
  .current-name {
    font-size: 0.9rem !important;
  }
}

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

/* Base mobile-first approach */
@media (max-width: 480px) {
  :root {
    --spacing-xxxl: 2rem;
    --spacing-xxl: 1.5rem;
    --spacing-xl: 1rem;
    --spacing-lg: 0.75rem;
    --spacing-md: 0.5rem;
  }

  /* Skip intro button - móvil */
  .skip-intro-btn {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  /* Sound notice - móvil (debajo del video) */
  .sound-notice {
    position: fixed;
    bottom: 30vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
  }

  .sound-notice-content {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    gap: 0.5rem;
  }

  .sound-icon {
    width: 16px;
    height: 16px;
  }

  /* Sección mensaje - móvil */
  .section-mensaje {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  .mensaje-wrapper {
    padding: var(--spacing-md);
  }

  /* Víctimas intro - móvil */
  .victimas-intro {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
  }

  /* Carrusel - oculto en móvil para dar protagonismo al reproductor */
  .victimas-carousel-container {
    display: none !important; /* Forzar ocultación en móvil */
  }
  
  .carousel-controls {
    display: none !important; /* Ocultar controles también */
  }

  .victim-name {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    line-height: 1.2;
  }

  /* Controles del carrusel - móvil con tamaño adecuado para touch */
  .carousel-btn {
    width: 48px; /* Mínimo 44px para accesibilidad touch */
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 1rem;
    flex-shrink: 0;
  }

  .carousel-btn svg {
    width: 20px;
    height: 20px;
  }

  /* Audio player - móvil con mayor protagonismo */
  .audio-player {
    padding: var(--spacing-lg);
    margin: var(--spacing-md) var(--spacing-sm);
    max-width: none;
  }

  .player-info {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-md);
  }

  .current-photo {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-width: 3px;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  }

  .current-name {
    font-size: 1.2rem;
    line-height: 1.4;
  }

  .current-description {
    display: none; /* Oculto en móvil — flechas y puntos son autoexplicativos */
  }

  /* Controles del player - móvil mejorados */
  .player-controls {
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
  }

  .control-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .control-btn:hover,
  .control-btn:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
  }

  .play-pause-btn {
    width: 56px;
    height: 56px;
    background: var(--color-accent);
    border: none;
  }

  .play-pause-btn:hover {
    background: #e55a2b;
    transform: scale(1.1);
  }

  /* Botón escuchar - móvil */
  .escuchar-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  /* Documentos - móvil */
  .documentos-sala {
    margin-top: 1.25rem;
    gap: 0.5rem;
  }

  .documento-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    max-width: 100%;
  }

  /* Mensaje final - móvil */
  .mensaje-final {
    padding: var(--spacing-sm);
    margin: 0 var(--spacing-xs) var(--spacing-md);
  }

  /* Video overlay ajustado para móvil */
  .video-overlay {
    background: var(--color-overlay-heavy);
  }

  /* Mejoras de legibilidad en móvil */
  .victimas-titulo {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
  }

  .victimas-descripcion {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
  }

  .mensaje-final p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
  }

  /* Foto wrapper centrada en móvil — estilo memorial */
  .current-photo-wrapper {
    margin: 0 auto;
    filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.12));
  }

  /* Volumen en móvil */
  .volume-control {
    justify-content: center;
  }

  /* YouTube en móvil */
  .youtube-link {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }

  /* Flechas de navegación ajuste móvil */
  .swipe-prev {
    left: -6px;
  }
  
  .swipe-next {
    right: -6px;
  }

  /* Section nav en móvil */
  .section-nav {
    right: 0.75rem;
    gap: 10px;
  }

  .section-dot {
    width: 8px;
    height: 8px;
  }
}

/* Tablet portrait */
@media (min-width: 481px) and (max-width: 768px) {
  :root {
    --spacing-xxxl: 3rem;
    --spacing-xxl: 2.5rem;
    --spacing-xl: 2rem;
  }

  /* Video inicial - ajuste para tablets en portrait */
  @media (orientation: portrait) {
    .fullscreen-video {
      object-fit: contain;
      background-color: #000;
    }
    
    .video-container {
      background-color: #000;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  .skip-intro-btn {
    top: 1rem;
    right: 1rem;
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
  }

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

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

  .victimas-carousel-container {
    margin: 0 var(--spacing-md);
    gap: var(--spacing-md);
    display: flex; /* Asegurar que sea visible en tablets */
    position: relative; /* Para controles absolutos */
  }
  
  .carousel-controls {
    display: flex; /* Mostrar controles en tablet */
  }

  .carousel-track {
    gap: var(--spacing-sm);
  }

  .victima-card {
    width: 140px;
  }

  .card-image {
    height: 180px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  .victim-name {
    font-size: 0.8rem;
  }

  .audio-player {
    padding: var(--spacing-md);
  }

  .current-photo {
    width: 70px;
    height: 70px;
  }
}

/* ===================================================================
   ACCESIBILIDAD
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible para navegación por teclado */
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

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

/* Prevenir zoom accidental en inputs */
input, select, textarea {
  font-size: 16px;
}

/* Optimizar el comportamiento de videos en móvil */
video {
  -webkit-playsinline: true;
}

/* Optimizar scroll en dispositivos táctiles */
html {
  -webkit-overflow-scrolling: touch;
}

/* Efectos visuales para touch */
.carousel-btn:active,
.control-btn:active,
.escuchar-btn:active,
.skip-intro-btn:active,
.play-pause-btn:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* Optimizar carga de imágenes - Solo para imágenes fuera del carrusel */
img[loading="lazy"]:not(.victimas-carousel img) {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded:not(.victimas-carousel img) {
  opacity: 1;
}

/* Las imágenes del carrusel deben ser siempre visibles */
.victimas-carousel img[loading="lazy"] {
  opacity: 1 !important;
}

/* Pantallas ultra pequeñas (320px y menos) */
@media (max-width: 320px) {
  :root {
    --spacing-xxxl: 1.5rem;
    --spacing-xxl: 1rem;
    --spacing-xl: 0.75rem;
  }
  
  .sound-notice-content {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .skip-intro-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
  }
  
  .mensaje-wrapper {
    padding: var(--spacing-sm);
  }
  
  .audio-player {
    padding: var(--spacing-sm);
    margin: var(--spacing-sm) var(--spacing-xs);
  }
  
  .current-photo {
    width: 120px;
    height: 120px;
  }
  
  .current-name {
    font-size: 1rem;
  }
  
  .swipe-arrow {
    width: 28px;
    height: 28px;
  }
  
  .player-dots {
    gap: 7px;
  }
  
  .control-btn {
    width: 40px;
    height: 40px;
  }
  
  .play-pause-btn {
    width: 48px;
    height: 48px;
  }
}

/* Alto contraste */
@media (prefers-contrast: high) {
  :root {
    --color-text-muted: #ffffff;
    --color-text-subtle: #cccccc;
  }
}

/* ===================================================================
   CARRUSEL ELEGANTE - OPTIMIZACIONES DESKTOP
   =================================================================== */

/* Desktop grande - mostrar 4-5 fotos con efectos cinematográficos */
@media (min-width: 1200px) {
  .victimas-carousel-container {
    margin: 0 auto;
    max-width: 1200px;
    position: relative;
  }
  
  .carousel-controls {
    bottom: -80px;
  }
  
  .indicator-dot {
    width: 14px;
    height: 14px;
  }
  
  .carousel-play-pause {
    width: 48px;
    height: 48px;
  }
  
  /* Efecto parallax sutil en desktop */
  .victima-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: var(--shadow-heavy);
  }
  
  .victima-card.active {
    transform: scale(1.08);
    box-shadow: 0 0 40px rgba(255, 107, 53, 0.8);
  }
}

/* Ultra wide screens - máximo 5 fotos */
@media (min-width: 1600px) {
  .victimas-carousel-container {
    max-width: 1400px;
  }
  
  .victima-card {
    max-width: 220px;
  }
}
