/* =============================================
   +Móvil - Hoja de Estilos Global
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --- Variables de Diseño --- */
:root {
  --orange: #FF4713;
  --purple: #842B8C;
  --purple-hover: #6E2475;
  --purple-light: #F3E5F5;
  --purple-border: rgba(132, 43, 140, 0.45);
  --green: #4CAF50;
  --green-valid: #28A745;
  --yellow-step: #C5B200;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-300: #E0E0E0;
  --gray-400: #BDBDBD;
  --gray-500: #9E9E9E;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  --white: #FFFFFF;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container-max: 1200px;
  --card-max: 620px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --radius-full: 50%;
  --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.10);
  --transition: 0.2s ease;
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: var(--gray-900);
  background-color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

/* =============================================
   TOP BAR
   ============================================= */
.topbar {
  background-color: #1A1A1A;
  padding: 6px 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.topbar__link {
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__icon {
  width: 20px;
  height: 16px;
  border: 2px solid #C084FC;
  border-radius: 3px;
  position: relative;
}

.topbar__icon::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 2px;
  background: #C084FC;
  border-radius: 1px;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  display: flex;
  align-items: center;
  padding: 0 40px;
  height: 60px;
  background: var(--white);
  position: relative;
}

.navbar__logo {
  margin-right: 40px;
  flex-shrink: 0;
}

.navbar__logo img {
  height: 30px;
  width: auto;
}

.navbar__nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar__link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  position: relative;
  transition: color var(--transition);
}

.navbar__link:hover {
  color: var(--gray-900);
}

.navbar__link--active {
  font-weight: 600;
  color: var(--gray-900);
}

.navbar__link--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--purple);
}

/* =============================================
   GRADIENT BANNER (Index)
   ============================================= */
.gradient-banner {
  background: url('../assets/banner.png') center/cover no-repeat;
  padding: 28px 40px;
  color: var(--white);
}

.gradient-banner__title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.3;
}

.gradient-banner__subtitle {
  font-size: 0.92rem;
  font-weight: 400;
  opacity: 0.95;
}

/* =============================================
   GRID DE MONTOS (Recargar)
   ============================================= */
.amount-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.amount-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.amount-option:hover {
  border-color: var(--gray-400);
}

.radio-input:checked + .amount-option {
  border-color: var(--purple);
}

.radio-input:checked + .amount-option .radio-visual {
  border-color: var(--purple);
  background: var(--purple);
}

.radio-input:checked + .amount-option .radio-visual::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--white);
}

/* =============================================
   CONTENIDO PRINCIPAL
   ============================================= */
.main-content {
  flex: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* =============================================
   TITULO DE PAGINA
   ============================================= */
.page-title {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.page-subtitle {
  text-align: center;
  font-size: 16px;
  color: var(--gray-600);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* =============================================
   ENLACE VOLVER
   ============================================= */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--orange);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 28px;
}

.back-link__arrow {
  font-size: 20px;
  line-height: 1;
}

/* =============================================
   TARJETAS DE SERVICIO (Index)
   ============================================= */
.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 210px;
  height: 130px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  cursor: pointer;
  transition: all var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--gray-300);
  transform: translateY(-2px);
}

.service-card__icon {
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  color: var(--purple);
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
}

.service-card__label {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: var(--gray-900);
  line-height: 1.4;
}

/* =============================================
   TEXTO DE TERMINOS
   ============================================= */
.terms-text {
  text-align: center;
  font-size: 14px;
  color: var(--gray-600);
}

.terms-link {
  color: var(--purple);
  text-decoration: underline;
}

/* =============================================
   FORM CARD (contenedor formularios)
   ============================================= */
.form-card {
  max-width: var(--card-max);
  margin: 0 auto;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
}

/* =============================================
   PHONE INPUT
   ============================================= */
.phone-group {
  margin-bottom: 28px;
}

.phone-group__label {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}

.phone-group__inputs {
  display: flex;
  gap: 12px;
}

.phone-group__prefix {
  width: 72px;
  padding: 13px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  background: var(--white);
  color: var(--gray-900);
}

.phone-group__number {
  flex: 1;
  padding: 13px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: var(--white);
}

.phone-group__number::placeholder {
  color: var(--gray-400);
}

/* =============================================
   STEPPER (Pasos de progreso)
   ============================================= */
.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 36px;
}

.stepper__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.stepper__circle {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  border: 2.5px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-400);
  background: var(--white);
}

.stepper__circle--completed {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.stepper__circle--current {
  border-color: var(--yellow-step);
  color: var(--yellow-step);
}

.stepper__label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
}

.stepper__label--active {
  font-weight: 700;
  color: var(--gray-900);
}

.stepper__line {
  width: 90px;
  height: 4px;
  background: var(--gray-300);
  margin-top: 13px;
  flex-shrink: 0;
}

.stepper__line--completed {
  background: var(--green);
}

.stepper__line--current {
  background: var(--yellow-step);
}

/* =============================================
   AMOUNT CARD (Pagar todo)
   ============================================= */
.amount-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  cursor: pointer;
  transition: border-color var(--transition);
}

.amount-card--selected {
  border-color: var(--gray-300);
}

.amount-card__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.amount-card__amount {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--gray-900);
}

.amount-card__date {
  font-size: 13px;
  color: var(--gray-600);
}

/* =============================================
   RADIO BUTTON
   ============================================= */
.radio {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-400);
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition);
}

.radio--selected {
  border-color: var(--purple);
  background: var(--purple);
}

.radio--selected::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--white);
}

/* =============================================
   OTRA CANTIDAD
   ============================================= */
.other-amount {
  margin-bottom: 28px;
}

.other-amount__label {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
}

.other-amount__input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: var(--white);
}

.other-amount__input::placeholder {
  color: var(--gray-400);
}

/* =============================================
   PAYMENT OPTIONS (Método de pago)
   ============================================= */
.payment-option {
  display: flex;
  align-items: center;
  padding: 22px 24px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  cursor: pointer;
  transition: border-color var(--transition);
}

.payment-option--selected {
  border-color: var(--purple);
}

.payment-option__icon {
  width: 24px;
  height: 24px;
  margin-right: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-option__icon svg {
  width: 100%;
  height: 100%;
}

.payment-option__label {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
}

.payment-option__radio {
  margin-left: auto;
}

/* =============================================
   FORM GROUPS (Detalles de pago)
   ============================================= */
.form-group {
  margin-bottom: 22px;
}

.form-group__label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group__help {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-400);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  cursor: help;
}

.form-group__input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: border-color var(--transition);
  background: var(--white);
}

.form-group__input:focus {
  border-color: var(--purple);
}

.form-group__input--valid {
  border-color: var(--green-valid);
}

.form-group__input-wrapper {
  position: relative;
}

.form-group__input-wrapper .form-group__input {
  padding-left: 44px;
  padding-right: 44px;
}

.form-group__input-wrapper .form-group__input--no-left-icon {
  padding-left: 16px;
}

.form-group__input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-group__valid-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* =============================================
   BOTONES
   ============================================= */
.btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 16px 32px;
  border-radius: var(--radius-xl);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn--inactive {
  background: var(--gray-200);
  color: var(--gray-600);
  cursor: default;
}

.btn--active {
  background: var(--purple);
  color: var(--white);
}

.btn--active:hover {
  background: var(--purple-hover);
}

/* =============================================
   ENLACE DE DUDAS
   ============================================= */
.doubts-link {
  display: block;
  text-align: center;
  margin-top: 24px;
  color: var(--purple);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
}

/* =============================================
   CLAVE ICON (bandera)
   ============================================= */
.clave-icon {
  width: 28px;
  height: 18px;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  flex-shrink: 0;
}

.clave-icon__red {
  width: 50%;
  height: 100%;
  background: #CE1126;
}

.clave-icon__blue {
  width: 50%;
  height: 100%;
  background: #003DA5;
}

/* =============================================
   MASTERCARD ICON
   ============================================= */
.mc-icon {
  display: flex;
  align-items: center;
  position: relative;
  width: 28px;
  height: 18px;
}

.mc-icon__circle {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  position: absolute;
}

.mc-icon__circle--red {
  background: #EB001B;
  left: 0;
}

.mc-icon__circle--yellow {
  background: #F79E1B;
  left: 10px;
}

/* =============================================
   LOADING OVERLAY
   ============================================= */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.spinner {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  position: relative;
  margin-bottom: 32px;
  animation: spinner-rotate 1s steps(8) infinite;
  box-shadow:
     0px -24px 0 0    rgba(255, 255, 255, 1),
     17px -17px 0 0    rgba(255, 255, 255, 0.875),
     24px 0px 0 0      rgba(255, 255, 255, 0.75),
     17px 17px 0 0     rgba(255, 255, 255, 0.625),
     0px 24px 0 0      rgba(255, 255, 255, 0.5),
    -17px 17px 0 0     rgba(255, 255, 255, 0.375),
    -24px 0px 0 0      rgba(255, 255, 255, 0.25),
    -17px -17px 0 0    rgba(255, 255, 255, 0.125);
}

@keyframes spinner-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.loading-btn {
  padding: 14px 48px;
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: var(--radius-xl);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  margin-top: auto;
  border-top: 3px solid transparent;
  border-image: linear-gradient(to right, var(--purple), #C2185B, var(--purple)) 1;
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__logo img {
  height: 34px;
  width: auto;
}

.footer__copyright {
  font-size: 14px;
  color: var(--gray-600);
}

.footer__social {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer__social-icon {
  width: 24px;
  height: 24px;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer__social-icon svg {
  width: 100%;
  height: 100%;
}

/* =============================================
   CHECKMARK SVG en stepper
   ============================================= */
.checkmark {
  display: inline-block;
  width: 14px;
  height: 14px;
}

/* =============================================
   VALID CHECK CIRCLE
   ============================================= */
.valid-check {
  width: 22px;
  height: 22px;
}

/* =============================================
   FORMULARIOS INTERACTIVOS (CSS-only)
   ============================================= */

/* Radio input oculto (accesible) */
.radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Indicador visual del radio */
.radio-visual {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-400);
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition);
}

/* Radio seleccionado */
.radio-input:checked + .amount-card .radio-visual,
.radio-input:checked + .payment-option .radio-visual {
  border-color: var(--purple);
  background: var(--purple);
}

.radio-input:checked + .amount-card .radio-visual::after,
.radio-input:checked + .payment-option .radio-visual::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--white);
}

/* Borde de payment-option seleccionada */
.radio-input:checked + .payment-option {
  border-color: var(--purple);
}

/* Contenedor interactivo - botón inactivo por defecto */
.form-interactive .btn {
  background: var(--gray-200);
  color: var(--gray-600);
  pointer-events: none;
  cursor: default;
  text-decoration: none;
}

/* Activar botón cuando TODOS los campos requeridos son válidos */
.form-interactive:has(:required):not(:has(:required:invalid)) .btn {
  background: var(--purple);
  color: var(--white);
  pointer-events: auto;
  cursor: pointer;
}

.form-interactive:has(:required):not(:has(:required:invalid)) .btn:hover {
  background: var(--purple-hover);
}

/* Validación visual - borde verde en inputs válidos con contenido */
.form-interactive input:required:valid:not(:placeholder-shown) {
  border-color: var(--green-valid);
}

/* Checkmark de validación - oculto por defecto */
.form-group__valid-icon {
  display: none;
}

/* Mostrar checkmark cuando input es válido */
.form-group__input:required:valid:not(:placeholder-shown) ~ .form-group__valid-icon {
  display: flex;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .topbar {
    padding: 6px 16px;
  }

  .navbar {
    padding: 0 16px;
    height: 56px;
  }

  .navbar__logo {
    margin-right: 20px;
  }

  .navbar__link {
    padding: 0 12px;
    font-size: 13px;
  }

  .main-content {
    padding: 24px 16px 40px;
  }

  .services-grid {
    gap: 16px;
  }

  .service-card {
    width: 160px;
    height: 120px;
  }

  .form-card {
    padding: 28px 24px;
  }

  .footer {
    padding: 20px 16px;
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer__copyright {
    font-size: 12px;
    order: 3;
    width: 100%;
    text-align: center;
  }

  .stepper__line {
    width: 50px;
  }
}

/* =============================================
   PLANES DE PAQUETE (Comprar Paquete)
   ============================================= */
.plan-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto 8px;
}

.plan-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px 22px 20px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition);
}

.plan-card:hover {
  box-shadow: var(--shadow-hover);
}

.plan-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.plan-card__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #B35C00;
  border: 1.5px solid #E07B00;
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.plan-card__price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.plan-card__btn {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--purple);
  color: var(--white);
  text-align: center;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-xl);
  margin-bottom: 20px;
  transition: background var(--transition), transform var(--transition);
}

.plan-card__btn:hover {
  background: var(--purple-hover);
  transform: translateY(-1px);
}

.plan-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-feat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
}

.plan-feat__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--gray-700);
  margin-top: 1px;
}

.plan-feat__body {
  display: flex;
  flex-direction: column;
}

.plan-feat__title {
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.3;
}

.plan-feat__sub {
  font-size: 0.8rem;
  color: var(--purple);
  font-weight: 400;
  line-height: 1.3;
}

/* Info de saldo disponible */
.plan-info {
  text-align: center;
  font-size: 0.84rem;
  color: var(--gray-600);
  margin-bottom: 20px;
  line-height: 1.5;
}

.plan-info a,
.plan-info .itbms {
  color: var(--purple);
  font-weight: 500;
  text-decoration: none;
}

.plan-info .saldo {
  color: var(--purple);
  font-weight: 600;
}

