/* ==========================================================================
   Responsive — breakpoint-specific refinements not already handled by
   fluid clamp() sizing, CSS grid auto-fit, or logical properties.
   ========================================================================== */

/* ---- Large desktop / ultra-wide guardrails ------------------------------ */
@media (min-width: 1600px) {
  :root {
    --container-max: 1360px;
  }
}

/* ---- Laptop ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content { max-width: 100%; margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { order: -1; height: 320px; margin-bottom: var(--space-md); }

  .footer-content { grid-template-columns: 1fr; gap: var(--space-lg); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Tablet / mobile nav ------------------------------------------------ */
@media (max-width: 860px) {
  .nav-menu {
    position: fixed;
    inset-inline: 0;
    top: 72px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: var(--space-sm) var(--container-padding) var(--space-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-base) ease, transform var(--duration-base) ease, visibility var(--duration-base);
  }

  .nav-menu.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  .nav-menu > li { width: 100%; }
  .nav-menu a { width: 100%; padding: 0.9rem 0.1rem; border-bottom: 1px solid var(--color-border); }
  .nav-menu a::after { display: none; }

  /* The Services link is nested inside .nav-item-wrap (to sit alongside the
     submenu toggle button), so the width:100%/border-bottom above resolves
     against that shrink-wrapped wrapper, not the full row — it would render
     narrow and misaligned compared to every other item. Move the full-width
     row treatment to the wrapper itself and let the link grow inside it. */
  .nav-item-wrap {
    width: 100%;
    justify-content: space-between;
    padding: 0.9rem 0.1rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-item-wrap a {
    width: auto;
    flex: 1;
    padding: 0;
    border-bottom: none;
  }

  .mega-toggle { width: 32px; height: 32px; }

  .mega-menu {
    position: static;
    width: 100%;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    grid-template-columns: 1fr;
    box-shadow: none;
    border: none;
    padding: 0 0 var(--space-sm);
  }

  .has-mega.is-open .mega-menu { display: grid; }

  .nav-actions { margin-inline-start: 0; }
  .nav-toggle { display: inline-flex; }

  .lang-switcher { display: none; }
  .nav-menu .lang-switcher-mobile { display: block; margin-top: var(--space-sm); }
}

@media (min-width: 861px) {
  .lang-switcher-mobile { display: none; }
}

/* ---- Mobile ------------------------------------------------------------ */
@media (max-width: 640px) {
  section { padding-block: var(--space-xl); }
  .page-hero { padding-block: 6rem var(--space-lg); }

  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-stats { grid-template-columns: 1fr; text-align: center; }

  .process-step { grid-template-columns: 1fr; text-align: center; }
  .process-step::after { display: none; }
  .step-number { margin-inline: auto; }

  .footer-links { grid-template-columns: 1fr; gap: var(--space-lg); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .stats-strip { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }

  .orbit-card { display: none; }

  .btn { width: 100%; }
  .hero-cta .btn, .cta-banner .btn { max-width: 340px; margin-inline: auto; }
}

/* ---- Landscape phones: prevent hero from eating the whole viewport ------ */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding-block: 6rem 2rem; }
  .hero-visual { display: none; }
}
