/*
 * GAS Executive Theme — Adaptive viewport layer
 * v37.1.1
 * Keeps the approved desktop composition calm on smaller monitors while
 * protecting one-line navigation and comfortable anchor positioning.
 */

/* Fixed header + anchor navigation. */
#gas-news {
  scroll-margin-top: 126px;
}
body.admin-bar #gas-news {
  scroll-margin-top: 158px;
}

.site-header__inner,
.main-navigation .menu,
.main-navigation > ul {
  flex-wrap: nowrap !important;
}

.main-navigation .menu > li,
.main-navigation > ul > li {
  flex: 0 0 auto;
}

.gas-menu-news > a {
  color: #8f6a32 !important;
}

/* --------------------------------------------------------------------------
   FLUID DESKTOP / SMALL MONITOR
   Keep a true desktop header, but compress it progressively before the drawer.
   -------------------------------------------------------------------------- */
@media (min-width: 1241px) and (max-width: 1500px) {
  .site-header__topbar-inner {
    min-height: 24px !important;
    font-size: 8px !important;
    letter-spacing: .17em !important;
  }

  .site-header__inner {
    min-height: 74px !important;
    gap: 12px !important;
  }

  .site-brand {
    gap: 10px !important;
  }

  .site-brand.has-custom-logo .site-brand__mark {
    width: 150px !important;
    height: 48px !important;
    flex: 0 0 150px !important;
  }

  .site-brand__title {
    font-size: .84rem !important;
    line-height: 1.05 !important;
    letter-spacing: .11em !important;
    white-space: nowrap !important;
  }

  .site-brand__tagline {
    max-width: 220px !important;
    margin-top: 3px !important;
    font-size: .68rem !important;
    white-space: nowrap !important;
  }

  .main-navigation {
    min-width: 0 !important;
    gap: 4px !important;
  }

  .main-navigation .menu,
  .main-navigation > ul {
    gap: 0 !important;
  }

  .main-navigation .menu > li > a,
  .main-navigation > ul > li > a,
  .main-navigation .menu-item-row > a {
    min-height: 38px !important;
    padding-inline: 6px !important;
    font-size: .72rem !important;
    white-space: nowrap !important;
  }

  .main-navigation .menu > li > a::after,
  .main-navigation > ul > li > a::after,
  .main-navigation .menu-item-row > a::after {
    left: 6px !important;
    right: 6px !important;
  }

  .header-social {
    gap: 5px !important;
    margin-left: 2px !important;
  }

  .header-social__link {
    width: 30px !important;
    height: 30px !important;
  }

  .header-social__icon {
    width: 18px !important;
    height: 18px !important;
  }
}

/* Very shallow laptop screens: save vertical space without changing identity. */
@media (min-width: 1241px) and (max-height: 820px) {
  .site-header__topbar-inner {
    min-height: 22px !important;
  }

  .site-header__inner {
    min-height: 68px !important;
  }

  .site-brand.has-custom-logo .site-brand__mark {
    height: 44px !important;
  }

  body.home .section-blog--refined {
    padding-top: clamp(64px, 6vw, 88px) !important;
    padding-bottom: clamp(64px, 6vw, 88px) !important;
  }
}

/* --------------------------------------------------------------------------
   COMPACT NAVIGATION
   At 1240px and below, a deliberate drawer is safer than a two-line menu.
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  #gas-news {
    scroll-margin-top: 92px;
  }

  body.admin-bar #gas-news {
    scroll-margin-top: 126px;
  }

  .site-header__inner {
    justify-content: space-between !important;
  }

  .site-branding {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .menu-toggle {
    margin-left: auto !important;
  }
}

/* Keep compact layouts proportionate rather than oversized on 1024-class screens. */
@media (min-width: 769px) and (max-width: 1100px) {
  .section-heading h2 {
    font-size: clamp(2.65rem, 5.3vw, 4.2rem) !important;
  }

  body.home .section-blog--refined .section-heading {
    margin-bottom: 12px !important;
  }

  body.home .gas-news-fan__stage {
    padding-inline: clamp(34px, 6vw, 70px) !important;
    scroll-padding-inline: clamp(34px, 6vw, 70px) !important;
  }
}

@media (max-width: 768px) {
  #gas-news {
    scroll-margin-top: 82px;
  }

  body.admin-bar #gas-news {
    scroll-margin-top: 116px;
  }

  .gas-menu-news > a {
    color: #6f5025 !important;
  }
}

@media (max-width: 420px) {
  .site-brand.has-custom-logo .site-brand__mark {
    width: 116px !important;
    flex-basis: 116px !important;
  }

  .menu-toggle {
    width: 44px !important;
    height: 44px !important;
    flex-basis: 44px !important;
  }
}
