/* ============================================================
   mobile-nav-footer.css  (orchestrator-app-mobile-nav-footer v1.0.0)
   Mobile-first responsive kit applied to all mymitap.ru pages.
   - Hamburger button hidden on desktop (≥721px), visible ≤720px
   - .nav-links toggled via [aria-expanded] attribute
   - Footer auto-resizes 4-col → 2-col → 1-col across 980 / 560px
   - Trust strip auto-wraps at ≤720px
   ============================================================ */

/* --- hamburger button (always present, hidden on desktop) --- */
.nav-toggle {
  display: none;  /* default (desktop) */
  width: 40px; height: 40px;
  border: 1px solid var(--line, rgba(0,72,170,.16));
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  position: relative;
  padding: 0;
  margin: 0;
  z-index: 30;
}
.nav-toggle span {
  display: block;
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--blue, #0076ff);
  border-radius: 2px;
  transition: transform .2s ease, opacity .15s ease;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 25px; }
/* Active state (X mark) */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* Desktop layout: button hidden, links visible */
@media (min-width: 721px) {
  .nav-toggle { display: none; }
}

/* Mobile layout: button visible, links hidden by default */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 70px; left: 12px; right: 12px;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(20px);
    border: 1px solid var(--line, rgba(0,72,170,.16));
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(0,66,160,.18);
    z-index: 25;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }
  .nav-links[data-open="true"] { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
  }
  .nav-links a:hover { background: rgba(0,118,255,.10); }
  .nav-links a[aria-current="page"] {
    background: rgba(0,118,255,.16);
    color: var(--blue, #0076ff);
  }
  .nav-tools { gap: 6px !important; }
  .lang-pill button { font-size: 14px !important; min-width: 32px !important; height: 32px !important; }
  .theme-toggle, .jinju-toggle, .wa-link { width: 32px !important; height: 32px !important; min-width: 32px !important; }
  .announce {
    font-size: 12px !important;
    padding: 8px 12px !important;
    gap: 10px !important;
    flex-wrap: wrap;
  }
  .nav {
    grid-template-columns: auto 1fr auto !important;
    gap: 10px !important;
    padding: 10px 12px !important;
  }
  .nav-logo { font-size: 17px !important; }
  .nav-cta { display: none !important; }  /* keep CTAs in drawer instead */
}

/* --- footer responsive grid auto-sizing --- */
@media (max-width: 980px) {
  .footer, .footer-bottom { width: min(100% - 22px, 1180px); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .footer-hero-inner { grid-template-columns: 1fr; gap: 20px; padding: 18px; }
  .footer-hero-card { padding: 18px; }
  .footer-trust-inner { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}
@media (max-width: 720px) {
  .footer { width: calc(100% - 18px); margin: 14px auto; padding: 18px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }
  .footer-h { font-size: 12px; margin-bottom: 4px; }
  .footer-list { gap: 4px; font-size: 13px; }
  .footer-trust-inner { grid-template-columns: 1fr 1fr; gap: 8px; }
  .footer-trust-card { padding: 10px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; font-size: 12px; }
  .section-cta-trust, .faq-funnel-trust { font-size: 11px !important; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 10px; }
  .footer-trust-inner { grid-template-columns: 1fr; }
  .footer-trust-card { padding: 6px 8px; font-size: 11px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 12px; }
  .footer-trust-inner { grid-template-columns: 1fr; }
  .footer-trust-card { padding: 8px 10px; font-size: 12px; }
}

/* --- reduced motion + dark mode safety --- */
@media (prefers-reduced-motion: reduce) {
  .nav-toggle span { transition: none; }
}

/* --- auto-sizing safety: text reflow on orientation change --- */
.nav-links a, .footer-list a {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}
