/* Ajustes visuales móviles JL Equipos — versión premium 2026-08-05 */
@media (max-width: 820px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  main,
  section,
  .shell,
  .detail-copy,
  .detail-media {
    min-width: 0;
  }

  h1,
  h2,
  h3,
  p,
  a,
  li,
  span,
  strong {
    overflow-wrap: anywhere;
  }

  .site-header .mobile-panel {
    top: calc(100% + 10px);
    right: 0;
    width: min(88vw, 390px);
    padding: 14px;
    border: 1px solid rgba(29, 113, 184, 0.13);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 26px 70px rgba(8, 42, 67, 0.18);
    backdrop-filter: blur(18px);
  }

  .site-header .mobile-panel nav {
    display: grid;
    gap: 7px;
  }

  .site-header .mobile-panel nav a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 12px 16px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, #f8fcfe 0%, #eef7fb 100%);
    color: #123f5b;
    font-size: 0.98rem;
    font-weight: 650;
    transition:
      background 0.2s ease,
      color 0.2s ease,
      transform 0.2s ease;
  }

  .site-header .mobile-panel nav a:active {
    transform: scale(0.985);
    background: #e2f3fa;
    color: #1d71b8;
  }

  .trust-strip {
    padding: 38px 15px;
    border: 0;
    background: linear-gradient(180deg, #f4fafc 0%, #e9f5fa 100%);
  }

  .trust-strip .trust-strip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .trust-strip .trust-strip-grid > div {
    position: relative;
    min-height: 132px;
    padding: 24px 20px 21px;
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 34px rgba(8, 42, 67, 0.08);
  }

  .trust-strip .trust-strip-grid > div::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    width: 40px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, #1d71b8, #36a9e1);
  }

  .trust-strip .trust-strip-grid > div:nth-child(3)::before,
  .trust-strip .trust-strip-grid > div:nth-child(4)::before {
    background: linear-gradient(90deg, #f9b233, #ffd47c);
  }

  .trust-strip .trust-strip-grid strong {
    margin-bottom: 9px;
    color: #082a43;
    font-size: clamp(1.05rem, 4.8vw, 1.32rem);
    line-height: 1.16;
  }

  .trust-strip .trust-strip-grid span {
    color: #607788;
    font-size: 0.88rem;
    line-height: 1.48;
  }

  .spec-list,
  .clean-list {
    display: grid;
    gap: 10px;
    margin: 26px 0 30px;
    padding: 0;
  }

  .spec-list li,
  .clean-list li {
    position: relative;
    min-height: 70px;
    margin: 0;
    padding: 17px 18px 17px 50px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f9fc 100%);
    box-shadow: 0 10px 26px rgba(8, 42, 67, 0.065);
    color: #36586d;
    line-height: 1.48;
    display: block;
  }

  .spec-list li::before,
  .clean-list li::before {
    position: absolute;
    left: 18px;
    top: 21px;
    width: 18px;
    height: 18px;
    margin: 0;
    border-radius: 50%;
    background: #fff3d9;
    box-shadow: inset 0 0 0 6px #f9b233;
  }

  .info-card,
  .application-card,
  .product-card,
  .contact-card,
  .leader,
  .source-card,
  .education-panel,
  .video-card,
  .jl-included-card {
    border: 0;
    box-shadow: 0 15px 38px rgba(8, 42, 67, 0.075);
  }

  .two-column-cards,
  .application-grid,
  .product-grid,
  .video-grid,
  .contact-grid,
  .source-grid,
  .leadership,
  .jl-included-grid {
    gap: 14px;
  }

  .application-links {
    display: grid;
    gap: 10px;
  }

  .application-links a {
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f2f9fc 100%);
    box-shadow: 0 11px 28px rgba(8, 42, 67, 0.07);
  }

  .faq-list,
  .jl-edu-faq-list,
  .jl-product-faq__grid > div:last-child {
    display: grid;
    gap: 10px;
  }

  .faq-list details,
  .jl-edu-faq-list details,
  .jl-product-faq details,
  .jl-product-faq details:last-child {
    padding: 18px;
    border: 0;
    border-radius: 17px;
    background: #f5f9fc;
  }

  .jl-tech-list {
    display: grid;
    gap: 9px;
  }

  .jl-tech-list li {
    padding: 16px 17px;
    border: 0;
    border-radius: 16px;
    background: #f5f9fc;
  }

  .education-list {
    display: grid;
    gap: 8px;
  }

  .education-list li {
    padding: 14px 15px;
    border: 0;
    border-radius: 14px;
    background: #f4f9fc;
  }

  .education-panel-safety .education-list li {
    background: rgba(255, 255, 255, 0.075);
  }

  .jl-product-gallery__main,
  .jl-product-gallery__secondary,
  .detail-media,
  .color-stage,
  .set-feature,
  .proof-image,
  .shipping-card {
    border: 0;
    box-shadow: 0 18px 44px rgba(8, 42, 67, 0.075);
  }

  .jl-product-band,
  .content-section-muted,
  .catalog-preview,
  .applications-preview {
    background: linear-gradient(180deg, #f4fafc 0%, #edf7fb 100%);
  }

  .jl-payment-grid {
    gap: 12px;
  }

  .jl-payment-card {
    border: 0;
    box-shadow: 0 16px 38px rgba(8, 42, 67, 0.1);
  }
}

@media (max-width: 560px) {
  .site-header .mobile-panel {
    right: -2px;
    width: min(92vw, 370px);
    max-height: calc(100vh - 112px);
    overflow-y: auto;
  }

  .trust-strip {
    padding: 32px 15px;
  }

  .trust-strip .trust-strip-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .trust-strip .trust-strip-grid > div {
    min-height: 0;
    padding: 22px 20px 20px;
  }

  .trust-strip .trust-strip-grid strong {
    font-size: 1.13rem;
  }

  .spec-list li,
  .clean-list li {
    min-height: 0;
    padding: 16px 16px 16px 47px;
    border-radius: 16px;
    font-size: 0.93rem;
  }

  .spec-list li::before,
  .clean-list li::before {
    left: 16px;
    top: 20px;
    width: 16px;
    height: 16px;
    box-shadow: inset 0 0 0 5px #f9b233;
  }

  .product-card,
  .application-card,
  .info-card,
  .contact-card,
  .video-card,
  .jl-included-card {
    border-radius: 20px;
  }

  .page-hero h1,
  .home-hero h1,
  .detail-copy h1,
  .detail-copy h2,
  .jl-product-summary h1 {
    font-size: clamp(2.45rem, 12vw, 3.2rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
  }

  .ai-fab {
    bottom: max(16px, env(safe-area-inset-bottom));
    right: 12px;
    max-width: calc(100vw - 24px);
  }
}

/* ============================================================
   JL Equipos — Mobile hotfix 2026-08-05 v5
   - menú móvil estable durante scroll
   - contraste Inicio > Aprender antes de aplicar
   - visibilidad de tarjetas/Datafast
   ============================================================ */
@media (max-width: 820px) {
  /* React aplica body.menu-open{overflow:hidden}; eso rompe el sticky header
     en varios navegadores móviles. Mantener el documento como scroll container. */
  html {
    overflow-x: clip !important;
  }

  body,
  body.menu-open {
    overflow-x: clip !important;
    overflow-y: visible !important;
  }

  .site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    overflow: visible !important;
  }

  .site-header .header-inner {
    position: relative;
    z-index: 1001;
  }

  .site-header .menu-toggle {
    position: relative;
    z-index: 1003;
    flex: 0 0 42px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 24px rgba(8, 42, 67, 0.10);
  }

  .site-header .menu-toggle span {
    transform-origin: center;
    transition: transform .18s ease, opacity .18s ease;
  }

  .site-header .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3.25px) rotate(45deg);
  }

  .site-header .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3.25px) rotate(-45deg);
  }

  /* El panel continúa anclado al header sticky, no a la parte superior
     de la página. Así abre donde esté el usuario. */
  .site-header .mobile-panel {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: auto !important;
    right: 15px !important;
    width: min(calc(100vw - 30px), 390px) !important;
    max-height: calc(100dvh - 100px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 1002 !important;
  }

  /* Inicio — recuperar el fondo oscuro original y mejorar contraste. */
  .applications-preview {
    background: linear-gradient(145deg, #061f33 0%, #0a3a59 100%) !important;
    color: #fff !important;
  }

  .applications-preview .applications-copy .eyebrow,
  .applications-preview .applications-copy .eyebrow-light {
    color: #78d3f4 !important;
  }

  .applications-preview .applications-copy h2 {
    color: #fff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .08);
  }

  .applications-preview .applications-copy p {
    color: #d7e7ef !important;
  }

  .applications-preview .application-links {
    border-top: 0 !important;
  }

  .applications-preview .application-links a {
    border: 0 !important;
    background: rgba(255, 255, 255, .97) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .14) !important;
  }

  .applications-preview .application-links a strong {
    color: #082a43 !important;
  }

  .applications-preview .application-links a span {
    color: #d99000 !important;
  }

  .applications-preview .application-links a i {
    color: #1d71b8 !important;
  }

  /* Datafast — asegurar que la franja y las marcas de tarjetas sean visibles. */
  .jl-payment-network {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    background: #fff !important;
    border: 1px solid #d6e7f0 !important;
    box-shadow: 0 15px 36px rgba(8, 42, 67, .10) !important;
  }

  .jl-payment-network img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 56px;
    object-fit: contain !important;
  }
}

@media (max-width: 560px) {
  .site-header .mobile-panel {
    right: 15px !important;
    width: calc(100vw - 30px) !important;
    max-height: calc(100dvh - 92px) !important;
  }

  .applications-preview {
    padding-block: 72px !important;
  }

  .applications-preview .applications-copy h2 {
    font-size: clamp(2.35rem, 11.4vw, 3.05rem) !important;
    line-height: 1.04 !important;
  }

  .applications-preview .application-links a {
    min-height: 72px !important;
    padding: 14px 16px !important;
    grid-template-columns: 34px minmax(0, 1fr) 22px !important;
    gap: 10px !important;
    border-radius: 17px !important;
  }

  .applications-preview .application-links a strong {
    font-size: 1.02rem !important;
    line-height: 1.3 !important;
  }

  .jl-payment-network {
    padding: 15px !important;
    border-radius: 18px !important;
  }

  .jl-payment-network img {
    min-height: 64px;
  }
}

@media (max-width: 820px) {
  /* Página estática del equipo: misma apertura visual que el menú React. */
  .site-header.jl-static-menu-open .mobile-panel {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }
}
