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

:root {
  --primary: #003087;
  --primary-light: #009cde;
  --green: #27ae60;
  --bg: #f5f7fa;
  --card-bg: #fff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

/* ── Navbar ─────────────────────────────── */
.navbar {
  background: var(--primary);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  overflow: hidden;
}
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo-img {
  height: 40px !important;
  width: 40px !important;
  max-height: 40px !important;
  max-width: 40px !important;
  object-fit: contain;
  display: block;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }

/* ── Hero ────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0057a8 100%);
  color: #fff;
  padding: 60px 24px 80px;
  text-align: center;
}
.hero h1 { font-size: clamp(26px, 5vw, 42px); font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.hero-sub { font-size: 17px; opacity: 0.85; max-width: 520px; margin: 0 auto; }
.brand { color: var(--primary-light); }

.page-hero {
  background: var(--primary);
  color: #fff;
  padding: 40px 24px;
  text-align: center;
}
.page-hero h1 { font-size: 28px; font-weight: 700; }
.page-hero p { opacity: 0.8; margin-top: 8px; }

/* ── Card ────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

/* ── Calculator ──────────────────────────── */
.calculator-section {
  padding: 0 16px;
  margin-top: -40px;
}
.calculator-card {
  max-width: 520px;
  margin: 0 auto;
}
.calculator-card h2 { font-size: 18px; margin-bottom: 24px; color: var(--text); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary-light); }
.form-group small { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

.input-prefix { display: flex; align-items: center; gap: 0; }
.input-prefix span { background: #f3f4f6; border: 2px solid var(--border); border-right: none; padding: 12px 14px; border-radius: 8px 0 0 8px; font-size: 16px; color: var(--muted); font-weight: 600; }
.input-prefix input { border-radius: 0 8px 8px 0; flex: 1; }

.result-box {
  background: #f0f9ff;
  border: 2px solid #bae6fd;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}
.result-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 15px; }
.result-row.total { border-top: 1px solid #bae6fd; margin-top: 8px; padding-top: 14px; font-size: 17px; }
.result-row.commission { font-size: 13px; }
.green { color: var(--green); }
.muted { color: var(--muted); }

.btn-pay {
  width: 100%;
  background: linear-gradient(135deg, #003087, #009cde);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 8px;
  letter-spacing: 0.3px;
}
.btn-pay:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); }
.btn-pay:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 11px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--primary); color: #fff; }

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s;
}
.btn-whatsapp:hover { opacity: 0.88; }

.spinner {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  padding: 16px;
}
.spin {
  width: 20px; height: 20px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.disclaimer { font-size: 12px; color: var(--muted); margin-top: 16px; line-height: 1.5; }

.notice { background: #fff3cd; border-left: 4px solid #ffc107; padding: 12px 16px; border-radius: 6px; font-size: 14px; }
.notice a { color: var(--primary); }

/* ── How it works ────────────────────────── */
.how-it-works {
  padding: 64px 16px;
}
.container { max-width: 900px; margin: 0 auto; }
.how-it-works h2 { text-align: center; font-size: 26px; margin-bottom: 40px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.step-num {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--muted); }

/* ── Form section ────────────────────────── */
.form-section { padding: 40px 16px 64px; }
.form-card { max-width: 540px; margin: 0 auto; }
.form-card h2 { font-size: 20px; margin-bottom: 8px; }
hr.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.section-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #d1e7dd; color: #0f5132; }
.alert-error { background: #f8d7da; color: #842029; }

.help-tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  background: var(--muted);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Success / Cancel pages ──────────────── */
.success-icon {
  width: 72px; height: 72px;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  font-size: 36px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.cancel-icon {
  width: 72px; height: 72px;
  background: #6b7280;
  color: #fff;
  border-radius: 50%;
  font-size: 36px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.receipt-box {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin: 24px 0;
  text-align: left;
}
.receipt-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
.receipt-row:last-child { border-bottom: none; }
.receipt-row code { font-size: 12px; background: #e9ecef; padding: 2px 6px; border-radius: 4px; }

/* ── Contact ────────────────────────────── */
.contact-icon { margin-bottom: 16px; }

/* ── WhatsApp float button ─────────────── */
.whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25D366;
  color: #fff;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 999;
}
.whatsapp-btn:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37,211,102,0.5); }

/* ── Cambiar button ─────────────────────── */
.btn-cambiar {
  display: block;
  width: fit-content;
  min-width: 240px;
  margin: 20px auto 0;
  background: linear-gradient(135deg, #0070ba 0%, #003087 100%);
  color: #fff;
  border: none;
  padding: 16px 36px;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.4px;
  box-shadow: 0 6px 24px rgba(0,48,135,0.35);
  transition: transform 0.18s, box-shadow 0.18s;
  text-align: center;
}
.btn-cambiar:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0,48,135,0.45);
}
.btn-cambiar:active { transform: translateY(0); }

/* ── Modal ──────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 460px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
.modal-box h3 { font-size: 20px; margin-bottom: 4px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  font-size: 22px; cursor: pointer; color: var(--muted);
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

/* ── Method cards ───────────────────────── */
.method-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.method-card {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.method-card input[type="radio"] { display: none; }
.method-card:has(input:checked), .method-card.selected {
  border-color: var(--primary);
  background: #e8f0fe;
}
.method-card:hover { border-color: var(--primary-light); }
.method-icon { font-size: 22px; }
.method-card strong { font-size: 13px; }
.method-card small { color: var(--muted); }
.method-fields { margin-top: 4px; }

/* ── File input ─────────────────────────── */
input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  background: #fafafa;
}
input[type="file"]:hover { border-color: var(--primary-light); }

/* ── Footer ─────────────────────────────── */
footer {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: #fff;
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 480px) {
  .navbar { padding: 0 16px; }
  .nav-links { gap: 14px; }
  .calculator-card, .form-card { padding: 20px 16px; }
  .hero { padding: 40px 16px 60px; }
}
