@charset "UTF-8";
/* Page-specific styles for the blog index (loaded only on /blog/) */
.blog-list {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.blog-item .blog-thumb {
  height: 180px;
}

/* Card styling: soft white outline and rounded edges */
.blog-item {
  background-color: rgba(41, 41, 41, 0.95);
  border-radius: 12px;
  padding: 0; /* internal padding handled by components inside */
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset; /* very soft white outline */
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.blog-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.blog-thumb {
  width: 100%;
  height: 220px;
  overflow: hidden;
  display: block;
  background: #111; /* fallback while image loads */
}

.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Title, date, excerpt are no longer links themselves; the .blog-card-link covers the whole card */
.blog-card-link {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: block;
  text-decoration: none;
  color: inherit;
}

.blog-title {
  padding: 12px 16px 0 16px;
}

.blog-date {
  display: block;
  padding: 6px 16px 0 16px;
  color: var(--muted-text, #9b9b9b);
}

.blog-excerpt {
  padding: 8px 16px 16px 16px;
  margin: 0;
  color: var(--main-text-color);
}

/* Slightly larger title on index */
.blog-title {
  font-size: 1rem;
  line-height: 1;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

/* Tighten hero / page heading spacing when present on the blog index */
.c-hero--simple__heading .c-heading__primary_heading,
.component__heading > h1,
.component__heading h1 {
  font-size: 1.5rem; /* reduced from larger default */
  line-height: 1.1;
  margin: 0.25rem 0 0.5rem 0;
}

/* Stronger, blog-prefixed overrides to ensure we affect only the blog index heading */
body.page--blog .c-hero--simple__heading .c-heading__primary_heading,
body.page--blog .component__heading > h1,
body.page--blog .component__heading h1 {
  font-size: 1.25rem !important;
  line-height: 1.05 !important;
  margin: 0.15rem 0 0.35rem 0 !important;
}

/* Reduce hero padding on the blog index so the heading doesn't take so much vertical space */
body.page--blog .c-hero--simple,
body.page--blog .component.component--primary {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

/* Responsive auto-fit grid so cards fill available space (3-4 per row when wide) */
.blog-list .c-grid.c-grid--cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

/* Strong, page-agnostic rule to significantly reduce the blog index title height */
/* Targets common hero and page heading patterns used on the blog index */
.c-hero--simple.component, .c-hero--simple, .c-hero--simple--content-align-center {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.c-hero--simple .c-heading__primary_heading,
.c-hero--simple__heading .c-heading__primary_heading,
.component__heading > h1,
.component__heading h1,
.c-hero--simple--content-align-center .c-heading__primary_heading {
  font-size: 0.95rem !important; /* significantly smaller */
  line-height: 1.02 !important;
  margin: 0.08rem 0 0.18rem 0 !important;
  padding: 0 !important;
}

/* Ensure any bookshop/heading variants are also reduced */
.c-heading__primary_heading.c-heading__primary_heading {
  font-size: 0.95rem !important;
}

/* Fixed full-viewport background for the blog index using the hero image */
/* This uses a fixed pseudo-element so the image stays static while content scrolls. */
html.page--blog::before {
  content: "";
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  background-image: url("/assets/uploads/hero-background-feature.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
  /* Slight darkening so text over the image remains readable */
  filter: brightness(0.65) saturate(0.95);
}

/* Make sure the main content and header stack above the fixed background */
.c-header {
  position: relative;
  z-index: 30;
}

#main {
  position: relative;
  z-index: 20;
}

.component, .blog-list, .component.component--secondary0 {
  position: relative;
  z-index: 20;
}

/* Mobile performance fallback: avoid fixed background on older mobile by using background-attachment */
@supports (-webkit-overflow-scrolling: touch) {
  body.page--blog::before {
    position: absolute;
    background-attachment: scroll;
  }
}
/* Ensure page background is transparent on the blog index so the fixed image shows through */
html.page--blog, body.page--blog {
  background: transparent !important;
}

/* Make hero and component backgrounds transparent so the fixed background is visible */
body.page--blog .c-hero--simple,
body.page--blog .component,
body.page--blog .component.component--primary,
body.page--blog .component.component--secondary0 {
  background: transparent !important;
}

/* Background DIV used when page has page--blog; more reliable across browsers */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page-bg--blog {
  background-image: url("/assets/uploads/hero-background-feature.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: brightness(0.65) saturate(0.95);
}

/* DEBUG: temporary overlay to verify background element visibility - remove after testing */
/* debug rules removed — background will rely on .page-bg--blog styles above */
