/* Responsive layer — retrofits breakpoints onto the inline-styled markup.
   Two utility classes cover almost every layout on the site:
   - .wg-stack   : any 2/3-column grid or space-between flex row that should
                   become a single stacked column on small screens (text+image
                   pairs, CTA heading+button rows, footer columns, terms sidebar).
   - .wg-cards   : multi-item card/photo grids (3–6 columns) that should step
                   down through an intermediate 2-column tablet layout before
                   going to 1 column on phones.
   !important is necessary here because the base layout is set via inline
   style="" attributes, which normal stylesheet specificity can't override. */

@media (max-width: 900px) {
  .wg-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .wg-cards {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .wg-terms-sidenav {
    position: static !important;
    border-left: none !important;
    border-top: 1px solid var(--wg-ink-500);
    padding-left: 0 !important;
    padding-top: 24px;
  }
}

@media (max-width: 560px) {
  .wg-cards {
    grid-template-columns: 1fr !important;
  }

  .wg-btn--lg {
    padding: 0 26px;
    font-size: 17px;
  }
}

/* ---- Header / mobile nav ---- */
.wg-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.wg-nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--wg-white);
  transition: transform 150ms cubic-bezier(.2,.7,.3,1), opacity 150ms cubic-bezier(.2,.7,.3,1);
}
.wg-nav-toggle.is-active .wg-nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.wg-nav-toggle.is-active .wg-nav-toggle__bar:nth-child(2) { opacity: 0; }
.wg-nav-toggle.is-active .wg-nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .wg-nav-toggle { display: flex; }

  #wg-nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
    padding: 24px var(--gutter) 32px;
    background: var(--wg-black);
    border-bottom: 1px solid var(--wg-ink-700);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 220ms cubic-bezier(.2,.7,.3,1), opacity 200ms cubic-bezier(.2,.7,.3,1);
  }
  #wg-nav-links.is-open {
    max-height: 80vh;
    opacity: 1;
    overflow-y: auto;
  }
  #wg-nav-links .wg-btn { width: 100%; }
}

@media (min-width: 861px) {
  .wg-nav-toggle { display: none !important; }
}
