/* ========== NEWS CAROUSEL BASE ========== */
.news-carousel {
  margin-bottom: 30px;
  position: relative;
  padding: 0 !important;
}

/* ========== SECTION HEADER - TÍTULOS CLICKEABLES ========== */
.news-carousel[data-category] .section-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding: 0 0;
}

/* OCULTAR el category-indicator original para evitar duplicación */
.news-carousel[data-category] .category-indicator {
  display: none;
}

.news-carousel[data-category] .section-title-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.04) 100%);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 8px 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 0;
  min-height: 44px;
  position: relative;
  overflow: hidden;
}

/* Barra de color integrada en el botón */
.news-carousel[data-category] .section-title-link::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 10px;
}

/* Microinteracciones para desktop */
@media (min-width: 1024px) {
  .news-carousel[data-category] .section-title-link:hover {
    background: linear-gradient(135deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.08) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  
  .news-carousel[data-category] .section-title-link:hover::before {
    height: 24px;
    width: 5px;
  }
  
  .news-carousel[data-category] .section-title-link:active {
    transform: translateY(0);
    transition: all 0.1s ease;
  }
}

.news-carousel[data-category] .section-title {
  font-family: var(--font-categorias);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  margin-left: 14px; /* Espacio para la barra de color */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== COLORES POR CATEGORÍA (solo para el botón) ========== */
.news-carousel[data-category="ultimo-minuto"] .section-title-link::before {
  background-color: var(--color-gen);
}

.news-carousel[data-category="para-ti"] .section-title-link::before {
  background-color: var(--color-para-ti);
}

.news-carousel[data-category="entre-voces-opinion"] .section-title-link::before {
  background-color: var(--color-entre-voces-opinion);
}

.news-carousel[data-category="agenda-publica"] .section-title-link::before {
  background-color: var(--color-agenda-publica);
}

.news-carousel[data-category="comunidades"] .section-title-link::before {
  background-color: var(--color-comunidades);
}

.news-carousel[data-category="enfoque"] .section-title-link::before {
  background-color: var(--color-enfoque);
}

.news-carousel[data-category="tendencias"] .section-title-link::before {
  background-color: var(--color-tendencias);
}

.news-carousel[data-category="global"] .section-title-link::before {
  background-color: var(--color-global);
}

.news-carousel[data-category="deportes"] .section-title-link::before {
  background-color: var(--color-deportes);
}

.news-carousel[data-category="tu-voz"] .section-title-link::before {
  background-color: var(--color-tu-voz);
}

/* ========== CAROUSEL CONTAINER ========== */
.news-carousel .carousel-container {
  position: relative;
  overflow: visible;
  width: 100%;
  padding: 0 15px;
}

.news-carousel .carousel-track {
  display: flex;
  transition: transform 0.3s ease;
  padding: 0 0;
}

/* ========== ARTICLE CARDS ========== */
.news-carousel .article-card {
  height: 225px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  flex: 0 0 auto;
  width: 345px;
  min-width: 345px;
  max-width: 345px;
  margin-right: 15px;
}

.news-carousel .article-card:last-child {
  margin-right: 0;
}

.news-carousel .article-card .article-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: var(--color-white);
  position: relative;
}

.news-carousel .article-card .article-image-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.news-carousel .article-card .article-image-container .article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.news-carousel .article-card .article-image-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0.1) 100%);
  border-radius: 10px;
}

.news-carousel .article-card .article-duration {
  position: absolute;
  top: 15px;
  left: 15px;
  font-family: var(--font-base);
  font-size: 14px;
  color: var(--color-white);
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
}

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

.news-carousel .article-card .article-controls .control-button {
  background: none;
  border: none;
  color: var(--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;
}

.news-carousel .article-card .article-controls .control-button:hover {
  transform: scale(1.1);
}

.news-carousel .article-card .article-controls .control-button:focus {
  outline: none;
}

.news-carousel .article-card .article-controls .control-button svg {
  width: 100%;
  height: 100%;
  transition: fill 0.2s ease;
}

.news-carousel .article-card .article-controls .control-button.like.active svg {
  fill: var(--color-tu-voz);
}

.news-carousel .article-card .article-controls .control-button.playlist.active svg {
  fill: var(--color-deportes);
}

.news-carousel .article-card .article-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  z-index: 2;
}

.news-carousel .article-card .article-content .article-title {
  font-family: var(--font-base);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.2;
  margin: 0 0 8px 0;
  color: var(--color-white);
  letter-spacing: 0.5%;
}

.news-carousel .article-card .article-content .article-subtitle {
  font-family: var(--font-destacados);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
  color: var(--color-white);
  opacity: 0.9;
}

/* ========== CAROUSEL CONTROLS ========== */
.news-carousel .carousel-controls {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  width: 100%;
  z-index: 50;
  pointer-events: none;
  padding: 0 15px;
}

.news-carousel .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);
}

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

.news-carousel .carousel-controls .carousel-control svg {
  width: 18px;
  height: 18px;
}

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

/* Mobile específico */
@media (max-width: 480px) {
  .news-carousel .article-card {
    width: calc(100vw - 40px);
    min-width: 270px;
    max-width: 345px;
    height: auto;
    aspect-ratio: 1.53;
  }
  
  .news-carousel .article-card .article-duration {
    top: 10px;
    left: 10px;
    font-size: 12px;
  }
  
  .news-carousel .article-card .article-controls {
    top: 10px;
    right: 10px;
    gap: 10px;
  }
  
  .news-carousel .article-card .article-controls .control-button {
    width: 20px;
    height: 20px;
  }
  
  .news-carousel .article-card .article-content {
    padding: 12px;
  }
  
  .news-carousel .article-card .article-content .article-title {
    font-size: 18px;
    margin-bottom: 5px;
  }
  
  .news-carousel .article-card .article-content .article-subtitle {
    font-size: 14px;
  }
}

/* Tablet */
@media (min-width: 768px) {
  .news-carousel .article-card {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    height: 195px;
  }
  
  .news-carousel .carousel-container {
    padding: 0 20px;
  }
  
  .news-carousel .carousel-controls {
    padding: 0 20px;
  }
  
  .news-carousel .carousel-controls .carousel-control {
    width: 40px;
    height: 40px;
  }
  
  .news-carousel .carousel-controls .carousel-control svg {
    width: 20px;
    height: 20px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .news-carousel .article-card {
    width: 345px;
    min-width: 345px;
    max-width: 345px;
    height: 225px;
  }
  
  .news-carousel .carousel-container {
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .news-carousel .carousel-controls {
    padding: 0;
    width: 100%;
    left: 0;
    right: 0;
  }
  
  .news-carousel .carousel-controls .carousel-control {
    position: absolute;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  
  .news-carousel .carousel-controls .carousel-control.prev {
    left: 15px;
  }
  
  .news-carousel .carousel-controls .carousel-control.next {
    right: 15px;
  }
  
  .news-carousel .carousel-controls .carousel-control:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: translateY(-50%) scale(1.08);
  }
  
  .news-carousel .carousel-controls .carousel-control svg {
    width: 22px;
    height: 22px;
  }
}

/* Large Desktop */
@media (min-width: 1200px) {
  .news-carousel .carousel-container {
    max-width: 1200px;
    overflow: hidden;
  }
  
  .news-carousel .carousel-track {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    gap: 0;
  }
  
  .news-carousel .article-card {
    width: 345px;
    min-width: 345px;
    max-width: 345px;
    flex: 0 0 auto;
  }
  
  .news-carousel .article-card:not(:last-child) {
    margin-right: calc((100% - (345px * 3)) / 2);
    margin-right: max(15px, calc((100% - (345px * 3)) / 2));
  }
  
  .news-carousel .carousel-controls .carousel-control {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
  }
  
  .news-carousel .carousel-controls .carousel-control.prev {
    left: 20px;
  }
  
  .news-carousel .carousel-controls .carousel-control.next {
    right: 20px;
  }
  
  .news-carousel .carousel-controls .carousel-control:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
  }
  
  .news-carousel .carousel-controls .carousel-control svg {
    width: 24px;
    height: 24px;
  }
}

/* Extra Large */
@media (min-width: 1400px) {
  .news-carousel .carousel-controls .carousel-control.prev {
    left: 30px;
  }
  
  .news-carousel .carousel-controls .carousel-control.next {
    right: 30px;
  }
}

/* Estados especiales */
.news-carousel .carousel-controls .carousel-control.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.news-carousel .carousel-controls .carousel-control:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.news-carousel .carousel-controls .carousel-control:active {
  transform: translateY(-50%) scale(0.95);
}