/* Extraído de app/views/agente/index.html.erb (sección: back-to-top). */

    .back-to-top {
    position: fixed;
    right: 22px;
    bottom: calc(22px + env(safe-area-inset-bottom));
    z-index: 1100;

    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 50%;

    color: var(--brand-accent);
    background: var(--brand-primary);

    font-size: 1.25rem;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;
    }

    .back-to-top:hover,
    .back-to-top:focus {
    color: var(--brand-accent);
    background: color-mix(
        in srgb,
        var(--brand-primary) 88%,
        black
    );

    transform: translateY(-4px);
    }

    .back-to-top:active {
    transform: translateY(-1px) scale(.96);
    }

    .back-to-top i {
    line-height: 1;
    }

    @media (max-width: 767.98px) {
    .back-to-top {
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom));

        width: 48px;
        height: 48px;

        font-size: 1.15rem;
    }
    }

    @media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    }
/* Extraído de app/views/layouts/application.html.erb (sección: base---global). */

      * { box-sizing: border-box; }
      html { scroll-behavior: smooth; }
      html {
        scrollbar-width: thin;
        scrollbar-color: var(--brand-primary) var(--surface-soft);
      }
      ::-webkit-scrollbar { width: 12px; height: 12px; }
      ::-webkit-scrollbar-track { background: var(--surface-soft); }
      ::-webkit-scrollbar-thumb {
        background: var(--brand-primary);
        border-radius: 999px;
        border: 3px solid var(--surface-soft);
      }
      ::-webkit-scrollbar-thumb:hover {
        background: color-mix(in srgb, var(--brand-primary) 80%, black);
      }
      body {
        margin: 0;
        font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        color: var(--ink);
        background: var(--surface-soft);
        -webkit-font-smoothing: antialiased;
        overflow-x: hidden;
      }

      section { scroll-margin-top: calc(var(--nav-height) + 28px); }
      h1, h2, h3, h4, h5 { color: var(--ink); font-weight: 800; letter-spacing: -.035em; }
      p { color: var(--ink-soft); }
      a { text-underline-offset: 3px; }

      .skip-link {
        position: fixed;
        left: 1rem;
        top: -5rem;
        z-index: 3000;
        border-radius: 12px;
        padding: .75rem 1rem;
        background: var(--brand-primary);
        color: #fff;
        text-decoration: none;
        transition: top .2s ease;
      }
      .skip-link:focus { top: 1rem; }

      a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
        outline: 3px solid color-mix(in srgb, var(--brand-primary) 70%, white);
        outline-offset: 3px;
      }

      .section-space { padding: 68px 0; }
      .section-head {
        max-width: none;
        width: 100%;
        margin-bottom: 2.8rem;
        text-align: center;
      }

      .section-head h2 {
        max-width: none;
        margin-bottom: 1rem !important;
        font-size: clamp(2rem, 4vw, 3.25rem);
        line-height: 1.05;
        letter-spacing: -.045em;
      }

      .section-head p {
        max-width: none;
        margin: 0;
        color: #64748b;
        font-size: 1.04rem;
        line-height: 1.75;
      }

      @media (max-width: 767.98px) {
        .section-head,
        .section-head h2,
        .section-head p {
          max-width: 820px;
        }
      }
      .eyebrow {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        padding: .45rem .75rem;
        border-radius: 999px;
        background: color-mix(in srgb, var(--brand-primary) 9%, white);
        color: var(--brand-primary);
        font-size: .76rem;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
        margin-bottom: 1rem;
      }
      .eyebrow::before {
        content: "";
        width: .45rem;
        height: .45rem;
        border-radius: 50%;
        background: var(--brand-primary);
        box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand-primary) 10%, transparent);
      }

      .btn-modern-primary,
      .btn-modern-secondary {
        min-height: 52px;
        border-radius: 14px;
        font-weight: 800;
        padding: .8rem 1.25rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .55rem;
        transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
      }
      .btn-modern-primary {
        background: var(--brand-primary);
        border: 1px solid var(--brand-primary);
        color: var(--brand-accent);
      }
      .btn-modern-primary:hover,
      .btn-modern-primary:focus {
        background: color-mix(in srgb, var(--brand-primary) 88%, black);
        border-color: color-mix(in srgb, var(--brand-primary) 88%, black);
        color: var(--brand-accent);
        transform: translateY(-2px);
      }
      .btn-modern-secondary {
        background: #fff;
        border: 1px solid var(--border);
        color: var(--brand-accent);
      }
      .btn-modern-secondary:hover,
      .btn-modern-secondary:focus {
        border-color: color-mix(in srgb, var(--brand-primary) 35%, white);
        color: var(--brand-accent);
        transform: translateY(-2px);
      }
      /* Variantes de .btn-modern-secondary que, a diferencia del resto,
         siempre deben verse con letras negras sin importar el color
         terciario configurado por el agente. */
      .btn-modern-secondary.maps-btn,
      .btn-modern-secondary.maps-btn:hover,
      .btn-modern-secondary.maps-btn:focus,
      .btn-modern-secondary.btn-back,
      .btn-modern-secondary.btn-back:hover,
      .btn-modern-secondary.btn-back:focus {
        color: #000;
      }
      .btn-modern-secondary.maps-btn,
      .btn-modern-secondary.maps-btn:hover,
      .btn-modern-secondary.maps-btn:focus {
        background: #fff;
      }
      /* Bootstrap define su propio background/border/color para .btn:disabled
         con más especificidad que estas clases, dejando el botón transparente;
         se fija aquí para que un botón deshabilitado (p. ej. mientras carga)
         conserve su color y tamaño en vez de verse "apagado". */
      .btn-modern-primary:disabled {
        opacity: .85;
        cursor: not-allowed;
        transform: none !important;
        background: var(--brand-primary);
        border-color: var(--brand-primary);
        color: var(--brand-accent);
      }
      .btn-modern-secondary:disabled {
        opacity: .85;
        cursor: not-allowed;
        transform: none !important;
        background: #fff;
        border-color: var(--border);
        color: var(--brand-accent);
      }

      /* Controles de formulario reutilizables en cualquier formulario del
         sitio (cotizador, soporte, etc.). */
      .form-label { font-weight: 700; font-size: .88rem; color: #334155; }
      .modern-control {
        min-height: 52px;
        border-radius: 13px;
        border: 1px solid var(--border);
        background-color: #fbfcfe;
        padding: .8rem .95rem;
        box-shadow: none !important;
        transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
      }
      textarea.modern-control { min-height: 112px; resize: vertical; }
      select.modern-control { padding-right: 2.25rem; }
      .modern-control::placeholder { color: #cbd5e1; opacity: 1; }
      .modern-control:focus {
        background-color: #fff;
        border-color: color-mix(in srgb, var(--brand-primary) 55%, white);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 10%, transparent) !important;
      }
      .modern-control.is-invalid:focus {
        border-color: var(--bs-form-invalid-border-color, #dc3545);
        box-shadow: 0 0 0 .25rem rgba(var(--bs-danger-rgb, 220, 53, 69), .25) !important;
      }
      .modern-control.is-valid:focus {
        border-color: var(--bs-form-valid-border-color, #198754);
        box-shadow: 0 0 0 .25rem rgba(var(--bs-success-rgb, 25, 135, 84), .25) !important;
      }

      /* Indicador de carga estilo iOS: 12 aspas estáticas cuya opacidad se
         desvanece en secuencia, simulando el giro sin animar `transform`
         (evita conflictos con cualquier transform de posicionamiento que ya
         tenga el contenedor, p. ej. centrado vertical con translateY). */
      .ios-spinner {
        --ios-spinner-size: 1rem;
        position: relative;
        display: inline-block;
        width: var(--ios-spinner-size);
        height: var(--ios-spinner-size);
        vertical-align: middle;
        color: inherit;
      }
      .ios-spinner.ios-spinner-lg { --ios-spinner-size: 1.5rem; }
      /* Relleno blanco fijo + sombra negra para que el spinner se note sobre
         cualquier color de marca dinámico (fondo de botón), sea claro u oscuro. */
      .ios-spinner.ios-spinner-contrast i {
        background: #fff;
        filter:
        drop-shadow(0 0 1px rgba(0, 0, 0, .85))
        drop-shadow(0 0 1.5px rgba(0, 0, 0, .6));
      }
      .ios-spinner i {
        position: absolute;
        top: 0;
        left: 50%;
        width: 8%;
        height: 25%;
        margin-left: -4%;
        border-radius: 40%;
        background: currentColor;
        transform-origin: 50% 200%;
        animation: iosSpinnerFade 1s linear infinite;
      }
      .ios-spinner i:nth-child(1) { transform: rotate(0deg); animation-delay: -1.0833s; }
      .ios-spinner i:nth-child(2) { transform: rotate(30deg); animation-delay: -1s; }
      .ios-spinner i:nth-child(3) { transform: rotate(60deg); animation-delay: -.9167s; }
      .ios-spinner i:nth-child(4) { transform: rotate(90deg); animation-delay: -.8333s; }
      .ios-spinner i:nth-child(5) { transform: rotate(120deg); animation-delay: -.75s; }
      .ios-spinner i:nth-child(6) { transform: rotate(150deg); animation-delay: -.6667s; }
      .ios-spinner i:nth-child(7) { transform: rotate(180deg); animation-delay: -.5833s; }
      .ios-spinner i:nth-child(8) { transform: rotate(210deg); animation-delay: -.5s; }
      .ios-spinner i:nth-child(9) { transform: rotate(240deg); animation-delay: -.4167s; }
      .ios-spinner i:nth-child(10) { transform: rotate(270deg); animation-delay: -.3333s; }
      .ios-spinner i:nth-child(11) { transform: rotate(300deg); animation-delay: -.25s; }
      .ios-spinner i:nth-child(12) { transform: rotate(330deg); animation-delay: -.1667s; }
      @keyframes iosSpinnerFade {
        0% { opacity: 1; }
        100% { opacity: .15; }
      }
      @media (prefers-reduced-motion: reduce) {
        .ios-spinner i { animation: none; opacity: .5; }
      }
/* Extraído de app/views/agente/index.html.erb (sección: contacto). */

    .contact-card {
        border-radius: 26px;
        padding: 0.8rem 1.5rem 0rem 1.5rem;
        background: #fff;
        border: 1px solid var(--border);
        height: 100%;
    }
    .contact-item { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--border); }
    .contact-item:last-of-type { border-bottom: 0; }
    .contact-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand-primary) 8%, white); color: var(--brand-primary); flex: 0 0 auto; font-size: 1.1rem; }
    .contact-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: #94a3b8; }
    .contact-value, .contact-value a { color: var(--ink); font-weight: 700; text-decoration: none; word-break: break-word; }
    .contact-value a:hover { color: var(--brand-primary); }
    .contact-sub { font-size: .82rem; font-weight: 600; color: #64748b; margin-top: .15rem; word-break: break-word; }
    .map-wrap { min-height: 100%; height: 460px; border-radius: 26px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
    /* A diferencia de los demás .btn-modern-secondary, este botón siempre
       debe verse blanco con letras negras, sin importar el color terciario
       configurado por el agente. */
    .btn-modern-secondary.maps-btn,
    .btn-modern-secondary.maps-btn:hover,
    .btn-modern-secondary.maps-btn:focus {
        background: #fff;
        color: #000;
    }
    .map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

    @media (max-width: 767.98px) {
        .map-wrap { height: 360px; }
    }
/* Extraído de app/views/agente/index.html.erb (sección: footer). */

    .site-footer {
    background: #050505;
    color: rgba(255,255,255,.66);
    padding: 16px 0 16px;
    }
    .footer-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 54px;
    }
    .footer-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .9rem;
    }
    .footer-logo {
    max-width: 160px;
    height: 34px;
    width: auto;
    object-fit: contain;
    }
    /* Subdominio "directos": el logo original no funciona sobre fondo oscuro,
       se fuerza a blanco con un filtro. */
    .footer-logo.footer-logo-white {
    filter: brightness(0) invert(1);
    }
    .footer-title { color: #fff; font-weight: 800; font-size: 1rem; }
    .footer-tagline {
    margin: 0;
    color: rgba(255,255,255,.48);
    font-size: .78rem;
    line-height: 1.35;
    white-space: nowrap;
    }
    .footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .8rem;
    flex-wrap: wrap;
    }
    .footer-socials { display: flex; align-items: center; gap: .4rem; }
    .social-link {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255,255,255,.055);
    color: rgba(255,255,255,.82);
    border: 1px solid rgba(255,255,255,.08);
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
    }
    .social-link:hover {
    background: #fff;
    border-color: #fff;
    color: #050505;
    transform: translateY(-2px);
    }
    .footer-cta {
    min-height: 38px;
    padding: .55rem .9rem;
    border-radius: 11px;
    background: #fff;
    border: 1px solid #fff;
    color: #050505;
    font-size: .82rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, color .2s ease;
    }
    .footer-cta:hover { background: #e9e9e9; color: #050505; transform: translateY(-1px); }
    .footer-bottom {
    margin-top: 15px;
    padding-top: 13px;
    border-top: 1px solid rgba(255,255,255,.075);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255,255,255,.38);
    font-size: .72rem;
    line-height: 1.4;
    }
    @media (max-width: 767.98px) {
    .site-footer { padding: 22px 0 18px; }
    .footer-main { align-items: flex-start; flex-direction: column; }
    .footer-brand { width: 100%; justify-content: space-between; }
    .footer-tagline { display: none; }
    .footer-actions { width: 100%; justify-content: space-between; }
    .footer-bottom { align-items: flex-start; flex-direction: column; gap: .3rem; }
    }
/* Extraído de app/views/agente/index.html.erb (sección: hero). */

    .hero {
        position: relative;
        min-height: 650px;
        padding: 132px 0 64px;
        display: flex;
        align-items: center;
        background:
        radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--brand-primary) 24%, transparent) 0, transparent 38%),
        radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--brand-secondary) 20%, transparent) 0, transparent 34%),
        radial-gradient(circle at 52% 88%, color-mix(in srgb, var(--brand-secondary) 10%, transparent) 0, transparent 40%),
        linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 8%, #f8fafc) 0%, #f8fafc 48%, color-mix(in srgb, var(--brand-primary) 7%, #ffffff) 100%);
        overflow: hidden;
    }
    .hero::before {
        display: none;
    }
    /* Cuando el agente tiene video, se reproduce de fondo en todo el hero,
       difuminado y con una capa clara encima para no interferir con la
       lectura del texto (que siempre usa el diseño estándar en este caso).
       El video se carga en segundo plano y solo se revela (fade-in) cuando
       ya está listo para reproducirse; mientras tanto el hero se ve
       idéntico a como se vería sin video, para no retrasar la carga. */
    .hero-bg-video {
        position: absolute;
        inset: 0;
        z-index: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: blur(18px) brightness(3);
        transform: scale(1.15);
        pointer-events: none;
        opacity: 0;
        transition: opacity .8s ease;
    }
    .hero-bg-video.is-ready { opacity: 1; }
    .hero-bg-video-overlay {
        position: absolute;
        inset: 0;
        z-index: 0;
        background: color-mix(in srgb, #f8fafc 75%, transparent);
        pointer-events: none;
        opacity: 0;
        transition: opacity .8s ease;
    }
    .hero-bg-video-overlay.is-ready { opacity: 1; }
    .hero.hero-con-video-fondo > .container { position: relative; z-index: 1; }
    .hero-container-top { align-self: flex-start; }
    .hero.hero-compact { min-height: 0; }
    @media (min-width: 992px) {
        .hero.hero-compact { padding-top: 96px; }
    }
    .hero-copy { max-width: 650px; }
    .hero-copy.hero-copy-full { max-width: none; }
    .hero-copy.hero-copy-full .hero-lead { max-width: none; text-align: center; }
    .hero-copy.hero-copy-full .hero-benefits { justify-content: center; }
    @media (min-width: 992px) {
        .hero h1.hero-title-center { text-align: center; }
        .hero h1.hero-title-lg { font-size: clamp(2.9rem, 6vw, 6rem); }
    }
    .hero h1 {
        font-size: clamp(2.5rem, 5.2vw, 5.2rem);
        line-height: .99;
        margin-bottom: 1.35rem;
        text-align: justify;
        letter-spacing: -.05em;
    }
    .hero h1 .highlight {
        color: var(--brand-primary);
        /* text-shadow:
        -1px -1px 0 transparent,
        1px -1px 0 transparent,
        -1px 1px 0 transparent,
        1px 1px 0 transparent,
        0 2px 10px rgba(0, 0, 0, .5); */
    }
    .hero h1 .hero-title-lead { display: inline-block; font-size: .55em; }
    .hero-title-break-pc { display: none; }
    @media (min-width: 992px) {
        .hero-title-break-pc { display: block; }
    }
    .hero-lead { font-size: clamp(1.05rem, 1.7vw, 1.22rem); line-height: 1.75; max-width: 610px; }
    .hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
    /* Los tres beneficios se apilan en la misma celda de grid (se superponen)
       y se muestran de a uno, alternando con un fundido controlado por JS. */
    .hero-benefits { display: grid; justify-content: center; justify-items: center; margin-top: 1.6rem; }
    @media (min-width: 992px) {
        .hero-benefits.hero-benefits-hide-pc { display: none; }
    }
    .hero-benefit {
        grid-area: 1 / 1;
        display: inline-flex;
        align-items: center;
        gap: .55rem;
        font-size: .91rem;
        color: #475569;
        font-weight: 700;
        opacity: 0;
        transform: translateY(6px);
        transition: opacity .5s ease, transform .5s ease;
        pointer-events: none;
    }
    .hero-benefit.is-active { opacity: 1; transform: translateY(0); pointer-events: auto; }
    .hero-benefit i { color: var(--success); font-size: 1.05rem; }
    @media (prefers-reduced-motion: reduce) {
        .hero-benefit { transition: none; }
    }

    /* Cuando el hero-visual está oculto (sin imágenes/video), el agente
       autorizado se muestra aquí en vez de sobre la tarjeta. */
    .hero-trust-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.75rem; }
    .hero-copy.hero-copy-full .hero-trust-row { justify-content: center; }
    .hero-trust-agent {
        display: inline-flex;
        align-items: center;
        gap: .9rem;
        padding: .8rem 1rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
    }
    .hero-trust-agent .agent-verified-icon { width: 42px; height: 42px; flex: 0 0 42px; font-size: 2.2rem; }

    .hero-visual {
        position: relative;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .hero-visual::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
        background-image:
        linear-gradient(color-mix(in srgb, var(--brand-primary) 26%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--brand-primary) 26%, transparent) 1px, transparent 1px);
        background-size: 34px 34px;
        -webkit-mask-image:
        radial-gradient(17% 40% at 17% 18%, black 0%, transparent 100%),
        radial-gradient(17% 40% at 17% 82%, black 0%, transparent 100%);
        mask-image:
        radial-gradient(17% 40% at 17% 18%, black 0%, transparent 100%),
        radial-gradient(17% 40% at 17% 82%, black 0%, transparent 100%);
        pointer-events: none;
    }
    .hero-visual-frame {
        aspect-ratio: 4 / 3;
        max-width: min(100%, 760px);
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        z-index: 1;
    }
    .hero-image-card {
        position: relative;
        width: 100%;
        height: 100%;
        border-radius: 34px;
        overflow: hidden;
        padding: 6px;
        background: #fff;
        box-shadow:
        0 30px 90px rgba(15, 23, 42, .20),
        0 14px 42px color-mix(in srgb, var(--brand-primary) 22%, transparent);
        border: 0;
    }
    .hero-image-card::before {
        content: "";
        position: absolute;
        inset: -50%;
        z-index: 0;
        background: conic-gradient(from 0deg,
        color-mix(in srgb, var(--brand-primary) 82%, #050505),
        var(--brand-primary) 28%,
        white 52%,
        white 76%,
        color-mix(in srgb, var(--brand-primary) 82%, #050505) 100%
        );
        animation: heroBorderSpin 8s linear infinite;
    }
    @keyframes heroBorderSpin {
        to { transform: rotate(360deg); }
    }
    .hero-image-card .hero-carousel,
    .hero-image-card .hero-image-fallback {
        position: relative;
        border-radius: 28px;
        overflow: hidden;
        background: #fff;
    }
    .hero-image-card .hero-carousel,
    .hero-image-card .hero-carousel-inner,
    .hero-image-card .hero-slide {
        width: 100%;
        height: 100%;
    }
    .hero-image-card .hero-carousel { position: relative; background: #fff; }
    .hero-image-card .hero-carousel-inner { position: relative; overflow: hidden; background: #fff; }
    .hero-image-card .hero-slide {
        position: absolute;
        inset: 0;
        opacity: 0;
        transition: opacity 1.15s cubic-bezier(.4, 0, .2, 1);
        pointer-events: none;
        overflow: hidden;
        background: #fff;
    }
    .hero-image-card .hero-slide.is-active {
        opacity: 1;
        pointer-events: auto;
        z-index: 1;
    }
    .hero-image-card .hero-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transform: scale(1.10);
        transform-origin: center center;
        will-change: transform;
        backface-visibility: hidden;
    }

    /* El movimiento corre incluso cuando el slide está oculto. De esta forma,
        al comenzar y terminar el crossfade ninguna imagen se queda estática. */
    .hero-image-card .hero-slide:nth-child(1) img {
        animation: heroMoveHorizontal 11s linear infinite alternate;
    }
    .hero-image-card .hero-slide:nth-child(2) img {
        animation: heroMoveVertical 12s linear infinite alternate;
    }
    .hero-image-card .hero-slide:nth-child(3) img {
        animation: heroMoveDiagonal 13s linear infinite alternate;
    }

    @keyframes heroMoveHorizontal {
        0%   { transform: scale(1.12) translate3d(-4.5%, 0, 0); }
        50%  { transform: scale(1.17) translate3d(0, -1%, 0); }
        100% { transform: scale(1.12) translate3d(4.5%, 0, 0); }
    }
    @keyframes heroMoveVertical {
        0%   { transform: scale(1.13) translate3d(0, -4%, 0); }
        50%  { transform: scale(1.18) translate3d(1%, 0, 0); }
        100% { transform: scale(1.13) translate3d(0, 4%, 0); }
    }
    @keyframes heroMoveDiagonal {
        0%   { transform: scale(1.13) translate3d(4%, -3.5%, 0); }
        50%  { transform: scale(1.18) translate3d(0, 0, 0); }
        100% { transform: scale(1.13) translate3d(-4%, 3.5%, 0); }
    }
    .hero-carousel-dots {
        position: absolute;
        left: 50%;
        bottom: 18px;
        transform: translateX(-50%);
        z-index: 4;
        display: flex;
        gap: 7px;
        padding: 7px 9px;
        border-radius: 999px;
        background: rgba(5, 5, 5, .24);
        border: 1px solid rgba(255,255,255,.24);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    .hero-carousel-dot {
        width: 8px;
        height: 8px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(255,255,255,.5);
        transition: width .25s ease, background .25s ease, transform .25s ease;
    }
    .hero-carousel-dot:hover { background: rgba(255,255,255,.85); transform: scale(1.12); }
    .hero-carousel-dot.is-active { width: 22px; background: #fff; }
    .hero-image-card::after {
        content: "";
        position: absolute;
        inset: 6px;
        border-radius: 28px;
        background: linear-gradient(180deg, rgba(15,23,42,.02) 35%, rgba(15,23,42,.5) 100%);
        pointer-events: none;
    }
    .hero-image-fallback {
        width: 100%; height: 100%; display: grid; place-items: center; color: #fff;
        background:
        radial-gradient(circle at 25% 20%, rgba(255,255,255,.12), transparent 25%),
        linear-gradient(145deg, var(--brand-secondary), var(--brand-primary));
    }
    .hero-image-fallback i { font-size: 8rem; opacity: .9; }
    .visual-agent {
        position: absolute;
        left: -40px;
        bottom: 70px;
        z-index: 3;
        width: max-content;
        max-width: calc(100% - 24px);
        border-radius: 20px;
        padding: 1rem;
        display: flex;
        align-items: center;
        gap: .9rem;
        background: rgba(255,255,255,.95);
        border: 1px solid rgba(255,255,255,.7);
        box-shadow: var(--shadow-md);
        backdrop-filter: blur(14px);
    }
    .agent-verified-icon {
        width: 50px;
        height: 50px;
        flex: 0 0 50px;
        display: grid;
        place-items: center;
        color: var(--success);
        font-size: 2.75rem;
        line-height: 1;
    }
    .agent-label { color: var(--success); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
    .agent-name { color: var(--ink); font-size: .94rem; font-weight: 800; white-space: normal; word-break: break-word; }
    .visual-secure {
        position: absolute;
        top: 70px;
        right: -40px;
        z-index: 3;
        display: inline-flex;
        align-items: center;
        gap: .7rem;
        padding: .8rem 1rem;
        border-radius: 16px;
        background: rgba(255,255,255,.96);
        color: var(--ink);
        border: 1px solid #fff;
        box-shadow: var(--shadow-md);
        font-size: 1rem;
        font-weight: 800;
    }
    .visual-secure i { color: var(--success); font-size: 2rem; }

    @media (max-width: 1199.98px) {
        .hero h1 { font-size: clamp(2.3rem, 4.8vw, 3.7rem); }
    }

    @media (max-width: 991.98px) {
        .hero { padding: 120px 0 24px; min-height: auto; }
        .hero-copy { max-width: 720px; }
        .hero-visual-col { display: none; }
        .hero-actions { display: none; }
        .hero h1 { text-align: center; font-size: clamp(2.6rem, 12vw, 3.8rem); line-height: 1.02; }
        .hero-lead { font-size: 1.15rem; text-align: center; max-width: none; }
        .hero-benefit { font-size: 1rem; }
    }

    /* Rango exclusivo de tablet (no incluye móvil), para no pisar el
       padding-top propio de la query de 767.98px por especificidad. */
    @media (min-width: 768px) and (max-width: 991.98px) {
        .hero.hero-compact { padding-top: 90px; }
    }

    @media (max-width: 767.98px) {
        .hero { padding: 112px 0 24px; }
        .hero h1 { font-size: clamp(2.6rem, 12vw, 3.8rem); line-height: 1.02; }
        .hero-lead { font-size: 1rem; text-align: center; max-width: none; }
        .hero-benefits { justify-content: center; }
    }
/* Extraído de app/views/agente/index.html.erb (sección: informacion-adicional). */

    #informacion-adicional {
        position: relative;
        overflow: hidden;
        padding: 92px 0;
        background:
        radial-gradient(
            circle at 8% 12%,
            color-mix(in srgb, var(--brand-primary) 8%, transparent),
            transparent 32%
        ),
        radial-gradient(
            circle at 92% 88%,
            color-mix(in srgb, var(--brand-secondary) 7%, transparent),
            transparent 28%
        ),
        #fff;
    }

    #informacion-adicional::before {
        content: "";
        position: absolute;
        width: 420px;
        height: 420px;
        top: -240px;
        right: -170px;
        border-radius: 50%;
        border: 1px solid
        color-mix(in srgb, var(--brand-primary) 12%, transparent);
        box-shadow:
        0 0 0 55px
            color-mix(in srgb, var(--brand-primary) 3%, transparent),
        0 0 0 110px
            color-mix(in srgb, var(--brand-primary) 1.5%, transparent);
        pointer-events: none;
    }

    #informacion-adicional .container {
        position: relative;
        z-index: 1;
    }

    .total-emisiones {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: .1rem;
        margin-top: 1.75rem;
    }
    .total-emisiones-value {
        font-size: clamp(2.75rem, 6vw, 4.5rem);
        font-weight: 800;
        line-height: 1;
        letter-spacing: -.03em;
        background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-secondary) 75%, var(--brand-primary)));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
    .total-emisiones-label {
        font-size: .92rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: var(--ink-soft);
    }
    .total-emisiones-label-accent { color: var(--brand-primary); }

    .digital-fianza-panel {
        position: relative;
        padding: 10px;
        border-radius: 30px;
        background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--brand-primary) 22%, white),
            white 40%,
            color-mix(in srgb, var(--brand-secondary) 18%, white)
        );
        box-shadow:
        0 30px 80px rgba(15, 23, 42, .10);
    }

    .digital-fianza-grid {
        position: relative;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .digital-feature {
        position: relative;
        min-height: 310px;
        padding: 1.75rem;
        display: flex;
        flex-direction: column;
        border-radius: 22px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid rgba(15, 23, 42, .07);
        overflow: hidden;
        box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9);
        transition:
        transform .28s ease,
        box-shadow .28s ease,
        border-color .28s ease;
    }

    .digital-feature::after {
        content: "";
        position: absolute;
        width: 170px;
        height: 170px;
        top: -95px;
        right: -85px;
        border-radius: 50%;
        background:
        color-mix(in srgb, var(--brand-primary) 6%, transparent);
        transition:
        transform .35s ease,
        background .35s ease;
        pointer-events: none;
    }

    .digital-feature:hover {
        transform: translateY(-8px);
        border-color:
        color-mix(in srgb, var(--brand-primary) 20%, white);
        box-shadow:
        0 24px 55px rgba(15, 23, 42, .12);
    }

    .digital-feature:hover::after {
        transform: scale(1.18);
        background:
        color-mix(in srgb, var(--brand-primary) 10%, transparent);
    }

    .digital-feature-icon {
        position: relative;
        z-index: 1;
        width: 64px;
        height: 64px;
        display: grid;
        place-items: center;
        margin-bottom: 1.5rem;
        border-radius: 18px;
        color: #fff;
        font-size: 1.6rem;
        background:
        linear-gradient(
            145deg,
            var(--brand-primary),
            color-mix(
            in srgb,
            var(--brand-primary) 75%,
            var(--brand-secondary)
            )
        );
        box-shadow:
        0 14px 30px
            color-mix(in srgb, var(--brand-primary) 24%, transparent);
    }

    .digital-feature h3 {
        position: relative;
        z-index: 1;
        margin-bottom: .85rem;
        font-size: 1.14rem;
        line-height: 1.25;
        letter-spacing: -.025em;
    }

    .digital-feature p {
        position: relative;
        z-index: 1;
        margin-bottom: 1.5rem;
        color: #64748b;
        font-size: .92rem;
        line-height: 1.7;
    }

    .digital-feature p strong {
        color: var(--ink-soft);
        font-weight: 750;
    }

    .digital-feature-tag {
        position: relative;
        z-index: 1;
        width: fit-content;
        margin-top: auto;
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        padding: .52rem .72rem;
        border-radius: 999px;
        background:
        color-mix(in srgb, var(--success) 9%, white);
        color: var(--success);
        border: 1px solid
        color-mix(in srgb, var(--success) 15%, white);
        font-size: .73rem;
        font-weight: 800;
        line-height: 1;
    }

    .digital-feature-tag i {
        font-size: .86rem;
    }

    @media (max-width: 991.98px) {
        #informacion-adicional {
        padding: 76px 0;
        }

        .digital-fianza-grid {
        grid-template-columns: 1fr;
        }

        .digital-feature {
        min-height: auto;
        }
    }

    @media (max-width: 575.98px) {
        #informacion-adicional {
        padding: 64px 0;
        }

        .digital-fianza-panel {
        padding: 7px;
        border-radius: 24px;
        }

        .digital-fianza-grid {
        gap: 7px;
        }

        .digital-feature {
        padding: 1.4rem;
        border-radius: 18px;
        }

        .digital-feature-icon {
        width: 58px;
        height: 58px;
        margin-bottom: 1.25rem;
        border-radius: 16px;
        font-size: 1.45rem;
        }
    }
/* Extraído de app/views/agente/index.html.erb (sección: navbar). */

    .site-nav-shell {
        position: fixed;
        inset: 14px 0 auto;
        z-index: 1050;
        padding: 0 14px;
        pointer-events: none;
    }

    .site-nav {
        position: relative;
        max-width: 1320px;
        min-height: var(--nav-height);
        margin: 0 auto;
        padding: .62rem .7rem .62rem .72rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;

        border: 1px solid rgba(255, 255, 255, .72);
        border-radius: 22px;

        background: rgba(255, 255, 255, .68);

        box-shadow:
        0 16px 48px rgba(15, 23, 42, .12),
        inset 0 1px 0 rgba(255, 255, 255, .9);

        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);

        pointer-events: auto;
        overflow: hidden;

        transition:
        min-height .28s ease,
        border-radius .28s ease,
        box-shadow .28s ease,
        transform .28s ease;
    }

    .site-nav::before {
        content: "";
        position: absolute;
        inset: 0 18% auto;
        height: 1px;
        background: linear-gradient(
        90deg,
        transparent,
        color-mix(in srgb, var(--brand-primary) 65%, white),
        transparent
        );
        opacity: .65;
        pointer-events: none;
    }

    .site-nav.is-scrolled {
        min-height: 66px;
        border-radius: 18px;
    }

    .brand-link {
        display: inline-flex;
        align-items: center;
        min-width: 0;
        gap: .72rem;
        text-decoration: none;
    }

    .brand-link:has(.brand-logo) {
        min-height: 62px;
        padding: .3rem .72rem;
        border-radius: 15px;
        background: transparent;
    }

    .brand-logo {
        max-width: 230px;
        height: 52px;
        width: auto;
        object-fit: contain;
    }

    .brand-text {
        color: var(--brand-primary);
        font-size: 1.04rem;
        font-weight: 800;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 260px;
        transition: color .28s ease;
    }

    .site-nav.is-scrolled .brand-text {
        color: var(--brand-primary);
    }

    .desktop-nav {
        display: flex;
        align-items: center;
        gap: .2rem;
    }

    .desktop-nav .nav-link {
        position: relative;
        color: var(--brand-primary);
        font-weight: 700;
        font-size: 1rem;
        border-radius: 12px;
        padding: .72rem .9rem !important;
        text-decoration: none;
        transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
    }

    .desktop-nav .nav-link::after {
        content: "";
        position: absolute;
        left: .9rem;
        right: .9rem;
        bottom: .42rem;
        height: 2px;
        border-radius: 999px;
        background: var(--brand-primary);
        transform: scaleX(0);
        transform-origin: center;
        transition: transform .2s ease;
    }

    .desktop-nav .nav-link:hover,
    .desktop-nav .nav-link:focus {
        color: var(--brand-primary);
        background: color-mix(in srgb, var(--brand-primary) 7%, transparent);
        transform: translateY(-1px);
    }

    .desktop-nav .nav-link:hover::after,
    .desktop-nav .nav-link:focus::after {
        transform: scaleX(1);
    }

    .site-nav.is-scrolled .desktop-nav .nav-link {
        color: var(--brand-primary);
    }

    .site-nav.is-scrolled .desktop-nav .nav-link::after {
        background: var(--brand-primary);
    }

    .site-nav.is-scrolled .desktop-nav .nav-link:hover,
    .site-nav.is-scrolled .desktop-nav .nav-link:focus {
        color: var(--brand-primary);
        background: color-mix(in srgb, var(--brand-primary) 8%, transparent);
    }

    .site-nav .nav-buy-btn {
        min-height: 46px;
        border-radius: 13px;
        padding-inline: 1.05rem;
        background: var(--brand-primary);
        border: 1px solid var(--brand-primary);
        color: var(--brand-accent);
    }

    .site-nav .nav-buy-btn:hover,
    .site-nav .nav-buy-btn:focus {
        background: color-mix(in srgb, var(--brand-primary) 88%, black);
        border-color: color-mix(in srgb, var(--brand-primary) 88%, black);
        color: var(--brand-accent);
        transform: translateY(-2px);
    }

    .site-nav.is-scrolled .nav-buy-btn {
        background: var(--brand-primary);
        border-color: var(--brand-primary);
        color: var(--brand-accent);
    }

    .site-nav.is-scrolled .nav-buy-btn:hover,
    .site-nav.is-scrolled .nav-buy-btn:focus {
        background: color-mix(in srgb, var(--brand-primary) 88%, black);
        border-color: color-mix(in srgb, var(--brand-primary) 88%, black);
        color: var(--brand-accent);
    }

    .mobile-menu-button {
        width: 46px;
        height: 46px;
        flex: 0 0 auto;
        border-radius: 13px;
        border: 1px solid color-mix(in srgb, var(--brand-primary) 20%, transparent);
        color: #000;
        background: color-mix(in srgb, var(--brand-primary) 6%, white);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.45rem;
        transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
    }

    .mobile-menu-button:hover {
        background: color-mix(in srgb, var(--brand-primary) 11%, white);
        transform: translateY(-1px);
    }

    .site-nav.is-scrolled .mobile-menu-button {
        color: #000;
        background: rgba(255, 255, 255, .45);
        border-color: color-mix(in srgb, var(--brand-primary) 18%, transparent);
    }

    .site-nav.is-scrolled .mobile-menu-button:hover {
        background: rgba(255, 255, 255, .75);
    }

    @media (max-width: 991.98px) {
        :root {
        --nav-height: 68px;
        }

        .desktop-nav {
        display: none;
        }

        .site-nav-shell {
        inset: 10px 0 auto;
        padding: 0 10px;
        }

        .site-nav {
        min-height: 68px;
        border-radius: 18px;
        padding: .52rem .58rem;
        }

        .brand-link:has(.brand-logo) {
        min-height: 56px;
        padding: .2rem .58rem;
        border-radius: 13px;
        }

        .brand-logo {
        height: 46px;
        max-width: 190px;
        }
    }
/* Extraído de app/views/agente/index.html.erb (sección: offcanvas). */

    .offcanvas-modern {
    width: min(88vw, 380px);
    color: var(--ink);
    background:
        linear-gradient(
        145deg,
        rgba(255, 255, 255, .94),
        rgba(255, 255, 255, .82)
        );
    border-left: 1px solid rgba(255, 255, 255, .8);
    box-shadow: -20px 0 60px rgba(15, 23, 42, .16);
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    }

    .offcanvas-modern .offcanvas-header {
    min-height: 82px;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(15, 23, 42, .08) !important;
    }

    .offcanvas-modern .offcanvas-title {
    max-width: 250px;
    margin: 0;
    color: var(--brand-primary);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    }

    .offcanvas-modern .btn-close {
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    background-color: color-mix(
        in srgb,
        var(--brand-primary) 7%,
        white
    );
    opacity: 1;
    transition:
        background .2s ease,
        transform .2s ease;
    }

    .offcanvas-modern .btn-close:hover,
    .offcanvas-modern .btn-close:focus {
    background-color: color-mix(
        in srgb,
        var(--brand-primary) 13%,
        white
    );
    transform: scale(1.04);
    }

    .offcanvas-modern .offcanvas-body {
    padding: 1.2rem;
    }

    .mobile-nav {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    }

    .mobile-nav-link {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    border-radius: 15px;
    color: var(--brand-primary);
    background: rgba(255, 255, 255, .48);
    border: 1px solid rgba(15, 23, 42, .06);
    font-size: .95rem;
    font-weight: 750;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
    }

    .mobile-nav-link i {
    font-size: 1rem;
    opacity: .65;
    transition: transform .2s ease;
    }

    .mobile-nav-link:hover,
    .mobile-nav-link:focus,
    .mobile-nav-link:active {
    color: var(--brand-primary);
    background: color-mix(
        in srgb,
        var(--brand-primary) 8%,
        white
    );
    border-color: color-mix(
        in srgb,
        var(--brand-primary) 15%,
        white
    );
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    transform: translateX(2px);
    }

    .mobile-nav-link:hover i,
    .mobile-nav-link:focus i {
    transform: translateX(3px);
    }

    .mobile-menu-divider {
    height: 1px;
    margin: .8rem 0;
    background: rgba(15, 23, 42, .08);
    }

    .mobile-nav-cta {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .9rem 1rem;
    border-radius: 15px;
    background: var(--brand-primary);
    border: 1px solid var(--brand-primary);
    color: var(--brand-accent);
    font-size: .94rem;
    font-weight: 800;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition:
        transform .2s ease,
        background .2s ease,
        box-shadow .2s ease;
    }

    .mobile-nav-cta:hover,
    .mobile-nav-cta:focus,
    .mobile-nav-cta:active {
    color: var(--brand-accent);
    background:
        color-mix(
        in srgb,
        var(--brand-primary) 88%,
        black
        );
    transform: translateY(-2px);
    }

    .mobile-menu-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    color: var(--ink-soft);
    font-size: .75rem;
    line-height: 1.5;
    text-align: center;
    }

    .offcanvas-backdrop.show {
    opacity: .22;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    }
/* Extraído de app/views/agente/index.html.erb (sección: purchase-panel). */

    .purchase-wrap {
        position: relative;
        z-index: 5;
        margin-top: -44px;
        background: var(--section-quote);
        padding-bottom: 34px;
    }
    .purchase-card {
        position: relative;
        border-radius: 28px;
        background: #fff;
        /* border: 1px solid var(--border); */
        border: 1px solid #ccc;
        box-shadow: var(--shadow-md);
        overflow: hidden;
    }
    /* Se muestra mientras se recupera una solicitud desde el enlace
       (?id=token, ver ver_solicitud/cargarSolicitudDesdeToken): la consulta
       depende de una API externa y puede tardar, así que sin esto la
       tarjeta se veía "congelada" sin ninguna señal de que algo pasaba. */
    .quote-loading-overlay {
        position: absolute;
        inset: 0;
        z-index: 20;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        background: rgba(255, 255, 255, .94);
        text-align: center;
        padding: 2rem;
    }
    .quote-loading-overlay .quote-loading-text {
        font-weight: 700;
        color: var(--ink);
        font-size: .92rem;
    }
    /* Mismo tamaño que el resto de spinners (.ios-spinner-lg), pero siempre
       negro, sin depender del color de marca del agente. */
    .quote-loading-overlay .ios-spinner { color: #000; }
    .purchase-confirmation {
        text-align: center;
        padding: clamp(2.5rem, 6vw, 5rem) 2rem;
        border-radius: 28px;
        background: #fff;
        border: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }
    .purchase-confirmation-icon {
        font-size: clamp(3.5rem, 6vw, 5rem);
        line-height: 1;
        color: var(--success);
        margin-bottom: 1.5rem;
    }
    .purchase-confirmation-title {
        font-size: clamp(1.6rem, 3.4vw, 2.5rem);
        margin-bottom: .6rem;
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }
    .purchase-confirmation-note {
        font-size: .95rem;
        color: var(--ink-soft);
        max-width: 560px;
        margin: 0 auto;
        line-height: 1.6;
    }
    .purchase-confirmation-fallback {
        margin: 1.5rem 0 0;
        font-size: .85rem;
        color: var(--ink-soft);
    }
    .purchase-confirmation-fallback a {
        color: var(--brand-primary);
        font-weight: 700;
        text-decoration: underline;
    }
    @keyframes purchaseSheenDrift {
        0%, 100% { background-position: 0 0, 0% 50%; }
        50% { background-position: 0 0, 100% 50%; }
    }
    @keyframes purchaseShimmerSweep {
        0% { transform: translateX(-120%) rotate(10deg); }
        100% { transform: translateX(220%) rotate(10deg); }
    }
    @keyframes purchaseBlobFloat {
        0%, 100% { transform: translate(0, 0) scale(1); }
        50% { transform: translate(-30px, 34px) scale(1.12); }
    }

    .purchase-intro {
        padding: 2rem;
        height: 100%;
        display: flex;
        flex-direction: column;
        background-image:
        repeating-linear-gradient(115deg, rgba(255, 255, 255, .5) 0px, rgba(255, 255, 255, .5) 1px, transparent 1px, transparent 4px),
        linear-gradient(120deg, #eceef1 0%, #dcdfe4 22%, #fbfbfc 45%, #d5d8de 68%, #eceef1 100%);
        background-size: auto, 240% 240%;
        background-position: 0 0, 0% 50%;
        animation: purchaseSheenDrift 16s ease-in-out infinite;
        color: var(--ink);
        border-right: 1px solid var(--border);
        position: relative;
        overflow: hidden;
    }

    .purchase-intro .form-reassurance { margin-top: auto; position: relative; z-index: 1; }
    .purchase-intro .eyebrow {
        position: relative;
        z-index: 1;
        background: #fff;
        color: #52606d;
        box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
    }
    .purchase-intro .eyebrow::before { background: #52606d; box-shadow: none; }
    .purchase-intro::before {
        content: "";
        position: absolute;
        top: -30%;
        left: 0;
        width: 55%;
        height: 160%;
        background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, .1) 35%,
        rgba(255, 255, 255, .95) 50%,
        rgba(255, 255, 255, .1) 65%,
        transparent 100%);
        mix-blend-mode: overlay;
        z-index: 0;
        pointer-events: none;
        animation: purchaseShimmerSweep 6s linear infinite;
    }
    .purchase-intro::after {
        content: "";
        position: absolute;
        top: -110px;
        right: -110px;
        width: 380px;
        height: 380px;
        border-radius: 50%;
        background: radial-gradient(circle, #ffffff 0%, #dfe2e7 45%, transparent 72%);
        filter: blur(8px);
        opacity: .7;
        mix-blend-mode: soft-light;
        z-index: 0;
        pointer-events: none;
        animation: purchaseBlobFloat 9s ease-in-out infinite;
    }
    .purchase-intro h2 {
        font-size: clamp(1.65rem, 2.3vw, 2.25rem);
        background: linear-gradient(120deg, #0f172a 0%, #334155 50%, #0f172a 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
    .purchase-intro p { color: var(--ink); }

    .purchase-intro-copy {
        position: relative;
        z-index: 1;
        transition: opacity .28s cubic-bezier(.4, 0, .2, 1), transform .28s cubic-bezier(.4, 0, .2, 1);
    }
    .purchase-intro-copy.is-fading {
        opacity: 0;
        transform: translateY(10px);
    }
    .purchase-form { padding: 2rem; }
    .form-reassurance { display: flex; align-items: center; gap: .55rem; font-size: .78rem; color: black; margin-top: .8rem; }
    .form-reassurance i { color: var(--success); font-size: 1rem; }
    .quote-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .55rem;
        padding: .4rem;
        margin-bottom: 1.6rem;
        border-radius: 17px;
        background: #f1f3f6;
        border: 1px solid #e4e7ec;
    }
    .quote-tab {
        min-width: 0;
        min-height: 50px;
        display: flex;
        align-items: center;
        gap: .7rem;
        padding: .7rem .8rem;
        border: 0;
        border-radius: 13px;
        background: transparent;
        color: #71717a;
        opacity: .78;
        user-select: none;
        font: inherit;
        text-align: left;
        cursor: default;
        transition: background .2s ease, color .2s ease, opacity .2s ease;
    }
    .quote-tab:not(:disabled) { cursor: pointer; }
    .quote-tab:not(:disabled):hover { background: rgba(5,5,5,.05); opacity: 1; }
    .quote-tab.is-active {
        background: #050505;
        color: #fff;
        opacity: 1;
    }
    .quote-tab.is-active:not(:disabled):hover { background: #050505; }

    .quote-steps-viewport { overflow: hidden; transition: height .45s cubic-bezier(.4, 0, .2, 1); }
    .quote-steps-track {
        display: flex;
        align-items: flex-start;
        transition: transform .45s cubic-bezier(.4, 0, .2, 1);
        will-change: transform;
    }
    .quote-step { flex: 0 0 100%; min-width: 0; padding-right: 2px; }
    .quote-tab-number {
        width: 30px; height: 30px; flex: 0 0 auto;
        display: grid; place-items: center;
        border-radius: 9px;
        background: #fff;
        color: #050505;
        font-size: .76rem; font-weight: 800;
    }
    .quote-tab.is-active .quote-tab-number { background: #fff; color: #050505; }
    .quote-tab-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
    .quote-tab-copy strong { color: inherit; font-size: .86rem; }
    .quote-tab-copy small { margin-top: .22rem; color: inherit; opacity: .7; font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .quote-input-loading-wrap { position: relative; }
    .quote-input-spinner {
        --ios-spinner-size: 1.25rem;
        position: absolute;
        top: calc((52px - var(--ios-spinner-size)) / 2);
        right: 14px;
        color: black;
    }
    /* El ícono de check/error de Bootstrap se pinta en la misma esquina
       derecha que el spinner; mientras el spinner esté visible se oculta
       para que no se encimen. */
    .quote-input-loading-wrap:has(.quote-input-spinner:not(.d-none)) .modern-control.is-valid,
    .quote-input-loading-wrap:has(.quote-input-spinner:not(.d-none)) .modern-control.is-invalid,
    .was-validated .quote-input-loading-wrap:has(.quote-input-spinner:not(.d-none)) .modern-control:valid,
    .was-validated .quote-input-loading-wrap:has(.quote-input-spinner:not(.d-none)) .modern-control:invalid {
        background-image: none;
    }

    .remote-select { position: relative; }
    .remote-select-panel {
        margin-top: .5rem;
        border: 1px solid var(--border);
        border-radius: 13px;
        background: #fff;
        max-height: 240px;
        overflow-y: auto;
        box-shadow: var(--shadow-sm);
    }
    .remote-select-list { list-style: none; margin: 0; padding: .4rem; }
    .remote-option {
        padding: .6rem .75rem;
        border-radius: 9px;
        cursor: pointer;
        font-size: .92rem;
        color: var(--ink);
        line-height: 1.3;
        border-bottom: 1px solid var(--border);
    }
    .remote-option:nth-child(even) { background: var(--surface-soft); }
    .remote-option:last-child { border-bottom: 0; }
    .remote-option:hover,
    .remote-option.is-active { background: color-mix(in srgb, var(--brand-primary) 10%, white); }
    .remote-option-message {
        padding: .75rem;
        font-size: .85rem;
        color: var(--ink-soft);
        text-align: center;
    }
    .remote-select-more {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        padding: .5rem 0 .7rem;
        color: var(--ink-soft);
    }
    .remote-select-more .ios-spinner { --ios-spinner-size: 1.25rem; color: black; }
    .remote-select-sentinel { height: 1px; }

    .quote-section-heading {
        margin: 1.6rem 0 .9rem;
        padding-bottom: .55rem;
        font-size: .78rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: var(--brand-primary);
        line-height: 1;
        display: flex;
        align-items: center;
        gap: .5rem;
        border-bottom: 1px solid var(--border);
    }
    .quote-section-heading::before {
        content: "";
        width: .5rem;
        height: .5rem;
        flex: 0 0 auto;
        border-radius: 3px;
        background: var(--brand-primary);
    }
    .quote-section-heading:first-of-type { margin-top: 0; }

    .form-switch-compact {
        display: flex;
        align-items: center;
        gap: .3rem;
        min-width: 0;
    }
    .form-switch-compact .form-check-input {
        flex: 0 0 auto;
        width: 1.7em;
        height: .95em;
        margin: 0;
    }
    .form-switch-compact .form-check-label {
        margin: 0;
        font-size: .72rem;
        white-space: nowrap;
    }


    .quote-total-price {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: .75rem 1rem;
        padding: 1.1rem 0;
        padding-bottom: 0;
        border-top: 1px dashed #eee;
        /* border-bottom: 1px dashed color-mix(in srgb, var(--success) 35%, var(--border)); */
    }

    .quote-total-price-copy { display: flex; flex-direction: column; gap: .15rem; }

    .quote-total-price-cta-group {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 1.1rem;
    }

    @keyframes quoteBtnPopIn {
        0% { opacity: 0; transform: translateY(16px) scale(.8) rotate(-3deg); }
        45% { opacity: 1; transform: translateY(-5px) scale(1.08) rotate(1.5deg); }
        70% { transform: translateY(2px) scale(.98) rotate(-.5deg); }
        100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
    }
    #quoteToStep2Btn {
        position: relative;
    }
    /* Igual que .support-submit: al mostrar el loader no debe encogerse
       (el color/opacidad de disabled ya se resuelve en .btn-modern-primary). */
    #quoteToStep3Btn,
    #quoteRealizarPagoBtn {
        min-width: 254px;
    }
    #quoteSolicitudAviso,
    #quoteCobroFeedback {
        display: block;
        text-align: justify;
    }
    .quote-billing-summary {
        display: flex;
        align-items: center;
        gap: .9rem;
        padding: .9rem 1.1rem;
        margin-bottom: 1rem;
        border-radius: var(--radius-md);
        background: var(--surface-soft);
        border: 1px solid var(--border);
    }
    .quote-billing-summary-icon {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border-radius: 10px;
        background: color-mix(in srgb, var(--brand-primary) 10%, white);
        color: var(--brand-primary);
        font-size: 1rem;
    }
    .quote-billing-summary-text {
        display: flex;
        flex-direction: column;
        gap: .1rem;
        min-width: 0;
        margin-right: auto;
    }
    .quote-billing-summary-name {
        font-weight: 700;
        color: var(--ink);
        font-size: .92rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .quote-billing-summary-text small { color: var(--ink-soft); font-size: .78rem; }
    .quote-billing-edit-btn {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        padding: .45rem .9rem;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--brand-primary);
        font-size: .82rem;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
        transition: background .15s ease, border-color .15s ease;
    }
    .quote-billing-edit-btn:hover,
    .quote-billing-edit-btn:focus {
        background: color-mix(in srgb, var(--brand-primary) 8%, white);
        border-color: color-mix(in srgb, var(--brand-primary) 30%, var(--border));
    }
    .quote-billing-fields { margin-bottom: 1.5rem; }

    .quote-preview { margin-bottom: 1rem; }
    .quote-preview-table {
        width: 100%;
        border-collapse: collapse;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        overflow: hidden;
        font-size: .82rem;
    }
    .quote-preview-table tr:not(:last-child) th,
    .quote-preview-table tr:not(:last-child) td {
        border-bottom: 1px solid var(--border);
    }
    .quote-preview-table th,
    .quote-preview-table td {
        padding: .35rem .75rem;
        text-align: left;
        vertical-align: top;
        font-weight: 400;
        line-height: 1.3;
    }
    .quote-preview-table th {
        /* Se encoge al ancho del texto (ninguna etiqueta es muy larga) y le
           deja el resto del espacio a la columna de valor. */
        width: 1%;
        color: var(--ink-soft);
        background: var(--surface-soft);
        white-space: nowrap;
    }
    .quote-preview-table td { color: var(--ink); }
    @media (max-width: 575.98px) {
        .quote-preview-table th { white-space: normal; width: auto; }
    }

    .quote-pago-info {
        display: flex;
        flex-direction: column;
        gap: .75rem;
        padding: 1.1rem 1.25rem;
        border-radius: var(--radius-md);
        background: var(--surface-soft);
        border: 1px solid var(--border);
    }
    .quote-pago-info-item {
        display: flex;
        align-items: center;
        gap: .75rem;
        font-size: .88rem;
        color: var(--ink);
        line-height: 1.5;
    }
    .quote-pago-info-item i {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border-radius: 10px;
        background: color-mix(in srgb, var(--brand-primary) 10%, white);
        color: var(--brand-primary);
        font-size: 1rem;
    }
    .quote-pago-info-item.is-warning i {
        background: color-mix(in srgb, #f59e0b 16%, white);
        color: #b45309;
    }
    #quoteToStep2Btn.is-appearing {
        animation: quoteBtnPopIn .55s cubic-bezier(.34, 1.56, .64, 1);
    }
    /* Anillo de pulso separado del botón: solo anima transform/opacity (no
       box-shadow) para evitar el artefacto de repintado que dejaba un
       "degradado" fantasma pegado al botón tras el paso siguiente. */
    #quoteToStep2Btn::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        border: 3px solid var(--brand-primary);
        opacity: 0;
        pointer-events: none;
    }
    #quoteToStep2Btn.is-appearing::after {
        animation: quoteBtnRingPulse .55s cubic-bezier(.34, 1.56, .64, 1);
    }
    @keyframes quoteBtnRingPulse {
        0% { opacity: .55; transform: scale(1); }
        70% { opacity: .2; transform: scale(1.12); }
        100% { opacity: 0; transform: scale(1.3); }
    }

    .quote-total-price-label {
        display: flex;
        align-items: center;
        gap: .4rem;
        color: black;
        font-weight: 800;
        font-size: 1rem;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .quote-total-price-caption { font-size: .78rem; color: #64748b; }

    .quote-total-price-amount {
        display: flex;
        align-items: center;
        gap: .6rem;
        font-size: clamp(1.8rem, 3.4vw, 2.4rem);
        font-weight: 900;
        letter-spacing: -.02em;
        white-space: nowrap;
        background: linear-gradient(135deg, black, color-mix(in srgb, black 55%, var(--brand-primary)));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        padding-right: 2rem;
    }

    .quote-total-price-amount .ios-spinner { color: black; }

    @media (max-width: 991.98px) {
        .purchase-wrap { margin-top: -10px; }
        .purchase-intro { padding: 1.7rem; }
    }

    @media (max-width: 767.98px) {
        .purchase-wrap { margin-top: -22px; padding-top: 14px; }
        .purchase-card { border-radius: 22px; }
        .purchase-intro, .purchase-form { padding: 1.35rem; }
        .quote-tabs { gap: .3rem; padding: .3rem; }
        .quote-tab { min-height: 52px; justify-content: center; padding: .55rem .4rem; gap: .4rem; }
        .quote-tab-number { width: 26px; height: 26px; border-radius: 8px; }
        .quote-tab-copy small { display: none; }
        .quote-tab-copy strong { font-size: .78rem; }
        .quote-total-price { flex-direction: column; align-items: flex-start; }
    }
/* Extraído de app/views/layouts/application.html.erb (sección: section-dividers). */

      .section-divider {
        width: min(1320px, calc(100% - 32px));
        margin: 0 auto;
        border: 0;
        opacity: 1;
      }
      .placeholder-section {
        background: #fff;
        padding: 54px 0;
      }
      .placeholder-section.alt { background: #f4f7fb; }
/* Extraído de app/views/agente/index.html.erb (sección: soporte). */

    #soporte {
        position: relative;
        overflow: hidden;
        padding: 92px 0;
        background:
        radial-gradient(
            circle at 92% 10%,
            color-mix(in srgb, var(--brand-primary) 8%, transparent),
            transparent 30%
        ),
        radial-gradient(
            circle at 5% 90%,
            color-mix(in srgb, var(--brand-secondary) 6%, transparent),
            transparent 28%
        ),
        #f8fafc;
    }

    #soporte::before {
        display: none;
    }

    #soporte .container {
        position: relative;
        z-index: 1;
    }

    .support-panel {
        position: relative;
        padding: 10px;
        border-radius: 30px;
        background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--brand-primary) 22%, white),
            white 45%,
            color-mix(in srgb, var(--brand-secondary) 16%, white)
        );
        box-shadow:
        0 30px 80px rgba(15, 23, 42, .10);
    }

    .support-grid {
        display: grid;
        grid-template-columns: 1fr minmax(300px, 380px);
        gap: 10px;
        align-items: stretch;
    }

    .support-info,
    .support-form-card {
        position: relative;
        border-radius: 22px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid rgba(15, 23, 42, .07);
        overflow: hidden;
    }

    .support-info {
        padding: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .support-icon {
        width: 68px;
        height: 68px;
        display: grid;
        place-items: center;
        margin-bottom: 1.5rem;
        border-radius: 20px;
        color: #fff;
        font-size: 1.7rem;
        background:
        linear-gradient(
            145deg,
            var(--brand-primary),
            color-mix(
            in srgb,
            var(--brand-primary) 75%,
            var(--brand-secondary)
            )
        );
        box-shadow:
        0 14px 30px
            color-mix(in srgb, var(--brand-primary) 24%, transparent);
    }

    .support-info h3 {
        margin-bottom: .8rem;
        font-size: 1.35rem;
        line-height: 1.25;
        letter-spacing: -.03em;
    }

    .support-info p {
        margin: 0;
        color: #64748b;
        font-size: .94rem;
        line-height: 1.75;
    }

    .support-note {
        margin-top: auto;
        display: flex;
        align-items: center;
        gap: .65rem;
        padding: .9rem 1rem;
        border-radius: 14px;
        color: var(--brand-primary);
        background:
        color-mix(in srgb, var(--brand-primary) 7%, white);
        border: 1px solid
        color-mix(in srgb, var(--brand-primary) 12%, white);
        font-size: .82rem;
        font-weight: 700;
        line-height: 1.5;
    }

    .support-note i {
        font-size: 1rem;
    }

    .support-form-card {
        padding: 2rem;
        width: 100%;
    }

    .support-form .form-label {
        margin-bottom: .45rem;
        color: #334155;
        font-size: .85rem;
        font-weight: 750;
    }

    /* El formulario de soporte es una tarjeta angosta y centrada; a
       diferencia del cotizador, sus campos se ven mejor con el texto
       centrado. */
    .support-form .modern-control { text-align: center; }

    .support-submit { margin-top: .4rem; }

    /* Google exige mostrar este aviso si se oculta el badge de reCAPTCHA. */
    .grecaptcha-badge { visibility: hidden; }
    .recaptcha-disclaimer {
        margin: .75rem 0 0;
        font-size: .74rem;
        line-height: 1.5;
        color: #94a3b8;
        text-align: center;
    }
    .recaptcha-disclaimer a { color: inherit; text-decoration: underline; }
    .recaptcha-disclaimer a:hover { color: var(--brand-primary); }

    .support-feedback {
        display: flex;
        align-items: center;
        gap: .7rem;
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 14px;
        font-size: .85rem;
        font-weight: 700;
        line-height: 1.45;
        animation: supportFeedbackIn .25s ease;
    }

    @keyframes supportFeedbackIn {
        from { opacity: 0; transform: translateY(-4px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .support-feedback-icon {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        font-size: 1.05rem;
    }

    .support-feedback.is-success {
        background: var(--success-soft);
        color: var(--success);
        border: 1px solid color-mix(in srgb, var(--success) 30%, white);
    }

    .support-feedback.is-success .support-feedback-icon {
        background: color-mix(in srgb, var(--success) 18%, white);
    }

    .support-feedback.is-error {
        background: #fdecea;
        color: #c0392b;
        border: 1px solid #f3bcb5;
    }

    .support-feedback.is-error .support-feedback-icon {
        background: color-mix(in srgb, #c0392b 16%, white);
    }

    @media (max-width: 991.98px) {
        #soporte {
        padding: 76px 0;
        }

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

    @media (max-width: 575.98px) {
        #soporte {
        padding: 64px 0;
        }

        .support-panel {
        padding: 7px;
        border-radius: 24px;
        }

        .support-grid {
        gap: 7px;
        }

        .support-info,
        .support-form-card {
        padding: 1.4rem;
        border-radius: 18px;
        }

        .support-icon {
        width: 58px;
        height: 58px;
        margin-bottom: 1.25rem;
        border-radius: 16px;
        font-size: 1.45rem;
        }
    }
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
