/* Ocultar scrollbar */
.entre-voces-carousel-desktop .entre-voces-scroll-cards::-webkit-scrollbar {
  display: none;
}

/* === REGLAS DE VISIBILIDAD PARA LOS CARRUSELES === */
/* PRUEBA: Ocultar mobile siempre, mostrar desktop siempre */
.entre-voces-carousel-mobile {
  display: none !important; /* Solo !important cuando necesario */
}
.entre-voces-carousel-desktop {
  display: block !important;
}
/* Ocultar el header del carousel mobile para evitar duplicación */
.entre-voces-carousel-mobile .section-header {
  display: none;
}

/* === ENTRE VOCES SECTION STYLES === */
/* ========== SECCIÓN PRINCIPAL - SIEMPRE VISIBLE ========== */
.entre-voces-section {
  width: 100%;
  margin-bottom: 2rem;
  /* FIX REAL: Permitir que el contenido crezca */
  overflow: visible;
  min-height: 520px; /* Espacio suficiente para hover */
}

/* ========== HEADER COMÚN ========== */
.entre-voces-section .section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0 15px;
}
.entre-voces-section .category-indicator {
  width: 4px;
  height: 18px;
  margin-right: 1rem;
  border-radius: 2px;
  background: var(--color-entre-voces, #8b7dc3);
}
.entre-voces-section .section-title {
  font-size: 14px;
  font-family: Barlow, sans-serif;
  font-weight: 800;
  color: #373C44;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== VERSIÓN DESKTOP ========== */
.entre-voces-carousel-desktop {
  width: 100%;
  position: relative;
  overflow: visible;
}

.entre-voces-carousel-desktop .entre-voces-scroll-cards {
  display: flex;
  padding: 0;
  scroll-behavior: smooth;
  gap: 0 !important;
  overflow-x: auto;
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.entre-voces-carousel-desktop .article-card-scroll {
  height: 450px;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  flex: 0 0 auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 345px;
  min-width: 345px;
  max-width: 345px;
  
  /* ANIMACIÓN DE ENTRADA */
  animation: fadeInCard 0.6s ease-out forwards;
  opacity: 0;
}

/* ========== ESPACIADO DINÁMICO IGUAL QUE NEWS-CAROUSEL ========== */
.entre-voces-carousel-desktop .article-card-scroll:not(:last-child) {
  margin-right: max(15px, calc((100% - (345px * 3)) / 2));
}

.entre-voces-carousel-desktop .article-card-scroll:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  z-index: 5;
}

/* ANIMACIONES DE ENTRADA ESCALONADAS */
@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.entre-voces-carousel-desktop .article-card-scroll:nth-child(1) { animation-delay: 0s; }
.entre-voces-carousel-desktop .article-card-scroll:nth-child(2) { animation-delay: 0.1s; }
.entre-voces-carousel-desktop .article-card-scroll:nth-child(3) { animation-delay: 0.2s; }
.entre-voces-carousel-desktop .article-card-scroll:nth-child(4) { animation-delay: 0.3s; }
.entre-voces-carousel-desktop .article-card-scroll:nth-child(5) { animation-delay: 0.4s; }

/* ========== AJUSTES PARA MOBILE (TEMPORAL PARA PRUEBA) ========== */
@media (max-width: 767px) {
  .entre-voces-section {
    min-height: 420px; /* Menos altura en mobile */
  }
  
  .entre-voces-section .section-header {
    padding: 0 15px;
  }
  
  .entre-voces-carousel-desktop .entre-voces-scroll-cards {
    padding: 0 15px;
  }
  
  .entre-voces-carousel-desktop .article-card-scroll {
    width: calc(100vw - 60px);
    min-width: 280px;
    max-width: 340px;
    height: 380px;
  }
  
  .entre-voces-carousel-desktop .article-card-scroll:not(:last-child) {
    margin-right: 15px;
  }
  
  .entre-voces-carousel-desktop .card-title {
    font-size: 1rem;
  }
  
  .entre-voces-carousel-desktop .card-subtitle {
    font-size: 0.75rem;
  }
  
  .entre-voces-carousel-desktop .gradient-overlay {
    padding: 1.5rem;
  }
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
/* ========== MOBILE/TABLET (768px+) ========== */
@media (min-width: 768px) and (max-width: 899px) {
  .entre-voces-section .section-header {
    padding: 0 20px;
  }
  
  .entre-voces-carousel-desktop .entre-voces-scroll-cards {
    padding: 0 20px;
  }
  
  .entre-voces-carousel-desktop .article-card-scroll:not(:last-child) {
    margin-right: max(16px, calc((100% - (345px * 3)) / 2));
  }
}

/* ========== DESKTOP (900px+) - SIN CLIPPING MASK ========== */
@media (min-width: 900px) {
  .entre-voces-section .section-header {
    max-width: 1200px;
    margin: 0 auto 1.5rem auto;
    padding: 0;
  }
  
  .entre-voces-carousel-desktop .entre-voces-scroll-cards {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: visible;
    padding: 0;
  }
  
  .entre-voces-carousel-desktop .article-card-scroll:not(:last-child) {
    margin-right: max(15px, calc((100% - (345px * 3)) / 2));
  }
}

/* ========== RESPONSIVE CARD SIZES ========== */
@media (min-width: 900px) and (max-width: 1024px) {
  .entre-voces-carousel-desktop .article-card-scroll {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    height: 400px;
  }
  
  .entre-voces-carousel-desktop .article-card-scroll:not(:last-child) {
    margin-right: max(15px, calc((100% - (300px * 3)) / 2));
  }
  
  .entre-voces-carousel-desktop .card-title {
    font-size: 1rem;
  }
  
  .entre-voces-carousel-desktop .card-subtitle {
    font-size: 0.75rem;
  }
}

/* ========== CARD CONTENT STYLING ========== */
.entre-voces-carousel-desktop .card-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.entre-voces-carousel-desktop .card-link:focus {
  outline: 2px solid var(--color-entre-voces-opinion, #191624);
  outline-offset: 4px;
  border-radius: 15px;
}

.entre-voces-carousel-desktop .card-image-scroll {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.entre-voces-carousel-desktop .gradient-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(
    to top, 
    rgba(0, 0, 0, 0.95) 0%, 
    rgba(0, 0, 0, 0.8) 25%, 
    rgba(0, 0, 0, 0.5) 50%, 
    rgba(0, 0, 0, 0.2) 75%, 
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  color: white;
  width: 100%;
  transition: background 0.3s ease-in-out;
}

.entre-voces-carousel-desktop .card-info {
  color: white;
  width: 100%;
}

.entre-voces-carousel-desktop .card-date {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
  display: block;
}

.entre-voces-carousel-desktop .card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: white;
  margin: 0 0 0.5rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
}

.entre-voces-carousel-desktop .card-subtitle {
  font-size: 0.8rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
}

.entre-voces-carousel-desktop .card-author {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  margin-bottom: 0;
  margin-top: 0.2rem;
}

/* ========== CONTROLES PLAY-LIKE, etc ========== */
.entre-voces-carousel-desktop .article-duration {
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 14px;
  color: white;
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.entre-voces-carousel-desktop .article-controls {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 15px;
  z-index: 2;
}

.entre-voces-carousel-desktop .article-controls .control-button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.entre-voces-carousel-desktop .article-controls .control-button:hover {
  transform: scale(1.1);
}

.entre-voces-carousel-desktop .article-controls .control-button.like.active svg {
  fill: #ff4757;
  stroke: #ff4757;
}

.entre-voces-carousel-desktop .article-controls .control-button.playlist.active svg {
  fill: #3742fa;
  stroke: #3742fa;
}

/* Responsive */
@media (max-width: 767px) {
  .entre-voces-carousel-desktop .article-duration {
    top: 10px;
    left: 10px;
    font-size: 12px;
  }
  
  .entre-voces-carousel-desktop .article-controls {
    top: 10px;
    right: 10px;
    gap: 10px;
  }
  
  .entre-voces-carousel-desktop .article-controls .control-button {
    width: 20px;
    height: 20px;
  }
}

/* ========== BOTONES DE NAVEGACIÓN < > (CLASE ESPECÍFICA) ========== */
.entre-voces-carousel-desktop .entre-voces-carousel-controls {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  width: 100%;
  z-index: 50;
  pointer-events: none;
  padding: 0 15px;
}

.entre-voces-carousel-desktop .entre-voces-carousel-controls .carousel-control {
  background: rgba(0, 0, 0, 0.7);
  border: none;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transform: translateY(-50%);
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.entre-voces-carousel-desktop .entre-voces-carousel-controls .carousel-control:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.05);
}

.entre-voces-carousel-desktop .entre-voces-carousel-controls .carousel-control svg {
  width: 18px;
  height: 18px;
}

.entre-voces-carousel-desktop .entre-voces-carousel-controls .carousel-control.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Responsive */
@media (min-width: 768px) {
  .entre-voces-carousel-desktop .entre-voces-carousel-controls {
    padding: 0 20px;
  }
  
  .entre-voces-carousel-desktop .entre-voces-carousel-controls .carousel-control {
    width: 40px;
    height: 40px;
  }
  
  .entre-voces-carousel-desktop .entre-voces-carousel-controls .carousel-control svg {
    width: 20px;
    height: 20px;
  }
}

@media (min-width: 1024px) {
  .entre-voces-carousel-desktop .entre-voces-carousel-controls {
    padding: 0;
  }
  
  .entre-voces-carousel-desktop .entre-voces-carousel-controls .carousel-control {
    position: absolute;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.8);
  }
  
  .entre-voces-carousel-desktop .entre-voces-carousel-controls .carousel-control.prev {
    left: 15px;
  }
  
  .entre-voces-carousel-desktop .entre-voces-carousel-controls .carousel-control.next {
    right: 15px;
  }
  
  .entre-voces-carousel-desktop .entre-voces-carousel-controls .carousel-control svg {
    width: 22px;
    height: 22px;
  }
}