/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.8);
  border-radius: 8px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 1);
}

/* Prose Styling for Formatted Article Preview */
.prose h1, .prose h2, .prose h3, .prose h4 {
  color: #f8fafc;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose h2 {
  font-size: 1.35rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  padding-bottom: 0.35rem;
}

.prose h3 {
  font-size: 1.15rem;
}

.prose p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: #cbd5e1;
}

.prose blockquote {
  border-left: 4px solid #f43f5e;
  padding-left: 1rem;
  font-style: italic;
  color: #94a3b8;
  margin: 1.25rem 0;
  background: rgba(244, 63, 94, 0.05);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-radius: 0 8px 8px 0;
}

.prose figure {
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.6);
  background: #090d16;
}

.prose figure img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background-color: #020617;
  border-radius: 0.75rem 0.75rem 0 0;
}

.prose figure figcaption {
  font-size: 0.8rem;
  color: #94a3b8;
  padding: 0.6rem 0.9rem;
  font-style: italic;
  background: rgba(15, 23, 42, 0.9);
}

.prose ul, .prose ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.35rem;
  color: #cbd5e1;
}

/* ================================================= */
/* NUMBERED LISTICLE HEADER STYLES                   */
/* ================================================= */
.numbered-header-wrapper {
  margin: 2.5rem 0 1.5rem 0;
  text-align: center;
}

.numbered-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.divider-line {
  flex: 1;
  height: 2px;
}

.divider-line.left {
  background: linear-gradient(to right, transparent, #d97706);
}

.divider-line.right {
  background: linear-gradient(to left, transparent, #d97706);
}

.numbered-badge {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #d97706, #f59e0b, #fbbf24);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(180, 83, 9, 0.35);
  border: 2px solid #ffffff;
  outline: 4px solid rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}

.numbered-header-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
}

.numbered-header-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: #d97706;
  font-style: italic;
  max-width: 42rem;
  margin: 0 auto;
}

/* ================================================= */
/* INTERACTIVE CAROUSEL / SLIDER STYLES              */
/* ================================================= */
/* Counter Badge (Paginación 1 / X - fijada arriba a la derecha sin tocar los controles) */
.interactive-carousel-block .carousel-counter {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 30 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.88) !important;
  color: #ffffff !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  letter-spacing: 0.05em !important;
  padding: 5px 12px !important;
  border-radius: 9999px !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  pointer-events: none !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

/* Controles Anterior / Siguiente (Centrados verticalmente a los lados, sin superposición) */
.interactive-carousel-block button[onclick*="stepCarousel"] {
  pointer-events: auto !important;
  position: relative !important;
  z-index: 20 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 9999px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  padding: 0 !important;
}

.interactive-carousel-block button[onclick*="stepCarousel"]:hover {
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  transform: scale(1.1) !important;
}

.interactive-carousel-block button[onclick*="stepCarousel"]:active {
  transform: scale(0.95) !important;
}

/* Título / Pie de foto de la Galería (Claramente visible, legible y estilizado) */
.article-content .interactive-carousel-block .carousel-caption-text,
.interactive-carousel-block .carousel-caption-text {
  color: #f8fafc !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  font-style: normal !important;
  line-height: 1.5 !important;
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  letter-spacing: 0.015em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.interactive-carousel-block .carousel-caption-text::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background-color: #38bdf8;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

.interactive-carousel-block div[class*="bg-slate-900"] {
  background-color: #0b1120 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 0.7rem 1.25rem !important;
}

.carousel-thumb-btn {
  width: 72px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.55;
  transition: all 0.2s ease;
  background: #090d16;
  cursor: pointer;
  padding: 0;
}

.carousel-thumb-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.carousel-thumb-btn.active {
  border-color: #f43f5e;
  opacity: 1;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
}

.carousel-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile Responsive Carousel (Elimina franjas negras en dispositivos móviles) */
@media (max-width: 768px) {
  .interactive-carousel-block .relative.bg-black,
  .interactive-carousel-block [class*="h-[460px]"] {
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
  }
  .interactive-carousel-block .carousel-main-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
}

/* Column alignment: 0 margin-top on desktop for perfect vertical parity with main content */
.sidebar-column {
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .sidebar-column,
  .lg\:mt-0 {
    margin-top: 0 !important;
  }
  .opentv-sticky-sidebar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 80px !important;
    z-index: 25 !important;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
  }
  .opentv-sticky-sidebar::-webkit-scrollbar {
    width: 4px;
  }
  .opentv-sticky-sidebar::-webkit-scrollbar-track {
    background: transparent;
  }
  .opentv-sticky-sidebar::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
  }
  .opentv-sticky-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
  }
}

