/* ---------- Header: menu | logo | search, sign in, dark mode ---------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "nav logo actions";
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 2rem;
  border-bottom: 1px solid var(--line);
}
.site-header__nav { grid-area: nav; justify-self: start; }
.site-header__logo { grid-area: logo; justify-self: center; text-decoration: none; color: inherit; display: block; }
.site-header__logo img { display: block; max-height: 2.75rem; width: auto; }
.site-header__title { font-weight: 800; font-size: 1.6rem; }
.site-header__actions { grid-area: actions; justify-self: end; display: flex; align-items: center; gap: 0.75rem; }

.site-header .nav, .site-footer .nav { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-header .nav a, .site-footer .nav a { color: inherit; text-decoration: none; }
.site-header .nav a:hover { text-decoration: underline; }
.site-header .nav-current a { text-decoration: underline; text-underline-offset: 0.35em; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.account-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.6rem;
  color: var(--text) !important;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}
.account-link:hover { text-decoration: underline; }
.account-link__icon { width: 0.85rem; height: 0.85rem; }


/* ---------- Front page wrapper ---------- */
.site-main--home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  display: grid;
  gap: 3.5rem;
}
.site-main--home > * { min-width: 0; } /* lets the scrolling row shrink instead of widening the page */

/* ---------- 1. Featured: 2 | 1 | 2 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
}
.hero__side { display: grid; gap: 2rem; align-content: start; }

.hero-card__media { display: block; }
.hero-card__title a { color: inherit; text-decoration: none; }
.hero-card__title a:hover { text-decoration: underline; }
.hero-card__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; margin-bottom: 0.75rem; }
.hero-card__tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.hero-card__title { margin: 0.25rem 0 0.4rem; line-height: 1.2; font-size: 1.1rem; }
.hero-card__excerpt { display: none; margin: 0 0 0.5rem; color: var(--subtle); line-height: 1.5; }
.hero-card__meta { font-size: 0.8rem; color: var(--muted); }

/* The no. 1 slot is bigger and shows an excerpt */
.hero__main .hero-card__title { font-size: 2rem; }
.hero__main .hero-card__excerpt { display: block; font-size: 1.05rem; }
.hero__main .hero-card__img { aspect-ratio: 16 / 10; }

/* Side cards: smaller images */
.hero__side .hero-card__img { aspect-ratio: 16 / 9; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero__main { grid-column: 1 / -1; order: -1; }   /* no. 1 first */
}
@media (max-width: 560px) {
  .hero { grid-template-columns: 1fr; }
}

/* ---------- 3. Latest 10: horizontal scroll row ---------- */
.recent .section-heading { border-bottom: 1px solid var(--line); padding-bottom: 0.6rem; margin-bottom: 1rem; }
.recent__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));   /* 4 across × 3 rows = 12 */
  gap: 2rem 1.5rem;
}
@media (max-width: 900px) {
  .recent__row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
}
.recent-card__link { display: block; color: inherit; text-decoration: none; }
.recent-card__link:hover .recent-card__title { text-decoration: underline; }
.recent-card__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; margin-bottom: 0.5rem; }
.recent-card__tag { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.recent-card__title { font-size: 1rem; line-height: 1.3; margin: 0.2rem 0 0.3rem; }
.recent-card__date { font-size: 0.75rem; color: var(--muted); }

/* ---------- 4. Footer: contact | subscribe + socials | about ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: auto; background: var(--surface); }  /* auto = pushed to the bottom */
.site-footer__inner {
  padding: 2.5rem 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.site-footer a { color: inherit; }
.button--wide { min-width: 16rem; text-align: center; }

/* Social icons: plain logos, no circles */
.social { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.social li { display: flex; }
.social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text) !important;
  text-decoration: none;
  line-height: 1;
  opacity: 0.85;
  transition: opacity 0.15s, color 0.15s;
}
.social__link:hover { opacity: 1; color: var(--accent) !important; }
.social__icon { display: block; width: 1.25rem; height: 1.25rem; }
.social__label { font-family: var(--gh-font-heading, system-ui, sans-serif); font-weight: 700; font-size: 0.8rem; }


@media (max-width: 700px) {
  .button--wide { min-width: 12rem; }
}

.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent) !important;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { filter: brightness(0.9); }
.button--small { font-size: 0.8rem; padding: 0.35rem 0.75rem; }
.button--ghost { background: transparent; color: var(--accent) !important; }



/* ---------- Header search button (opens Ghost's search pop-up) ---------- */
.search-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  color: var(--text);
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
}
.search-box:hover { border-color: var(--muted); background: var(--surface); }
.search-box:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-box__icon { width: 0.95rem; height: 0.95rem; }

/* Subscribe button in the header: same height as the search box and toggle */
.button--header {
  display: inline-flex;
  align-items: center;
  height: 2.25rem;
  padding: 0 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Header on tablets/phones — kept last so it overrides the desktop sizes above */
@media (max-width: 960px) {
  /* Logo + buttons on the first row, menu underneath */
  .site-header {
    grid-template-columns: auto 1fr;
    grid-template-areas: "logo actions" "nav nav";
    gap: 0.9rem 1rem;
  }
  .site-header__logo { justify-self: start; }
  .site-header { padding: 1rem; }
  .site-header__title { font-size: 1.35rem; }
  .site-header__nav { justify-self: stretch; overflow-x: auto; }
  .site-header .nav { flex-wrap: nowrap; gap: 1.1rem; white-space: nowrap; }
  .account-link { width: 2.25rem; padding: 0; justify-content: center; border: 1px solid var(--line); }
  .account-link__text { display: none; }
  .button--header { padding: 0 0.7rem; font-size: 0.85rem; }
  .site-header__actions { gap: 0.5rem; }
}
