/* --- VARIABLES GLOBALES --- */
:root {
  /* Paleta Púrpura */
  --primary-dark: #000000;
  --primary-light: #152331;
  --accent-color: #182848;
  --text-on-gradient: #ffffff;

  /* Gradientes */
  --main-gradient: linear-gradient(to right, var(--primary-dark), var(--primary-light));
  --main-gradient-webkit: -webkit-linear-gradient(to right, var(--primary-dark), var(--primary-light));

  /* Tiempos y Curvas de Animación */
  --hoverEasing: cubic-bezier(0.23, 1, 0.32, 1);
  --returnEasing: cubic-bezier(0.445, 0.05, 0.55, 0.95);

  /* Dimensiones de la Card */
  --card-width: 240px;
  --card-height: 320px;
  --card-radius: 12px;
}

/* --- ESTILOS DE CUERPO Y LAYOUT --- */
body {
  background-color: #f8f9fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#comicContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* --- EFECTO 3D PARALLAX EN CARDS --- */
.card-wrap {
  margin: 15px;
  transform: perspective(800px);
  transform-style: preserve-3d;
  cursor: pointer;
  display: flex;
  justify-content: center;
}

.comic-card-custom {
  position: relative;
  flex: 0 0 var(--card-width);
  width: var(--card-width);
  height: var(--card-height);
  background-color: #333;
  overflow: hidden;
  border-radius: var(--card-radius);
  box-shadow: rgba(0, 0, 0, 0.66) 0 30px 60px 0;
  transition: 1s var(--returnEasing);
}

.card-bg {
  opacity: 0.6;
  position: absolute;
  top: -20px;
  left: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transition: 1s var(--returnEasing), opacity 2s 1s var(--returnEasing);
  pointer-events: none;
}

.card-info {
  padding: 20px;
  position: absolute;
  bottom: 0;
  width: 100%;
  color: #fff;
  transform: translateY(40%);
  transition: 0.6s 1.6s cubic-bezier(0.215, 0.61, 0.355, 1);
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
}

.card-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  text-shadow: rgba(0, 0, 0, 0.5) 0 10px 10px;
  margin: 0;
}

.card-info p {
  opacity: 0;
  font-size: 0.75rem;
  text-shadow: rgba(0, 0, 0, 1) 0 2px 3px;
  transition: 0.6s 1.6s var(--hoverEasing);
}

/* Estados Hover de la Card */
.card-wrap:hover .card-info {
  transform: translateY(0);
  transition: 0.6s var(--hoverEasing);
}

.card-wrap:hover .card-info p {
  opacity: 1;
  transition: 0.6s var(--hoverEasing);
}

.card-wrap:hover .card-bg {
  transition: 0.6s var(--hoverEasing), opacity 2s var(--hoverEasing);
  opacity: 0.8;
}

.card-wrap:hover .comic-card-custom {
  transition: 0.6s var(--hoverEasing), box-shadow 2s var(--hoverEasing);
  box-shadow:
    rgba(100, 65, 165, 0.4) 0 0 40px 5px,
    rgba(255, 255, 255, 1) 0 0 0 1px,
    rgba(0, 0, 0, 0.66) 0 30px 60px 0;
}

/* --- ELEMENTOS CON GRADIENTE (CHIPS, BADGES, BOTONES) --- */
.date-badge,
.btn-gradient,
.badge-chip,
.filter-chip-active {
  background: var(--primary-light);
  background: var(--main-gradient-webkit);
  background: var(--main-gradient);
  color: var(--text-on-gradient) !important;
  border: none;
}

/* Badge de Año (Modal) */
.date-badge {
  position: absolute;
  top: 20px;
  right: 60px;
  padding: 10px;
  border-radius: 15px;
  text-align: center;
  min-width: 70px;
  box-shadow: 0 4px 15px rgba(42, 8, 69, 0.3);
  z-index: 10;
}

.date-badge .day {
  font-size: 1.2rem;
  font-weight: bold;
  display: block;
  line-height: 1;
}

.date-badge .month {
  font-size: 0.6rem;
  letter-spacing: 1px;
}

/* Botones y Chips */
.btn-gradient {
  border-radius: 50px;
  padding: 12px 25px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.btn-gradient:hover {
  filter: brightness(1.2);
  box-shadow: 0 5px 15px rgba(100, 65, 165, 0.4);
  transform: translateY(-1px);
}

.badge-chip {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 5px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(42, 8, 69, 0.2);
  vertical-align: middle;
}

.clickable-chip {
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}

.clickable-chip:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

/* --- FILTRO ACTIVO (HOME) --- */
.filter-chip-active {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(42, 8, 69, 0.2);
  animation: fadeIn 0.4s ease;
}

.btn-remove-filter {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  cursor: pointer;
  font-size: 0.7rem;
  transition: background 0.2s;
}

.btn-remove-filter:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* --- DISEÑO DEL MODAL (WORKSHOP STYLE) --- */
.custom-modal {
  border: none !important;
  border-radius: 25px !important;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-cover-bg {
  background-size: cover;
  background-position: center;
  min-height: 450px;
}

.read-more-link {
  color: var(--accent-color) !important;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
}

.read-more-link:hover {
  text-decoration: underline;
}

/* Truncado de texto (Descripción) */
.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.text-full {
  display: block;
  line-height: 1.6;
}

/* --- UTILIDADES --- */
.animate__animated {
  animation-duration: 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#activeFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  /* Espacio entre chips */
  margin-bottom: 20px;
}

.logo {
  max-height: 80px;
}

.main-footer {
  background-color: #1a1a1a;
  /* Un gris casi negro para contraste */
  color: #a0a0a0;
  padding: 60px 0 30px;
  margin-top: 80px;
  border-top: 4px solid transparent;
  /* El borde superior usa tu degradado */
  border-image: var(--main-gradient) 1;
  position: relative;
}

.footer-disclaimer {
  max-width: 700px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #888;
}

.footer-disclaimer strong {
  color: var(--primary-light);
  /* Usa el púrpura claro de tus variables */
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-copyright {
  border-top: 1px solid #2a2a2a;
  padding-top: 20px;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* Efecto opcional: Un brillo sutil de fondo */
.main-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: var(--primary-light);
  filter: blur(20px);
  opacity: 0.5;
}
.skeleton-card {
  width: var(--card-width);
  height: var(--card-height);
  margin: 15px;
  border-radius: var(--card-radius);
  background: #e0e0e0;
  position: relative;
  overflow: hidden;
}

/* Animación de brillo pasando */
.skeleton-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0.2) 20%,
      rgba(255, 255, 255, 0.5) 60%,
      rgba(255, 255, 255, 0));
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}
/* Estado inicial: Invisible y un poco más abajo para el efecto de subida */
.results-badge {
    font-size: 0.85rem;
      color: #b388ff;
    font-weight: 500;
    margin-top: 5px;
      opacity: 0;
      transform: translateY(-5px);
      transition: all 0.3s ease;
      /* Transición suave para opacidad y movimiento */
      pointer-events: none;
      /* Evita que el texto del contador interfiera con clics */
}

.search-container:hover .results-badge,
.search-container:focus-within .results-badge {
  opacity: 1;
  transform: translateY(0);
}


/* Importación de Iconos */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css");