/* Homepage-only: Local Listings sidebar box and header adjustments.
   Loaded only on index.html so subpage headers and footers stay unchanged. */

/* ---------- Local Listings box (under Subscribe, above This Week's Poll) ---------- */
.side-card--listings {
  padding: 0.8rem 0.9rem 0.85rem;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
.listings-card__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--navy);
}
.listings-card__link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  background: var(--cream);
  color: var(--navy);
  text-decoration: none;
  text-align: left;
}
.listings-card__link + .listings-card__link { margin-top: 0.4rem; }
.listings-card__link:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--navy);
}
.listings-card__link:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  color: var(--navy);
}
.listings-card__name {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}
.listings-card__desc {
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--muted);
  font-weight: 500;
}

/* Desktop/tablet: Local Jobs, Real Estate, and For Sale live in the Local Listings box.
   Keep the three links in the phone menu (max-width 720px) so they're one tap away. */
@media (min-width: 721px) {
  .nav__links li:has(> a[href$="jobs/"]),
  .nav__links li:has(> a[href*="/jobs/"]),
  .nav__links li:has(> a[href$="real-estate/"]),
  .nav__links li:has(> a[href*="/real-estate/"]),
  .nav__links li:has(> a[href$="for-sale/"]),
  .nav__links li:has(> a[href*="/for-sale/"]) {
    display: none;
  }
}

/* Undo the shared subpage mid-width hides so Games, Photos, Comments,
   Let's Connect and Building Map can stay visible longer on the homepage
   (Jobs, Real Estate and For Sale stay in the phone menu only). */
@media (min-width: 721px) {
  .nav__links li:has(> a[href$="#comments"]),
  .nav__links li:has(> a[href$="photo/"]),
  .nav__links li:has(> a[href*="/photo/"]),
  .nav__links li:has(> a[href$="connect/"]),
  .nav__links li:has(> a[href*="/connect/"]),
  .nav__links li.nav__building,
  .nav__links li.nav__games,
  .nav__links li:has(> a[href$="games/"]),
  .nav__links li:has(> a[href*="/games/"]) {
    display: list-item;
  }
}

/* Homepage folds, measured in Chromium, Firefox and WebKit with the longer
   labels and a full-size logo: Building Map ≤996px, Comments ≤904px,
   Let's Connect ≤825px, Photos ≤729px. Games stays in the bar until the
   hamburger at 720px. */
@media (min-width: 721px) and (max-width: 996px) {
  .nav__links li.nav__building { display: none; }
}
@media (min-width: 721px) and (max-width: 904px) {
  .nav__links li:has(> a[href$="#comments"]) { display: none; }
}
@media (min-width: 721px) and (max-width: 825px) {
  .nav__links li:has(> a[href$="connect/"]),
  .nav__links li:has(> a[href*="/connect/"]) { display: none; }
}
@media (min-width: 721px) and (max-width: 729px) {
  .nav__links li:has(> a[href$="photo/"]),
  .nav__links li:has(> a[href*="/photo/"]) { display: none; }
}

/* In the tablet 2-column sidebar stack (768–1023px), span the full row like
   Search, Subscribe, This Week's Poll, and Ask the Digest. */
.sidebar-stack > .side-card--listings {
  width: 100%;
  margin: 0;
  grid-column: 1 / -1;
}
