/* css/sidebar.css
   Include this on every page: <link rel="stylesheet" href="css/sidebar.css">
   ------------------------------------------------------------------ */

/* ── Layout wrapper ────────────────────────────────────────────────── */
.site-wrap {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: auto;
  align-items: start;
  gap: 0;
  width: 100%;
}

/* Everything inside .site-wrap that isn't the sidebar goes to col 2 */
.site-wrap > *:not(.site-sidebar) {
  grid-column: 2;
}

/* The sidebar is always col 1, starts at row 1, spans all rows */
.site-sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  position: sticky;
  top: 70px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  padding: 1.2rem 0.9rem;
  border-right: none;                  /* ← remove the straight edge */
  background: #dbeeff;                 /* ← light blue */
  border-radius: 14px;                 /* ← rounded corners */
  margin: .5rem .4rem;                 /* ← small gap so corners aren't clipped */
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.site-sidebar::-webkit-scrollbar { width: 4px; }
.site-sidebar::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.sidebar-inner {
  display: flex;
  flex-column: column;
  flex-direction: column;
  gap: 1rem;
}

/* ── Individual card ───────────────────────────────────────────────── */
.sb-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.04);
  transition: box-shadow .2s;
}

.sb-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.10), 0 0 0 1px rgba(0,0,0,.06);
}

/* Optional image at top of card */
.sb-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}

.sb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.sb-card:hover .sb-img-wrap img {
  transform: scale(1.04);
}

/* Card body */
.sb-body {
  padding: .75rem .9rem .85rem;
}

.sb-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--dark, #1a1a2e);
  margin: 0 0 .35rem;
  line-height: 1.3;
}

.sb-text {
  font-size: .8rem;
  color: var(--muted, #666);
  line-height: 1.55;
  margin: 0 0 .6rem;
}

.sb-link {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--blue, #1976d2);
  text-decoration: none;
  letter-spacing: .02em;
  transition: color .18s;
}

.sb-link:hover { color: var(--dark, #1a1a2e); }

@media (max-width: 860px) {
  .site-wrap {
    grid-template-columns: 1fr;
  }

  /* ✅ ADD THIS — reset all children back to column 1 on mobile */
  .site-wrap > *:not(.site-sidebar) {
    grid-column: 1;
  }

  .site-sidebar {
    grid-column: 1;
    grid-row: auto;
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,.07);
    padding: .8rem 1rem;
    overflow: visible;
  }

  .sidebar-inner {
    flex-direction: row;
    overflow-x: auto;
    gap: .75rem;
    padding-bottom: .4rem;
    scrollbar-width: none;
  }
  .sidebar-inner::-webkit-scrollbar { display: none; }

  .sb-card {
    flex: 0 0 220px;
  }
}