/*
Theme Name: Nurturing Narratives
Theme URI: https://NurturingNarratives.org
Author: Nurturing Narratives
Description: A warm, faith-centered theme for a children's book brand. Fully editable via the WordPress Customizer (logo, hero content, hero image, navigation menu, and the four feature blocks) and the block editor for all pages.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: nurturing-narratives
*/

/*
 * NURTURING NARRATIVES â€” STYLESHEET MAP
 *
 * 01. Design tokens and base defaults
 * 02. Announcement bar and site header
 * 03. Homepage hero and feature strip
 * 04. General page / archive content and footer
 * 05. Sitewide responsive layout
 * 06. Books landing page
 * 07. Individual book page components (shared .nn-meg-* classes)
 * 08. Homepage: author, featured book, parents, newsletter
 * 09. Blog archive
 * 10. Gutenberg/responsive compatibility corrections
 * 11. Duplicate-title visibility and shared book typography
 * 12. Tablet-only book-page and Books catalog corrections
 *
 * Keep the responsive correction rules near the end of this file. Their later
 * position in the cascade is intentional; moving them may change layouts.
 *
 * REFERENCE: Reorganized from the user's previously supplied stylesheet.
 * Always compare with the current server copy before replacing production CSS.
 */

/* ==========================================================================
   01. Design tokens
   ========================================================================== */
:root{
  --nn-navy: #1c2c4f;
  --nn-navy-deep: #16223d;
  --nn-gold: #c19a49;
  --nn-gold-soft: #d8b876;
  --nn-cream: #faf5ea;
  --nn-cream-deep: #f5ecdb;
  --nn-white: #ffffff;
  --nn-ink: #263252;
  --nn-ink-soft: #4a5573;

  --nn-font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --nn-font-body: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --nn-radius: 10px;
  --nn-container: 1200px;
}

/* ==========================================================================
   01. Reset & base
   ========================================================================== */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--nn-font-body);
  color: var(--nn-ink);
  background: var(--nn-white);
  line-height:1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; height:auto; }
a{ color: inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3,h4{
  font-family: var(--nn-font-display);
  color: var(--nn-navy);
  margin: 0 0 .5em;
  line-height:1.15;
}
.nn-container{
  max-width: var(--nn-container);
  margin: 0 auto;
  padding: 0 24px;
}
:focus-visible{
  outline: 3px solid var(--nn-gold);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ==========================================================================
   02. Top announcement bar
   ========================================================================== */
.nn-topbar{
  background: var(--nn-navy);
  color: var(--nn-white);
  text-align:center;
  font-size: .85rem;
  letter-spacing: .02em;
  padding: 10px 20px;
}
.nn-topbar .dashicons,
.nn-topbar-heart{ color: var(--nn-gold); margin-right:6px; }

/* ==========================================================================
   02. Header
   ========================================================================== */
.nn-header{
  background: var(--nn-white);
  border-bottom: 1px solid #eee6d6;
  position: relative;
  z-index: 50;
}
.nn-header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 24px;
  padding: 4px 24px;
}
.nn-brand{
  display:flex;
  align-items:center;
  gap:14px;
}
.nn-brand img.custom-logo{
  max-height: 128px;
  width:auto;
}
.nn-brand-text .nn-site-title{
  font-family: var(--nn-font-display);
  font-size: 1.7rem;
  font-weight:700;
  color: var(--nn-navy);
  line-height:1.1;
  margin:0;
}
.nn-brand-text .nn-site-title a{ color: var(--nn-navy); }
.nn-brand-text .nn-site-tagline{
  font-size: .8rem;
  color: var(--nn-ink-soft);
  margin-top: 2px;
}

.nn-primary-nav{ display:flex; align-items:center; gap: 32px; }
.nn-primary-nav ul{ display:flex; gap: 28px; align-items:center; }
.nn-primary-nav a{
  font-weight:700;
  font-size: .95rem;
  color: var(--nn-navy);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.nn-primary-nav li:hover > a,
.nn-primary-nav .current-menu-item > a{
  border-bottom-color: var(--nn-gold);
}
.nn-primary-nav li.menu-item-has-children{ position:relative; }
.nn-primary-nav .sub-menu{
  display:none;
  position:absolute;
  top: 100%;
  left:0;
  background: var(--nn-white);
  box-shadow: 0 12px 24px rgba(28,44,79,.12);
  border-radius: 8px;
  padding: 8px;
  min-width: 200px;
}
.nn-primary-nav li.menu-item-has-children:hover .sub-menu{ display:block; }
.nn-primary-nav .sub-menu a{ display:block; padding: 8px 12px; border:0; }
.nn-primary-nav .sub-menu a:hover{ background: var(--nn-cream); border-radius:6px; }

.nn-header-cta{
  background: var(--nn-navy);
  color: var(--nn-white) !important;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight:700;
  font-size: .9rem;
  white-space: nowrap;
  transition: background .15s ease;
}
.nn-header-cta:hover{ background: var(--nn-navy-deep); color: var(--nn-white); }
.nn-header-cta .heart{ color: var(--nn-gold-soft); margin-left:4px; }

.nn-menu-toggle{
  display:none;
  background:none;
  border: 1px solid var(--nn-navy);
  border-radius: 8px;
  padding: 8px 10px;
  cursor:pointer;
}
.nn-menu-toggle span,
.nn-menu-toggle span::before,
.nn-menu-toggle span::after{
  display:block;
  width: 20px;
  height: 2px;
  background: var(--nn-navy);
  position:relative;
}
.nn-menu-toggle span::before{ content:""; position:absolute; top:-6px; }
.nn-menu-toggle span::after{ content:""; position:absolute; top:6px; }

/* ==========================================================================
   03. Homepage hero
   ========================================================================== */
.nn-hero{
  background: var(--nn-cream);
  overflow:hidden;
}
.nn-hero-inner{
  display:grid;
  grid-template-columns: 1fr 1.8fr;
  align-items:center;
  gap: 24px;
  max-width: var(--nn-container);
  margin: 0 auto;
  padding: 36px 12px;
}
.nn-hero-eyebrow{
  color: var(--nn-gold);
  font-weight:800;
  letter-spacing: .12em;
  font-size: .8rem;
  text-transform:uppercase;
  margin-bottom: 14px;
}
.nn-hero-heading{
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin-bottom: 18px;
}
.nn-hero-heading em{
  color: var(--nn-gold);
  font-style: italic;
}
.nn-hero-divider{
  display:flex;
  align-items:center;
  gap: 12px;
  margin: 20px 0 24px;
  color: var(--nn-gold);
}
.nn-hero-divider::before,
.nn-hero-divider::after{
  content:"";
  height:1px;
  width: 64px;
  background: var(--nn-gold-soft);
}
.nn-hero-text{
  color: var(--nn-ink-soft);
  font-size: 1.1rem;
  max-width: 46ch;
  margin-bottom: 32px;
}
.nn-hero-buttons{ display:flex; gap:16px; flex-wrap:wrap; }
.nn-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight:800;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform:uppercase;
  transition: transform .15s ease, box-shadow .15s ease;
}
.nn-btn:hover{ transform: translateY(-2px); }
.nn-btn-primary{ background: var(--nn-navy); color: var(--nn-white); }
.nn-btn-primary:hover{ color: var(--nn-white); box-shadow: 0 10px 20px rgba(28,44,79,.25); }
.nn-btn-outline{
  background: transparent;
  color: var(--nn-navy);
  border: 2px solid var(--nn-navy);
}
.nn-btn-outline:hover{ color: var(--nn-navy); box-shadow: 0 10px 20px rgba(28,44,79,.12); }

.nn-hero-media{
  position:relative;
  border-radius: 18px;
  overflow:hidden;
  min-height: 300px;
  background: linear-gradient(160deg, var(--nn-cream-deep), #efe3c7 60%, var(--nn-gold-soft));
  display:flex;
  align-items:flex-end;
  justify-content:center;
}
.nn-hero-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.nn-hero-media .nn-hero-placeholder{
  padding: 32px;
  text-align:center;
  color: var(--nn-navy);
  font-family: var(--nn-font-display);
  font-size: 1.1rem;
}

/* ==========================================================================
   03. Feature bar
   ========================================================================== */
.nn-features{
  background: var(--nn-navy);
  color: var(--nn-white);
}
.nn-features-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: var(--nn-container);
  margin:0 auto;
  padding: 48px 24px;
}
.nn-feature{ display:flex; gap:14px; align-items:flex-start; }
.nn-feature-icon{
  flex: 0 0 auto;
  width: 36px;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--nn-gold);
}
.nn-feature-icon svg{ width:28px; height:28px; }
.nn-feature h3{
  color: var(--nn-gold);
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform:uppercase;
  font-family: var(--nn-font-body);
  font-weight:800;
  margin:0 0 6px;
}
.nn-feature p{
  margin:0;
  font-size: .92rem;
  color: #dfe4f0;
}

/* ==========================================================================
   04. Generic content areas (pages, posts, archives)
   ========================================================================== */
.nn-page-content{
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 24px;
}
.nn-page-content h1{ font-size: 2.4rem; }
.nn-page-content .nn-page-title{ margin-bottom: 24px; }
.nn-archive-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
  max-width: var(--nn-container);
  margin: 0 auto;
  padding: 64px 24px;
}
.nn-card{
  background: var(--nn-cream);
  border-radius: var(--nn-radius);
  padding: 24px;
}
.nn-card h2{ font-size: 1.3rem; }
.nn-card a{ color: var(--nn-navy); }
.nn-card .nn-excerpt{ color: var(--nn-ink-soft); font-size:.95rem; }

/* ==========================================================================
   04. Footer
   ========================================================================== */

.nn-footer{
  background: var(--nn-navy-deep);
  color: #dfe4f0;
  padding: 52px 24px 26px;
}

.nn-footer-grid{
  max-width: var(--nn-container);
  margin: 0 auto 34px;
  display:grid;
  grid-template-columns: 1.5fr 1fr 1.35fr;
  gap: 56px;
  align-items:start;
}

/* Footer headings */
.nn-footer h4,
.nn-footer .wp-block-heading{
  color: var(--nn-white);
  font-family: var(--nn-font-display);
  font-size: 1.05rem;
  font-weight:700;
  line-height:1.25;
  margin:0 0 14px;
}

/* Footer text */
.nn-footer p{
  color:#dfe4f0;
  font-size:.92rem;
  line-height:1.65;
  margin:0 0 16px;
}

/* Footer links */
.nn-footer a{
  color:#dfe4f0;
  text-decoration:none;
  transition:color .15s ease;
}

.nn-footer a:hover{
  color:var(--nn-gold-soft);
}

/* Explore menu */
.nn-footer-menu{
  margin:0;
  padding:0;
  list-style:none;
}

.nn-footer-menu li{
  margin:0 0 7px;
}

.nn-footer-menu a{
  font-size:.92rem;
  line-height:1.45;
}

/* Stay in Touch */
.nn-footer-widgets{
  color:#dfe4f0;
}

.nn-footer-widgets > *:last-child{
  margin-bottom:0;
}

.nn-footer-widgets .wp-block-social-links{
  margin-top:18px;
}

/* Bottom copyright row */
.nn-footer-bottom{
  max-width: var(--nn-container);
  margin:0 auto;
  border-top:1px solid rgba(255,255,255,.14);
  padding-top:20px;
  font-size:.8rem;
  color:#cfd6e6;
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:12px 30px;
}

/* ==========================================================================
   05. Sitewide responsive rules
   ========================================================================== */
@media (max-width: 960px){
  .nn-hero-inner{ grid-template-columns: 1fr; padding: 48px 24px; }
  .nn-features-grid{ grid-template-columns: repeat(2, 1fr); }
  .nn-footer-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 780px){
  .nn-primary-nav{
    display:none;
    position:absolute;
    top: 100%;
    left:0; right:0;
    background: var(--nn-white);
    box-shadow: 0 12px 24px rgba(28,44,79,.12);
    flex-direction:column;
    align-items:stretch;
    padding: 16px 24px;
  }
  .nn-primary-nav.is-open{ display:flex; }
  .nn-primary-nav ul{ flex-direction:column; gap: 4px; align-items:stretch; }
  .nn-primary-nav .sub-menu{ position:static; box-shadow:none; padding-left: 12px; }
  .nn-menu-toggle{ display:inline-block; }
  .nn-header-inner{ flex-wrap:wrap; }
  .nn-header-cta{ order:3; }
}
@media (max-width: 600px){
  .nn-features-grid{ grid-template-columns: 1fr; }

  .nn-footer{
    padding:40px 24px 24px;
  }

  .nn-footer-grid{
    gap:32px;
  }

  .nn-footer-bottom{
    flex-direction:column;
    align-items:flex-start;
  }
}
/* ==========================================================================
   06. Books landing page
   ========================================================================== */

/* Main Books introduction */
body.page .nn-page-content{
  max-width: 1100px;
}

.nn-books-intro{
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}

/* Individual book sections */
.nn-book-section{
  max-width: 1000px;
  margin: 0 auto;
  padding: 58px 42px;
  border-bottom: 1px solid rgba(193,154,73,.35);
}

.nn-book-section:last-of-type{
  border-bottom: 0;
}

/* Two-column book layout */
.nn-book-row{
  align-items: center !important;
  gap: 60px;
}

/* Book cover */
.nn-book-row figure{
  margin: 0;
}

.nn-book-row figure img{
  display: block;
  width: 100%;
  max-width: 390px;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(28,44,79,.12);
}

/* Small series / category heading */
.nn-book-row h3,
.nn-book-row h4{
  color: var(--nn-gold);
  font-family: var(--nn-font-body);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Book title */
.nn-book-row h2{
  color: var(--nn-navy);
  font-family: var(--nn-font-display);
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.15;
  margin: 0 0 18px;
}

/* Description and supporting copy */
.nn-book-row p{
  color: var(--nn-ink-soft);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 18px;
}

/* Book feature lists */
.nn-book-row ul{
  margin: 18px 0 26px;
  padding-left: 0;
  list-style: none;
}

.nn-book-row li{
  position: relative;
  color: var(--nn-ink);
  font-size: .95rem;
  line-height: 1.55;
  margin: 7px 0;
  padding-left: 22px;
}

.nn-book-row li::before{
  content: "\2661";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--nn-gold);
  font-weight: 700;
}

/* Book buttons */
.nn-book-row .wp-block-button__link{
  background: var(--nn-navy);
  color: var(--nn-white);
  border-radius: 999px;
  padding: 12px 24px;
  font-family: var(--nn-font-body);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: transform .15s ease, background .15s ease;
}

.nn-book-row .wp-block-button__link:hover{
  background: var(--nn-gold);
  color: var(--nn-white);
  transform: translateY(-1px);
}

/* Coming Soon feature */
.nn-book-section.nn-book-coming-soon{
  background-color: var(--nn-cream) !important;
  border: 1px solid rgba(193,154,73,.35) !important;
  border-radius: 18px;
  padding: 58px 42px;
  margin-top: 24px;
  margin-bottom: 24px;
}

/* Tablet */
@media (max-width: 960px){

  .nn-book-section{
    padding: 46px 28px;
  }

  .nn-book-row{
    gap: 36px;
  }

  .nn-book-row figure img{
    max-width: 340px;
  }
}

/* Mobile */
@media (max-width: 700px){

  .nn-book-section{
    padding: 42px 20px;
  }

  .nn-book-row{
    gap: 28px;
  }

  .nn-book-row.wp-block-columns{
    flex-direction: column !important;
  }

  .nn-book-row .wp-block-column{
    flex-basis: 100% !important;
    width: 100%;
  }

  .nn-book-row figure img{
    max-width: 320px;
  }

  .nn-book-row h2{
    font-size: 1.75rem;
  }
}
/* ==========================================================================
   07. Shared individual-book layout and content styles
   ========================================================================== */

/* Give the page a little more room */
.page-id-207 .nn-page-content{
  max-width: 1120px;
  padding-top: 48px;
}


/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */

.nn-meg-hero{
  max-width: 1040px;
  margin: 0 auto 64px;
  padding: 52px;
  background: var(--nn-cream);
  border: 1px solid rgba(193,154,73,.30);
  border-radius: 20px;
}

.nn-meg-hero .wp-block-columns{
  align-items:center !important;
  gap:64px;
  margin-bottom:0;
}

.nn-meg-hero figure{
  margin:0;
}

.nn-meg-hero figure img{
  display:block;
  width:100%;
  max-width:430px;
  height:auto;
  margin:0 auto;
  border-radius:8px;
  box-shadow:0 14px 34px rgba(28,44,79,.14);
}

/* Coming Soon eyebrow */
.nn-meg-hero h3,
.nn-meg-hero h4{
  color:var(--nn-gold);
  font-family:var(--nn-font-body);
  font-size:.82rem;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  margin-bottom:14px;
}

/* Book title */
.nn-meg-hero h2{
  color:var(--nn-navy);
  font-family:var(--nn-font-display);
  font-size:clamp(2rem,4vw,3rem);
  line-height:1.08;
  margin-bottom:22px;
}

.nn-meg-hero p{
  color:var(--nn-ink-soft);
  font-size:1.02rem;
  line-height:1.75;
}

/* Hero bullet list */
.nn-meg-hero ul{
  list-style:none;
  padding:0;
  margin:24px 0 0;
}

.nn-meg-hero li{
  position:relative;
  padding-left:24px;
  margin:8px 0;
  color:var(--nn-ink);
  line-height:1.55;
}

.nn-meg-hero li::before{
  content:"\2661";
  position:absolute;
  left:0;
  color:var(--nn-gold);
  font-weight:700;
}


/* --------------------------------------------------------------------------
   SHARED SECTION TYPOGRAPHY
   -------------------------------------------------------------------------- */

.nn-meg-story,
.nn-meg-parents,
.nn-meg-peek,
.nn-meg-heart{
  max-width:960px;
  margin:0 auto;
}

.nn-meg-story h3,
.nn-meg-story h4,
.nn-meg-parents h3,
.nn-meg-parents h4,
.nn-meg-peek h3,
.nn-meg-peek h4,
.nn-meg-heart h3,
.nn-meg-heart h4{
  color:var(--nn-gold);
  font-family:var(--nn-font-body);
  font-size:.8rem;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  text-align:center;
  margin-bottom:12px;
}

.nn-meg-story h2,
.nn-meg-parents h2,
.nn-meg-peek h2,
.nn-meg-heart h2{
  color:var(--nn-navy);
  font-family:var(--nn-font-display);
  font-size:clamp(1.8rem,3vw,2.35rem);
  line-height:1.18;
  text-align:center;
  margin-bottom:22px;
}


/* --------------------------------------------------------------------------
   THE STORY
   -------------------------------------------------------------------------- */

.nn-meg-story{
  padding:20px 48px 64px;
  text-align:center;
}

.nn-meg-story p{
  max-width:800px;
  margin:0 auto 18px;
  color:var(--nn-ink-soft);
  font-size:1rem;
  line-height:1.8;
}


/* --------------------------------------------------------------------------
   FOR LITTLE HEARTS / PARENTS
   -------------------------------------------------------------------------- */

.nn-meg-parents{
  background:var(--nn-cream);
  border-radius:18px;
  padding:54px 58px;
  margin-bottom:68px;
  text-align:center;
}

.nn-meg-parents > p{
  max-width:820px;
  margin:0 auto 20px;
  color:var(--nn-ink-soft);
  line-height:1.75;
}

.nn-meg-parents strong{
  color:var(--nn-navy);
}

/* Conversation topics */
.nn-meg-parents ul{
  max-width:760px;
  margin:28px auto 0;
  padding:0;
  list-style:none;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px 36px;
  text-align:left;
}

.nn-meg-parents li{
  position:relative;
  padding-left:25px;
  color:var(--nn-ink);
  line-height:1.55;
}

.nn-meg-parents li::before{
  content:"\2661";
  position:absolute;
  left:0;
  color:var(--nn-gold);
  font-weight:700;
}


/* --------------------------------------------------------------------------
   A PEEK INSIDE
   -------------------------------------------------------------------------- */

.nn-meg-peek{
  padding:10px 20px 70px;
  text-align:center;
}

.nn-meg-peek > p{
  max-width:780px;
  margin:0 auto 32px;
  color:var(--nn-ink-soft);
  line-height:1.7;
}

.nn-meg-gallery{
  gap:28px !important;
  align-items:stretch !important;
}

.nn-meg-gallery figure{
  margin:0;
  height:100%;
}

.nn-meg-gallery img{
  display:block;
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
  border-radius:14px;
  box-shadow:0 12px 28px rgba(28,44,79,.13);
  transition:transform .2s ease, box-shadow .2s ease;
}

.nn-meg-gallery img:hover{
  transform:translateY(-3px);
  box-shadow:0 16px 34px rgba(28,44,79,.17);
}


/* --------------------------------------------------------------------------
   THE HEART BEHIND THE STORY
   -------------------------------------------------------------------------- */

.nn-meg-heart{
  background:var(--nn-cream);
  border:1px solid rgba(193,154,73,.30);
  border-radius:20px;
  padding:56px 64px;
  margin-bottom:72px;
  text-align:center;
}

.nn-meg-heart p{
  max-width:820px;
  margin:0 auto 18px;
  color:var(--nn-ink-soft);
  font-size:1rem;
  line-height:1.75;
}

.nn-meg-heart strong{
  color:var(--nn-navy);
}


/* Join the Journey button */
.nn-meg-cta{
  margin-top:30px;
}

.nn-meg-cta .wp-block-button__link{
  background:var(--nn-navy);
  color:var(--nn-white);
  border-radius:999px;
  padding:13px 27px;
  font-family:var(--nn-font-body);
  font-size:.8rem;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
  transition:background .15s ease, transform .15s ease;
}

.nn-meg-cta .wp-block-button__link:hover{
  background:var(--nn-gold);
  color:var(--nn-white);
  transform:translateY(-2px);
}


/* --------------------------------------------------------------------------
   TABLET
   -------------------------------------------------------------------------- */

@media (max-width:960px){

  .nn-meg-hero{
    padding:42px 34px;
  }

  .nn-meg-hero .wp-block-columns{
    gap:38px;
  }

  .nn-meg-parents,
  .nn-meg-heart{
    padding:46px 38px;
  }
}


/* --------------------------------------------------------------------------
   MOBILE
   -------------------------------------------------------------------------- */

@media (max-width:700px){

  .page-id-207 .nn-page-content{
    padding:32px 18px;
  }

  .nn-meg-hero{
    padding:30px 22px;
    margin-bottom:48px;
  }

  .nn-meg-hero .wp-block-columns{
    flex-direction:column !important;
    gap:30px;
  }

  .nn-meg-hero .wp-block-column{
    flex-basis:100% !important;
    width:100%;
  }

  .nn-meg-hero figure img{
    max-width:340px;
  }

  .nn-meg-story{
    padding:10px 10px 48px;
  }

  .nn-meg-parents{
    padding:38px 24px;
    margin-bottom:52px;
  }

  .nn-meg-parents ul{
    grid-template-columns:1fr;
    gap:10px;
  }

  .nn-meg-peek{
    padding:0 6px 52px;
  }

  .nn-meg-gallery.wp-block-columns{
    flex-direction:column !important;
    gap:22px !important;
  }

  .nn-meg-gallery .wp-block-column{
    flex-basis:100% !important;
    width:100%;
  }

  .nn-meg-gallery img{
    max-width:380px;
    margin:0 auto;
  }

  .nn-meg-heart{
    padding:40px 24px;
    margin-bottom:52px;
  }
}
/* Shared book hero â€” reliable desktop column widths.
   This deliberately overrides Gutenberg's default column sizing. */
@media (min-width: 701px){

  .nn-meg-hero .wp-block-columns{
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    gap:48px !important;
  }

  .nn-meg-hero-cover{
    flex:0 0 47% !important;
    width:47% !important;
    max-width:47% !important;
    min-width:0 !important;
  }

  .nn-meg-hero-copy{
    flex:0 0 calc(53% - 48px) !important;
    width:calc(53% - 48px) !important;
    max-width:none !important;
    min-width:0 !important;
  }

  .nn-meg-hero-copy p,
  .nn-meg-hero-copy ul,
  .nn-meg-hero-copy h2,
  .nn-meg-hero-copy h3,
  .nn-meg-hero-copy h4{
    width:100% !important;
    max-width:none !important;
  }
}
/* Hide text branding when the custom logo is displayed */
.nn-header .nn-brand-text{
  display:none;
}
/* =========================================================
   08. HOMEPAGE CONTENT SECTIONS
   Meet the Author + Newest Book
   ========================================================= */

/* Give Gutenberg homepage sections room to breathe */
body.home .nn-page-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 30px 80px;
}


/* =========================================================
   MEET THE AUTHOR
   ========================================================= */

.nn-home-author {
  padding: 72px 0 68px;
}

.nn-home-author-grid {
  align-items: center !important;
  gap: 48px;
}

.nn-home-author-grid > .wp-block-column:nth-child(1) {
  flex-basis: 28% !important;
}

.nn-home-author-grid > .wp-block-column:nth-child(2) {
  flex-basis: 44% !important;
}

.nn-home-author-grid > .wp-block-column:nth-child(3) {
  flex-basis: 28% !important;
}


/* Author portrait */

.nn-home-author-photo {
  margin: 0 auto;
  text-align: center;
}

.nn-home-author-photo img {
  display: block;
	width: 286px;
	height: 286px;
  max-width: 140%;
  margin: 0 auto;
  object-fit: contain;
object-position: center;
border-radius: 0;
border: none;
padding: 0;
background: transparent;
box-shadow: none;
}


/* Author eyebrow */

.nn-home-author-grid > .wp-block-column:nth-child(2) > p:first-child {
  margin: 0 0 12px;
  color: var(--nn-gold);
  font-family: var(--nn-font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}


/* Author title */

.nn-home-author h2 {
  margin: 0 0 22px;
  color: var(--nn-navy);
  font-family: var(--nn-font-display);
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.12;
}


/* Author paragraphs */

.nn-home-author-grid > .wp-block-column:nth-child(2) > p:not(:first-child) {
  margin: 0 0 18px;
  color: var(--nn-ink-soft);
  font-family: var(--nn-font-body);
  font-size: 17px;
  line-height: 1.7;
}


/* Author button */

.nn-home-author-button {
  margin-top: 28px;
  justify-content: center;
}

.nn-home-author-button .wp-block-button__link {
  background: var(--nn-navy);
  color: var(--nn-white);
  border: 2px solid var(--nn-navy);
  border-radius: 999px;
  padding: 13px 24px;
  font-family: var(--nn-font-body);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.nn-home-author-button .wp-block-button__link:hover {
  background: var(--nn-gold);
  border-color: var(--nn-gold);
  color: var(--nn-navy-deep);
  transform: translateY(-1px);
}


/* Author quote card */

.nn-home-author-quote {
  position: relative;
  padding: 34px 30px;
  background: var(--nn-cream);
  border: 1px solid rgba(193, 154, 73, 0.45);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(28, 44, 79, 0.06);
}

.nn-home-author-quote::before {
  content: "\2665";
  display: block;
  margin-bottom: 14px;
  color: var(--nn-gold);
  font-size: 16px;
  text-align: center;
}

.nn-home-author-quote p {
  margin: 0;
  color: var(--nn-navy);
  font-family: var(--nn-font-display);
  font-size: 22px;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}


/* =========================================================
   MY NEWEST BOOK
   ========================================================= */

.nn-home-book {
  margin: 0 0 76px;
  padding: 64px 52px;
  background: linear-gradient(
    180deg,
    var(--nn-cream) 0%,
    #f7f8fa 100%
  );
  border: 1px solid rgba(193, 154, 73, 0.22);
  border-radius: 22px;
}


/* Section eyebrow */

.nn-home-book > p:first-child {
  margin: 0 0 10px;
  color: var(--nn-gold);
  font-family: var(--nn-font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}


/* Section heading */

.nn-home-book h2.wp-block-heading {
  margin: 0 0 44px;
  color: var(--nn-navy);
  font-family: var(--nn-font-display);
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.15;
  text-align: center;
}


/* Three-column layout */

.nn-home-book-grid {
  align-items: center !important;
  gap: 46px;
}

.nn-home-book-grid > .wp-block-column:nth-child(1) {
  flex-basis: 27% !important;
}

.nn-home-book-grid > .wp-block-column:nth-child(2) {
  flex-basis: 41% !important;
}

.nn-home-book-grid > .wp-block-column:nth-child(3) {
  flex-basis: 32% !important;
}


/* Book cover */

.nn-home-book-cover {
  margin: 0;
  text-align: center;
}

.nn-home-book-cover img {
  display: block;
  width: 100%;
  max-width: 265px;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 16px 34px rgba(28, 44, 79, 0.18);
}


/* Book description */

.nn-home-book-grid > .wp-block-column:nth-child(2) > p {
  margin: 0 0 22px;
  color: var(--nn-ink);
  font-family: var(--nn-font-body);
  font-size: 17px;
  line-height: 1.7;
}


/* Remove WordPress bullets because hearts are already in the text */

.nn-home-book-grid ul {
  margin: 0 0 28px;
  padding-left: 0;
  list-style: none;
}

.nn-home-book-grid li {
  margin: 0 0 10px;
  color: var(--nn-ink);
  font-family: var(--nn-font-body);
  font-size: 16px;
  line-height: 1.5;
}

.nn-home-book-grid li::marker {
  content: "";
}


/* Book button */

.nn-home-book-button {
  margin-top: 28px;
}

.nn-home-book-button .wp-block-button__link {
  background: var(--nn-navy);
  color: var(--nn-white);
  border: 2px solid var(--nn-navy);
  border-radius: 999px;
  padding: 13px 24px;
  font-family: var(--nn-font-body);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.nn-home-book-button .wp-block-button__link:hover {
  background: var(--nn-gold);
  border-color: var(--nn-gold);
  color: var(--nn-navy-deep);
  transform: translateY(-1px);
}


/* Why Nurturing Narratives card */

.nn-home-book-why {
  padding: 30px 28px;
  background: var(--nn-white);
  border: 1px solid rgba(28, 44, 79, 0.30);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(28, 44, 79, 0.07);
}

.nn-home-book-why h3 {
  margin: 0 0 22px;
  color: var(--nn-navy);
  font-family: var(--nn-font-display);
  font-size: 27px;
  line-height: 1.2;
}

.nn-home-book-why ul {
  margin: 0;
}

.nn-home-book-why li {
  margin: 0;
  padding: 12px 0 12px 1.35em;
  text-indent: -1.35em;
  border-top: 1px solid rgba(28, 44, 79, 0.10);
  font-size: 15px;
  line-height: 1.45;
}

.nn-home-book-why li:first-child {
  border-top: 0;
  padding-top: 0;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

  body.home .nn-page-content {
    padding-left: 22px;
    padding-right: 22px;
  }

  .nn-home-author-grid,
  .nn-home-book-grid {
    gap: 34px;
  }

  .nn-home-author-grid > .wp-block-column,
  .nn-home-book-grid > .wp-block-column {
    flex-basis: 100% !important;
  }

  .nn-home-author-grid {
    flex-wrap: wrap !important;
  }

  .nn-home-book-grid {
    flex-wrap: wrap !important;
  }

  .nn-home-author-grid > .wp-block-column:nth-child(2) {
    text-align: center;
  }

  .nn-home-author-button {
    justify-content: center;
  }

  .nn-home-author-quote {
    max-width: 540px;
    margin: 0 auto;
  }

  .nn-home-book {
    padding: 50px 32px;
  }

  .nn-home-book-grid > .wp-block-column:nth-child(2) {
    max-width: 600px;
    margin: 0 auto;
  }

  .nn-home-book-button {
    justify-content: center;
  }

  .nn-home-book-why {
    max-width: 600px;
    margin: 0 auto;
  }
}


@media (max-width: 600px) {

  .nn-home-author {
    padding: 52px 0;
  }

  .nn-home-author-photo img {
    width: 220px;
    height: 220px;
  }

  .nn-home-author-quote p {
    font-size: 20px;
  }

  .nn-home-book {
    padding: 42px 22px;
    border-radius: 16px;
  }

  .nn-home-book > h2 {
    margin-bottom: 34px;
  }
}
/* =========================================================
   A NOTE FOR PARENTS
   ========================================================= */

.nn-home-parents {
  margin: 0 0 76px;
  padding: 40px 40px;
  background: var(--nn-navy);
  border-radius: 22px;
  overflow: hidden;
}

.nn-home-parents-grid {
  align-items: center !important;
  gap: 58px;
}

.nn-home-parents-grid > .wp-block-column:first-child {
  flex-basis: 42% !important;
}

.nn-home-parents-grid > .wp-block-column:last-child {
  flex-basis: 58% !important;
}


/* Illustration */

.nn-home-parents img {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 auto;
}


/* Eyebrow */

.nn-home-parents-grid > .wp-block-column:last-child > p:first-child {
  margin: 0 0 14px;
  color: var(--nn-gold-soft);
  font-family: var(--nn-font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}


/* Heading */

.nn-home-parents h2 {
  margin: 0 0 24px;
  color: var(--nn-white);
  font-family: var(--nn-font-display);
  font-size: clamp(32px, 3.5vw, 46px);
  line-height: 1.15;
}


/* Body copy */

.nn-home-parents-grid > .wp-block-column:last-child > p:not(:first-child) {
  margin: 0 0 20px;
  color: rgba(255,255,255,0.88);
  font-family: var(--nn-font-body);
  font-size: 17px;
  line-height: 1.75;
}


/* Closing prayer */

.nn-home-parents-grid > .wp-block-column:last-child > p:last-child {
  margin-top: 28px;
  color: var(--nn-gold-soft);
  font-family: var(--nn-font-display);
  font-size: 20px;
  font-style: italic;
  line-height: 1.6;
}


/* Responsive */

@media (max-width: 900px) {

  .nn-home-parents {
    padding: 50px 34px;
  }

  .nn-home-parents-grid {
    flex-wrap: wrap !important;
    gap: 36px;
  }

  .nn-home-parents-grid > .wp-block-column {
    flex-basis: 100% !important;
  }

  .nn-home-parents-grid > .wp-block-column:last-child {
    text-align: center;
  }
}

@media (max-width: 600px) {

  .nn-home-parents {
    padding: 42px 24px;
    border-radius: 16px;
  }

  .nn-home-parents img {
    max-width: 290px;
  }

  .nn-home-parents h2 {
    font-size: 32px;
  }
}
/* =========================================================
   JOIN THE JOURNEY / NEWSLETTER
   ========================================================= */

.nn-home-newsletter {
  margin: 0 0 76px;
  padding: 40px 40px;
  background: var(--nn-cream);
  border: 1px solid rgba(193,154,73,.30);
  border-radius: 22px;
}

.nn-home-newsletter-grid {
  align-items: center !important;
  gap: 64px;
}

.nn-home-newsletter-grid > .wp-block-column:first-child {
  flex-basis: 42% !important;
}

.nn-home-newsletter-grid > .wp-block-column:last-child {
  flex-basis: 58% !important;
}


/* Eyebrow */

.nn-home-newsletter-grid > .wp-block-column:first-child > p:first-child {
  margin: 0 0 12px;
  color: var(--nn-gold);
  font-family: var(--nn-font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}


/* Heading */

.nn-home-newsletter h2 {
  margin: 0 0 18px;
  color: var(--nn-navy);
  font-family: var(--nn-font-display);
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.1;
}


/* Supporting copy */

.nn-home-newsletter-grid > .wp-block-column:first-child > p:last-child {
  margin: 0;
  color: var(--nn-ink-soft);
  font-family: var(--nn-font-body);
  font-size: 17px;
  line-height: 1.7;
}


/* Kit form container */

.nn-home-newsletter-form {
  padding: 18px;
  background: var(--nn-white);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(28,44,79,.08);
}


/* Responsive */

@media (max-width: 900px) {

  .nn-home-newsletter {
    padding: 50px 34px;
  }

  .nn-home-newsletter-grid {
    flex-wrap: wrap !important;
    gap: 36px;
  }

  .nn-home-newsletter-grid > .wp-block-column {
    flex-basis: 100% !important;
  }

  .nn-home-newsletter-grid > .wp-block-column:first-child {
    text-align: center;
  }

  .nn-home-newsletter-form {
    max-width: 650px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {

  .nn-home-newsletter {
    padding: 42px 22px;
    border-radius: 16px;
  }
}
/* ==========================================================
   09. Blog Archive
   ========================================================== */

.nn-blog-page{
  background:var(--nn-white);
}

.nn-blog-hero{
  max-width:780px;
  margin:0 auto;
  padding:72px 24px 52px;
  text-align:center;
}

.nn-blog-eyebrow{
  margin:0 0 12px;
  color:var(--nn-gold);
  font-family:var(--nn-font-body);
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.nn-blog-hero h1{
  margin:0 0 18px;
  color:var(--nn-navy);
  font-family:var(--nn-font-display);
  font-size:clamp(2.2rem,5vw,3.6rem);
  line-height:1.08;
}

.nn-blog-hero > p:last-child{
  max-width:650px;
  margin:0 auto;
  color:var(--nn-ink-soft);
  font-size:1.05rem;
  line-height:1.7;
}

.nn-blog-listing{
  max-width:1200px;
  margin:0 auto;
  padding:0 24px 88px;
}

.nn-blog-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,360px));
  justify-content:center;
  gap:34px;
}

.nn-blog-card{
  overflow:hidden;
  background:var(--nn-cream);
  border:1px solid rgba(193,154,73,.32);
  border-radius:18px;
  box-shadow:0 10px 28px rgba(28,44,79,.07);
}

.nn-blog-card-image-link{
  display:block;
}

.nn-blog-card-image{
  display:block;
  width:100%;
  aspect-ratio:16 / 9;
  object-fit:cover;
}

.nn-blog-card-content{
  padding:28px;
}

.nn-blog-date{
  margin:0 0 10px;
  color:var(--nn-gold);
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.nn-blog-card h2{
  margin:0 0 14px;
  font-family:var(--nn-font-display);
  font-size:1.55rem;
  line-height:1.2;
}

.nn-blog-card h2 a{
  color:var(--nn-navy);
  text-decoration:none;
}

.nn-blog-card h2 a:hover{
  color:var(--nn-gold);
}

.nn-blog-excerpt{
  margin:0 0 22px;
  color:var(--nn-ink-soft);
  line-height:1.65;
}

.nn-blog-read-more{
  display:inline-block;
  color:var(--nn-navy);
  font-weight:700;
  text-decoration:none;
}

.nn-blog-read-more:hover{
  color:var(--nn-gold);
}

.nn-blog-pagination{
  margin-top:44px;
  text-align:center;
}

.nn-blog-empty{
  text-align:center;
  color:var(--nn-ink-soft);
}

@media (max-width:600px){
  .nn-blog-hero{
    padding:52px 20px 38px;
  }

  .nn-blog-listing{
    padding-left:20px;
    padding-right:20px;
    padding-bottom:64px;
  }

  .nn-blog-grid{
    grid-template-columns:1fr;
  }
}
/* ==========================================================================
   10. Gutenberg / responsive compatibility corrections
   These late overrides preserve tested mobile and tablet behavior.
   ========================================================================== */
/* Homepage: correct Author and Newest Book mobile columns */
@media (max-width: 900px) {
  .nn-home-author-grid.wp-block-columns,
  .nn-home-book-grid.wp-block-columns {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .nn-home-author-grid > .wp-block-column:nth-child(1),
  .nn-home-author-grid > .wp-block-column:nth-child(2),
  .nn-home-author-grid > .wp-block-column:nth-child(3),
  .nn-home-book-grid > .wp-block-column:nth-child(1),
  .nn-home-book-grid > .wp-block-column:nth-child(2),
  .nn-home-book-grid > .wp-block-column:nth-child(3) {
    flex-basis: auto !important;
    width: 100% !important;
    min-width: 0;
  }
}

/* Books page: show book covers first on mobile */
@media (max-width: 700px) {
  .nn-book-row.wp-block-columns
  > .wp-block-column:has(figure img) {
    order: -1 !important;
  }
}

/* Individual book covers â€” mobile only */
@media (max-width: 767px) {
  .nn-mobile-book-cover {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .nn-mobile-book-cover img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
  }
}

/* ==========================================================================
   11. Page title visibility and consistent book-heading hierarchy
   ========================================================================== */

/* Only hide theme-generated duplicate titles on pages with a separate,
   designed, visible H1 in the page content. */
.page-id-58 .nn-page-title,  /* Books */
.page-id-60 .nn-page-title,  /* For Parents */
.page-id-62 .nn-page-title,  /* Contact */
.page-id-207 .nn-page-title, /* Meg's Gift for Jesus */
.page-id-312 .nn-page-title, /* The Lord is My Shepherd */
.page-id-334 .nn-page-title, /* God Will Always Always Love You */
.page-id-350 .nn-page-title  /* Who Made My World */
{
  display: none;
}

/* Retain the more-specific original safeguard used on page 334. */
.page-id-334 .nn-page-content > h1.nn-page-title {
  display: none !important;
}

/* Series/eyebrow heading: intentionally smaller than the book title. */
:is(.page-id-207, .page-id-312, .page-id-334, .page-id-350)
.nn-meg-hero h2 {
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  line-height: 1.3;
  margin-bottom: 14px;
}

/* Book title: prominent and consistent on all four pages. */
:is(.page-id-207, .page-id-312, .page-id-334, .page-id-350)
.nn-meg-hero h1 {
  font-size: clamp(2rem, 3.5vw, 2.7rem);
  line-height: 1.12;
}

/* ==========================================================================
   12. Tablet-only book-page and Books catalog corrections (701pxâ€“900px)

   Book heroes stack cover above text. The Books landing page displays the
   cover first for the two rows that reverse columns on desktop.
   These overrides preserve the previously verified 768px iPad layout.
   ========================================================================== */

@media (min-width: 701px) and (max-width: 900px) {

  /* Tablet layout â€” God Will Always Always Love You */
  .page-id-334 .nn-meg-hero .wp-block-columns {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 28px !important;
  }

  .page-id-334 .nn-meg-hero .wp-block-columns > .wp-block-column {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .page-id-334 .nn-meg-hero figure img {
    max-width: 340px;
  }

  /* Tablet fix: The Lord is My Shepherd */
  body.page-id-312 .nn-page-content
  > .wp-block-group:first-of-type .wp-block-columns {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 28px !important;
  }

  body.page-id-312 .nn-page-content
  > .wp-block-group:first-of-type
  .wp-block-columns > .wp-block-column {
    flex: 0 0 auto !important;
    flex-basis: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.page-id-312 .nn-page-content
  > .wp-block-group:first-of-type
  .wp-block-column:first-child img {
    display: block;
    width: 100%;
    max-width: 340px !important;
    height: auto;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Tablet fix: Who Made My World */
  body.page-id-350 .nn-page-content
  > .wp-block-group:first-of-type .wp-block-columns {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 28px !important;
  }

  body.page-id-350 .nn-page-content
  > .wp-block-group:first-of-type
  .wp-block-columns > .wp-block-column {
    flex: 0 0 auto !important;
    flex-basis: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.page-id-350 .nn-page-content
  > .wp-block-group:first-of-type
  .wp-block-column:first-child img {
    display: block;
    width: 100%;
    max-width: 340px !important;
    height: auto;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.page-id-350 .nn-page-content
  > .wp-block-group:first-of-type .wp-block-buttons {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
  }

  /* Tablet fix: Meg's Gift for Jesus */
  body.page-id-207 .nn-page-content
  > .wp-block-group:first-of-type .wp-block-columns {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 28px !important;
  }

  body.page-id-207 .nn-page-content
  > .wp-block-group:first-of-type
  .wp-block-columns > .wp-block-column {
    flex: 0 0 auto !important;
    flex-basis: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.page-id-207 .nn-page-content
  > .wp-block-group:first-of-type
  .wp-block-column:first-child img {
    display: block;
    width: 100%;
    max-width: 340px !important;
    height: auto;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Books landing page: cover first on tablets */
  body.page-id-58 .wp-block-columns.nn-tablet-cover-first {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 28px !important;
  }

  body.page-id-58 .wp-block-columns.nn-tablet-cover-first
  > .wp-block-column {
    flex: 0 0 auto !important;
    flex-basis: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Move the image column above the text column */
  body.page-id-58 .wp-block-columns.nn-tablet-cover-first
  > .wp-block-column:first-child {
    order: 2 !important;
  }

  body.page-id-58 .wp-block-columns.nn-tablet-cover-first
  > .wp-block-column:last-child {
    order: 1 !important;
  }
}

/* =====================================================
   Book Pages — Amazon Button Spacing
   ===================================================== */

body.page-id-312 .nn-meg-hero .wp-block-buttons,
body.page-id-334 .nn-meg-hero .wp-block-buttons,
body.page-id-350 .nn-meg-hero .wp-block-buttons {
    margin-top: 18px !important;
}

/* Who Made My World — Keep series heading together on small phones */
@media (max-width: 420px) {
  body.page-id-350 .nn-meg-hero h2 {
    font-size: 0.95rem;
    letter-spacing: 0;
  }
}

/* =====================================================
   Accessibility — Improved Gold Text Contrast
   ===================================================== */

:root {
  --nn-gold-text: #856220;
  --nn-gold-display: #a47c2f;
}

/* Small gold text on light backgrounds */
.nn-hero-eyebrow,
.nn-home-author-grid > .wp-block-column:nth-child(2) > p:first-child,
.nn-home-book > p:first-child,
.nn-home-newsletter-grid > .wp-block-column:first-child > p:first-child,
.nn-book-row h3,
.nn-book-row h4,
.nn-meg-hero h3,
.nn-meg-hero h4,
.nn-meg-story h3,
.nn-meg-story h4,
.nn-meg-parents h3,
.nn-meg-parents h4,
.nn-meg-peek h3,
.nn-meg-peek h4,
.nn-meg-heart h3,
.nn-meg-heart h4,
.nn-blog-eyebrow,
.nn-blog-date,
.nn-blog-card h2 a:hover,
.nn-blog-read-more:hover {
  color: var(--nn-gold-text);
}

/* Large gold text in the homepage hero */
.nn-hero-heading em {
  color: var(--nn-gold-display);
}
/* Homepage — side-by-side Parents and Newsletter cards */
@media (min-width: 782px) {
  .nn-home-bottom-cards {
    align-items: stretch !important;
    gap: 24px !important;
  }

  .nn-home-bottom-cards > .wp-block-column {
    min-width: 0 !important;
  }
}

/* Stack each card's internal content vertically */
.nn-home-bottom-cards .nn-home-parents-grid,
.nn-home-bottom-cards .nn-home-newsletter-grid {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 20px !important;
}

.nn-home-bottom-cards .nn-home-parents-grid > .wp-block-column,
.nn-home-bottom-cards .nn-home-newsletter-grid > .wp-block-column {
  flex: 0 0 auto !important;
  flex-basis: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
/* Match the heights of the two homepage cards */
@media (min-width: 782px) {
  .nn-home-bottom-cards > .wp-block-column {
    display: flex;
    flex-direction: column;
  }

  .nn-home-bottom-cards > .wp-block-column > .wp-block-group {
    flex: 1;
    width: 100%;
  }
}
/* Meet the Author - balance left portrait and right quote image */
.nn-home-author-grid > .wp-block-column:nth-child(3) img {
  display: block;
  width: 368px;
  max-width: 175%;
  height: auto;
  margin: 0 auto;
}