/* Estilos mejorados para el filtro de finanzas - v2.0.0 */

/* Contenedor principal con mejor scroll en móvil */
.anys-menu {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  margin: 0;
  padding: 0;
  overflow-y: hidden;
  white-space: nowrap;
  touch-action: pan-x;
}

/* Añadir espacios visibles a los extremos para indicar scroll */
.anys-menu::before,
.anys-menu::after {
  content: "";
  display: block;
  min-width: 1rem;
  height: 1px;
}

/* Ocultar scrollbar manteniendo funcionalidad */
.anys-menu::-webkit-scrollbar {
  height: 4px;
}

.anys-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.anys-menu::-webkit-scrollbar-thumb {
  background: #ce0037;
  border-radius: 10px;
}

/* Botones de año con diseño mejorado */
.any-filter {
  padding: 0.1rem 0.5rem;
  border-radius: 2rem;
  text-decoration: none !important;
  color: #333;
  font-weight: 500;
  font-family: "Raveo Display", sans-serif;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid rgba(206, 0, 55, 0.2);
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  margin: 0 0.2rem;
  cursor: pointer;
  pointer-events: auto !important;
  flex-shrink: 0;
}

.any-filter:hover {
  border-color: rgba(228, 77, 38, 0.4);
  background-color: rgba(228, 77, 38, 0.05);
}

.any-filter::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #ce0037;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.any-filter:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.any-filter.active {
  background-color: #ce0037;
  color: white;
  border-color: #ce0037;
  box-shadow: 0 4px 8px rgba(206, 0, 55, 0.3);
  transform: translateY(-1px);
}

.any-filter.active::after {
  transform: scaleX(0);
}

/* Efecto de pulso suave para el año activo */
.any-filter.active {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(228, 77, 38, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(228, 77, 38, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(228, 77, 38, 0);
  }
}

/* Eliminamos estilos especiales de peso para años recientes ya que todos tienen el mismo font-weight */
/* La siguiente regla ha sido eliminada:
.any-filter[data-any="2020"],
.any-filter[data-any="2021"],
.any-filter[data-any="2022"],
.any-filter[data-any="2023"],
.any-filter[data-any="2024"] {
    font-weight: 700;
}
*/

/* Eliminamos estilo especial para 2024 para unificar apariencia 
.any-filter[data-any="2024"] {
    background-color: rgba(228, 77, 38, 0.1);
    border-color: rgba(228, 77, 38, 0.4);
}
*/

/* Mejoras para móvil */
@media (max-width: 768px) {
  .anys-menu {
    justify-content: flex-start;
    padding: 0.5rem 1rem;
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      black 5%,
      black 95%,
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      black 5%,
      black 95%,
      transparent 100%
    );
    margin: 0 -1rem;
  }

  .any-filter {
    min-width: 3.5rem;
    margin: 0 0.25rem;
    padding: 0.5rem 0.8rem;
  }
}

/* Se eliminaron los estilos del overlay de carga */

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