/* ==========================================================================
   Estudio Alonso — Responsive
   Puntos de corte: 1080 · 960 · 860 · 720 · 620 · 520 · 420
   ========================================================================== */

/* ---------- ≤ 1080px: el submenú pasa a panel lateral ---------- */
@media (max-width: 1080px) {
  .submenu {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 88vw);
    transform: translateX(100%); opacity: 1; visibility: visible;
    border-radius: 0; border-top: 0; border-right: 0;
    display: flex; flex-direction: column;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    box-shadow: var(--sh-lg);
    transition: transform var(--t-slow) var(--e-move);
  }
  .nav__item--has-sub:hover .submenu { transform: translateX(0); }

  /* El puente del hover-gap sólo hace falta con el submenú desplegable
     (absolute, con hueco). Con el panel lateral no hay hueco, así que el
     pseudo-elemento se desactiva para no interceptar punteros. */
  .nav__item--has-sub::after { content: none; }

  .submenu a { padding: .8rem .9rem; font-size: .95rem; }
}

/* ---------- ≤ 960px: navegación de escritorio → menú móvil ---------- */
@media (max-width: 960px) {
  html { scroll-padding-top: 78px; }

  .nav, .header__actions .btn { display: none; }

  .nav-toggle { display: flex; }
  .mobile-call { display: flex; }
  .header__inner { min-height: 68px; gap: var(--sp-3); }

  .brand__name { font-size: 1.05rem; }
  .brand__mark { width: 40px; height: 40px; flex-basis: 40px; }
  .brand__sub { font-size: .58rem; letter-spacing: .24em; }

  .hero { min-height: auto; }
  .hero__seal { width: 84px; opacity: .72; }
  .hero__facts { gap: var(--sp-5) var(--sp-6); }

  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
}

@media (max-width: 860px) {
  .topbar__inner { min-height: 38px; justify-content: center; }
  .topbar__list--left { display: none; }
  .topbar__list--right { width: 100%; justify-content: center; flex-wrap: wrap; gap: var(--sp-4); }
}

/* ---------- ≤ 720px ---------- */
@media (max-width: 720px) {
  .hero__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
  .hero__fact { flex-direction: column; align-items: flex-start; gap: .15rem; }
  .hero__fact b { font-size: 1.55rem; }

  .calc__head { padding: var(--sp-4); gap: var(--sp-3); }
  .calc__body { padding: var(--sp-4); }

  .about__badge { right: -8px; }

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

@media (max-width: 620px) {
  .section-head { margin-bottom: var(--sp-6); }
  .mobile-menu__panel { width: min(360px, 94vw); }
  .mobile-nav { padding: var(--sp-3) var(--sp-4) var(--sp-5); }
  .mobile-menu__foot { padding: var(--sp-4); }
  .mobile-nav__link { font-size: .98rem; padding: .78rem .7rem; }
  .mobile-nav__sub a { font-size: .9rem; }
  .mobile-menu__title { font-size: .95rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .wa-float { width: 54px; height: 54px; font-size: 1.5rem; }
}

/* ---------- ≤ 520px ---------- */
@media (max-width: 520px) {
  .brand__sub { display: none; }
  .header__inner { min-height: 62px; }
  .mobile-call { width: 42px; height: 42px; }
  .nav-toggle { width: 42px; height: 42px; }

  .hero__eyebrow { font-size: .64rem; padding: .42em .85em; }
  .hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-4); }
  .hero__fact b { font-size: 1.35rem; }
  .hero__fact span { font-size: .72rem; letter-spacing: .06em; }

  .form-grid { gap: var(--sp-3); }
  .field input, .field select { padding: .7rem .8rem; }
  .btn { padding: .78em 1.25em; font-size: .88rem; }

  .footer__bar { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* ---------- ≤ 420px ---------- */
@media (max-width: 420px) {
  .hero__facts { grid-template-columns: minmax(0, 1fr); }
  .hero__fact { flex-direction: row; align-items: baseline; gap: .5rem; }
  .mobile-menu__panel { width: 100vw; }
}

/* ---------- Orientation landscape en móvil ---------- */
@media (max-height: 480px) and (orientation: landscape) {
  .mobile-menu__head { padding: .7rem 1rem; }
  .mobile-nav__link { padding: .6rem .7rem; font-size: .94rem; }
}

/* ---------- Impresión ---------- */
@media print {
  .topbar, .site-header, .wa-float, .mobile-menu, .hero__media,
  .hero__scrim, .footer__social, .ticker, .read-progress { display: none !important; }
  body { background: #fff; color: #000; }
  .hero, .page-head, .section--deep, .site-footer { background: #fff !important; color: #000 !important; }
  .hero__title, .page-head h1, .site-footer b { color: #000 !important; }
  a { color: #000; text-decoration: underline; }
}
