/* Estilos para el Listado de Actividades */
.wp-actividades-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.actividad-card {
  display: flex;
  background: #fff;
  border-radius: 15px; /* Curva solicitada */
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.actividad-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border-color: #ddd;
}

.actividad-flyer {
  flex: 0 0 250px;
  background: #f9f9f9;
  overflow: hidden;
  position: relative;
}

.actividad-flyer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s ease; /* Transición suave para la imagen */
}

.actividad-card:hover .actividad-flyer img {
  transform: scale(1.08); /* Zoom suave al pasar el mouse */
  filter: brightness(0.9);
}

/* Curvas para el Slider de Actividades */
/* Forzar altura en Swiper para que todos los slides midan lo mismo */
.wp-actividades-swiper, 
.wp-actividades-swiper .swiper-wrapper {
    height: 100% !important;
}

.wp-actividades-swiper .swiper-slide {
    height: 100% !important;
    display: flex !important;
    flex-direction: column;
}

.flyer-item {
    height: 100%;
    width: 100%;
}

.flyer-item img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Para que se vea el flyer completo sin cortes */
  border-radius: 15px !important;
}

.wp-actividades-swiper {
    background: transparent !important;
    border-radius: 15px;
    overflow: hidden;
}

.slide-ver-mas-final {
    position: relative;
    width: 100%;
    background: #ffffff;
    padding-top: 140%; /* Fuerza la proporción de un flyer */
    border-radius: 15px;
    overflow: hidden;
}

.btn-ver-todo-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.premium-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #cc0000;
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(204, 0, 0, 0.2);
    white-space: nowrap;
}

.slide-premium-link:hover .premium-cta {
    transform: scale(1.05);
    background: #e60000;
    box-shadow: 0 10px 20px rgba(204, 0, 0, 0.3);
}

.actividad-info {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.actividad-meta {
  font-size: 13px;
  color: #cc0000;
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  gap: 15px;
}

.actividad-titulo {
  margin: 0 0 10px 0;
  font-size: 22px;
  color: #333;
}

.actividad-detalle {
  font-size: 15px;
  color: #666;
  margin-bottom: 15px;
}

.actividad-lugar {
  font-size: 14px;
  margin-bottom: 0px;
}

/* Botones */
.btn-mapa {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #cc0000;
  color: #fff !important;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 13px;
}

.btn-ver-mas {
  display: block;
  width: 100%;
  text-align: center;
  background: #ff6b6b;
  color: #fff !important;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 20px;
}

/* Filtros y Contador Moderno */
.actividades-filter-container {
  background: #ffffff;
  padding: 25px;
  border-radius: 16px;
  margin-bottom: 35px;
  border: 1px solid #eee;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.04);
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  height: 18px; /* ALTURA FIJA PARA TODAS LAS ETIQUETAS */
  line-height: 18px;
  display: block;
}

.filter-group input[type="date"] {
  border: 1px solid #e0e0e0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4; /* Forzado para consistencia */
  color: #333;
  background: #f9f9f9;
  transition: all 0.2s ease;
  height: 42px;
  box-sizing: border-box;
}

.filter-group input[type="date"]:focus {
  border-color: #cc0000;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

.btn-filtrar {
  background: #cc0000;
  color: #fff;
  border: none;
  padding: 0 25px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(204, 0, 0, 0.2);
  height: 42px; /* Altura idéntica al input */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-filtrar:hover {
  background: #b30000;
  box-shadow: 0 6px 20px rgba(204, 0, 0, 0.3);
}

.filter-group-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group-actions label {
  visibility: hidden;
  pointer-events: none;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  height: 42px;
}

.btn-limpiar {
  text-decoration: none;
  color: #888;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.btn-limpiar:hover {
  color: #cc0000;
}

.actividades-count-summary {
  margin-top: 10px;
  padding-top: 0;
  border-top: none;
  font-size: 13px;
  color: #888;
  font-style: italic;
}

.actividades-count-summary p {
  margin: 0 !important;
}

/* Paginación Moderna */
.actividades-pagination {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.pagination-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pagination-links a {
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid #eee;
  border-radius: 12px;
  color: #555;
  font-weight: 600;
  font-size: 14px;
  background: #fff;
  transition: all 0.3s ease;
}

.pagination-links a:hover:not(.active) {
  background: #fdf2f2;
  color: #cc0000;
  border-color: #fbdada;
}

.pagination-links a.active {
  background: #cc0000;
  color: #fff;
  border-color: #cc0000;
  box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3);
}

.pagination-info {
  font-size: 13px;
  color: #999;
  font-weight: 500;
}

/* Estilos unificados para tarjetas (Mini y Completa) */
.wp-actividades-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.actividad-card {
  display: flex;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid #ddd; /* Borde más visible */
  box-shadow: none !important;
  border-radius: 0 !important;
  gap: 30px;
  position: relative;
  background: transparent !important;
}

/* Fondo intercalado para todas las listas */
.actividad-card:nth-child(even) {
  background: #fdfdfd !important;
}

.actividad-card:last-child {
  border-bottom: 1px solid #ddd; /* Aseguramos que el último también tenga borde si hay paginación */
}

.actividad-flyer {
  flex: 0 0 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
  position: relative;
}

.actividad-flyer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.flyer-zoom-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
}

.actividad-flyer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.flyer-zoom-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(204, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.flyer-zoom-indicator i {
  color: #fff;
  font-size: 30px;
  transform: scale(0.5);
  transition: transform 0.3s ease;
}

/* Indicador para móvil (Badge fijo) */
.flyer-zoom-wrapper::after {
  content: "\f179"; /* Icono de búsqueda dashicons */
  font-family: dashicons;
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #cc0000;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: none; /* Oculto por defecto en PC */
  justify-content: center;
  align-items: center;
  font-size: 16px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

@media (max-width: 768px) {
  .flyer-zoom-wrapper::after {
    display: flex; /* Visible en móviles */
  }
}

.flyer-zoom-wrapper:hover img {
  transform: scale(1.1);
}

.flyer-zoom-wrapper:hover .flyer-zoom-indicator {
  opacity: 1;
}

.flyer-zoom-wrapper:hover .flyer-zoom-indicator i {
  transform: scale(1);
}

/* Modal Estilizado */
.wp-acti-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  backdrop-filter: blur(5px);
}

.wp-acti-modal-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-acti-modal.is-open .wp-acti-modal-content {
  transform: scale(1);
}

.wp-acti-modal-content img {
  max-width: 100%;
  max-height: 90vh;
  display: block;
  border-radius: 20px !important;
}

.wp-acti-modal-close {
  position: absolute;
  top: -40px;
  right: -40px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  background: none;
  border: none;
}

@media (max-width: 768px) {
  .wp-acti-modal-close {
    top: -50px;
    right: 10px;
  }
}

/* --- CORRECCIÓN LIGHTBOX ELEMENTOR --- */
/* Forzar curva en el Lightbox de Elementor */
.elementor-lightbox .elementor-lightbox-image,
.elementor-lightbox .elementor-video-container,
.elementor-lightbox .swiper-slide img {
    border-radius: 15px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
}

/* Suavizar la transición (Efecto Fade) */
.elementor-lightbox .swiper-slide {
    transition: opacity 0.4s ease-in-out !important;
}

.elementor-lightbox .swiper-slide-active {
    opacity: 1 !important;
}

/* Evitar que se vea la "cuadrícula" o bordes rectos al cambiar */
.elementor-lightbox .elementor-swiper-button {
    z-index: 100 !important;
}
/* -------------------------------------- */

.actividad-info {
  flex: 1;
  padding: 0;
}

.actividad-meta-details {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
}

.actividad-meta-details span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #cc0000;
  font-weight: bold;
}

.actividad-meta-details i.dashicons {
  font-size: 15px;
  width: 15px;
  height: 15px;
}

.actividad-tipo-tag {
  position: absolute;
  top: 20px;
  right: 15px;
  font-size: 10px;
  text-transform: uppercase;
  background: #fdf2f2;
  color: #cc0000;
  padding: 3px 12px;
  border-radius: 4px;
  font-weight: bold;
  letter-spacing: 1px;
}

.actividad-info {
  flex: 1;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Permite ellipsis en hijos flex */
}

.actividad-titulo {
  font-size: 22px; /* Unificado */
  font-weight: 700;
  color: #333;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  width: 100%;
}

.actividad-detalle {
  font-size: 18px; /* Unificado */
  color: #555;
  margin-bottom: 10px !important;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Límite de 2 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.actividad-lugar,
.actividad-enlace {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  overflow: hidden;
  font-size: 16px !important;
}

.actividad-lugar {
  color: #666;
  margin-top: 0px !important; /* Margen cero unificado */
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.actividad-lugar span {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1;
}

.actividad-enlace {
  margin-top: 0px !important;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.actividad-lugar i,
.actividad-enlace i {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

.actividad-lugar i {
  font-size: 16px !important; /* Pin afinado */
}

.actividad-enlace i {
  font-size: 13px !important; /* Mundo afinado */
}

.actividad-enlace a {
  color: #cc0000;
  text-decoration: none;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1;
}

.actividad-enlace a:hover {
  text-decoration: underline;
}

.actividad-acciones {
  margin-top: 15px;
}

/* Ajustes específicos para modo MINI */
.wp-acti-mini .actividad-card {
  padding: 15px 0;
  gap: 20px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.wp-acti-mini .actividad-flyer {
  flex: 0 0 130px !important;
  width: 130px !important;
  height: 130px !important;
  margin-bottom: 0 !important;
  margin-right: 25px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

.wp-acti-mini .actividad-flyer img {
  width: 130px !important;
  height: 130px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  margin: 0 !important;
  display: block !important;
}

.wp-acti-mini .actividad-info {
  padding: 0 !important;
  width: auto !important;
}

@media (max-width: 768px) {
  .wp-acti-mini .actividad-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 0 !important;
    gap: 0 !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 20px !important;
    overflow: hidden !important;
  }

  .wp-acti-mini .actividad-flyer {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: 220px !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  .wp-acti-mini .actividad-flyer img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
  }

  .wp-acti-mini .actividad-info {
    padding: 20px !important;
    width: 100% !important;
  }
}

.wp-acti-mini .actividad-titulo {
  font-size: 22px;
  margin-bottom: 5px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-top: 10px !important;
  width: 100%;
}

.wp-acti-mini .actividad-detalle {
  font-size: 18px; /* Descripción dominante */
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px !important;
  color: #444;
}

.wp-acti-mini .actividad-lugar {
  font-size: 16px !important;
  margin-top: 0px !important; /* Margen en cero */
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wp-acti-mini .actividad-enlace {
  font-size: 16px !important;
  margin-top: 0px !important;
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wp-acti-mini .actividad-lugar i {
  font-size: 16px !important; /* Pin de ubicación afinado */
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

.wp-acti-mini .actividad-enlace i {
  font-size: 13px !important; /* El mundo reducido para que visualmente parezca del mismo tamaño que el pin */
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

.wp-acti-mini .actividad-info {
  flex: 1;
  min-width: 0; /* Permite que los hijos usen ellipsis */
}

.wp-acti-mini .actividad-enlace a {
  color: #cc0000;
  text-decoration: none;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important; /* Forzar los 3 puntos */
  display: block;
  width: 100%;
}

.wp-acti-mini .actividad-enlace a:hover {
  text-decoration: underline;
}

.wp-acti-mini .actividad-acciones {
  margin-top: 10px;
  text-align: right;
  width: 100%;
}

.btn-mapa-text {
  color: #cc0000 !important;
  text-decoration: none;
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: none;
}

.btn-mapa-text:hover {
  color: #cc0000 !important;
  text-decoration: underline;
}

.wp-acti-mini .actividad-titulo {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
}

.wp-acti-mini .btn-mapa {
  background: #cc0000; /* Volvemos al Rojo original */
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.wp-acti-mini .btn-mapa:hover {
  background: #990000;
  transform: scale(1.05);
}

/* Pantalla de Carga AJAX */
.wp-acti-results-container {
  position: relative;
  min-height: 200px;
  transition: all 0.3s ease;
}

.wp-acti-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  justify-content: center;
  align-items: center; /* Centrado total */
  z-index: 100;
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.wp-acti-results-container.is-loading {
  opacity: 0.6;
}

.wp-acti-results-container.is-loading .wp-acti-loader {
  opacity: 1;
  visibility: visible;
}

.wp-acti-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #cc0000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Flechas Swiper Pequeñas y Elegantes */
.wp-actividades-swiper .swiper-button-next,
.wp-actividades-swiper .swiper-button-prev {
  background: rgba(255, 255, 255, 0.7);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  color: #cc0000 !important;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wp-actividades-swiper .swiper-button-next:after,
.wp-actividades-swiper .swiper-button-prev:after {
  font-size: 16px !important;
  font-weight: bold;
}

.wp-actividades-swiper .swiper-button-next:hover,
.wp-actividades-swiper .swiper-button-prev:hover {
  background: #cc0000;
  color: #fff !important;
}

.wp-actividades-swiper .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.8) !important;
  opacity: 1 !important;
  width: 8px !important;
  height: 8px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 1px solid rgba(0,0,0,0.1);
}

.wp-actividades-swiper .swiper-pagination-bullet-active {
  background: #ffffff !important;
  width: 25px !important;
  border-radius: 5px !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.wp-actividades-swiper .swiper-pagination {
    bottom: 25px !important; /* Subido de 15px a 25px */
    z-index: 10;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive corregido */
@media (max-width: 768px) {
  .actividad-card {
    flex-direction: column !important;
    width: 100% !important;
    padding: 0px;
    gap: 0px;
  }
  .actividad-flyer {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: 200px !important;
    border-radius: 12px !important;
    margin: 0 !important;
  }
  .actividad-flyer img {
    border-radius: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
  .actividad-info {
    width: 100% !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .actividad-titulo,
  .actividad-lugar span,
  .actividad-enlace span,
  .actividad-enlace a {
    display: block !important;
    width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .actividad-lugar,
  .actividad-enlace {
    width: 100% !important;
    overflow: hidden !important;
  }
  .filter-form {
    gap: 0px !important;
  }
  .actividad-lugar {
    margin-bottom: 0 !important;
  }
}

/* Corrección específica para TABLETS (Evita que el tag tape la hora) */
@media (min-width: 769px) and (max-width: 1024px) {
  .actividad-tipo-tag {
    position: static !important;
    display: inline-flex !important;
    margin-bottom: 8px !important;
    align-self: flex-start !important;
  }
  
  .actividad-meta {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
  }
}
