/* ══════════════════════════════════════════════════════
   LaboraYa — Publico_movil.css
   Adaptación móvil de páginas públicas (igual a la app)
   Se carga DESPUÉS de Principal.css
══════════════════════════════════════════════════════ */

/* ─── ESCRITORIO: ocultar elementos solo-móvil ─── */
.mobile-nav,
.txt-movil { display: none; }

/* ══════════════════════════════════════════════════════
   MÓVIL
══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ─── Textos alternos (versión corta de la app) ─── */
  .txt-desk  { display: none; }
  .txt-movil { display: inline; }

  .container { padding: 0 20px; }

  /* Sin efectos hover que "brincan" en pantallas táctiles */
  .ct:hover, .wk:hover, .tcard:hover { transform: none; }

  /* ════════════ HEADER ════════════ */
  .header-inner { height: 64px; gap: .75rem; }

  .logo { font-size: 1.3rem; gap: 10px; }
  .logo img {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
  }

  .nav-links { display: none; }
  .nav-actions { display: flex; margin-left: auto; }
  .nav-actions .link-login,
  .nav-actions .btn-nav { display: none; }
  .hamburger, .mobile-menu { display: none !important; }

  /* Botón de tema como en la app: solo el emoji */
  .theme-toggle {
    border: none;
    background: transparent;
    width: 40px; height: 40px;
  }
  .theme-toggle:hover { background: transparent; box-shadow: none; transform: none; }
  .theme-toggle svg { display: none; }
  .theme-toggle::before { content: "🌙"; font-size: 1.35rem; line-height: 1; }
  [data-theme="dark"] .theme-toggle::before { content: "☀️"; }

  /* Menú con scroll horizontal */
  .mobile-nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    overflow-x: auto;
    padding: 0 20px 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav a {
    flex: 0 0 auto;
    font-size: .92rem; font-weight: 500;
    color: var(--gray-600);
    white-space: nowrap;
  }
  .mobile-nav a:active { color: var(--orange); }
  .mobile-nav .mn-login { margin-left: .5rem; }
  .mobile-nav .mn-cta {
    padding: .55rem 1.1rem;
    background: var(--orange);
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
  }

  /* ════════════ HERO ════════════ */
  .hero {
    padding-top: 110px;              /* header (64) + menú deslizable (~46) */
    background: var(--orange-l);
  }
  .hero-bg-shapes { display: none; }

  .hero-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;            /* FIX: antes "center" cortaba las filas deslizables */
    gap: 0;
    padding-top: 1.5rem;
    padding-bottom: 0;
  }
  /* Sus hijos pasan a ser elementos del flex para reordenarlos */
  .hero-left, .hero-right { display: contents; }

  .hero-pill   { order: 1; align-self: flex-start; margin-bottom: 1.1rem; }
  .hero-h1     { order: 2; }
  .hero-p      { order: 3; }
  .hero-img    { order: 4; align-self: center; }
  .hero-pops   { order: 5; }
  .search-box  { order: 6; }
  .hero-chips  { order: 7; }
  .hero-trust  { order: 8; }

  .hero-h1 {
    font-size: 2.1rem;
    line-height: 1.15;
    margin-bottom: 1rem;
  }
  .hero-h1 br { display: none; }
  .hero-h1 em { display: block; }

  .hero-p { font-size: 1.05rem; line-height: 1.6; margin-bottom: 1.25rem; }

  .hero-img {
    width: 100%;
    max-width: 380px;
    margin: 0 auto 1rem;
  }

  /* ── Tarjetas (4.9, Verificado…) en fila deslizable ── */
  .hero-pops {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    margin: 0 -20px 1.25rem;
    padding: .35rem 20px 1rem;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 20px;     /* la tarjeta se alinea con el margen, no con el borde */
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .hero-pops::-webkit-scrollbar { display: none; }

  .pop {
    display: flex;
    align-items: center;
    gap: .75rem;
    position: static;
    flex: 0 0 auto;
    min-width: 46%;
    padding: 1rem 1.15rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    white-space: nowrap;
    animation: none;
    transform: none;
    scroll-snap-align: start;
  }
  .pop span  { font-size: 1.5rem; line-height: 1; }
  .pop div   { gap: .15rem; }
  .pop b     { font-size: 1rem; font-weight: 700; color: var(--gray-900); }
  .pop small { font-size: .8rem; color: var(--gray-600); }

  /* ── Buscador apilado a todo el ancho ── */
  .search-box {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    border-radius: 20px;
    padding: 6px;
    margin-bottom: 1.1rem;
  }
  .sb-field { width: 100%; padding: .8rem .75rem; }
  .sb-field input { font-size: 16px; }   /* evita el zoom automático en iPhone */
  .sb-sep { width: 100%; height: 1px; }
  .sb-btn {
    width: auto;
    margin: 6px 4px 2px;
    padding: .85rem;
    border-radius: 14px;
    font-size: 1rem;
    text-align: center;
  }

  /* ── Chips deslizables ── */
  .hero-chips {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: .6rem;
    margin: 0 -20px 1.25rem;
    padding: 0 20px .25rem;
    scroll-padding-inline: 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .hero-chips::-webkit-scrollbar { display: none; }
  .hero-chips span {
    flex: 0 0 auto;
    padding: .6rem 1rem;
    background: var(--orange-m);
    color: var(--gray-600);
    font-size: .9rem;
  }

  /* ── Confianza con emojis naranjas ── */
  .hero-trust { gap: .75rem 1.5rem; }
  .ht-item { color: var(--orange); font-size: .95rem; gap: .4rem; }
  .ht-item svg { display: none; }
  .ht-item:nth-child(1)::before { content: "⚡"; }
  .ht-item:nth-child(2)::before { content: "🛡️"; }
  .ht-item:nth-child(3)::before { content: "🕐"; }

  /* ── Estadísticas 2×2 ── */
  .stats-strip { margin-top: 1.75rem; }
  .stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem .5rem;
    padding: 1.4rem 16px;
  }
  .sstat b { font-size: 1.4rem; }
  .sstat span { font-size: .8rem; text-align: center; }

  /* ════════════ ORDEN DE SECCIONES (igual a la app) ════════════ */
  main { display: flex; flex-direction: column; }
  main > .hero     { order: 1; }
  #categorias      { order: 2; }
  #destacados      { order: 3; }
  #como-funciona   { order: 4; }
  .testi-bg        { order: 5; }
  .sec-cta         { order: 6; }

  /* ════════════ SECCIONES ════════════ */
  .section-pad { padding: 2.25rem 0; }

  .sh {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
    margin-bottom: 1.25rem;
  }
  .h2 { font-size: 1.65rem; }
  .h2 br { display: none; }
  .link-all { font-size: .95rem; }

  /* Categorías: tarjeta vertical centrada */
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .ct {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: .6rem;
    padding: 1.4rem .75rem;
  }
  .ct-i {
    width: 52px; height: 52px;
    background: var(--orange-m);
    border-radius: 12px;
  }
  .ct-b h3 { font-size: 1rem; }
  .ct-b p  { font-size: .82rem; }
  .ct.hot { border-color: var(--gray-200); }
  .ct-hot-badge { display: none; }

  /* Profesionales destacados */
  .wk { padding: 1.1rem; }
  .wk-desc { display: none; }
  .wk-rating small::after { content: " reseñas"; }
  .wk-price { max-width: 60%; line-height: 1.35; }
  .wk-price b { font-size: 1.15rem; }
  .wk-btn { padding: .65rem 1.1rem; font-size: .9rem; }

  /* Cómo funciona */
  .how-bg,
  [data-theme="dark"] .how-bg {
    background: var(--orange-l);
    border: none;
  }
  .how-wrap { gap: 1.25rem; }
  .how-left .h2 em { font-style: normal; color: inherit; }
  .how-desc { display: none; }
  .tab-btns { margin-top: 1rem; }
  .tb { padding: .6rem 1.1rem; font-size: .9rem; }
  .step-row,
  .step-row:last-child {
    padding: 1.1rem 0;
    gap: 1rem;
    border-bottom: 1px solid rgba(255,87,34,.15);
  }
  .step-row:hover { background: none; padding-left: 0; }
  .step-num { font-size: 1.75rem; width: 44px; opacity: .4; }
  .step-txt h3 { font-size: 1rem; }
  .step-txt p  { font-size: .9rem; line-height: 1.55; }

  /* Testimonios */
  .testi-bg,
  [data-theme="dark"] .testi-bg {
    background: var(--white);
    border: none;
  }
  .testi-head { text-align: left !important; margin-bottom: 1.25rem !important; }
  .testi-row { gap: .9rem; }
  .tcard { padding: 1.25rem; }
  .tcard:hover { box-shadow: none; }
  .tcard-main { border-color: var(--gray-200); box-shadow: none; }
  .tcard p { font-size: .95rem; margin-bottom: 1rem; }

  /* Dual CTA */
  .sec-cta { padding: 1rem 0 2rem; }
  .dual-row { gap: 1rem; }
  .dcta { padding: 1.5rem; border-radius: 24px; }
  .dcta-icon { font-size: 2rem; margin-bottom: .6rem; }
  .dcta h3 { font-family: var(--font-body); font-size: 1.4rem; }
  .dcta p { font-size: .95rem; margin-bottom: 1.1rem; }

  /* ════════════ FOOTER ════════════ */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.75rem 20px 1rem;
  }
  .ft-brand .logo { margin-bottom: .6rem; }
  .ft-logo img {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
  }
  .ft-brand p { max-width: none; font-size: .85rem; }
  .ft-socials { margin-top: 1rem; gap: .6rem; }
  .ft-socials a {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.1);
    color: #fff;
  }
  .ft-links { grid-template-columns: repeat(3, 1fr); gap: .75rem; }
  .ft-col h4 { font-size: .7rem; letter-spacing: .04em; margin-bottom: .6rem; }
  .ft-col a  { font-size: .85rem; margin-bottom: .55rem; }
  .footer-bar { padding: 1rem 0; }
  .footer-bar-inner span:last-child { display: none; }

  /* ════════════ MODALES ════════════ */
  .mapa-modal-overlay { padding: .75rem; }
  .mapa-modal { max-height: 92vh; border-radius: 20px; }
  .mapa-modal-header { padding: 1rem 1.1rem; }
  .mapa-titulo { font-size: 1.1rem; }
  .mapa-modal input,
  .mapa-modal textarea { font-size: 16px !important; }

  .modal-scroll { padding: 1rem !important; }

  /* Para empresas: una columna y con scroll (antes se cortaba el formulario) */
  .empresas-body {
    padding: 1.1rem !important;
    overflow-y: auto;
    min-height: 0;
  }
  .empresas-grid {
    grid-template-columns: 1fr !important;
    gap: .75rem !important;
    margin-bottom: 1.25rem !important;
  }
}