/* assets/css/mural-detail.css - Estilos para la página de detalle del mural */

/* Breadcrumb */
.mural-breadcrumb {
  margin-bottom: 2rem;
}

.mural-breadcrumb .breadcrumb {
  background: rgba(0, 255, 221, 0.1);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.mural-breadcrumb .breadcrumb-item a {
  color: var(--accent-cyan-dark);
  text-decoration: none;
  transition: var(--transition);
}

.mural-breadcrumb .breadcrumb-item a:hover {
  color: var(--accent-cyan);
}

.mural-breadcrumb .breadcrumb-item.active {
  color: var(--primary-black);
}

/* Mural Header */
.mural-header {
  margin-bottom: 3rem;
}

.mural-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-black);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.mural-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--medium-gray);
  font-size: 0.9rem;
}

.meta-item i {
  color: var(--accent-cyan);
  width: 16px;
  text-align: center;
}

.mural-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mural-actions .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  transition: var(--transition);
}

.mural-actions .btn-primary {
  background: var(--gradient-accent);
  color: var(--primary-black);
  border: none;
}

.mural-actions .btn-primary:hover {
  background: var(--accent-cyan-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-cyan);
}

/* Mural Content */
.mural-content {
  padding: 2rem 0;
}

/* Gallery */
.mural-gallery {
  background: var(--white);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border: 1px solid var(--border-gray);
}

.main-image {
  position: relative;
  margin-bottom: 1rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--light-gray);
}

.main-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  cursor: pointer;
  transition: var(--transition);
}

.main-image img:hover {
  transform: scale(1.02);
}

.thumbnail-gallery {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.thumbnail.active {
  border-color: var(--accent-cyan);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail:hover {
  border-color: var(--accent-cyan-light);
  transform: scale(1.05);
}

.no-photos {
  text-align: center;
  padding: 3rem;
  color: var(--medium-gray);
}

.no-photos i {
  margin-bottom: 1rem;
}

/* Description */
.mural-description {
  background: var(--white);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border-left: 4px solid var(--accent-cyan);
}

.mural-description h3 {
  color: var(--primary-black);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.mural-description p {
  color: var(--medium-gray);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Routes */
.mural-routes {
  background: var(--white);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.mural-routes h3 {
  color: var(--primary-black);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.routes-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.route-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border-gray);
  border-radius: 8px;
  background: var(--light-gray);
  transition: var(--transition);
}

.route-card:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 255, 221, 0.05);
}

.route-info h5 {
  margin-bottom: 0.5rem;
  color: var(--primary-black);
}

.route-info p {
  margin-bottom: 0.5rem;
  color: var(--medium-gray);
  font-size: 0.9rem;
}

.route-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--medium-gray);
}

.route-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.route-meta i {
  color: var(--accent-cyan);
}

/* Comments */
.mural-comments {
  background: var(--white);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.mural-comments h3 {
  color: var(--primary-black);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.comment-form {
  padding: 1.5rem;
  background: var(--light-gray);
  border-radius: 12px;
  margin-bottom: 2rem;
}

.rating-input {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.star-rating {
  display: flex;
  flex-direction: row-reverse;
  gap: 0.25rem;
}

.star-rating input {
  display: none;
}

.star-rating label {
  cursor: pointer;
  color: var(--border-gray);
  font-size: 1.2rem;
  transition: var(--transition);
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: var(--accent-cyan);
}

.login-prompt {
  text-align: center;
  padding: 2rem;
  background: var(--light-gray);
  border-radius: 12px;
  margin-bottom: 2rem;
}

.login-prompt a {
  color: var(--accent-cyan-dark);
  text-decoration: none;
  font-weight: 600;
}

.login-prompt a:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.no-comments {
  text-align: center;
  padding: 2rem;
  color: var(--medium-gray);
}

.comment {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-gray);
}

.comment:last-child {
  border-bottom: none;
}

.comment-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-black);
  font-weight: 600;
  flex-shrink: 0;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.comment-header strong {
  color: var(--primary-black);
}

.comment-time {
  color: var(--medium-gray);
  font-size: 0.8rem;
}

.comment-rating {
  display: flex;
  gap: 0.1rem;
}

.comment-rating .fas.fa-star.rated {
  color: var(--accent-cyan);
}

.comment-rating .fas.fa-star {
  color: var(--border-gray);
  font-size: 0.8rem;
}

.comment-content p {
  color: var(--primary-black);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Sidebar Cards */
.creator-card,
.mural-info-card,
.related-murals {
  background: var(--white);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent-cyan);
}

.creator-card h4,
.mural-info-card h4,
.related-murals h4 {
  color: var(--primary-black);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.creator-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.creator-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-black);
  font-weight: 600;
  flex-shrink: 0;
}

.creator-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.creator-details h5 {
  margin-bottom: 0.25rem;
  color: var(--primary-black);
}

.creator-details p {
  margin-bottom: 0.25rem;
  color: var(--accent-cyan-dark);
}

.creator-details small {
  color: var(--medium-gray);
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-gray);
}

.info-item:last-child {
  border-bottom: none;
}

.info-item label {
  font-weight: 600;
  color: var(--primary-black);
  margin-bottom: 0;
}

.info-item span {
  color: var(--medium-gray);
}

/* Lightbox */
/* CSS para lightbox con navegación fija */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px; /* Espacio para los controles */
}

.lightbox-content {
  position: relative;
  max-width: calc(100% - 120px); /* Espacio para botones laterales */
  max-height: calc(
    100% - 120px
  ); /* Espacio para controles superiores/inferiores */
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 10;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  font-size: 30px;
  width: 60px;
  height: 60px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 5px;
  max-width: 80%;
  backdrop-filter: blur(10px);
}

.lightbox-counter {
  position: fixed;
  top: 20px;
  left: 20px;
  color: white;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 15px;
  border-radius: 5px;
  backdrop-filter: blur(10px);
}

/* Agregar estos estilos al final de mural-detail.css */

/* Rating promedio */
.average-rating-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
  font-size: 0.9rem;
}

.stars-display {
  display: flex;
  gap: 0.1rem;
}

.stars-display .fas.fa-star.rated {
  color: #ffc107;
}

.stars-display .fas.fa-star {
  color: var(--border-gray);
  font-size: 0.9rem;
}

/* Formulario de comentarios mejorado */
.comment-form {
  padding: 1.5rem;
  background: var(--light-gray);
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid var(--border-gray);
}

.rating-input {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rating-input .form-label {
  font-weight: 600;
  color: var(--primary-black);
  margin-bottom: 0;
}

.star-rating {
  display: flex;
  flex-direction: row-reverse;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.star-rating input {
  display: none;
}

.star-rating label {
  cursor: pointer;
  color: var(--border-gray);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  padding: 0.25rem;
  border-radius: 4px;
}

.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #ffc107;
  transform: scale(1.1);
}

.star-rating input:checked ~ label {
  color: #ffc107;
}

/* Animación para estrellas seleccionadas */
.star-rating input:checked ~ label {
  animation: starGlow 0.3s ease;
}

@keyframes starGlow {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Lista de comentarios mejorada */
.comment {
  display: flex;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-gray);
  position: relative;
}

.comment:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.comment-header strong {
  color: var(--primary-black);
  font-size: 0.95rem;
}

.comment-time {
  color: var(--medium-gray);
  font-size: 0.8rem;
}

.comment-rating {
  display: flex;
  gap: 0.1rem;
  align-items: center;
}

.comment-rating .fas.fa-star.rated {
  color: #ffc107;
}

.comment-rating .fas.fa-star {
  color: var(--border-gray);
  font-size: 0.8rem;
}

/* Avatar de comentario */
.comment-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-black);
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-black);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Contenido del comentario */
.comment-content {
  flex: 1;
}

.comment-content p {
  color: var(--primary-black);
  line-height: 1.6;
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Estados de carga */
.comment-form.loading {
  opacity: 0.7;
  pointer-events: none;
}

.comment-form.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-cyan);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Animación para comentarios nuevos */
.comment.new-comment {
  animation: slideInUp 0.5s ease;
  background: rgba(0, 255, 221, 0.05);
  border-radius: 8px;
  margin: 0 -1rem;
  padding: 1.5rem 1rem;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .comment {
    gap: 0.75rem;
    padding: 1rem 0;
  }

  .comment-avatar {
    width: 40px;
    height: 40px;
  }

  .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .rating-input {
    width: 100%;
  }

  .star-rating label {
    font-size: 1.3rem;
  }

  .comment-form {
    padding: 1rem;
  }

  .comment-form .d-flex {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .lightbox.active {
    padding: 80px 20px 60px 20px; /* Más espacio en móvil */
  }

  .lightbox-content {
    max-width: calc(100% - 40px);
    max-height: calc(100% - 140px);
  }

  .lightbox-nav {
    font-size: 24px;
    width: 50px;
    height: 50px;
  }

  .lightbox-prev {
    left: 15px;
  }

  .lightbox-next {
    right: 15px;
  }

  .lightbox-close {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .lightbox-counter {
    top: 15px;
    left: 15px;
    font-size: 14px;
    padding: 6px 12px;
  }

  .lightbox-caption {
    bottom: 15px;
    font-size: 14px;
    padding: 8px 15px;
    max-width: 90%;
  }
}

/* Para imágenes muy anchas */
@media (orientation: landscape) {
  .lightbox img {
    max-height: 85vh;
    max-width: 85vw;
  }
}

/* Para imágenes muy altas */
@media (orientation: portrait) {
  .lightbox img {
    max-height: 80vh;
    max-width: 90vw;
  }
}
/* Responsive Design */
@media (max-width: 991px) {
  .mural-title {
    font-size: 2rem;
  }

  .mural-actions {
    justify-content: flex-start;
  }

  .creator-card,
  .mural-info-card,
  .related-murals {
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .mural-title {
    font-size: 1.75rem;
  }

  .mural-meta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .mural-actions {
    flex-direction: column;
  }

  .mural-actions .btn {
    width: 100%;
    text-align: center;
  }

  .main-image img {
    height: 250px;
  }

  .thumbnail-gallery {
    gap: 0.5rem;
  }

  .thumbnail {
    width: 60px;
    height: 45px;
  }

  .route-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .route-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .comment {
    gap: 0.75rem;
  }

  .comment-avatar {
    width: 40px;
    height: 40px;
  }

  .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .creator-info {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .mural-content {
    padding: 1rem 0;
  }

  .mural-gallery,
  .mural-description,
  .mural-routes,
  .mural-comments,
  .creator-card,
  .mural-info-card,
  .related-murals {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .mural-title {
    font-size: 1.5rem;
  }

  .main-image img {
    height: 200px;
  }

  .comment-form {
    padding: 1rem;
  }

  .rating-input {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .lightbox-close {
    top: 20px;
    right: 20px;
  }

  .lightbox-caption {
    bottom: 20px;
    left: 20px;
    right: 20px;
  }
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mural-gallery,
.mural-description,
.mural-routes,
.mural-comments {
  animation: fadeInUp 0.6s ease-out;
}

.thumbnail {
  animation: fadeInUp 0.4s ease-out;
}

.comment {
  animation: fadeInUp 0.5s ease-out;
}
