/* =========================================================
   FILTRA TU PLACA — Design tokens
   Concepto: la placa vehicular como objeto de identidad.
   ========================================================= */
:root {
  /* Color */
  --navy: #0B1F3A;
  --navy-2: #123458;
  --navy-deep: #081020;
  --yellow: #F5B700;
  --yellow-deep: #C98F00;
  --sky: #2E9BE0;
  --sky-deep: #1B76B3;
  --green: #1E9E6B;
  --green-deep: #157A54;

  --paper: #F5F6F8;
  --white: #FFFFFF;
  --line: #DEE3EA;
  --line-strong: #C4CCD8;
  --text: #16212F;
  --text-muted: #55677E;
  --text-soft: #8695AA;

  --on-navy: #E8ECF2;
  --on-navy-muted: #93A4BE;
  --on-navy-line: rgba(232, 236, 242, 0.14);

  /* Type */
  --f-display: 'Space Grotesk', 'Inter', sans-serif;
  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(11, 31, 58, 0.04), 0 12px 32px rgba(11, 31, 58, 0.07);
  --shadow-navy: 0 20px 60px rgba(3, 9, 20, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--f-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.dashboard-body {
  background: #F4F6F9 !important;
  color: #0F172A !important;
}

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

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
}

/* ----- BUTTONS ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
}

.btn-yellow {
  background: var(--yellow);
  color: var(--navy-deep);
  box-shadow: 0 6px 20px rgba(245, 183, 0, 0.28);
}

.btn-yellow:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 10px 28px rgba(245, 183, 0, 0.36);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.82rem;
}

/* ----- NAV ----- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 16, 32, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--on-navy-line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--on-navy);
  gap: 10px;
  cursor: pointer;
}

.brand span {
  color: var(--yellow);
}

.brand-logo {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: inline-block;
}

footer .brand-logo {
  height: 28px;
}

.brand-icon {
  display: none;
  align-items: center;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 24px;
  background: var(--yellow);
  border: 2px solid var(--navy-deep);
  border-radius: 4px;
  position: relative;
  box-shadow: 0 0 0 1px rgba(245, 183, 0, 0.35);
}

.brand-icon i {
  width: 3px;
  height: 3px;
  background: var(--navy-deep);
  border-radius: 50%;
  position: relative;
}

.brand-icon i::before,
.brand-icon i::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--navy-deep);
  border-radius: 50%;
  top: 0;
}

.brand-icon i::before {
  left: -14px;
}

.brand-icon i::after {
  left: 11px;
}

.nav-links {
  display: flex;
  gap: 30px;
  font-size: 0.9rem;
  color: var(--on-navy-muted);
  font-weight: 500;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--yellow);
}

/* ----- NAVBAR ACTION BUTTONS ----- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-nav-login:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.55);
  color: #FFFFFF !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.12);
}

.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #081020 !important;
  background: linear-gradient(135deg, #F5B700 0%, #FFAE00 100%);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(245, 183, 0, 0.35);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 183, 0, 0.48);
  filter: brightness(1.05);
}

.btn-nav-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #38BDF8 !important;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-nav-admin:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.65);
  color: #E0F2FE !important;
  transform: translateY(-1px);
}

.btn-nav-pending {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--yellow) !important;
  background: rgba(245, 183, 0, 0.1);
  border: 1px solid rgba(245, 183, 0, 0.28);
  border-radius: 8px;
  text-decoration: none;
}

.btn-nav-logout {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-nav-logout:hover {
  color: #F87171 !important;
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--yellow);
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 18px 24px 22px;
  border-top: 1px solid var(--on-navy-line);
  background: var(--navy-deep);
}

.mobile-menu a {
  color: var(--on-navy-muted);
  font-size: 1rem;
}

.mobile-menu.open {
  display: flex;
}

/* ----- HERO ----- */
.hero {
  position: relative;
  background: var(--navy);
  /* La barra superior es sticky (no fixed), fluye en el documento normal:
     este relleno grande venía de cuando el nav sí era fixed y el hero
     necesitaba "hacerle sitio" debajo. Ya se corrigió para celular (ver el
     media query de 720px); en escritorio quedaba el mismo espacio vacío
     de siempre antes de la insignia "Consulta vehicular en Perú". */
  padding: 56px 0 72px;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--on-navy-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--on-navy-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 40%, transparent 90%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-intro {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

/* La insignia "Consulta vehicular · Perú" se quitó de encima del título
   (se movió al pie de página, junto al copyright). */

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  color: var(--on-navy);
  margin-top: 20px;
}

/* Primera línea del H1 ("Consulta vehicular en Perú"): va dentro del H1
   por SEO, con el mismo estilo de antetítulo que las secciones (mono,
   mayúsculas, espaciado) y un punto verde que late, como un "en línea". */
.hero h1 .hero-h1-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 22px;
  font-family: var(--f-mono);
  font-size: clamp(0.72rem, 1.2vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-navy);
  line-height: 1.2;
  white-space: nowrap;
}

.hero h1 .hero-h1-kicker::before {
  content: '';
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: puntoEnLinea 1.8s ease-out infinite;
}

@keyframes puntoEnLinea {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 .hero-h1-kicker::before {
    animation: none;
  }
}

@media (max-width: 420px) {
  .hero h1 .hero-h1-kicker {
    gap: 10px;
    letter-spacing: 0.12em;
  }
}

.hero h1 .highlight-yellow {
  color: var(--yellow);
}

.hero h1 .highlight-sky {
  color: var(--sky);
}

.hero-lead {
  color: #B4C2D6;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  margin: 0 auto 48px;
  max-width: 600px;
}

.hero-lead strong {
  color: var(--white);
  font-weight: 600;
}

/* ----- PLATE PANEL (elemento firma) ----- */
.plate-panel {
  max-width: 640px;
  margin: 0 auto 44px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-navy);
  overflow: hidden;
}

.plate-panel-head {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 22px;
  background: var(--navy-deep);
}

.plate-panel-eyebrow {
  font-family: var(--f-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--on-navy-muted);
}

/* "PE": código de país de la placa peruana (detalle decorativo). Va
   discreto, solo con borde, para no competir con el resto del cuadro. */
.plate-panel-flag {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--on-navy-muted);
  background: transparent;
  border: 1px solid var(--on-navy-line);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

.plate-input-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 30px 26px;
  background:
    repeating-linear-gradient(115deg, rgba(11, 31, 58, 0.035) 0 2px, transparent 2px 26px),
    var(--white);
  border-bottom: 1px dashed var(--line-strong);
  overflow: hidden;
}

.plate-bolt {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #7c8aa0, var(--navy-2));
  box-shadow: inset 0 0 0 2px rgba(11, 31, 58, 0.15);
}

#placaInput {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--navy-deep);
  padding: 6px 4px;
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  letter-spacing: 6px;
  text-transform: uppercase;
  font-weight: 700;
  /* Misma letra que la caja de /filtropro (Inter, la fuente normal del
     sitio, var(--f-body)) — sin aspecto de "código". */
  font-family: var(--f-body);
  text-align: center;
}

#placaInput::placeholder {
  color: #C7CFDA;
  letter-spacing: 6px;
  font-family: var(--f-body);
}

#placaInput:focus {
  outline: none;
}

/* Resplandor que recorre la placa. Antes llegaba solo a translateX(420%)
   (el 84% del ancho), frenaba con ease-in-out y se quedaba 2,5 s quieto
   medio visible en el borde derecho: parecía trabado. Ahora cruza entero
   (de -100% a 500% de su propio ancho = de fuera a fuera), a velocidad
   casi pareja, y la pausa ocurre cuando ya no se ve. */
.plate-scan {
  position: absolute;
  left: 0;
  top: 0;
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(46, 155, 224, 0.28), transparent);
  pointer-events: none;
  transform: translateX(-100%);
  will-change: transform;
  animation: plateScan 4.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes plateScan {
  0%,
  20% {
    transform: translateX(-100%);
  }

  70%,
  100% {
    transform: translateX(500%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .plate-scan {
    display: none;
  }
}

.plate-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  flex-wrap: wrap;
}

.search-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-soft);
  line-height: 1.5;
}

/* "Fuentes oficiales:" arriba y la lista de entidades debajo, en una sola
   línea sin cortarse. */
.search-hint .hint-label,
.search-hint .hint-lista {
  display: block;
}

/* La lista de entidades va en una sola línea: en celulares angostos la
   letra se achica un poco con el ancho de pantalla para que entre. */
.search-hint .hint-lista {
  white-space: nowrap;
  font-size: clamp(0.66rem, 3.2vw, 0.82rem);
}

@media (min-width: 720px) {
  .search-hint .hint-lista {
    font-size: 0.82rem;
  }
}

/* Pantallas muy angostas: si aun así no entra, puede pasar a dos líneas. */
@media (max-width: 339px) {
  .search-hint .hint-lista {
    white-space: normal;
  }
}

.search-hint .hint-yellow {
  color: var(--yellow-deep);
  font-weight: 600;
}

.search-hint .hint-sky {
  color: var(--sky-deep);
  font-weight: 600;
}

.search-hint .hint-green {
  color: var(--green-deep);
  font-weight: 600;
}

.search-toast {
  display: none;
  margin: 0;
  padding: 12px 22px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--green-deep);
  background: rgba(30, 158, 107, 0.08);
  border-top: 1px solid rgba(30, 158, 107, 0.18);
}

/* La fila de estadísticas (7+ fuentes, 100% enlaces directos, etc.) del
   hero se quitó por pedido del usuario. */

/* ----- SERVICIOS ASISTIDOS (tarjetas compactas + modal de solicitud) -----
   Va justo debajo del hero, sobre fondo blanco. Apretada a propósito: el
   usuario baja poco desde el hero y las tarjetas deben verse enseguida.
   Los logos (imágenes con fondo blanco) van en un cuadro blanco con borde,
   tipo ícono de app; Cloudinary los recorta y centra (e_trim + c_pad) para
   que todos ocupen lo mismo. */
.services-band {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 48px;
  scroll-margin-top: 100px;
}

.services-head {
  margin-bottom: 18px;
}

.services-head h2 {
  font-family: var(--f-display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700;
  color: var(--text);
  margin: 6px 0 0;
  line-height: 1.25;
}

.services-grid {
  display: grid;
  /* minmax(0, 1fr): sin el 0, una columna de grid no baja de su ancho
     "auto" (el contenido) y se desborda en pantallas angostas. */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  /* Cuadrícula con áreas: en escritorio el logo va al lado del nombre y el
     texto debajo; en celular el logo pasa a la izquierda de todo (ver la
     media query), sin tocar el HTML. */
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "logo nombre"
    "desc desc"
    "cta  cta";
  /* La descripción toma el espacio sobrante: así "Solicitar" queda a la
     misma altura en todas las tarjetas de la fila. */
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: 10px 12px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(245, 183, 0, 0.7);
  box-shadow: 0 14px 30px rgba(11, 31, 58, 0.11);
  outline: none;
}

.service-card .service-logo { grid-area: logo; }
.service-card .service-name { grid-area: nombre; }
.service-card .service-desc { grid-area: desc; align-self: start; }
.service-card .service-cta { grid-area: cta; }

.service-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 5px;
  overflow: hidden;
}

.service-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.service-name {
  font-family: var(--f-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.service-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.service-cta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--yellow-deep);
}

.service-cta .bi {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.service-card:hover .service-cta .bi {
  transform: translateX(3px);
}

/* Modal de solicitud del servicio */
.service-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 58, 0.7);
  backdrop-filter: blur(5px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.service-modal-backdrop.abierto {
  display: flex;
}

.service-modal {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 430px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px 24px 22px;
  box-shadow: 0 30px 70px rgba(3, 9, 20, 0.5);
}

.service-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--paper);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-modal-close:hover {
  background: var(--line);
  color: var(--text);
}

.service-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-right: 34px;
}

/* En el modal el logo va un poco más grande que en la tarjeta */
.service-modal-head .service-logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
}

.service-modal-eyebrow {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 3px;
}

.service-modal h3 {
  font-family: var(--f-display);
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.25;
}

.service-modal-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 14px;
}

.service-beneficios {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.service-beneficios li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--text);
}

.service-beneficios li::before {
  content: '✓';
  color: var(--green);
  font-weight: 800;
  line-height: 1.4;
}

.service-modal label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.service-modal input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-family: var(--f-mono);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-modal input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 183, 0, 0.18);
}

.service-modal-btn {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--navy-deep);
  font-family: var(--f-display);
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(245, 183, 0, 0.32);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.service-modal-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.service-modal-nota {
  font-size: 0.74rem;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.5;
  margin: 12px 0 0;
}

/* ----- SECTIONS ----- */
.section {
  padding: 88px 0;
  background: var(--white);
  /* La barra superior es "sticky" (queda fija al hacer scroll) y tapaba el
     título de la sección al saltar aquí desde un enlace o desde "Filtrar
     placa": con esto el navegador deja ese espacio libre arriba. */
  scroll-margin-top: 100px;
}

.section-alt {
  background: var(--paper);
}

.section-tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky-deep);
  margin-bottom: 14px;
}

/* Enlace dentro de una recomendación de la guía (lleva a WhatsApp): solo
   color, sin subrayado. */
.enlace-tip {
  color: var(--sky-deep);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.enlace-tip:hover,
.enlace-tip:focus-visible {
  color: var(--navy);
}

/* Enlace dentro de un texto de sección (p. ej. "nuestros planes") */
.enlace-planes {
  color: var(--yellow-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.enlace-planes:hover {
  color: var(--navy);
}

.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  max-width: 820px;
}

.section-title .highlight-navy {
  color: var(--navy-2);
}

.section-title .highlight-sky {
  color: var(--sky-deep);
}

.section-title .highlight-green {
  color: var(--green-deep);
}

.section-title .highlight-yellow {
  color: var(--yellow-deep);
}

.section-lead {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 560px;
  margin-bottom: 48px;
}

/* ----- STEPS (secuencia real: 1→2→3) ----- */
.steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 0 18px;
}

.step-line {
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px);
  margin-top: 16px;
}

/* Paso: número pequeño al lado del título y el texto debajo, alineado con
   el título. */
.step {
  padding: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "num titulo"
    ".   texto";
  column-gap: 12px;
  align-items: center;
}

.step-num {
  grid-area: num;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  /* Mismo amarillo suave que los botones "Consultar" de los módulos. */
  background: rgba(245, 183, 0, 0.14);
  color: #B45309;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
}

.step h4 {
  grid-area: titulo;
  font-size: 1.08rem;
  margin: 0;
}

.step p {
  grid-area: texto;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 8px 0 0;
}

/* ----- MODULE CARDS ----- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 24px 24px 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(11, 31, 58, 0.12);
}

.card-yellow {
  border-top-color: var(--yellow);
}

.card-sky {
  border-top-color: var(--sky);
}

.card-green {
  border-top-color: var(--green);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  border-radius: 10px;
  background: var(--paper);
}

.badge {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 5px;
}

.badge-yellow {
  background: rgba(245, 183, 0, 0.12);
  color: var(--yellow-deep);
}

.badge-sky {
  background: rgba(46, 155, 224, 0.12);
  color: var(--sky-deep);
}

.badge-green {
  background: rgba(30, 158, 107, 0.12);
  color: var(--green-deep);
}

.card h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 20px;
  min-height: 60px;
}

/* flex-wrap: en celulares angostos el botón baja a su propia línea
   (alineado a la derecha) en vez de salirse de la tarjeta. */
.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.source-tag {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--text-soft);
}

.card-btn {
  margin-left: auto;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--navy);
  transition: color 0.2s ease, gap 0.2s ease;
}

.card-btn:hover {
  color: var(--sky-deep);
}

.card-featured {
  background: var(--navy);
  border-color: var(--navy);
}

.card-featured .card-icon {
  background: rgba(255, 255, 255, 0.08);
}

.card-featured h4,
.card-featured p {
  color: var(--on-navy);
}

.card-featured .source-tag {
  color: var(--on-navy-muted);
}

.card-featured .card-footer {
  border-top-color: var(--on-navy-line);
}

.card-featured .card-btn {
  color: var(--yellow);
}

.card-featured .card-btn:hover {
  color: var(--yellow-deep);
}

/* ----- TIPS ----- */
.tips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.tip {
  display: flex;
  gap: 16px;
  padding: 26px 20px 26px 0;
  border-bottom: 1px solid var(--line);
}

.tip:nth-child(odd) {
  border-right: 1px solid var(--line);
  padding-right: 26px;
}

.tip:nth-child(even) {
  padding-left: 26px;
}

.tip-wide {
  grid-column: 1 / -1;
  border-right: none;
  padding-left: 0;
}

.tip-mark {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-top: 6px;
}

.tip-mark.tip-yellow {
  background: var(--yellow);
}

.tip-mark.tip-sky {
  background: var(--sky);
}

.tip-mark.tip-green {
  background: var(--green);
}

.tip h4 {
  font-size: 0.98rem;
  margin-bottom: 6px;
}

.tip p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
}

/* ----- FAQ ----- */
.faq-list {
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.faq {
  border-bottom: 1px solid var(--line);
  padding: 22px 4px;
}

.faq summary {
  cursor: pointer;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--navy);
  font-size: 1.1rem;
}

.faq[open] summary::after {
  content: '−';
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.faq p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 14px 0 0;
  max-width: 640px;
}

/* ----- CTA BANNER ----- */
.cta-banner {
  background: var(--navy);
  padding: 64px 0;
}

.cta-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-banner-text h2 {
  color: var(--on-navy);
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  margin: 0 0 6px;
}

.cta-banner-text h2 .highlight-yellow {
  color: var(--yellow);
}

.cta-banner-text p {
  color: var(--on-navy-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* ----- DISCLAIMER ----- */
.disclaimer-section {
  padding: 48px 0;
}

.disclaimer {
  padding: 22px 24px;
  font-size: 0.82rem;
  color: var(--text-soft);
  line-height: 1.7;
  background: var(--paper);
  border-left: 3px solid var(--line-strong);
  border-radius: 0 8px 8px 0;
}

.disclaimer strong {
  color: var(--text-muted);
}

/* ----- FOOTER ----- */
footer {
  background: var(--navy-deep);
  padding: 34px 0;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--on-navy-muted);
}

.footer-links a:hover {
  color: var(--yellow);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--on-navy-muted);
}

/* ----- LOGO REVEAL ----- */
.logo-reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 16, 32, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.logo-reveal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.logo-reveal-close {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 183, 0, 0.1);
  border: 1px solid rgba(245, 183, 0, 0.3);
  border-radius: 50%;
  color: var(--yellow);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.logo-reveal-close:hover {
  background: var(--yellow);
  color: var(--navy-deep);
  transform: scale(1.08);
}

.logo-reveal-content {
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.35s ease 0.12s, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.12s;
}

.logo-reveal-overlay.active .logo-reveal-content {
  opacity: 1;
  transform: scale(1);
}

.logo-reveal-icon {
  font-size: 3.2rem;
  color: var(--yellow);
}

.logo-reveal-text {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 3rem;
  color: var(--on-navy);
}

.logo-reveal-text span {
  color: var(--yellow);
}

.logo-reveal-slash {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160vw;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--sky), var(--yellow), transparent);
  transform: translate(-50%, -50%) rotate(-18deg) translateX(-120%);
  opacity: 0;
  box-shadow: 0 0 20px rgba(46, 155, 224, 0.5);
}

.logo-reveal-overlay.active .logo-reveal-slash {
  animation: slashSweep 0.55s ease forwards;
}

@keyframes slashSweep {
  0% {
    transform: translate(-50%, -50%) rotate(-18deg) translateX(-120%);
    opacity: 0;
  }

  40% {
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) rotate(-18deg) translateX(120%);
    opacity: 0;
  }
}

/* ----- ANIMATIONS ----- */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease forwards;
}

.delay-1 {
  animation-delay: 0.08s;
}

.delay-2 {
  animation-delay: 0.16s;
}

.delay-3 {
  animation-delay: 0.26s;
}

.delay-4 {
  animation-delay: 0.38s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- WHATSAPP WIDGET ----- */
.wa-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  pointer-events: none;
}

.wa-fab {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #1FA855;
  box-shadow: 0 10px 28px rgba(11, 31, 58, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  pointer-events: auto;
}

.wa-fab:hover {
  transform: translateY(-2px) scale(1.03);
}

.wa-fab-icon {
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
}

.wa-fab-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(31, 168, 85, 0.55);
  animation: waPulse 2.2s ease-out infinite;
}

@keyframes waPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }

  80% {
    transform: scale(1.35);
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

.wa-fab.has-badge::after {
  content: '1';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #E23D3D;
  color: var(--white);
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
}

.wa-panel {
  display: none !important;
  width: min(320px, 84vw);
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(11, 31, 58, 0.28);
  overflow: hidden;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s ease;
}

.wa-panel:not(.open) * {
  pointer-events: none !important;
}

.wa-panel.open {
  display: block !important;
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.wa-panel.open * {
  pointer-events: auto;
}

.wa-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;
  background: var(--navy);
  color: var(--on-navy);
}

.wa-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--white);
  /* Cambiado a blanco */
  overflow: hidden;
  /* Asegura que la imagen o logo no sobrepase el círculo */
  padding: 4px;
  /* Opcional: genera un margen interno limpio alrededor del ícono */
}

/* Para asegurar que cualquier imagen dentro del avatar se mantenga centrada y proporcional */
.wa-avatar img,
.wa-avatar svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.wa-online-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1FA855;
  border: 2px solid var(--navy);
}

.wa-panel-head strong {
  display: block;
  font-family: var(--f-display);
  font-size: 0.92rem;
}

.wa-panel-head span {
  display: block;
  font-size: 0.74rem;
  color: var(--on-navy-muted);
}

.wa-panel-head>div {
  flex: 1;
}

.wa-status {
  display: flex !important;
  align-items: center;
  gap: 5px;
}

.wa-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1FA855;
  animation: pulse-dot 1.8s ease-in-out infinite;
}

.wa-close {
  background: none;
  border: none;
  color: var(--on-navy-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
}

.wa-close:hover {
  color: var(--yellow);
}

.wa-panel-body {
  padding: 16px;
  background: #E9EDF1;
  min-height: 52px;
}

.wa-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--white);
  border-radius: 12px 12px 12px 2px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(11, 31, 58, 0.08);
}

.wa-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-soft);
  animation: waTypingBounce 1.1s ease-in-out infinite;
}

.wa-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.wa-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes waTypingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.wa-bubble {
  background: var(--white);
  border-radius: 12px 12px 12px 2px;
  padding: 12px 14px;
  font-size: 0.86rem;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(11, 31, 58, 0.08);
}

.wa-bubble-in {
  animation: waBubbleIn 0.3s ease;
}

@keyframes waBubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wa-panel-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.wa-panel-foot textarea {
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--f-body);
  font-size: 0.86rem;
  color: var(--text);
}

.wa-panel-foot textarea:focus {
  outline: none;
  border-color: var(--sky);
}

.wa-panel-foot .btn {
  align-self: flex-end;
}

/* ----- RESPONSIVE ----- */
/* Entre 981 y 1100 px, cinco tarjetas por fila quedan muy angostas: se
   pasan a tres y dos, centradas. */
@media (min-width: 981px) and (max-width: 1100px) {
  .services-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .service-card {
    grid-column: span 2;
  }

  .service-card:nth-child(4) {
    grid-column: 2 / span 2;
  }
}

@media (max-width: 980px) {
  .grid {
    /* minmax(0, 1fr) en vez de 1fr: sin el 0, una columna de grid no baja de
       su ancho "auto" (el contenido de la tarjeta), así que se salía del
       celular pegada a la derecha en vez de encogerse a la pantalla. */
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Con un número impar de servicios, el último ocupa la fila completa
     para no dejar un hueco al lado. */
  .service-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 28px 0;
  }

  .step-line {
    display: none;
  }

  .tip:nth-child(odd) {
    border-right: none;
    padding-right: 0;
  }

  .tip:nth-child(even) {
    padding-left: 0;
  }
}

@media (max-width: 720px) {

  .nav-links,
  .nav-inner>.btn {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    /* La barra superior ya no es fija (fluye normal), así que el hero no
       necesita un relleno grande para "hacerle sitio": eso dejaba un
       espacio vacío antes de la insignia "Consulta vehicular · Perú". */
    padding: 32px 0 56px;
  }

  .plate-panel-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .plate-panel-foot .btn {
    width: 100%;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tips {
    grid-template-columns: 1fr;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .cta-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-reveal-text {
    font-size: 2rem;
  }

  .logo-reveal-icon {
    font-size: 2.4rem;
  }

  /* En celular: una tarjeta por fila, con el logo a la izquierda de todo
     el texto. Así cada servicio ocupa una sola franja horizontal y no
     quedan apretados de a dos por fila. */
  .services-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .service-card {
    grid-template-areas:
      "logo nombre"
      "logo desc"
      "logo cta";
    align-items: start;
    gap: 2px 14px;
    padding: 14px;
  }

  .service-card .service-logo {
    align-self: center;
  }

  .service-card .service-name {
    align-self: end;
  }

  .service-card .service-cta {
    margin-top: 4px;
  }

  .wa-widget {
    right: 14px;
    bottom: 14px;
  }

  .wa-panel {
    width: min(300px, 88vw);
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 1.05rem;
  }

  #placaInput {
    letter-spacing: 3px;
  }

  .plate-input-shell {
    padding: 24px 18px;
  }
}


/* Botón de acceso en la barra superior */
.btn-nav-login {
  color: var(--on-navy);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--on-navy-line);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.btn-nav-login:hover {
  background: rgba(245, 183, 0, 0.12);
  border-color: var(--yellow);
  color: var(--yellow);
}

@media (max-width: 720px) {
  .nav-actions {
    display: none !important;
  }
}

/* =========================================================
   ESTILOS DEL PORTAL DASHBOARD (DISEÑO EXACTO)
   ========================================================= */
.dashboard-body {
  background: #EBF0F5;
  margin: 0;
  font-family: var(--f-body);
}

.dash-nav {
  background: #081020;
  padding: 12px 24px;
  border-bottom: 2px solid var(--yellow);
}

.dash-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-brand {
  color: #FFF;
  font-size: 1.15rem;
}

.dash-brand strong {
  color: var(--yellow);
}

.dash-user-menu {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-badge {
  color: var(--green);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.1);
  color: #FFF;
  border: 1px solid var(--line-strong);
}

.btn-logout:hover {
  background: #E23D3D;
  color: #FFF;
  border-color: #E23D3D;
}

/* HERO PORTAL */
.portal-hero {
  position: relative;
  background: linear-gradient(180deg, rgba(8, 16, 32, 0.85) 0%, rgba(6, 13, 23, 0.95) 100%),
    url('/static/img/hero-car.jpg') center/cover no-repeat;
  padding: 50px 20px 40px;
  text-align: center;
  border-bottom: 5px solid #FFDE00;
  overflow: hidden;
}

.portal-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.portal-logo-car {
  margin-bottom: 12px;
}

.hero-car-img {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(0, 229, 255, 0.3));
}

.portal-main-title {
  color: #FFFFFF;
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: 3px;
  margin: 0;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

.portal-title-underline {
  width: 220px;
  height: 5px;
  background: #FFDE00;
  margin: 8px auto 16px;
  border-radius: 4px;
}

.portal-plate-graphic {
  background: #FFFFFF;
  border: 3px solid #000000;
  border-radius: 8px;
  padding: 4px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.portal-plate-graphic span {
  font-family: var(--f-mono);
  font-size: 1.4rem;
  font-weight: 900;
  color: #000000;
  letter-spacing: 4px;
}

/* SECCIONES Y BARRAS AMARILLAS */
.portal-container {
  max-width: 1240px;
  margin: 20px auto 60px;
  padding: 0 16px;
}

.portal-section-bar {
  background: #FFDE00;
  color: #081020;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 1.25rem;
  text-align: center;
  padding: 12px 16px;
  margin: 36px 0 18px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
}

/* Aclaracion chica debajo del titulo de una seccion (por ahora solo en
   "Consultas Adicionales"): normal, sin mayusculas forzadas ni el peso
   grueso del titulo, para que se lea como una nota y no compita con el
   encabezado. */
.portal-section-note {
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: normal;
  text-transform: none;
  color: #081020;
  opacity: 0.65;
  margin-top: 4px;
}

/* GRID DE 3 COLUMNAS */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 980px) {
  .portal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }

  /* En escritorio (3 columnas) el orden natural del HTML se lee fila por
     fila. Al colapsar a 1 columna en celular, eso se sentiria salteado
     (mezcla instituciones sin relacion entre si). Aqui se reordena cada
     tarjeta para que en celular se lea columna por columna en su lugar:
     primero todo lo que era la columna 1 de escritorio, luego la 2, luego
     la 3. Solo aplica en este media query, en escritorio no cambia nada. */

  /* grid-consulta-vehicular: 39 tarjetas, 13 filas x 3 columnas */
  #grid-consulta-vehicular > *:nth-child(1) { order: 0; }
  #grid-consulta-vehicular > *:nth-child(2) { order: 13; }
  #grid-consulta-vehicular > *:nth-child(3) { order: 26; }
  #grid-consulta-vehicular > *:nth-child(4) { order: 1; }
  #grid-consulta-vehicular > *:nth-child(5) { order: 14; }
  #grid-consulta-vehicular > *:nth-child(6) { order: 27; }
  #grid-consulta-vehicular > *:nth-child(7) { order: 2; }
  #grid-consulta-vehicular > *:nth-child(8) { order: 15; }
  #grid-consulta-vehicular > *:nth-child(9) { order: 28; }
  #grid-consulta-vehicular > *:nth-child(10) { order: 3; }
  #grid-consulta-vehicular > *:nth-child(11) { order: 16; }
  #grid-consulta-vehicular > *:nth-child(12) { order: 29; }
  #grid-consulta-vehicular > *:nth-child(13) { order: 4; }
  #grid-consulta-vehicular > *:nth-child(14) { order: 17; }
  #grid-consulta-vehicular > *:nth-child(15) { order: 30; }
  #grid-consulta-vehicular > *:nth-child(16) { order: 5; }
  #grid-consulta-vehicular > *:nth-child(17) { order: 18; }
  #grid-consulta-vehicular > *:nth-child(18) { order: 31; }
  #grid-consulta-vehicular > *:nth-child(19) { order: 6; }
  #grid-consulta-vehicular > *:nth-child(20) { order: 19; }
  #grid-consulta-vehicular > *:nth-child(21) { order: 32; }
  #grid-consulta-vehicular > *:nth-child(22) { order: 7; }
  #grid-consulta-vehicular > *:nth-child(23) { order: 20; }
  #grid-consulta-vehicular > *:nth-child(24) { order: 33; }
  #grid-consulta-vehicular > *:nth-child(25) { order: 8; }
  #grid-consulta-vehicular > *:nth-child(26) { order: 21; }
  #grid-consulta-vehicular > *:nth-child(27) { order: 34; }
  #grid-consulta-vehicular > *:nth-child(28) { order: 9; }
  #grid-consulta-vehicular > *:nth-child(29) { order: 22; }
  #grid-consulta-vehicular > *:nth-child(30) { order: 35; }
  #grid-consulta-vehicular > *:nth-child(31) { order: 10; }
  #grid-consulta-vehicular > *:nth-child(32) { order: 23; }
  #grid-consulta-vehicular > *:nth-child(33) { order: 36; }
  #grid-consulta-vehicular > *:nth-child(34) { order: 11; }
  #grid-consulta-vehicular > *:nth-child(35) { order: 24; }
  #grid-consulta-vehicular > *:nth-child(36) { order: 37; }
  #grid-consulta-vehicular > *:nth-child(37) { order: 12; }
  #grid-consulta-vehicular > *:nth-child(38) { order: 25; }
  #grid-consulta-vehicular > *:nth-child(39) { order: 38; }

  /* grid-deudas-provincia: 24 tarjetas, 8 filas x 3 columnas */
  #grid-deudas-provincia > *:nth-child(1) { order: 0; }
  #grid-deudas-provincia > *:nth-child(2) { order: 8; }
  #grid-deudas-provincia > *:nth-child(3) { order: 16; }
  #grid-deudas-provincia > *:nth-child(4) { order: 1; }
  #grid-deudas-provincia > *:nth-child(5) { order: 9; }
  #grid-deudas-provincia > *:nth-child(6) { order: 17; }
  #grid-deudas-provincia > *:nth-child(7) { order: 2; }
  #grid-deudas-provincia > *:nth-child(8) { order: 10; }
  #grid-deudas-provincia > *:nth-child(9) { order: 18; }
  #grid-deudas-provincia > *:nth-child(10) { order: 3; }
  #grid-deudas-provincia > *:nth-child(11) { order: 11; }
  #grid-deudas-provincia > *:nth-child(12) { order: 19; }
  #grid-deudas-provincia > *:nth-child(13) { order: 4; }
  #grid-deudas-provincia > *:nth-child(14) { order: 12; }
  #grid-deudas-provincia > *:nth-child(15) { order: 20; }
  #grid-deudas-provincia > *:nth-child(16) { order: 5; }
  #grid-deudas-provincia > *:nth-child(17) { order: 13; }
  #grid-deudas-provincia > *:nth-child(18) { order: 21; }
  #grid-deudas-provincia > *:nth-child(19) { order: 6; }
  #grid-deudas-provincia > *:nth-child(20) { order: 14; }
  #grid-deudas-provincia > *:nth-child(21) { order: 22; }
  #grid-deudas-provincia > *:nth-child(22) { order: 7; }
  #grid-deudas-provincia > *:nth-child(23) { order: 15; }
  #grid-deudas-provincia > *:nth-child(24) { order: 23; }

  /* grid-adicionales: 15 tarjetas, 5 filas x 3 columnas parejo (quedo
     exacto tras quitar 3 tarjetas). El HTML ya viene entrelazado fila por
     fila para que en escritorio se agrupe por columna sin nada de esto;
     aqui solo se recalcula el orden de lectura en celular. */
  #grid-adicionales > *:nth-child(1) { order: 0; }
  #grid-adicionales > *:nth-child(2) { order: 5; }
  #grid-adicionales > *:nth-child(3) { order: 10; }
  #grid-adicionales > *:nth-child(4) { order: 1; }
  #grid-adicionales > *:nth-child(5) { order: 6; }
  #grid-adicionales > *:nth-child(6) { order: 11; }
  #grid-adicionales > *:nth-child(7) { order: 2; }
  #grid-adicionales > *:nth-child(8) { order: 7; }
  #grid-adicionales > *:nth-child(9) { order: 12; }
  #grid-adicionales > *:nth-child(10) { order: 3; }
  #grid-adicionales > *:nth-child(11) { order: 8; }
  #grid-adicionales > *:nth-child(12) { order: 13; }
  #grid-adicionales > *:nth-child(13) { order: 4; }
  #grid-adicionales > *:nth-child(14) { order: 9; }
  #grid-adicionales > *:nth-child(15) { order: 14; }

  /* grid-tutoriales: 5 tarjetas, 2 filas x 3 columnas */
  #grid-tutoriales > *:nth-child(1) { order: 0; }
  #grid-tutoriales > *:nth-child(2) { order: 2; }
  #grid-tutoriales > *:nth-child(3) { order: 4; }
  #grid-tutoriales > *:nth-child(4) { order: 1; }
  #grid-tutoriales > *:nth-child(5) { order: 3; }
}

/* =========================================================
   ESTILOS DE BOTONES DINÁMICOS CON CORTE DIAGONAL (SLANTED)
   ========================================================= */

.dynamic-button {
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  color: #FFFFFF !important;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  transition: box-shadow 0.2s ease-out, transform 0.2s ease-out;
  width: 100%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  background-color: #FFFFFF;
  box-sizing: border-box;
}

.dynamic-button:hover {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

/* 3. Sección de Texto (el bloque AZUL/COLOR en diagonal) */
.text-section {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  font-size: 15px;
  padding: 3px 14px;
  transition: background-color 0.15s ease;
  clip-path: polygon(0 0, 93% 0, 100% 100%, 0% 100%);
  line-height: 1.15;
  margin-right: -10px;
  z-index: 2;
}

/* Nuevo estilo para el subtítulo */
.subtitle {
  font-size: 10px;
  font-weight: normal;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
  line-height: 1.1;
  display: block;
  text-transform: uppercase;
}

/* 4. Sección de Ícono/Imagen (el bloque BLANCO y su forma) */
.icon-section {
  background-color: #FFFFFF;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  flex-shrink: 0;
  z-index: 1;
  overflow: hidden;
  position: relative;
}

/* 5. Estilos de la IMAGEN dentro de la sección del ícono */
.icon-section img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.icon-section .p-btn-tag {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: #081020;
  background: #E2E8F0;
  padding: 3px 6px;
  border-radius: 4px;
  display: none;
}

.icon-section .p-btn-icon {
  font-size: 1.2rem;
  font-weight: bold;
  color: #1DA851;
}

.icon-section .p-btn-play {
  color: #E23D3D;
  font-size: 1.2rem;
}

/* Variaciones de Color */
.btn-blue .text-section {
  background-color: #007BFF;
}

.btn-blue:hover .text-section {
  background-color: #0056B3;
}

.btn-teal .text-section {
  background-color: #00A896;
}

.btn-teal:hover .text-section {
  background-color: #028090;
}

.btn-green .text-section {
  background-color: #1DA851;
}

.btn-green:hover .text-section {
  background-color: #157A54;
}

.btn-orange .text-section {
  background-color: #FF5A1F;
}

.btn-orange:hover .text-section {
  background-color: #E04810;
}

.btn-white {
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
}

.btn-white .text-section {
  background-color: #FFFFFF;
  color: #E23D3D !important;
}

.btn-white .subtitle {
  color: #64748B !important;
}

.btn-white:hover .text-section {
  background-color: #F8FAFC;
}

.btn-white .icon-section {
  background-color: #F1F5F9;
}

.portal-footer {
  text-align: center;
  padding: 32px 20px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  background: #081020;
}
/* Prevenir la superposición del plugin externo IDM */
[id*="idm_"], [class*="idm_"], div[id*="IDM"], div[class*="IDM"] {
  pointer-events: none !important;
}

/* Grilla compacta responsiva para móvil y escritorio */
@media (min-width: 768px) {
  .resumen-grid-compact {
    grid-template-columns: repeat(6, 1fr) !important;
  }
}
@media (max-width: 767px) {
  .resumen-grid-compact {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
