/* --- Global Resets and Layout --- */
body {
  background-color: #f4f7f9; /* Fondo suave para destacar los contenedores */
}

.container {
  max-width: 1200px; /* Ancho máximo para el contenido principal */
}

.card {
  border: none; /* Eliminar bordes de tarjeta */
  border-radius: 12px; /* Redondear más las esquinas */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Sombra suave para elevación */
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 0;
  margin-bottom: 1.5rem;
  background: none;
}

.breadcrumb-item a {
  color: #6c757d;
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  color: #007bff;
}

/* --- Encabezado del Contenido (.content-header-box) --- */
.content-header-box {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-top: 25px;
}

.content-header-box h1.display-5 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.lead.text-muted {
  font-size: 1.25rem;
  color: #5a6470 !important;
  margin-bottom: 1.5rem;
}

/* --- Meta y Acciones --- */
.meta-tags .badge {
  font-size: 0.85rem;
  padding: 0.5em 0.8em;
  font-weight: 500;
  border-radius: 4px;
}

.tags-list a.badge-tag {
  font-size: 0.8rem;
  padding: 0.4em 0.7em;
  border-radius: 15px;
  background-color: #e9ecef;
  color: #495057;
  text-decoration: none;
  transition: background-color 0.2s;
}

.tags-list a.badge-tag:hover {
  background-color: #dee2e6;
  color: #212529;
}

.actions-group .btn {
  border-radius: 25px; /* Botones más redondeados */
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

.fav-btn.btn-danger {
  background: #dc3545;
  border-color: #dc3545;
  color: white;
}

/* --- Video --- */
.video-wrapper {
  margin-bottom: 2rem;
  background: black; /* Fondo para si hay un breve flash */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* --- Contenido HTML (Descripción) --- */
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px 12px 0 0 !important;
}

.card-header h3.h5 {
  font-weight: 600;
}

.card-header.bg-gradient-primary {
  /* Estilo personalizado para un gradiente sutil */
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.card-header.bg-gradient-success {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
}

.content-html {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #343a40;
}

.content-html h1, .content-html h2, .content-html h3 {
  color: #2c3e50;
  margin: 2rem 0 1rem;
  font-weight: 600;
}

.content-html p {
  margin-bottom: 1.5rem;
}

.content-html ul, .content-html ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

/* --- Recursos (Tarjetas de descarga) --- */
.resource-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px dashed #ced4da;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
}

.resource-card:hover {
  border-style: solid;
  border-color: #007bff;
  background-color: white;
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.1);
}

.resource-icon {
  font-size: 2rem;
  color: #007bff; /* Color unificado para íconos */
  flex-shrink: 0;
}

.resource-info {
  flex-grow: 1;
  line-height: 1.2;
}

.resource-label {
  font-weight: 600;
  font-size: 1.1rem;
  color: #2c3e50;
}

.resource-arrow {
  font-size: 1.2rem;
  color: #6c757d;
  flex-shrink: 0;
}

/* --- Sidebar: Info Rápida --- */
.sticky-sidebar {
  top: 1.5rem; /* Para que se pegue un poco más abajo del top */
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px dashed #e9ecef;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list li i {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.info-list li strong {
  font-weight: 600;
  color: #2c3e50;
}

/* --- Sidebar: Relacionados --- */
.related-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid #f8f9fa;
  transition: background-color 0.2s ease;
}

.related-item:hover {
  background-color: #f2f5f7;
}

.related-item img {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.related-title {
  font-size: 1rem;
  color: #2c3e50;
  line-height: 1.4;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limita a 2 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Modal Compartir --- */
.modal-header .modal-title {
  font-weight: 600;
  color: #2c3e50;
}

/* --- Media Queries (Responsiveness) --- */
@media (max-width: 991px) {
  /* Para tablets y menos */
  .sticky-sidebar {
    position: static !important; /* Desactiva sticky en móvil */
  }
}

@media (max-width: 767px) {
  /* Para móviles */
  .content-header-box {
    padding: 1.5rem;
  }
  
  .content-header-box h1.display-5 {
    font-size: 2rem;
  }
  
  .lead.text-muted {
    font-size: 1.1rem;
  }
  
  .d-flex.flex-wrap.align-items-center.justify-content-between.gap-3 {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
  
  .actions-group {
    width: 100%;
    justify-content: space-around;
  }
  
  .actions-group .btn {
    flex: 1;
    text-align: center;
  }
}

/* --- Clases de código heredado/sobrante para limpieza --- */
/* Elimino clases que ya no se usan o están mejoradas */
.content-title, .content-subtitle, .content-meta, .meta-items, .meta-item, 
.content-actions .btn, .fav-btn.active, .video-container, .resource-item, 
.resource-item .btn, .resource-item .btn:hover, .resource-content, 
.resource-title, .related-subtitle, .related-thumb, .card-header, 
.social-share .btn, .contenido-detalle .resource-item, 
.contenido-detalle .fav-btn {
  /* Limpiar o redefinir si es necesario, pero la mayoría ya fueron reemplazadas */
}

button.btn.btn-sm.btn-danger.fav-btn {
    margin: 0;
}

button.btn.btn-sm.fav-btn.btn-outline-danger {
    margin: 0;
}

button.btn.btn-sm.fav-btn.btn-outline-danger:hover {
    color: #fff;
}

.contenido-detalle-v2 .col-lg-4 {
    margin-top: 50px;
}

.rating-block .star {
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: inline-block;
  margin-right: .15rem;
}
.rating-block .star.inactive { opacity: .35; }
.rating-block .star.active   { opacity: 1; }
.rating-block .star:hover    { transform: scale(1.05); }
.rating-block .star[aria-checked="true"] { text-shadow: 0 0 .25rem rgba(0,0,0,.15); }


/*NUEVAS VALORACIONES*/

/* Agregar estos estilos al archivo CSS de lista_contenidos.php o en un <style> tag */

/* Valoraciones en las cards */
.content-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

.content-rating .stars {
  display: flex;
  gap: 0.125rem;
}

.content-rating .stars i {
  color: #ffc107;
  font-size: 0.875rem;
}

.content-rating .stars i.far {
  color: #dee2e6;
}

.content-rating .rating-text {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
}

/* Ajuste en content-meta para incluir rating */
.content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.875rem;
}

.content-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
  .content-rating {
    width: 100%;
    margin-top: 0.5rem;
  }
  
  .content-rating .stars i {
    font-size: 0.75rem;
  }
  
  .content-rating .rating-text {
    font-size: 0.75rem;
  }
}

#reportModal .modal-dialog {
    margin-top: 105px;
}