/* group-site overrides — loaded after all theme CSS.
   1) Announcement bar follows the day/night theme (Omer, 2026-10-06):
      light = white background, dark = site dark background. Ghost paints
      the bar with a fixed dark color; we override per data-theme.
   2) Desktop main nav: keep native horizontal scrolling visible. */

/* --- announcement bar ------------------------------------------------- */

[data-theme="light"] div.gh-announcement-bar,
html:not([data-theme="dark"]) div.gh-announcement-bar {
  background: #ffffff !important;
  color: #333333 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] div.gh-announcement-bar a,
html:not([data-theme="dark"]) div.gh-announcement-bar a {
  color: #133467 !important;
}

[data-theme="dark"] div.gh-announcement-bar {
  background: #111111 !important;
  color: #cccccc !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] div.gh-announcement-bar a {
  color: #b6b7f6 !important;
}

/* --- main nav horizontal scroll (native, with affordance) ------------- */

@media only screen and (min-width: 48rem) {
  .m-nav__left {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;                       /* Firefox */
    -webkit-overflow-scrolling: touch;
  }

  .m-nav__left::-webkit-scrollbar {
    height: 4px;
  }

  .m-nav__left::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.55);
    border-radius: 2px;
  }

  .m-nav__left::-webkit-scrollbar-track {
    background: transparent;
  }

  /* subtle right-edge fade hinting there is more to scroll */
  .m-nav__left {
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
  }
}

/* ============ Back to top (theme-native) ============ */
.gs-back-to-top{
  position:fixed;
  right:24px;
  bottom:24px;
  height:46px;
  width:46px;
  font-size:1.05rem;
  color:var(--titles-color);
  background-color:var(--background-color);
  border:1px solid var(--primary-border-color);
  box-shadow:0 4px 14px var(--button-shadow-color-normal);
  opacity:0;
  visibility:hidden;
  transform:translateY(12px);
  transition:opacity .25s ease, transform .25s ease, visibility .25s;
  z-index:9000;
  cursor:pointer;
}
.gs-back-to-top.visible{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}
.gs-back-to-top:hover{
  color:var(--primary-subtle-color);
  transform:translateY(-2px);
  box-shadow:0 6px 18px var(--button-shadow-color-hover);
}
.rtl .gs-back-to-top{right:auto;left:24px;}
@media (prefers-reduced-motion: reduce){
  .gs-back-to-top{transition:none;transform:none;}
}

/* ============ Home: per-category sections ============ */
.gs-home-sec{margin-top:38px;}
.gs-home-sec .l-sec{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 14px;}
.gs-home-sec .l-sec__title{font-size:1.28rem;font-weight:700;letter-spacing:.2px;margin:0;color:var(--titles-color);}
.gs-home-sec .l-sec__title a{color:inherit;}
.gs-home-sec .l-sec__title a:hover{color:var(--link-color);}
.gs-home-sec .l-sec__more{font-size:.85rem;color:var(--link-color);white-space:nowrap;}
.gs-home-sec .l-sec__more:hover{text-decoration:underline;}
.gs-home-sec .m-lead{margin-bottom:0;}

/* Homepage pagination: visible (sectioned home + archive both paginated) */

/* ============ Home: two-column sections, no stretch ============ */
/* .l-home is a 2-col grid; category sections pair up side-by-side.
   align-items:start keeps each cell at its natural height (no
   stretching to the taller neighbour = no white space).
   "Recent posts" (first section) stays full width with its lead. */
.l-home{align-items:start;}
.gs-home-sec:first-child{grid-column:1 / -1;}

/* ============ Pagination widget: « ‹ n/N › » ============ */
.gs-pagination{display:flex;align-items:center;justify-content:center;gap:8px;}
.gs-pg-btn{display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;border-radius:50%;border:1px solid var(--primary-border-color);
  color:var(--titles-color);font-size:1.05rem;line-height:1;cursor:pointer;
  background:var(--background-color);transition:all .15s ease;text-decoration:none;}
.gs-pg-btn:hover{border-color:var(--primary-subtle-color);color:var(--primary-subtle-color);}
.gs-pg-btn.is-disabled{opacity:.35;pointer-events:none;cursor:default;}
.gs-pg-info{font-size:.9rem;color:var(--titles-color);letter-spacing:.5px;
  margin:0 10px;min-width:72px;text-align:center;}
.gs-pg-info b{color:var(--primary-subtle-color);font-weight:700;}
.rtl .gs-pagination{flex-direction:row-reverse;}
.rtl .gs-pg-btn{transform:scaleX(-1);}
