/* ===== CURRENCIES SECTION ===== */
.currencies {
  padding: 100px 0;
  background: white;
}

.currencies-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.currency-item {
  background: var(--gray-50);
  padding: 20px 15px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.currency-item:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 20px 30px -10px rgba(99, 102, 241, 0.3);
  border-color: transparent;
}

.currency-item:hover .currency-code,
.currency-item:hover .currency-name {
  color: white;
}

/* Estilos para banderas */
.currency-flag {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.currency-item:hover .currency-flag {
  transform: scale(1.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border-color: var(--primary);
}

/* Flag Icons styling */
.currency-flag .fi {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  font-size: 32px;
}

.currency-code {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  transition: color 0.3s ease;
}

.currency-name {
  font-size: 0.8rem;
  color: var(--gray-600);
  transition: color 0.3s ease;
  line-height: 1.4;
  max-width: 100px;
  margin: 0 auto;
}

.currency-item.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 1200px) {
  .currencies-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
  }
}

@media (max-width: 992px) {
  .currencies-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .currencies {
    padding: 60px 0;
  }

  .currencies-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .currency-flag {
    width: 40px;
    height: 40px;
  }

  .currency-code {
    font-size: 1rem;
  }

  .currency-name {
    font-size: 0.7rem;
  }
}

@media (max-width: 576px) {
  .currencies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .currency-item {
    padding: 15px 10px;
  }

  .currency-flag {
    width: 36px;
    height: 36px;
  }
}

/* Animación de entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.currency-item {
  animation: fadeInUp 0.5s ease backwards;
}

.currency-item:nth-child(1) {
  animation-delay: 0s;
}
.currency-item:nth-child(2) {
  animation-delay: 0.1s;
}
.currency-item:nth-child(3) {
  animation-delay: 0.2s;
}
.currency-item:nth-child(4) {
  animation-delay: 0.3s;
}
.currency-item:nth-child(5) {
  animation-delay: 0.4s;
}
.currency-item:nth-child(6) {
  animation-delay: 0.5s;
}
.currency-item:nth-child(7) {
  animation-delay: 0.6s;
}
.currency-item:nth-child(8) {
  animation-delay: 0.7s;
}
.currency-item:nth-child(9) {
  animation-delay: 0.8s;
}
.currency-item:nth-child(10) {
  animation-delay: 0.9s;
}
.currency-item:nth-child(11) {
  animation-delay: 1s;
}
.currency-item:nth-child(12) {
  animation-delay: 1.1s;
}
/* ===== BOTÓN TOGGLE MEJORADO ===== */
#toggleCurrencies {
  min-width: 200px;
  transition: all 0.3s ease;
}

#toggleCurrencies i {
  transition: transform 0.3s ease;
}

#toggleCurrencies.active i {
  transform: rotate(180deg);
}

#toggleCurrencies:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

/* Animación para las monedas al aparecer/desaparecer */
.currency-item {
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease backwards;
}

.currency-item.hidden {
  display: none;
}

/* Retrasos en la animación */
.currency-item:nth-child(1) {
  animation-delay: 0s;
}
.currency-item:nth-child(2) {
  animation-delay: 0.05s;
}
.currency-item:nth-child(3) {
  animation-delay: 0.1s;
}
.currency-item:nth-child(4) {
  animation-delay: 0.15s;
}
.currency-item:nth-child(5) {
  animation-delay: 0.2s;
}
.currency-item:nth-child(6) {
  animation-delay: 0.25s;
}
.currency-item:nth-child(7) {
  animation-delay: 0.3s;
}
.currency-item:nth-child(8) {
  animation-delay: 0.35s;
}
.currency-item:nth-child(9) {
  animation-delay: 0.4s;
}
.currency-item:nth-child(10) {
  animation-delay: 0.45s;
}
.currency-item:nth-child(11) {
  animation-delay: 0.5s;
}
.currency-item:nth-child(12) {
  animation-delay: 0.55s;
}
.currency-item:nth-child(13) {
  animation-delay: 0.6s;
}
.currency-item:nth-child(14) {
  animation-delay: 0.65s;
}
.currency-item:nth-child(15) {
  animation-delay: 0.7s;
}
.currency-item:nth-child(16) {
  animation-delay: 0.75s;
}
.currency-item:nth-child(17) {
  animation-delay: 0.8s;
}
.currency-item:nth-child(18) {
  animation-delay: 0.85s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
