/* ================================
   NOVEDADES PAGE - DISEÑO MINIMALISTA
   ================================ */

/* Hero Novedades */
.novedades-hero {
  background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-secundario) 100%);
  padding: 4rem 0 3rem;
  margin-bottom: 3rem;
}

.hero-content {
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-icon {
  width: 64px;
  height: 64px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.novedades-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.novedades-hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin: 0;
  opacity: 0.95;
  max-width: 600px;
}

/* Filtros */
.filters-section {
  background: white;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-borde);
  margin-bottom: 3rem;
}

.filters-wrapper {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-group {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--color-fondo-claro);
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.filter-group:hover {
  box-shadow: 0 4px 12px rgba(77, 134, 156, 0.15);
}

.filter-icon {
  width: 20px;
  height: 20px;
  color: var(--color-primario);
  margin-right: 0.5rem;
}

.filter-select {
  border: none;
  background: transparent;
  color: var(--color-primario);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234D869C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 16px;
}

.filter-select:focus {
  color: var(--color-primario);
}

/* Grid de Eventos */
.eventos-section {
  padding: 2rem 0 4rem;
  min-height: 400px;
}

.eventos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Tarjeta de Evento */
.evento-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.evento-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(77, 134, 156, 0.2);
}

.evento-imagen {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.evento-card:hover .evento-imagen {
  transform: scale(1.05);
}

.evento-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.evento-fecha {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-fondo-claro);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primario);
  margin-bottom: 1rem;
  width: fit-content;
}

.fecha-icon {
  width: 16px;
  height: 16px;
}

.evento-titulo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.evento-descripcion {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.evento-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--color-borde);
  gap: 1rem;
}

.evento-categoria {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--categoria-bg, #f3f4f6);
  color: var(--categoria-color, #374151);
  white-space: nowrap;
}

.categoria-icon {
  width: 14px;
  height: 14px;
}

/* Colores por categoría - Consistentes con el calendario */
.evento-card[data-categoria="Programa de Salud"] .evento-categoria {
  --categoria-bg: #e9d5ff;
  --categoria-color: #7c3aed;
  background-color: #c084fc;
  color: white;
}

.evento-card[data-categoria="Promoción Social"] .evento-categoria {
  --categoria-bg: #fef9c3;
  --categoria-color: #854d0e;
  background-color: #fde047;
  color: #854d0e;
}

.evento-card[data-categoria="Deportivo"] .evento-categoria {
  --categoria-bg: #fed7aa;
  --categoria-color: #9a3412;
  background-color: #fb923c;
  color: white;
}

.evento-card[data-categoria="Académico"] .evento-categoria {
  --categoria-bg: #dbeafe;
  --categoria-color: #1e40af;
  background-color: #60a5fa;
  color: white;
}

.evento-card[data-categoria="Feria"] .evento-categoria {
  --categoria-bg: #fce7f3;
  --categoria-color: #9f1239;
  background-color: #ec4899;
  color: white;
}

.evento-ubicacion {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ubicacion-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Estado de carga */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-fondo-medio);
  border-top-color: var(--color-primario);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading p {
  color: #666;
  font-size: 1rem;
}

/* No resultados */
.no-resultados {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.no-resultados-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  color: #d1d5db;
}

.no-resultados h3 {
  font-size: 1.5rem;
  color: #374151;
  margin-bottom: 0.5rem;
}

.no-resultados p {
  font-size: 1rem;
  color: #9ca3af;
}

/* CTA Novedades */
.cta-novedades {
  background: var(--color-fondo-claro);
  padding: 4rem 0;
  margin-top: 3rem;
}

.cta-card {
  background: linear-gradient(135deg, var(--color-primario), var(--color-secundario));
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  text-align: center;
  color: white;
  box-shadow: 0 12px 32px rgba(77, 134, 156, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta-icon {
  width: 48px;
  height: 48px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
}

.cta-card h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0;
}

.cta-card p {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  margin: 0;
  opacity: 0.95;
  max-width: 500px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: var(--color-primario);
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
  .novedades-hero {
    padding: 3rem 0 2rem;
  }

  .hero-icon {
    width: 48px;
    height: 48px;
  }

  .eventos-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .filters-wrapper {
    flex-direction: column;
    width: 100%;
  }

  .filter-group {
    width: 100%;
    justify-content: center;
  }

  .filter-select {
    flex: 1;
  }

  .cta-card {
    padding: 2rem 1.5rem;
  }

  .evento-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .evento-imagen {
    height: 180px;
  }

  .evento-content {
    padding: 1.25rem;
  }

  .evento-titulo {
    font-size: 1.125rem;
  }
}

/* ================================
   MODAL DE DETALLES DEL EVENTO
   ================================ */

.evento-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.evento-modal-overlay.active {
  display: flex;
}

.evento-modal {
  background: white;
  border-radius: 1.5rem;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 10, 10, 0.1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 5;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: rotate(90deg);
}

.modal-close i {
  width: 20px;
  height: 20px;
}

.modal-content {
  padding: 0 2rem 2rem 2rem;
}

.modal-imagen-container {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: 1.5rem 1.5rem 0 0;
  overflow: hidden;
  margin-bottom: 2rem;
}

.modal-imagen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.modal-titulo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primario);
  margin: 0;
  line-height: 1.2;
}

.modal-categoria-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  width: fit-content;
}

.categoria-icon-modal {
  width: 16px;
  height: 16px;
}

.modal-detalles {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.modal-detalle-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.detalle-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  background: var(--color-fondo-claro);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detalle-icon {
  width: 20px;
  height: 20px;
  color: var(--color-primario);
}

.detalle-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detalle-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detalle-valor {
  font-size: 1rem;
  color: #1a1a1a;
  line-height: 1.6;
}

.detalle-valor p {
  margin: 0;
}

.modal-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-borde);
  flex-wrap: wrap;
}

.btn-modal-cerrar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--color-primario), var(--color-secundario));
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(77, 134, 156, 0.3);
}

.btn-modal-cerrar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(77, 134, 156, 0.4);
}

.btn-modal-cerrar i {
  width: 20px;
  height: 20px;
}

.btn-modal-aplicar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: var(--color-primario);
  padding: 0.875rem 2rem;
  border-radius: 50px;
  border: 2px solid var(--color-primario);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-modal-aplicar:hover {
  background: var(--color-primario);
  color: white;
  transform: translateY(-2px);
}

.btn-modal-aplicar i {
  width: 20px;
  height: 20px;
}

/* Modal Responsive */
@media (max-width: 768px) {
  .evento-modal {
    max-height: 95vh;
    border-radius: 1rem;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .modal-imagen-container {
    height: 200px;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    border-radius: 1rem 1rem 0 0;
  }

  .modal-titulo {
    font-size: 1.5rem;
  }

  .modal-detalle-item {
    gap: 0.75rem;
  }

  .detalle-icon-wrapper {
    width: 36px;
    height: 36px;
  }
}

/* Transiciones suaves */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
