/* ============================================================
  Responsive (breakpoint ≥768px, tablet + desktop)
   ============================================================ */

@media (min-width: 768px) {
  .container {
    padding-inline: var(--margin-desktop);
  }

  /* Menu open/close is intentionally mobile-only:
     desktop always shows the inline nav bar */
  .menu-toggle {
    display: none;
  }

  /* Desktop header: 1fr | auto | 1fr grid keeps nav perfectly centered */
  .site-header {
    padding: 0;
    border-radius: 0;
  }

  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    padding-inline: var(--margin-desktop);
    align-items: center;
  }

  .site-header__group {
    gap: 12px;
  }

  .site-header__actions {
    display: flex;
    justify-content: flex-end;
  }

  /* Desktop navigation replaces mobile panel */
  .site-nav {
    display: flex;
  }

  .site-nav__link {
    font-size: 1.0625rem;
    line-height: 24px;
  }

  /* Main grid: 12 columns — content 8, sidebar 4 */
  .main-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
    padding-block: 32px;
  }

  .col-primary {
    grid-column: span 8;
  }

  /* Pages without a sidebar use the full 12 columns */
  .main-grid--full > .col-primary {
    grid-column: span 12;
  }

  .col-sidebar {
    grid-column: span 4;
  }

  /* Hero media grows */
  .hero__media {
    height: 384px;
  }

  /* Article cards: 2 columns, wide card spans both */
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card--wide {
    grid-column: span 2;
  }

  .card--wide .card__link {
    flex-direction: row;
  }

  .card__media--wide {
    width: 40%;
    height: auto;
    min-height: 240px;
  }

  .card__content--wide {
    width: 60%;
    padding: 28px 32px;
    justify-content: center;
  }

  /* Hero content padding grows */
  .hero__content {
    padding: 32px;
  }

  /* Sidebar stacks widgets */
  .col-sidebar {
    gap: 32px;
  }

  /* Footer: 4 columns, brand spans 2 */
  .site-footer__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 32px;
    padding-block: 56px;
  }

  .site-footer__brand {
    grid-column: span 5;
  }

  .site-footer__links:nth-of-type(1) {
    grid-column: span 2;
  }

  .site-footer__links:nth-of-type(2) {
    grid-column: span 2;
  }

  .site-footer__contact {
    grid-column: span 3;
  }

  .site-footer__bottom-inner {
    padding-inline: var(--margin-desktop);
  }

  /* Sidebar stack sticks below the header on scroll — being
     in-flow (sticky, not fixed) keeps it exactly aligned with
     its grid column (no scrollbar-width offset).
     Stretch the sidebar across the full grid row so the sticky
     stack has room to travel and actually engages. */
  body:not(.is-landing) .col-sidebar {
    align-self: stretch;
  }

  body:not(.is-landing) .sidebar-stack {
    position: sticky;
    top: calc(var(--header-total) + 16px);
  }

  body:not(.is-landing) .widget--list,
  body:not(.is-landing) .widget--sticky {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* Fixed sidebar is desktop-only */
@media (max-width: 767px) {
  .col-sidebar {
    position: static;
  }
}

/* Landing page: popular + notice widgets are combined in one
   .sidebar-stack div which sticks below the header on scroll */
@media (min-width: 768px) {
  body.is-landing .col-sidebar {
    align-self: stretch;
  }

  body.is-landing .sidebar-stack {
    position: sticky;
    top: calc(var(--header-total) + 16px);
  }

  body.is-landing .widget--list,
  body.is-landing .widget--sticky {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (min-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}