/* ========== LATEST NEWS - CONTENEDOR PRINCIPAL ========== */
.latest-news-section {
  margin-bottom: 30px;
  position: relative;
}
/* ========== HEADER ========== */
.latest-news-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 0;
}
.latest-news-header .category-indicator {
  width: 4px;
  height: 20px;
  margin-right: 10px;
  border-radius: 2px;
}
.latest-news-header .category-indicator[data-category="ultimo-minuto"] {
  background-color: var(--color-gen);
}
.latest-news-header .section-title {
  font-family: var(--font-categorias);
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* ========== RESPONSIVE CONTAINERS ========== */
.latest-news-desktop {
  display: block;
}
.latest-news-mobile {
  display: none;
}
.latest-news-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: start;
}
/* ========== LAST NEWS CARD (PRINCIPAL) ========== */
.last-news-card {
  position: relative;
  overflow: visible;
}
.last-news-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
/* Contenedor de imagen */
.last-news-img-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: 540px;
}
.last-news-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  object-position: center;
}
/* Gradient overlay */
.last-news-gradient-overlay {
  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: 12px;
  z-index: 1;
  transition: background 0.3s ease-in-out;
}
.last-news-card:hover .last-news-gradient-overlay {
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.8) 30%,
    rgba(0, 0, 0, 0.5) 60%,
    rgba(0, 0, 0, 0.3) 80%,
    rgba(0, 0, 0, 0.15) 100%
  );
}
/* Duración */
.last-news-duration {
  position: absolute;
  top: 24px;
  left: 24px;
  font-family: var(--font-base);
  font-size: 14px;
  color: white;
  z-index: 3;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
}
/* Controles */
.last-news-controls {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  gap: 16px;
  z-index: 3;
}
.last-news-controls .control-button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}
.last-news-controls .control-button:hover {
  transform: scale(1.1);
}
.last-news-controls .control-button svg {
  width: 20px;
  height: 20px;
  transition: fill 0.2s ease;
}
.last-news-controls .control-button.like.active svg {
  fill: var(--current-category-color, #ff0000);
}
.last-news-controls .control-button.play.active svg {
  fill: var(--current-category-color, #00ff00);
}
/* Overlay de contenido */
.last-news-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 32px;
  border-radius: 12px;
  max-width: 100%;
  max-height: 300px;
}
.last-news-category-name {
  font-size: 12px;
  text-align: start;
  margin: 0 0 12px 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--current-category-color, #fafafa);
}
.last-news-title {
  margin: 0 0 16px 0;
  font-weight: 800;
  font-size: 24px;
  line-height: 1.2;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.last-news-date {
  font-size: 14px;
  color: #fff !important;
  margin: 0 !important;
  padding: 0;
}
/* ========== SIDEBAR ========== */
.latest-news-sidebar {
  background-color: #050739;
  padding: 16px;
  border-radius: 8px;
  color: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 540px;
  min-height: 540px;
  max-height: 540px;
}
.latest-news-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.latest-news-list::-webkit-scrollbar {
  width: 6px;
}
.latest-news-list::-webkit-scrollbar-track {
  background: transparent;
}
.latest-news-list::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}
.latest-news-list::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.5);
}
/* Items del sidebar */
.latest-news-item {
  flex-shrink: 0;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.latest-news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.latest-news-item-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.latest-news-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.latest-news-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.latest-news-label {
  color: var(--current-category-color, #fafafa);
  font-size: 10px;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}
/* Título de artículo en sidebar - con limitación de líneas */
.latest-news-item-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: white;
  /* Limitación de líneas - máximo 2 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.latest-news-time {
  font-size: 11px;
  color: #aaa;
  margin-top: auto;
}
/* Estado vacío */
.latest-news-empty,
.last-news-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #666;
  font-style: italic;
}
/* ========== RESPONSIVE BREAKPOINTS ========== */
/* Tablet/Desktop pequeño */
@media (max-width: 1200px) {
  .latest-news-container {
    grid-template-columns: 1fr 350px;
    gap: 24px;
  }
}
/* Punto de quiebre principal - 900px */
@media (max-width: 900px) {
  .latest-news-desktop {
    display: none;
  }
  
  .latest-news-mobile {
    display: block;
  }
  
  .latest-news-mobile .news-carousel .section-header {
    display: none; /* Ocultar header duplicado */
  }
}
/* Mobile */
@media (max-width: 767px) {
  .latest-news-header {
    margin-bottom: 15px;
    padding-left: 16px;
  }
  
  .latest-news-header .section-title {
    font-size: 13px;
  }
}
/* Animaciones */
.last-news-card {
  transition: transform 0.3s ease;
}
.last-news-card:hover {
  transform: translateY(-2px);
}
.last-news-image {
  transition: transform 0.5s ease;
}
.last-news-card:hover .last-news-image {
  transform: scale(1.02);
}
.latest-news-item-link:hover .latest-news-item-title {
  color: var(--color-link-hover, #fafafa);
}
/* ========== CONTROLES SIDEBAR ========== */
.latest-news-item-wrapper {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.latest-news-item-wrapper .latest-news-item-link {
  flex-shrink: 0;
}
.latest-news-item-wrapper .latest-news-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  transition: filter 0.3s ease;
}
.latest-news-controls {
  position: absolute;
  top: 2px;
  right: 2px;
  display: flex;
  gap: 4px;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.latest-news-item-wrapper:hover .latest-news-controls {
  opacity: 1;
}
.latest-news-item-wrapper:hover .latest-news-thumb {
  filter: brightness(0.8);
}
/* Botones de control del sidebar - más pequeños */
.sidebar-control {
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}
.sidebar-control:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.9);
}
.sidebar-control svg {
  width: 12px;
  height: 12px;
  transition: fill 0.2s ease;
}
/* Estados activos para botones del sidebar */
.sidebar-control.active svg,
.sidebar-control svg {
  transition: fill 0.2s ease, stroke 0.2s ease;
}
/* Corazón activo (favorito) */
.latest-news-controls .control-button[data-article-controls-target="heart"].active svg,
.latest-news-controls .control-button[data-article-controls-target="heart"] svg[style*="fill: rgb(228, 36, 47)"] {
  fill: #e4242f !important;
  stroke: #e4242f !important;
}
/* Botón de play - cuando está reproduciéndose, cambiar a pausa */
.latest-news-controls .control-button[data-article-controls-target="playButton"] svg {
  fill: white;
}
/* Hover effects mejorados para que funcionen con Stimulus */
.sidebar-control:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.9);
}
/* Ajuste para el icono de play que ahora tiene un div wrapper */
.sidebar-control[data-article-controls-target="playButton"] div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
}
.sidebar-control[data-article-controls-target="playButton"] svg {
  width: 12px;
  height: 12px;
}
/* ========== BOTONES INLINE EN EL HEADER ========== */
/* Contenedor del header con categoría y botones */
.latest-news-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  width: 100%;
}
/* Controles inline (en la misma línea que la categoría) */
.latest-news-controls-inline {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
/* Botones de control inline - más pequeños y discretos */
.sidebar-control-inline {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  opacity: 0.7;
}
.sidebar-control-inline:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
  opacity: 1;
}
.sidebar-control-inline svg {
  width: 10px;
  height: 10px;
  transition: fill 0.2s ease, stroke 0.2s ease;
}
/* Estados activos para botones inline */
.sidebar-control-inline[data-article-controls-target="heart"].active svg,
.sidebar-control-inline[data-article-controls-target="heart"] svg[style*="fill: rgb(228, 36, 47)"] {
  fill: #e4242f !important;
  stroke: #e4242f !important;
}
/* Asegurar que el play button funcione correctamente */
.sidebar-control-inline[data-article-controls-target="playButton"] div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
}
.sidebar-control-inline[data-article-controls-target="playButton"] svg {
  width: 10px;
  height: 10px;
  fill: white;
}
/* Ajustes al layout cuando hay imagen */
.latest-news-item-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.latest-news-sidebar .latest-news-thumb {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px;
  max-width: 56px;
  min-height: 56px;
  max-height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  display: block;
}
/* Cuando hay imagen, mantener el layout original */
.latest-news-item-link .latest-news-thumb {
  width: 56px !important;
  height: 56px !important;
}
/* Cuando no hay imagen, ocupar todo el ancho */
.latest-news-item-link:not(:has(.latest-news-thumb)) .latest-news-info {
  width: 100%;
}
/* Efecto hover para toda la fila */
.latest-news-item:hover .sidebar-control-inline {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}
/* Prevenir que los botones activen el link del artículo */
.latest-news-controls-inline button {
  position: relative;
  z-index: 10;
}