/* =========================
   COMPRA / VENTA – PREMIUM GOLD
========================= */

:root {
  --bg: #fafafa;
  --bg-card: rgba(255, 255, 255, 0.88);
  --text: #1c1c1c;
  --muted: #6b6b6b;

  --gold: #c9a24d;
  --gold-soft: rgba(201,162,77,0.15);

  --border: rgba(0,0,0,0.08);
  --radius: 20px;
  --shadow: 0 30px 60px rgba(0,0,0,0.12);
}

body {
  background:
    radial-gradient(circle at top, var(--gold-soft), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  padding: 40px 16px;
}

/* =========================
   HEADER ESPECIAL – COMPRA/VENTA
========================= */
.crypto-page .hero {
  margin-bottom: 50px;
}

.crypto-page .hero-left h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.crypto-page .main-nav {
  display: flex;
  gap: 20px;
  margin-top: 12px;
}

.crypto-page .main-nav .nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  position: relative;
  padding-bottom: 2px;
  transition: 0.3s;
}

.crypto-page .main-nav .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--gold);
  border-radius: 2px;
}

.crypto-page .main-nav .nav-link:hover {
  color: var(--gold);
}


/* =========================
   PAGE WRAPPER
========================= */
.crypto-page {
  max-width: 1100px;
  margin: auto;
}

/* =========================
   HERO
========================= */
.hero {
  text-align: center;
  margin-bottom: 50px;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* =========================
   INTRO SEO
========================= */
.intro-text {
  max-width: 820px;
  margin: 0 auto 60px;
  text-align: center;
}

.intro-text p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
}

/* =========================
   FORMULARIO
========================= */
.crypto-form {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 40px;
  margin-bottom: 60px;
}

.crypto-form h2 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 30px;
}

/* GRID */
.transfer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}


.transfer-block h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.transfer-block label {
  font-size: 0.85rem;
  color: var(--muted);
}

select {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: transparent;
}

/* SWAP */
.transfer-swap {
  display: flex;
  align-items: center;
  justify-content: center;
}

#swapAction {
  background: var(--gold);
  color: #000;
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.3s;
}

#swapAction:hover {
  transform: rotate(180deg) scale(1.05);
}

/* =========================
   CANTIDAD
========================= */
.amount-row {
  margin-bottom: 30px;
}

.amount-row label {
  font-size: 0.85rem;
  color: var(--muted);
}

.amount-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
}

.amount-input input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 16px 0;
  font-size: 1.1rem;
}

.amount-input span {
  font-weight: 600;
  color: var(--muted);
}

/* =========================
   BOTÓN FORM
========================= */
.form-actions {
  text-align: center;
}

.form-actions button {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

.form-actions button:hover {
  transform: translateY(-2px);
}

.amount-input select {
  border: none;
  background: transparent;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding-left: 12px;
}

/* =========================
   Precio de Referencia
========================= */

.price-reference {
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  margin: 20px 0 30px;
}

.price-reference strong {
  color: var(--text);
  font-weight: 700;
}


/* =========================
   MINI-BADGE PREMIUM GOLD ANIMADO
========================= */

.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  min-width: 55px;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #c9a24d 0%, #a0792b 100%); /* dorado legible */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background 0.5s ease, transform 0.3s ease;
}

/* Flechas */
.price-badge span {
  display: inline-block;
  font-size: 0.85rem;
  transform-origin: center;
}

/* Estados subida/bajada */
.price-badge.up {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: #fff;
}

.price-badge.down {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: #fff;
}

/* Contenedor de badge y tiempo */
.price-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.8rem;
}

.price-updated {
  font-size: 0.75rem;
  color: var(--muted);
}

/* =========================
   Animación rebote con flash
========================= */
.price-badge.animate-badge {
  display: inline-block;
  animation: bounce-flash 0.8s ease;
}

/* Rebote con escala y flash */
@keyframes bounce-flash {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  20%  { transform: translateY(-6px) scale(1.05); opacity: 0.9; }
  40%  { transform: translateY(2px) scale(0.98); opacity: 1; }
  60%  { transform: translateY(-3px) scale(1.02); opacity: 0.95; }
  80%  { transform: translateY(1px) scale(0.99); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Flash dorado y rojo al actualizar */
.price-badge.up.animate-badge {
  background: linear-gradient(135deg, #ffd966 0%, #f5c842 100%);
  color: #1a1200;
}

.price-badge.down.animate-badge {
  background: linear-gradient(135deg, #ff4c4c 0%, #c0392b 100%);
  color: #fff;
}


/* =========================
   RESULTADOS
========================= */
.crypto-results {
  margin-bottom: 70px;
}

.results-updated {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
}

/* =========================
   PROVIDER CARD
========================= */
.provider-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 26px;
  transition: 0.35s;
}

.provider-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.provider-shell {
  display: grid;
  grid-template-columns: 2fr 2fr 1.5fr;
  gap: 30px;
  align-items: center;
}

/* =========================
   BRAND
========================= */
.provider-brand h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.provider-rating {
  font-size: 0.9rem;
  color: var(--muted);
}

.stars {
  color: var(--gold);
}

/* =========================
   RECEIVE
========================= */
.provider-receive {
  margin-top: 18px;
}

.provider-receive .label {
  font-size: 0.8rem;
  color: var(--muted);
}

.provider-receive strong {
  display: block;
  font-size: 1.6rem;
  margin: 6px 0;
}

.commission {
  font-size: 0.8rem;
  color: var(--muted);
}

/* =========================
   FEATURES
========================= */
.provider-features {
  list-style: none;
  display: grid;
  gap: 10px;
}

.provider-features li {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

/* =========================
   CTA
========================= */
.provider-right {
  text-align: center;
}

.provider-badge {
  display: inline-block;
  background: var(--gold);
  color: #000;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: 12px;
}

.cta {
  display: block;
  text-decoration: none;
  background: var(--gold);
  color: #000;
  padding: 14px;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.3s;
}

.cta:hover {
  transform: translateY(-2px);
}

.provider-savings {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
}

/* =========================
   SEO TEXT
========================= */
.seo-text {
  max-width: 820px;
  margin: auto;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .provider-shell {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .provider-features li {
    justify-content: center;
    gap: 8px;
  }

  .transfer-grid {
    grid-template-columns: 1fr;
  }
}
