/**
 * Clics Modernos
 * Page: Cómo comprar (How to buy)
 *
 * Consistent with design tokens, container widths, paddings,
 * colors, typography and fluid aesthetics across the entire website.
 */

/* ============================================================
   PAGE SECTION & INNER CONTAINER
   ============================================================ */

.page-how-to-buy {
  background-color: var(--color-background, #F9FAFB);
  min-height: calc(100vh - 220px);
}

.how-to-buy {
  padding-block: clamp(2.5rem, 5vw, 5rem);
  width: 100%;
}

.how-to-buy__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(calc(100% - (var(--container-padding, 1.25rem) * 2)), 880px);
  margin-inline: auto;
}


/* ============================================================
   PAGE HEADER
   ============================================================ */

.how-to-buy__header {
  width: min(100%, 720px);
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.how-to-buy__title {
  margin: 0;
  color: var(--color-foreground, #0F172A);
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: clamp(2.25rem, 4.2vw, 3.125rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.how-to-buy__subtitle {
  max-width: 580px;
  margin: 0.875rem auto 0;

  color: #475569;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  text-wrap: balance;
}


/* ============================================================
   STEPS LIST
   ============================================================ */

.how-to-buy__steps {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 1.8vw, 1.35rem);
  width: 100%;
}

.how-to-buy__step-card {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.125rem, 2.8vw, 1.65rem);

  padding: clamp(1.25rem, 2.8vw, 1.75rem);
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 1.25rem;

  box-shadow:
    0 4px 18px -2px rgba(15, 23, 42, 0.035),
    0 2px 6px -1px rgba(15, 23, 42, 0.015);

  transition:
    transform var(--duration-base, 250ms) var(--ease-apple, cubic-bezier(0.22, 1, 0.36, 1)),
    box-shadow var(--duration-base, 250ms) var(--ease-apple, cubic-bezier(0.22, 1, 0.36, 1)),
    border-color var(--duration-base, 250ms) var(--ease-apple, cubic-bezier(0.22, 1, 0.36, 1));
}

.how-to-buy__step-card:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow:
    0 12px 28px -4px rgba(15, 23, 42, 0.07),
    0 4px 10px -2px rgba(15, 23, 42, 0.03);
}

/* Step Aside: Number & Icon */
.how-to-buy__step-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.how-to-buy__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;

  border-radius: 0.875rem;
  background-color: #0F172A;
  color: #FFFFFF;

  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;

  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.how-to-buy__step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;

  border-radius: 50%;
  background-color: #F1F5F9;
  color: #334155;
}

/* Step Main Content */
.how-to-buy__step-main {
  flex: 1;
  min-width: 0;
}

.how-to-buy__step-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.how-to-buy__step-title {
  margin: 0;
  color: #0F172A;
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.how-to-buy__step-desc {
  margin: 0;
  color: #475569;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.96875rem;
  line-height: 1.6;
}

/* Actions inside step cards */
.how-to-buy__step-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}

.how-to-buy__step-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;

  color: #0F172A;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.84375rem;
  font-weight: 600;
  text-decoration: none;

  padding: 0.25rem 0.65rem;
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 9999px;

  transition:
    background-color var(--duration-fast, 150ms) ease,
    border-color var(--duration-fast, 150ms) ease,
    color var(--duration-fast, 150ms) ease,
    transform var(--duration-fast, 150ms) ease;
}

.how-to-buy__step-link:hover {
  background-color: #0F172A;
  border-color: #0F172A;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.how-to-buy__step-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;

  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background-color: #F1F5F9;
  color: #475569;

  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.78125rem;
  font-weight: 600;
}

.how-to-buy__step-badge--success {
  background-color: #ECFDF5;
  color: #059669;
}


/* ============================================================
   HELP CARD ("¿Necesitás ayuda?")
   ============================================================ */

.how-to-buy__help-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;

  width: 100%;
  margin-top: clamp(2rem, 3.5vw, 2.75rem);
  padding: clamp(1.35rem, 3.2vw, 1.85rem);

  background: linear-gradient(135deg, #F0FDF4 0%, #FFFFFF 100%);
  border: 1px solid #DCFCE7;
  border-radius: 1.25rem;

  box-shadow:
    0 4px 18px -2px rgba(22, 163, 74, 0.05),
    0 2px 6px -1px rgba(22, 163, 74, 0.03);
}

.how-to-buy__help-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;

  border-radius: 1rem;
  background-color: #DCFCE7;
  color: #16A34A;

  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.12);
}

.how-to-buy__help-content {
  flex: 1;
  min-width: 0;
}

.how-to-buy__help-title {
  margin: 0 0 0.25rem;
  color: #0F172A;
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: clamp(1.15rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.25;
}

.how-to-buy__help-desc {
  margin: 0;
  color: #475569;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.how-to-buy__help-cta {
  flex-shrink: 0;
}

.how-to-buy__help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  height: 2.875rem;
  padding: 0 1.5rem;

  border-radius: 9999px;
  background-color: #16A34A;
  color: #FFFFFF;

  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.90625rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;

  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.22);

  transition:
    background-color var(--duration-fast, 150ms) ease,
    transform var(--duration-fast, 150ms) ease,
    box-shadow var(--duration-fast, 150ms) ease;
}

.how-to-buy__help-btn:hover {
  background-color: #15803D;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.32);
}


/* ============================================================
   PROCESS SUMMARY ("Corto de todo el proceso")
   ============================================================ */

.how-to-buy__summary {
  width: 100%;
  margin-top: clamp(2rem, 3.5vw, 2.75rem);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);

  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 1.375rem;

  box-shadow:
    0 4px 20px -2px rgba(15, 23, 42, 0.04),
    0 2px 6px -1px rgba(15, 23, 42, 0.02);
}

.how-to-buy__summary-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.how-to-buy__summary-eyebrow {
  display: block;
  color: #64748B;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.how-to-buy__summary-title {
  margin: 0;
  color: #0F172A;
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

/* Stepper Track */
.how-to-buy__stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.5rem;
}

.how-to-buy__stepper-node {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  padding: 0.55rem 0.95rem;
  border-radius: 9999px;
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;

  transition:
    background-color var(--duration-fast, 150ms) ease,
    border-color var(--duration-fast, 150ms) ease,
    transform var(--duration-fast, 150ms) ease;
}

.how-to-buy__stepper-node:hover {
  background-color: #F1F5F9;
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

.how-to-buy__stepper-node--final {
  background-color: #F0FDF4;
  border-color: #DCFCE7;
}

.how-to-buy__stepper-node--final:hover {
  background-color: #DCFCE7;
  border-color: #BBF7D0;
}

.how-to-buy__stepper-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;

  border-radius: 50%;
  background-color: #0F172A;
  color: #FFFFFF;

  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 0.71875rem;
  font-weight: 700;
  line-height: 1;
}

.how-to-buy__stepper-badge--final {
  background-color: #16A34A;
  color: #FFFFFF;
}

.how-to-buy__stepper-label {
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 0.859375rem;
  font-weight: 600;
  color: #0F172A;
  white-space: nowrap;
}

.how-to-buy__stepper-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  flex-shrink: 0;
  padding-inline: 0.1rem;
}

/* Bottom CTA inside summary */
.how-to-buy__summary-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}

.how-to-buy__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  height: 2.875rem;
  padding: 0 1.85rem;

  border-radius: 9999px;
  background-color: #0F172A;
  color: #FFFFFF;

  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;

  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);

  transition:
    background-color var(--duration-fast, 150ms) ease,
    transform var(--duration-fast, 150ms) ease,
    box-shadow var(--duration-fast, 150ms) ease;
}

.how-to-buy__cta-btn:hover {
  background-color: #1E293B;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}


/* ============================================================
   RESPONSIVE (MOBILE & TABLET)
   ============================================================ */

@media (max-width: 767px) {
  .how-to-buy {
    padding-block: 2rem 3rem;
  }

  .how-to-buy__header {
    margin-bottom: 1.75rem;
  }

  .how-to-buy__step-card {
    padding: 1.125rem;
    gap: 0.875rem;
    border-radius: 1.125rem;
  }

  .how-to-buy__step-aside {
    gap: 0.35rem;
  }

  .how-to-buy__step-num {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 0.8125rem;
    border-radius: 0.65rem;
  }

  .how-to-buy__step-icon {
    width: 1.85rem;
    height: 1.85rem;
  }

  .how-to-buy__step-icon svg {
    width: 16px;
    height: 16px;
  }

  .how-to-buy__step-title {
    font-size: 1.0625rem;
  }

  .how-to-buy__step-desc {
    font-size: 0.90625rem;
  }

  /* Help Card Mobile */
  .how-to-buy__help-card {
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
    gap: 1rem;
    text-align: center;
  }

  .how-to-buy__help-icon-wrap {
    margin-inline: auto;
  }

  .how-to-buy__help-btn {
    width: 100%;
    justify-content: center;
  }

  /* Stepper Mobile */
  .how-to-buy__summary {
    padding: 1.25rem;
    border-radius: 1.125rem;
  }

  .how-to-buy__stepper {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0;
  }

  .how-to-buy__stepper-node {
    width: 100%;
    justify-content: flex-start;
    padding: 0.65rem 1rem;
  }

  .how-to-buy__stepper-arrow {
    transform: rotate(90deg);
    margin-block: -0.25rem;
    padding: 0;
  }

  .how-to-buy__cta-btn {
    width: 100%;
  }
}