/* ================================================================
   SECCION VIDEO CONFORT - ESTILOS RESPONSIVE (FONDO BLANCO)
   ================================================================ */

.video-section {
  padding: clamp(40px, 8vw, 80px) clamp(15px, 4vw, 20px);
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.video-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 10% 20%, rgba(34, 197, 94, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(234, 179, 8, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.video-section__container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
}

/* ================================================================
   HEADER DE LA SECCIÓN - RESPONSIVE
   ================================================================ */

.video-section__header {
  text-align: center;
  margin-bottom: clamp(30px, 6vw, 60px);
  padding: 0 15px;
}

.section__subheader {
  color: #22c55e;
  font-size: clamp(11px, 2vw, 14px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: clamp(1.5px, 0.3vw, 3px);
  margin-bottom: 10px;
  display: inline-block;
  position: relative;
}

.section__subheader::before,
.section__subheader::after {
  content: '';
  position: absolute;
  top: 50%;
  width: clamp(15px, 3vw, 30px);
  height: 2px;
  background: linear-gradient(90deg, transparent, #22c55e);
}

.section__subheader::before {
  right: calc(100% + clamp(8px, 1.5vw, 15px));
}

.section__subheader::after {
  left: calc(100% + clamp(8px, 1.5vw, 15px));
  background: linear-gradient(90deg, #22c55e, transparent);
}

.section__header {
  color: #000000;
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
  padding: 0 10px;
}

.section__description {
  color: #4a4a4a;
  font-size: clamp(15px, 2.5vw, 18px);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  padding: 0 20px;
}

/* ================================================================
   CONTENEDOR PRINCIPAL DEL VIDEO - RESPONSIVE
   ================================================================ */

.video-container {
  position: relative;
  border-radius: clamp(12px, 2.5vw, 24px);
  overflow: hidden;
  box-shadow: 
    0 clamp(10px, 2vw, 20px) clamp(30px, 6vw, 60px) rgba(0, 0, 0, 0.15),
    0 0 clamp(40px, 8vw, 80px) rgba(34, 197, 94, 0.1);
  border: clamp(1px, 0.2vw, 2px) solid rgba(34, 197, 94, 0.2);
  transition: all 0.4s ease;
  background: #f5f5f5;
  margin: 0 auto;
  max-width: 100%;
}

/* Hover solo en dispositivos no táctiles */
@media (hover: hover) and (pointer: fine) {
  .video-container:hover {
    box-shadow: 
      0 30px 80px rgba(0, 0, 0, 0.2),
      0 0 100px rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    transform: translateY(-5px);
  }
}

/* Wrapper del video - Altura adaptativa */
.video-wrapper {
  position: relative;
  width: 100%;
  height: clamp(280px, 50vw, 600px);
  overflow: hidden;
  min-height: 250px;
}

.background-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* Overlay gradiente - Ajustado para móviles */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.65) 50%,
    rgba(0, 0, 0, 0.75) 100%
  );
  z-index: 1;
}

/* Efectos de brillo - Responsive */
.video-glow {
  position: absolute;
  width: clamp(200px, 40vw, 400px);
  height: clamp(200px, 40vw, 400px);
  border-radius: 50%;
  filter: blur(clamp(40px, 8vw, 80px));
  opacity: 0.4;
  z-index: 2;
  pointer-events: none;
}

.video-glow--top-left {
  top: clamp(-50px, -10vw, -100px);
  left: clamp(-50px, -10vw, -100px);
  background: radial-gradient(circle, rgba(34, 197, 94, 0.6) 0%, transparent 70%);
}

.video-glow--bottom-right {
  bottom: clamp(-50px, -10vw, -100px);
  right: clamp(-50px, -10vw, -100px);
  background: radial-gradient(circle, rgba(234, 179, 8, 0.6) 0%, transparent 70%);
}

/* ================================================================
   CONTENIDO SOBRE EL VIDEO - RESPONSIVE
   ================================================================ */

.video-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  padding: clamp(15px, 4vw, 40px);
}

.video-content__inner {
  text-align: center;
  max-width: 800px;
  width: 100%;
}

/* Badge decorativo - Responsive */
.video-badge {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 1.5vw, 10px);
  background: rgba(34, 197, 94, 0.9);
  border: 1px solid rgba(34, 197, 94, 1);
  padding: clamp(6px, 1.5vw, 8px) clamp(12px, 3vw, 20px);
  border-radius: 30px;
  color: #ffffff;
  font-size: clamp(11px, 2vw, 14px);
  font-weight: 600;
  margin-bottom: clamp(12px, 2.5vw, 20px);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.video-badge i {
  font-size: clamp(14px, 3vw, 20px);
}

/* Título - Tipografía fluida */
.video-content h2 {
  color: #ffffff;
  font-size: clamp(24px, 6vw, 56px);
  font-weight: 800;
  margin-bottom: clamp(12px, 2.5vw, 20px);
  line-height: 1.2;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  padding: 0 10px;
}

/* Descripción - Responsive */
.video-content p {
  color: #ffffff;
  font-size: clamp(14px, 2.5vw, 18px);
  line-height: 1.6;
  margin-bottom: clamp(20px, 4vw, 35px);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  padding: 0 15px;
}

/* ================================================================
   BOTONES DE ACCIÓN - MOBILE FIRST
   ================================================================ */

.video-actions {
  display: flex;
  gap: clamp(12px, 2.5vw, 20px);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: clamp(20px, 4vw, 40px);
  padding: 0 10px;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 12px);
  padding: clamp(12px, 2.5vw, 16px) clamp(20px, 4vw, 32px);
  border: none;
  border-radius: 50px;
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  min-width: clamp(140px, 30vw, auto);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.play-btn__icon {
  display: flex;
  align-items: center;
  font-size: clamp(18px, 3vw, 24px);
}

.play-btn--primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.4);
}

.play-btn--secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
}

/* Hover solo en dispositivos no táctiles */
@media (hover: hover) and (pointer: fine) {
  .play-btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(34, 197, 94, 0.6);
  }

  .play-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
  }
}

/* Efecto ripple - Touch friendly */
.play-btn__ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.play-btn:active .play-btn__ripple {
  width: clamp(200px, 50vw, 300px);
  height: clamp(200px, 50vw, 300px);
}

/* ================================================================
   CARACTERÍSTICAS DESTACADAS - RESPONSIVE
   ================================================================ */

.video-features {
  display: flex;
  gap: clamp(12px, 3vw, 30px);
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 10px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.5vw, 10px);
  color: #ffffff;
  font-size: clamp(12px, 2vw, 14px);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.15);
  padding: clamp(8px, 1.5vw, 10px) clamp(12px, 2.5vw, 20px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .feature-item:hover {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.5);
    transform: translateY(-2px);
  }
}

.feature-item i {
  font-size: clamp(16px, 3vw, 20px);
  color: #eab308;
}

/* ================================================================
   CONTROLES DE VIDEO - TOUCH OPTIMIZED
   ================================================================ */

.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(12px, 2.5vw, 20px);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 15px);
  z-index: 4;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Controles siempre visibles en móvil */
@media (max-width: 768px) {
  .video-controls {
    opacity: 1;
  }
}

@media (hover: hover) and (pointer: fine) {
  .video-container:hover .video-controls {
    opacity: 1;
  }
}

.control-btn {
  width: clamp(36px, 8vw, 40px);
  height: clamp(36px, 8vw, 40px);
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .control-btn:hover {
    background: rgba(34, 197, 94, 0.9);
    transform: scale(1.1);
  }
}

.control-btn:active {
  transform: scale(0.95);
}

.control-btn i {
  font-size: clamp(16px, 3vw, 20px);
}

.progress-bar {
  flex: 1;
  height: clamp(4px, 1vw, 6px);
  min-height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

/* Área de toque más grande en móvil */
@media (max-width: 768px) {
  .progress-bar {
    height: 8px;
    margin: 4px 0;
  }
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #eab308 100%);
  width: 0%;
  transition: width 0.1s linear;
}

/* ================================================================
   ESTADÍSTICAS - GRID RESPONSIVE
   ================================================================ */

.video-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 25vw, 200px), 1fr));
  gap: clamp(15px, 3vw, 30px);
  margin-top: clamp(30px, 6vw, 60px);
  padding: clamp(20px, 4vw, 40px);
  background: #ffffff;
  border-radius: clamp(12px, 2.5vw, 20px);
  border: clamp(1px, 0.2vw, 2px) solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.stat-item {
  text-align: center;
  padding: clamp(12px, 2.5vw, 20px);
  transition: transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .stat-item:hover {
    transform: translateY(-5px);
  }
}

.stat-number {
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 800;
  background: linear-gradient(135deg, #22c55e 0%, #eab308 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: clamp(6px, 1.5vw, 10px);
  line-height: 1.2;
}

.stat-label {
  color: #4a4a4a;
  font-size: clamp(11px, 2vw, 14px);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: clamp(0.5px, 0.15vw, 1px);
}

/* ================================================================
   MODAL DE VIDEO - RESPONSIVE
   ================================================================ */

.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.video-modal.active {
  display: block;
}

.video-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.video-modal__container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) clamp(15px, 3vw, 20px);
  height: 100vh;
  height: 100dvh; /* Para móviles modernos */
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

/* Botón cerrar - Touch optimized */
.video-modal__close {
  position: absolute;
  top: clamp(15px, 3vw, 20px);
  right: clamp(15px, 3vw, 20px);
  width: clamp(44px, 8vw, 50px);
  height: clamp(44px, 8vw, 50px);
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: #ffffff;
  color: #000000;
  font-size: clamp(20px, 4vw, 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 3;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .video-modal__close:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    transform: rotate(90deg);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  }
}

.video-modal__close:active {
  transform: scale(0.95);
}

/* Header del modal - Responsive */
.video-modal__header {
  text-align: center;
  margin-bottom: clamp(15px, 3vw, 30px);
  padding: 0 15px;
}

.video-modal__header h3 {
  color: #000000;
  font-size: clamp(20px, 4vw, 32px);
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.video-modal__header p {
  color: #4a4a4a;
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.5;
}

/* Reproductor - Aspect Ratio Responsive */
.video-modal__player {
  border-radius: clamp(8px, 2vw, 16px);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: clamp(1px, 0.2vw, 2px) solid rgba(34, 197, 94, 0.3);
  margin-bottom: clamp(15px, 3vw, 20px);
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-modal__player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

/* Información adicional - Responsive */
.video-modal__info {
  display: flex;
  justify-content: center;
  gap: clamp(15px, 4vw, 40px);
  flex-wrap: wrap;
  padding: 0 15px;
}

.modal-info-item {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.5vw, 10px);
  color: #000000;
  font-size: clamp(12px, 2vw, 14px);
  font-weight: 500;
}

.modal-info-item i {
  font-size: clamp(16px, 3vw, 20px);
  color: #eab308;
}

/* ================================================================
   ANIMACIONES
   ================================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */

/* Extra Large Devices (1400px+) */
@media (min-width: 1400px) {
  .video-section__container {
    padding: 0 40px;
  }
}

/* Large Devices (1200px - 1399px) */
@media (max-width: 1399px) {
  .video-section__container {
    padding: 0 30px;
  }
}

/* Desktop (1024px - 1199px) */
@media (max-width: 1199px) {
  .video-wrapper {
    height: clamp(400px, 45vw, 500px);
  }
}

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) {
  .video-section {
    padding: clamp(50px, 7vw, 60px) clamp(15px, 3vw, 20px);
  }

  .video-wrapper {
    height: clamp(350px, 50vw, 450px);
  }

  .video-features {
    gap: 15px;
  }

  .feature-item {
    font-size: 13px;
    padding: 8px 16px;
  }
}

/* Mobile Landscape (640px - 767px) */
@media (max-width: 767px) {
  .video-section {
    padding: 50px 15px;
  }

  .section__subheader::before,
  .section__subheader::after {
    display: none; /* Ocultar líneas decorativas en móvil */
  }

  .video-wrapper {
    height: clamp(300px, 60vw, 400px);
  }

  .video-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .play-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
  }

  .video-features {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .feature-item {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .video-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 25px 15px;
  }

  /* Modal ajustes para tablet */
  .video-modal__container {
    padding: 30px 20px;
  }
}

/* Mobile Portrait (480px - 639px) */
@media (max-width: 639px) {
  .video-wrapper {
    height: clamp(250px, 65vw, 320px);
  }

  .video-content {
    padding: 15px;
  }

  .video-badge {
    font-size: 11px;
    padding: 6px 12px;
  }

  .video-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* Small Mobile (< 480px) */
@media (max-width: 479px) {
  .video-section {
    padding: 40px 10px;
  }

  .video-wrapper {
    height: clamp(220px, 70vw, 280px);
    border-radius: 12px;
  }

  .video-content {
    padding: 12px;
  }

  .video-content h2 {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .video-content p {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .video-badge {
    font-size: 10px;
    padding: 5px 10px;
    gap: 5px;
  }

  .video-badge i {
    font-size: 12px;
  }

  .play-btn {
    padding: 12px 20px;
    font-size: 13px;
    gap: 8px;
  }

  .play-btn__icon {
    font-size: 16px;
  }

  .video-stats {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 15px;
  }

  .stat-number {
    font-size: 28px;
  }

  .stat-label {
    font-size: 11px;
  }

  /* Modal para móviles pequeños */
  .video-modal__container {
    padding: 15px 10px;
  }

  .video-modal__header h3 {
    font-size: 18px;
  }

  .video-modal__header p {
    font-size: 13px;
  }

  .video-modal__info {
    gap: 15px;
    flex-direction: column;
    align-items: center;
  }

  .modal-info-item {
    font-size: 12px;
  }
}

/* Extra Small Mobile (< 360px) */
@media (max-width: 359px) {
  .video-wrapper {
    height: 200px;
  }

  .video-content h2 {
    font-size: 20px;
  }

  .section__header {
    font-size: 24px;
  }

  .stat-number {
    font-size: 24px;
  }
}

/* ================================================================
   OPTIMIZACIONES PARA DISPOSITIVOS TÁCTILES
   ================================================================ */

@media (hover: none) and (pointer: coarse) {
  /* Eliminar animaciones hover en dispositivos táctiles */
  .video-container:hover {
    transform: none;
  }

  /* Aumentar área de toque */
  .control-btn,
  .play-btn,
  .video-modal__close {
    min-width: 44px;
    min-height: 44px;
  }

  /* Mejorar feedback táctil */
  .play-btn:active {
    transform: scale(0.97);
  }

  .feature-item:active {
    transform: scale(0.98);
  }
}

/* ================================================================
   ESTADOS DE CARGA Y HOVER - RESPONSIVE
   ================================================================ */

.video-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(234, 179, 8, 0.05));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .video-container:hover::before {
    opacity: 1;
  }
}

/* ================================================================
   ORIENTACIÓN LANDSCAPE EN MÓVILES
   ================================================================ */

@media (max-height: 500px) and (orientation: landscape) {
  .video-wrapper {
    height: 85vh;
  }

  .video-content h2 {
    font-size: 24px;
  }

  .video-content p {
    font-size: 14px;
    margin-bottom: 15px;
  }

  .video-badge {
    margin-bottom: 10px;
  }

  .video-actions {
    margin-bottom: 20px;
  }

  .video-modal__container {
    padding: 20px 15px;
  }
}

/* ================================================================
   DARK MODE SUPPORT (Opcional)
   ================================================================ */

@media (prefers-color-scheme: dark) {
  /* Mantener fondo blanco según diseño original */
  /* Pero puedes descomentar esto si necesitas dark mode:
  
  .video-section {
    background: #1a1a1a;
  }
  
  .section__header {
    color: #ffffff;
  }
  
  .video-stats {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
  }
  */
}

/* ================================================================
   REDUCE MOTION PARA ACCESIBILIDAD
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .video-container:hover {
    transform: none;
  }

  .play-btn:hover {
    transform: none;
  }
}