/* BuscoVisaRD · estilos (mobile-first) */
:root {
  /* Colores del logo: negro tinta + azul de la bandera */
  --brand: #161616;
  --brand-700: #0b0b0b;
  --brand-600: #2e2e2e;
  --brand-50: #f0f0f0;
  --brand-100: #dcdcdc;
  --accent: #1f47b8;
  --accent-600: #183a96;
  --accent-light: #8fb2ff;
  --accent-50: #e9efff;
  --navy: #1e2a5a;

  --bg: #f4f4f2;
  --surface: #ffffff;
  --text: #161616;
  --muted: #5f6368;
  --border: #dedede;
  --focus: #3b82f6;

  --ok: #17794a;
  --ok-bg: #e2f5ea;
  --warn: #9a6200;
  --warn-bg: #fff2d6;
  --danger: #c0262d;
  --danger-bg: #fde7e8;
  --info: #22599a;
  --info-bg: #e5effa;
  --neutral: #4a5568;
  --neutral-bg: #edf0f4;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px rgba(16, 24, 40, 0.06);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
img, svg { display: block; }
a { color: var(--brand-600); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: var(--brand-700);
  color: #fff;
  border-bottom: 3px solid var(--accent);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand-logo { width: 42px; height: 42px; border-radius: 50%; background: #fff; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25); object-fit: cover; }
.brand b { color: var(--accent-light); }
.brand small { font-weight: 600; font-size: 0.8rem; color: var(--brand-100); margin-left: 4px; }
.topbar-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff; text-decoration: none; font-weight: 600; font-size: 0.9rem;
  padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.1);
  border: 0; cursor: pointer;
}
.topbar-link:hover { background: rgba(255, 255, 255, 0.18); }
.topbar-link svg { width: 18px; height: 18px; }

/* ---------- Encabezado ---------- */
.hero {
  background:
    radial-gradient(circle at 88% 12%, rgba(43, 88, 214, 0.45), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(255, 255, 255, 0.07), transparent 50%),
    linear-gradient(160deg, #0b0b0b 0%, #181818 55%, #262626 100%);
  color: #fff;
  padding: 28px 16px 76px;
  position: relative;
  overflow: hidden;
}
/* Rayas de bandera en movimiento */
.hero::before {
  content: ""; position: absolute; inset: -50%;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.035) 0 16px, transparent 16px 32px);
  animation: stripes 18s linear infinite;
}
.hero::after {
  content: ""; position: absolute; right: -70px; top: -50px; width: 240px; height: 240px;
  border-radius: 50%; border: 30px solid rgba(143, 178, 255, 0.16);
  animation: pulse-ring 6s ease-in-out infinite;
}
.hero-inner { max-width: 640px; margin: 0 auto; position: relative; z-index: 1; }
.hero-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.hero-logo {
  width: 84px; height: 84px; border-radius: 50%; background: #fff; flex: none; object-fit: cover;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12), 0 0 0 7px var(--accent), 0 12px 30px rgba(0, 0, 0, 0.45);
  animation: badge-in 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.3) both, float 6s ease-in-out 1s infinite;
}
.hero h1 { margin: 0; font-size: 1.85rem; line-height: 1.12; letter-spacing: -0.02em; animation: rise 0.6s ease 0.15s both; }
.hero h1 span { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 4px; }
.hero p { margin: 0; color: #d4d4d4; font-size: 1rem; animation: rise 0.6s ease 0.25s both; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.hero-badges li {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; font-weight: 600; padding: 6px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); color: #fff;
}
.hero-badges { animation: rise 0.6s ease 0.35s both; }
.hero-badges svg { width: 16px; height: 16px; color: var(--accent-light); }

/* ---------- Contenedor y tarjetas ---------- */
.container { max-width: 640px; margin: -48px auto 0; padding: 0 16px 40px; position: relative; z-index: 2; }
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(222, 222, 222, 0.7);
  animation: rise 0.5s ease both;
}
#booking-form .card:nth-of-type(2) { animation-delay: 0.08s; }
#booking-form .card:nth-of-type(3) { animation-delay: 0.16s; }
#booking-form .card:nth-of-type(4) { animation-delay: 0.24s; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 1.1rem; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 0.95rem;
  box-shadow: 0 0 0 3px var(--accent-50);
}

/* ---------- Campos ---------- */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label, .field .label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; }
.hint { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; }
.input, .select, .textarea {
  width: 100%; min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 96px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235b6b82' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-600); box-shadow: 0 0 0 4px var(--brand-50); outline: none; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: 0.85rem; font-weight: 600; margin: 6px 0 0; }
.field-error:empty { display: none; }
.row-2 { display: grid; gap: 16px; margin-bottom: 16px; }
.row-2 .field { margin-bottom: 0; }
.phone-group { display: grid; grid-template-columns: 118px 1fr; gap: 8px; }
.counter { float: right; font-weight: 500; font-size: 0.8rem; color: var(--muted); }

/* ---------- Calendario ---------- */
.cal { user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { margin: 0; font-weight: 800; text-transform: capitalize; font-size: 1.05rem; }
.cal-nav {
  width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--border);
  background: #fff; cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--brand);
}
.cal-nav:disabled { opacity: 0.35; cursor: default; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-week span { text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-grid.is-loading { opacity: 0.5; pointer-events: none; }
.cal-day {
  position: relative;
  aspect-ratio: 1 / 1; min-height: 42px;
  border-radius: 12px; border: 1.5px solid transparent;
  background: var(--brand-50); color: var(--brand-700);
  font-weight: 700; font-size: 0.98rem; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  transition: transform 0.1s, background 0.15s;
}
.cal-day:hover:not(:disabled) { background: var(--brand-100); }
.cal-day:active:not(:disabled) { transform: scale(0.95); }
.cal-day:disabled { background: transparent; color: #b4bfcd; cursor: default; font-weight: 500; }
.cal-day.is-today { border-color: var(--accent); }
.cal-day.is-selected, .cal-day.is-selected:hover { background: var(--brand); color: #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25); }
.cal-day .cal-badge { font-size: 0.66rem; font-weight: 700; line-height: 1; padding: 2px 5px; border-radius: 999px; background: var(--brand); color: #fff; }
.cal-day.is-selected .cal-badge { background: var(--accent); color: #fff; }
.cal-day.is-holiday { background: var(--danger-bg); color: var(--danger); }
.cal-day.is-off { background: transparent; color: #9aa7b8; font-weight: 500; }
.cal-blank { aspect-ratio: 1 / 1; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 0.78rem; color: var(--muted); }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Horarios ---------- */
.slots-wrap { margin-top: 18px; }
.slots-title { font-weight: 700; margin: 0 0 4px; }
.slots-sub { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }
.slots-sub::first-letter { text-transform: uppercase; }
.slot-group-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 12px 0 8px; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot {
  min-height: 48px; border-radius: 12px; border: 1.5px solid var(--border);
  background: #fff; font-weight: 700; cursor: pointer; font-size: 0.95rem;
}
.slot:hover { border-color: var(--brand-600); }
.slot { transition: transform 0.12s, border-color 0.15s, background 0.15s; }
.slot:hover { transform: translateY(-1px); }
.slot[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
.empty-note { padding: 14px; border-radius: 12px; background: var(--neutral-bg); color: var(--muted); font-size: 0.92rem; text-align: center; }

/* ---------- Modalidad ---------- */
.choice-grid { display: grid; gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border-radius: 14px; border: 1.5px solid var(--border); background: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.choice-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; }
.choice-icon svg { width: 24px; height: 24px; }
.choice-title { font-weight: 800; display: block; }
.choice-desc { font-size: 0.86rem; color: var(--muted); display: block; margin-top: 2px; }
.choice input:checked + .choice-body { border-color: var(--brand); background: #fafafa; box-shadow: 0 0 0 3px var(--brand-100), inset 4px 0 0 var(--accent); }
.choice input:checked + .choice-body .choice-icon { background: var(--accent); color: #fff; }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 700; cursor: pointer; text-decoration: none; font-size: 0.95rem;
  transition: background 0.15s, transform 0.1s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(43, 88, 214, 0.28); position: relative; overflow: hidden; }
.btn-primary:hover:not(:disabled) { background: var(--accent-600); }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg); animation: shine 4s ease-in-out 1.5s infinite;
}
.btn-dark { background: var(--brand); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--brand-600); }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn-ghost:hover:not(:disabled) { border-color: var(--brand-600); }
.btn-danger { background: #fff; border-color: #f3c2c5; color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-bg); }
.btn-lg { min-height: 58px; font-size: 1.08rem; border-radius: 14px; padding: 14px 22px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: 0.86rem; border-radius: 10px; }

.alert { padding: 14px 16px; border-radius: 12px; font-weight: 600; font-size: 0.93rem; margin-bottom: 14px; }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }

.submit-bar { margin-top: 6px; }
.privacy { text-align: center; font-size: 0.8rem; color: var(--muted); margin: 10px 0 0; }

/* ---------- Confirmación ---------- */
.success-card { text-align: center; padding-top: 28px; }
.success-icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; animation: badge-in 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }
.success-icon svg { width: 38px; height: 38px; }
.success-card h2 { margin: 0 0 6px; font-size: 1.5rem; }
.success-card > p { margin: 0 0 18px; color: var(--muted); }
.summary { text-align: left; border: 1px solid var(--border); border-radius: 14px; padding: 4px 16px; margin: 0 0 16px; }
.summary div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.summary div:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); font-size: 0.9rem; flex: none; }
.summary dd { margin: 0; font-weight: 700; text-align: right; }
.summary dd.first-letter::first-letter { text-transform: uppercase; }
.notice { display: flex; gap: 10px; text-align: left; padding: 14px; border-radius: 12px; background: var(--accent-50); color: #183a96; font-size: 0.92rem; margin-bottom: 16px; }
.notice svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.actions-stack { display: grid; gap: 10px; }

.footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 8px 16px 32px; }
.footer a { color: var(--muted); }

/* ---------- Pantallas más grandes ---------- */
@media (min-width: 560px) {
  .card { padding: 24px; }
  .row-2 { grid-template-columns: 1fr 1fr; }
  .slots { grid-template-columns: repeat(4, 1fr); }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 40px 16px 80px; }
  .hero h1 { font-size: 2.3rem; }
  .hero-logo { width: 104px; height: 104px; }
  .hero-head { gap: 22px; }
}

@keyframes stripes { to { transform: translate(64px, 0); } }
@keyframes pulse-ring { 50% { transform: scale(1.08); opacity: 0.7; } }
@keyframes badge-in { from { opacity: 0; transform: scale(0.5) rotate(-25deg); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-5px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Tarjeta de notificaciones push ---------- */
.push-card {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  padding: 14px; margin: 0 0 16px; border-radius: 14px;
  background: var(--brand-50); border: 1.5px dashed var(--brand-100);
}
.push-card.is-on { background: var(--ok-bg); border: 1.5px solid #bfe5cf; }
.push-card strong { display: block; margin-bottom: 2px; }
.push-card p { margin: 0 0 10px; font-size: 0.9rem; color: var(--muted); }
.push-card p:last-child { margin-bottom: 0; }
.push-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.push-icon svg { width: 22px; height: 22px; }
.push-card.is-on .push-icon { background: var(--ok); }
.push-error { color: var(--danger) !important; font-weight: 600; }

/* Crédito del desarrollador */
.credit { font-size: 0.8rem; opacity: 0.85; }
.credit a { font-weight: 700; }
