/* ==========================================================================
   ABI VISUALIZATION — Responsive overrides
   ========================================================================== */

@media (max-width: 960px) {
  /* Dark scrim behind the panel, dimming the rest of the page */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 38, 44, 0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 90;
  }
  .nav-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

  /* Panel: full width, anchored under the header, height fits its content
     (capped + scrollable as a safety net, never forced fullscreen) */
  .main-nav {
    position: fixed;
    top: 76px;
    left: 50%;
    width: 100vw;
    bottom: auto;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    background: var(--abi-dark);
    padding: 8px 24px 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    transform: translateX(-50%) translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1;
  }
  .main-nav.is-open { opacity: 1; transform: translateX(-50%) translateY(0); visibility: visible; pointer-events: auto; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    width: 100%;
    padding: 14px 4px;
    font-size: 1.0625rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    transition: color 0.15s ease, background-color 0.15s ease;
  }
  .main-nav a:not(.lang-switch-item):hover,
  .main-nav a:not(.lang-switch-item):active { color: var(--abi-cyan); background: rgba(255, 255, 255, 0.06); }
  .header-actions .btn-sm { display: none; }
  .nav-toggle { display: inline-flex; }

  /* No hover on touch — the dropdown stays permanently expanded, nested
     under its trigger, instead of the desktop hover/focus-within reveal. */
  .nav-dropdown-menu {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    margin: 0;
    padding: 0 0 0 16px;
    background: transparent;
  }
  .nav-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 14px 4px;
    font-size: 1.0625rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }
  .nav-dropdown-menu a { color: rgba(255, 255, 255, 0.85); padding: 12px 4px; border-radius: 0; }
  .nav-dropdown-menu a:hover { background: none; color: var(--abi-cyan); }
  /* Text-only on mobile, per request — the letter-mark badges are a
     desktop-only detail. */
  .nav-dropdown-icon { display: none; }

  .lang-switch {
    width: 100%;
    padding: 14px 4px;
    margin-top: 8px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }
  .lang-switch-icon { color: rgba(255, 255, 255, 0.55); }
  .main-nav .lang-switch-item,
  .main-nav .lang-switch-item--active {
    display: inline-flex;
    align-items: center;
    min-height: auto;
    width: auto;
    padding: 0;
    border-bottom: none;
    font-size: 1rem;
  }
  .main-nav .lang-switch-item { color: rgba(255, 255, 255, 0.55); }
  .main-nav a.lang-switch-item:hover { color: var(--abi-cyan); }
  .main-nav .lang-switch-item--active { color: var(--abi-cyan); }
  .lang-switch-sep { color: rgba(255, 255, 255, 0.3); }

  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { justify-content: flex-start; }
  /* google-ads hero: mock disappears on mobile/tablet, only the copy stays */
  #ga-hero-mock { display: none; }
  /* meta-ads hero: same treatment as #ga-hero-mock above */
  #ma-hero-mock { display: none; }
  /* google-business-profile hero: same treatment as #ga-hero-mock above */
  #gbp-hero-mock { display: none; }
}

@media (max-width: 860px) {
  .case-study { grid-template-columns: 1fr; padding: 32px; }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .hero { padding: 56px 0; }
  .problem-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 40px; }
  .timeline::before { display: none; }
  .testimonials { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .pricing-plans { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
