/* ============================================================
   Recorriendo México — main.css
   Sistema visual: UI moderna + alma mexicana.
   Modo claro, tipografía Inter + Fraunces.
   Fuentes cargadas via <link> en cada HTML.
   ============================================================ */

/* ---------- Custom properties ---------- */
:root {
  /* ----- Base / superficies ----- */
  --color-bg:          #FFFFFF;   /* Blanco — superficie principal */
  --color-surface:     #FFFFFF;   /* Cards limpias */
  --color-surface-2:   #F2F1EE;   /* Gris cálido claro (zonas alternas) */
  --color-elevated:    #FFFFFF;   /* Modales, popovers */
  --color-border:      rgba(44, 40, 36, 0.10);
  --color-border-strong: rgba(44, 40, 36, 0.20);

  /* ----- Tipografía ----- */
  --color-ink:         #241F1B;   /* Texto principal — negro cálido */
  --color-ink-soft:    #3B342E;   /* Texto secundario fuerte */
  --color-ink-muted:   #6C625A;   /* Texto secundario suave */
  --color-ink-faint:   #9C948C;   /* Labels, pies */

  /* ----- Paleta principal (mapa adjunto) ----- */
  --color-blue:          #3C5486;  /* Azul acero */
  --color-blue-deep:     #2C3E66;  /* Azul oscuro — botones */
  --color-blue-soft:     #B7C1D6;  /* Azul claro — fondos suaves */
  --color-terracota:     #9C4A38;  /* Terracota / ladrillo */
  --color-terracota-deep:#7C3A2C;
  --color-green:         #567D55;  /* Verde */
  --color-gold:          #E8B84C;  /* Amarillo / oro */
  --color-gray:          #C9C9C9;  /* Gris neutro */

  /* Acento principal = terracota (CTA, highlights, focus). */
  --color-accent:      #9C4A38;   /* Terracota — acento principal */
  --color-accent-warm: #E8B84C;   /* Oro — segundo stop de gradientes */
  --color-accent-deep: #7C3A2C;   /* Terracota oscuro — active */

  /* Aliases de compatibilidad (nombres previos) */
  --color-fuchsia:     #9C4A38;
  --color-fuchsia-deep:#7C3A2C;

  /* ----- Detalles ----- */
  --color-fresh:       #567D55;   /* Verde — success */
  --color-cool:        #3C5486;   /* Azul — info / secondary */
  --color-alert:       #C0392B;   /* Rojo ladrillo — errores / outline */

  /* ----- Legacy aliases (compatibilidad con CSS hijos) ----- */
  --color-text:        var(--color-ink);
  --color-text-muted:  var(--color-ink-muted);
  --color-accent-2:    var(--color-accent-deep);
  --color-success:     var(--color-fresh);

  /* ----- Tipografía ----- */
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Plus Jakarta Sans', sans-serif;

  /* ----- Spacing scale ----- */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  /* ----- Radius (corners más generosos, app-style) ----- */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* ----- Sombras (modo claro, suaves y modernas) ----- */
  --shadow-xs: 0 1px 2px rgba(26, 20, 16, 0.04);
  --shadow-sm: 0 2px 8px rgba(26, 20, 16, 0.06);
  --shadow-md: 0 6px 18px rgba(26, 20, 16, 0.08);
  --shadow-lg: 0 16px 40px rgba(26, 20, 16, 0.10);
  --shadow-xl: 0 28px 64px rgba(26, 20, 16, 0.14);
  --shadow-accent: 0 12px 30px rgba(156, 74, 56, 0.26);

  /* ----- Motion ----- */
  --ease:       cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 220ms var(--ease);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  animation: fadeIn 520ms var(--ease) both;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
select {
  font-family: inherit;
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

/* ---------- Animaciones ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%   { background-position: -480px 0; }
  100% { background-position: 480px 0; }
}

/* ---------- Accesibilidad: focus ---------- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Utilidades ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--color-ink-muted);
}

/* ============================================================
   Logo como imagen (proporción 20:9) — navbar y footer
   ============================================================ */
.nav-logo {
  display: inline-flex;
  align-items: center;
}

.nav-logo img {
  display: block;
  height: 36px;
  width: auto;
  aspect-ratio: 20 / 9;
  object-fit: contain;
}

.footer-logo img {
  display: block;
  height: 46px;
  width: auto;
  aspect-ratio: 20 / 9;
  object-fit: contain;
  margin: 0 auto;
}

/* ============================================================
   Banner / botón Autorenta
   ============================================================ */
.autorenta-banner {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition);
}

.autorenta-banner:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.autorenta-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;   /* respeta la proporción, no se corta */
  object-fit: cover;
}

/* Banner de texto (fallback si no hay imagen de banner) */
.autorenta-banner--text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  text-align: left;
  background: linear-gradient(135deg, var(--color-blue-deep), var(--color-blue));
  color: #FFFFFF;
  border: none;
}

.autorenta-banner--text .ab-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}

.autorenta-banner--text .ab-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.autorenta-banner--text .ab-cta {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.95;
}

/* Botón "Reserva tu auto" — azul obscuro, rounded, outline rojo, carrito */
.autorenta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  padding: 0 22px;
  background: var(--color-blue-deep);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 2px solid var(--color-alert);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition);
}

.autorenta-btn:hover {
  transform: translateY(-1px);
  background: #123a94;
  box-shadow: 0 12px 28px rgba(22, 63, 158, 0.28);
}

.autorenta-btn:active {
  transform: scale(0.985);
}

.autorenta-btn svg {
  flex-shrink: 0;
}

/* ============================================================
   Form fields — select
   ============================================================ */
.rm-field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  margin-bottom: var(--space-sm);
}

.rm-select {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  background-color: var(--color-surface);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236B5E50' stroke-width='1.8' stroke-linecap='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-ink);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.rm-select:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.rm-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(156, 74, 56, 0.16);
}

.rm-select option {
  background: var(--color-surface);
  color: var(--color-ink);
}

/* ============================================================
   Bipolar slider component
   ============================================================ */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.slider-row {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: var(--space-sm);
}

.pole {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-ink-muted);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.pole-left  { text-align: right; }
.pole-right { text-align: left; }

.slider-track {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
}

/* Base unfilled track line */
.slider-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(26, 20, 16, 0.08);
  border-radius: var(--radius-pill);
}

/* Fill bar — width set by JS */
.slider-fill {
  position: absolute;
  left: 0;
  height: 4px;
  width: 50%;
  background: linear-gradient(90deg, var(--color-accent-warm), var(--color-accent));
  border-radius: var(--radius-pill);
  pointer-events: none;
  transition: width 90ms linear;
}

/* The native range input — interaction layer on top */
.rm-slider {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

.rm-slider:focus {
  outline: none;
}

/* WebKit / Blink track */
.rm-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border-radius: var(--radius-pill);
}

/* WebKit / Blink thumb */
.rm-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border: 3px solid var(--color-surface);
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 2px 8px rgba(156, 74, 56, 0.36), var(--shadow-sm);
  transition: transform 140ms var(--ease), box-shadow var(--transition);
}

.rm-slider:hover::-webkit-slider-thumb {
  transform: scale(1.12);
}

.rm-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 6px rgba(156, 74, 56, 0.22), var(--shadow-sm);
}

.rm-slider:active::-webkit-slider-thumb {
  transform: scale(1.18);
}

/* Firefox track */
.rm-slider::-moz-range-track {
  height: 4px;
  background: transparent;
  border-radius: var(--radius-pill);
}

.rm-slider::-moz-range-progress {
  height: 4px;
  background: transparent;
}

/* Firefox thumb */
.rm-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid var(--color-surface);
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 2px 8px rgba(156, 74, 56, 0.36);
  transition: transform 140ms var(--ease), box-shadow var(--transition);
}

.rm-slider:hover::-moz-range-thumb {
  transform: scale(1.12);
}

.rm-slider:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 6px rgba(156, 74, 56, 0.22);
}

/* Disabled slider */
.slider-row.is-disabled {
  opacity: 0.4;
}

.rm-slider:disabled {
  cursor: not-allowed;
}

.slider-tooltip {
  grid-column: 1 / -1;
  margin-top: -6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-accent);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ============================================================
   Primary button
   ============================================================ */
.rm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  padding: 0 22px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-deep) 100%);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-accent);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.rm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(156, 74, 56, 0.32);
  filter: brightness(1.05);
}

.rm-btn:active {
  transform: scale(0.985);
  filter: brightness(0.96);
}

.rm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: grayscale(0.2);
}

/* Variante grande — CTA principal del landing */
.rm-btn--lg {
  height: 62px;
  font-size: 17px;
  gap: 12px;
  border-radius: var(--radius-lg);
  letter-spacing: 0.02em;
}

.rm-btn--lg svg {
  width: 24px;
  height: 24px;
}

/* Secondary / ghost variants — disponibles si los HTML los quieren usar */
.rm-btn--secondary {
  background: var(--color-surface);
  color: var(--color-ink);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-xs);
}

.rm-btn--secondary:hover {
  background: var(--color-surface-2);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  filter: none;
}

.rm-btn--ghost {
  background: transparent;
  color: var(--color-ink);
  box-shadow: none;
}

.rm-btn--ghost:hover {
  background: rgba(26, 20, 16, 0.04);
  filter: none;
  box-shadow: none;
}

/* ============================================================
   Toast notification
   ============================================================ */
.rm-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 1000;
  padding: 14px 24px;
  background: var(--color-ink);
  color: #FAF6EF;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms var(--ease), transform 280ms var(--ease);
}

.rm-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   Custom scrollbar (sutil en modo claro)
   ============================================================ */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 20, 16, 0.18) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(26, 20, 16, 0.16);
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 20, 16, 0.28);
}
