/* ================================
   SITE SPACING: tighter containers
   ================================ */

/* Global: tighten content container spacing */
.site-content > .ast-container {
  padding-top: 30px !important;
  padding-bottom: 30px !important;
}

/* Home + About: slightly tighter top spacing */
.home .site-content > .ast-container,
.page-id-2258 .site-content > .ast-container {
  padding-top: 20px !important;
}


/* ================================
   HOMEPAGE: hero scale + rhythm
   ================================ */

/* Reduce oversized H1 on homepage hero */
.home h1 {
  font-size: 56px !important;      /* tweak to 52px if still too big */
  line-height: 1.05 !important;
  margin-bottom: 16px !important;
}

/* Tighten spacing between hero paragraph and buttons */
.home h1 + p {
  margin-top: 0 !important;
  margin-bottom: 18px !important;  /* paragraph → buttons */
}

/* Remove extra top space above the buttons block */
.home .wp-block-buttons {
  margin-top: 0 !important;
}

/* Fix the big gap AFTER the hero:
   target the first section after the hero (usually the second top-level block) */
.home .entry-content > *:nth-child(2) {
  margin-top: 0 !important;
}

/* If that first post-hero section is a Group with padding, keep it sane */
.home .entry-content > *:nth-child(2) {
  padding-top: 20px !important;    /* adjust 20 → 10 for tighter */
}


/* ================================
   ABOUT (page ID 2258): scale
   ================================ */

.page-id-2258 h1 {
  font-size: 44px !important;
  line-height: 1.15 !important;
  margin-bottom: 12px !important;
}

.page-id-2258 h2 {
  font-size: 32px !important;
  line-height: 1.2 !important;
  margin-top: 28px !important;
  margin-bottom: 12px !important;
}
/* ================================
   ASTRA + GUTENBERG: global rhythm
   (this is usually the real problem)
   ================================ */

/* Reduce the default top margins Gutenberg adds between blocks */
.site-content .entry-content > * + * {
  margin-top: 1em !important;         /* default can feel like 2em+ */
}

/* Tighten headings so they stop creating "air gaps" */
.site-content .entry-content h1,
.site-content .entry-content h2,
.site-content .entry-content h3 {
  margin-top: 1.2em !important;
  margin-bottom: 0.5em !important;
}

/* Paragraphs: keep your 1em rhythm but stop double-stacking with theme spacing */
.site-content .entry-content p {
  margin-top: 0 !important;
  margin-bottom: 1em !important;
}

/* Buttons block spacing (Gutenberg often gives this a chunky margin) */
.site-content .entry-content .wp-block-buttons {
  margin-top: 0.75em !important;
  margin-bottom: 1.25em !important;
}

/* ================================
   HOMEPAGE: hero spacing (robust)
   ================================ */

/* H1 scale on home */
body.home .site-content .entry-content h1 {
  font-size: 56px !important;
  line-height: 1.05 !important;
  margin-bottom: 0.35em !important;
}

/* Gutenberg-safe: tighten the first paragraph after the first H1 */
body.home .site-content .entry-content h1 + .wp-block-paragraph,
body.home .site-content .entry-content .wp-block-heading + .wp-block-paragraph {
  margin-top: 0 !important;
  margin-bottom: 0.9em !important;
}

/* Remove surprise top margin above the first buttons block */
body.home .site-content .entry-content .wp-block-buttons:first-of-type {
  margin-top: 0 !important;
}

/* If your hero is a Group block, it often has padding/margins baked in */
body.home .site-content .entry-content .wp-block-group {
  margin-top: 0 !important; /* stops groups stacking extra space at the top */
}

/* ================================
   ABOUT (ID 2258): typography + rhythm
   ================================ */

body.page-id-2258 .site-content .entry-content h1 {
  font-size: 44px !important;
  line-height: 1.15 !important;
  margin-bottom: 0.4em !important;
}

body.page-id-2258 .site-content .entry-content h2 {
  font-size: 32px !important;
  line-height: 1.2 !important;
  margin-top: 1.4em !important;
  margin-bottom: 0.5em !important;
}
/* ================================
   BOOKS "SHELF" SECTION
   ================================ */

/* Make each book column behave like a neat vertical card */
body.home .books-shelf .wp-block-columns .wp-block-column {
  display: flex;
  flex-direction: column;
}

/* Make all book covers the same visual height */
body.home .books-shelf .wp-block-image img {
  width: 100%;
  height: 380px;
	object-fit: contain;
	background: #ffffff;
  display: block;
}

/* Push the button(s) to the bottom so all buttons line up */
body.home .books-shelf .wp-block-buttons {
  margin-top: auto !important;
}

/* Turn the Separator into a "shelf" */
body.home .books-shelf .wp-block-separator {
  margin-top: 18px !important;
  margin-bottom: 0 !important;
  opacity: 1;
  height: 6px;
  border: 0;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  border-radius: 6px;
}
/* Contact page: style the "Elsewhere" social line */
body.page-id-2499 .contact-elsewhere {
  margin-top: 18px !important;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* Make the social links look clean (not default blue + underline) */
body.page-id-2499 .contact-elsewhere a {
  text-decoration: none;
  font-weight: 600;
}

/* Add underline only on hover */
body.page-id-2499 .contact-elsewhere a:hover {
  text-decoration: underline;
}
/* About page (ID 2258): tighter spacing under headings */
body.page-id-2258 .entry-content h2,
body.page-id-2258 .entry-content h3 {
  margin-top: 1.3em !important;
  margin-bottom: 0.4em !important;
}

body.page-id-2258 .entry-content > * + h2,
body.page-id-2258 .entry-content > * + h3 {
  margin-top: 1.4em !important;
}
