/* =========================================================================
   Cox Gazette — Responsive Overrides
   Breakpoints: 1200px / 992px / 768px / 576px (desktop-first cascade)
   ========================================================================= */

/* ---------- ≤1200px : large desktop → desktop ---------- */
@media (max-width: 1200px) {
  :root {
    --container-width: 100%;
    --gutter: 32px;
  }

  .hero-story__title {
    font-size: 46px;
  }
}

/* ---------- ≤992px : desktop → tablet ---------- */
@media (max-width: 992px) {
  :root {
    --gutter: 24px;
  }

  /* Masthead: stack tagline under logo, hide desktop social row to
     keep the header compact once the layout narrows. */
  .masthead__row {
    grid-template-columns: auto 1fr;
    padding-block: var(--space-4);
  }

  .masthead__spacer {
    display: none;
  }
 
  .masthead__brand {
    grid-column: 1;
    align-items: flex-start;
    text-align: left;
  }

  .masthead__logo {
    height: 85px;
  }

  /* .masthead__social {
    display: none;
  } */

  /* Primary nav: no hamburger — keep every item visible and let the
     row scroll horizontally if it doesn't fit. The active item and a
     fade edge make it clear there's more to scroll to. */
  .site-nav__row {
    justify-content: flex-start;
    height: 52px;
    padding-right: 56px;
  }

  .site-nav__menu {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: var(--space-5);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-inline: 2px;
  }

  .site-nav__menu::-webkit-scrollbar {
    display: none;
  }

  .site-nav__menu li {
    flex: 0 0 auto;
  }

  .search-toggle {
    box-shadow: -18px 0 16px 6px var(--color-white);
  }

  /* Hero becomes a single column: main story, then side stories */
  .hero {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .hero-story__title {
    font-size: 36px;
  }

  .hero-side {
    flex-direction: row;
    overflow-x: auto;
    gap: var(--space-4);
  }

  .hero-side .side-story {
    flex: 1 0 260px;
    border-bottom: none;
    padding-bottom: 0;
  }

  /* News grid: 2 columns */
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Category sections: stack, always feature-first visually */
  .category-grid,
  .category-grid--reverse {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .category-grid--reverse .category-feature,
  .category-grid--reverse .category-secondary {
    order: initial;
  }

  /* Footer: brand full width, two link columns beneath */
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

/* ---------- ≤768px : tablet → mobile ---------- */
@media (max-width: 768px) {
  :root {
    --space-6: 36px;
    --space-7: 44px;
  }

  .topbar__row {
    height: auto;
    padding-block: var(--space-2);
    /* flex-direction: column; */
    /* align-items: flex-start; */
    /* text-align:left; */
    gap: var(--space-1);
  }

  .topbar__links {
    gap: var(--space-3);
    /* align-items: flex-end; */
    /* text-align: right; */
  }

  .masthead__tagline {
    display: none;
  }

  .masthead__logo {
    height: 75px;
  }

  .hero-story__title {
    font-size: 30px;
  }

  .hero-story__excerpt {
    font-size: 15.5px;
  }

  .hero-side {
    flex-direction: column;
    overflow-x: visible;
  }

  .hero-side .side-story {
    flex: initial;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-4);
  }

  .hero-side .side-story:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  /* News grid: single column */
  .news-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding-block: var(--space-6);
  }

  .section__head h2 {
    font-size: 23px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .footer__brand {
    grid-column: 1;
  }

  .social-list {
    gap: var(--space-5);
  }

  .search-panel__form input {
    font-size: 22px;
  }
}

/* ---------- ≤576px : small mobile ---------- */
@media (max-width: 576px) {
  :root {
    --gutter: 18px;
  }

  .masthead__logo {
    height: 65px;
  }

  .hero-story__title {
    font-size: 26px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }

  .side-story {
    grid-template-columns: 80px 1fr;
  }

  .category-feature__title {
    font-size: 22px;
  }

  .category-secondary__title {
    font-size: 18px;
  }

  .ticker__label {
    font-size: 10px;
  }

  .social-list {
    gap: var(--space-4);
  }

  .search-panel__inner {
    gap: var(--space-3);
  }

  .search-panel__form input {
    font-size: 18px;
  }

  .search-panel__form button[type="submit"] {
    font-size: 12px;
  }
}
