/* ============================================================
   MoGhraOps — shared navigation + The Books We Carry styles
   Added July 2026 with the nav rework. Loaded after styles-v2.
   Palette: Bexar Blue #304CB2 · Emily West Gold #FFBF27 ·
            Patria Red #D5152E · Deep Navy #1F2947
   ============================================================ */

/* ---------- Grouped navigation (desktop) ---------- */
.header-inner { padding-left: 1rem; padding-right: 1rem; }
.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav > .nav-item { position: relative; }

.main-nav a,
.main-nav .nav-toggle-label {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  margin-left: 0;
  font-weight: 500;
  font-size: 0.95rem;
  color: #1F2947;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.main-nav a.nav-active { font-weight: 600; border-bottom-color: #304CB2; }

/* State language: GOLD = where you're pointing · BLUE = where you are.
   Hover gold must win even on the active rail (declared after, same target). */
.main-nav > .nav-item > a:hover,
.main-nav > .nav-item:hover > a,
.main-nav > a:hover,
.main-nav > .nav-item > a:focus-visible,
.main-nav > a:focus-visible,
.main-nav > .nav-item > a.nav-active:hover,
.main-nav > a.nav-active:hover {
  border-bottom-color: #FFBF27;
}

.nav-caret { font-size: 0.62em; opacity: 0.55; margin-left: 0.3em; }

/* Dropdown panel */
.nav-drop {
  position: absolute; top: 100%; left: 0;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-top: 3px solid #FFBF27;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 10px 28px rgba(31, 41, 71, 0.14);
  padding: 0.4rem 0;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 60;
}
.nav-item:hover > .nav-drop,
.nav-item:focus-within > .nav-drop {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-drop a {
  display: block;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  border-bottom: none;
}
.nav-drop a:hover { background: #f2f4fa; color: #304CB2; }
.nav-drop a.nav-active { color: #304CB2; font-weight: 600; }

/* ---------- Mobile: hamburger ---------- */
.nav-toggle-cb { display: none; }
.nav-hamburger { display: none; }

@media (max-width: 880px) {
  .header-inner { flex-direction: row; align-items: center; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto;
    width: min(320px, 84vw);
    flex-direction: column; align-items: stretch; gap: 0;
    background: #ffffff;
    box-shadow: -12px 0 32px rgba(31,41,71,0.18);
    padding: 4.2rem 0 2rem;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    overflow-y: auto; z-index: 90;
  }
  .nav-toggle-cb:checked ~ .main-nav { transform: translateX(0); }

  .nav-hamburger {
    display: block; position: fixed; top: 1.1rem; right: 1.1rem; z-index: 95;
    width: 42px; height: 42px; cursor: pointer;
    border: 1px solid #e0e0e0; border-radius: 6px; background: #fff;
  }
  .nav-hamburger span, .nav-hamburger span::before, .nav-hamburger span::after {
    content: ''; display: block; position: absolute; left: 10px; right: 10px;
    height: 2px; background: #1F2947; transition: transform 0.2s ease, opacity 0.2s;
  }
  .nav-hamburger span { top: 20px; }
  .nav-hamburger span::before { top: -7px; }
  .nav-hamburger span::after  { top: 7px; }
  .nav-toggle-cb:checked ~ .nav-hamburger span { background: transparent; }
  .nav-toggle-cb:checked ~ .nav-hamburger span::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-cb:checked ~ .nav-hamburger span::after  { transform: translateY(-7px) rotate(-45deg); }

  .main-nav > .nav-item > a, .main-nav > a {
    padding: 0.8rem 1.4rem; font-size: 1rem; border-bottom: 1px solid #f0f0f0;
  }
  .nav-drop {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: none; border-left: 3px solid #FFBF27; border-radius: 0;
    box-shadow: none; margin: 0 0 0 1.4rem; padding: 0;
  }
  .nav-caret { display: none; }
}

/* ---------- Footer sitemap row ----------
   The site footer is white (.site-footer, styles.css). These were authored in
   white-on-white and rendered invisible on every page; matched to .footer-meta. */
.footer-sitemap {
  margin: 0.4rem 0 0.8rem;
  font-size: 0.8rem; line-height: 2;
  color: #5a6379;                      /* 6.01:1 on white */
}
.footer-sitemap a { color: #304CB2; text-decoration: none; margin: 0 0.45rem; }  /* 7.49:1 */
.footer-sitemap a:hover { color: #1F2947; text-decoration: underline; }

/* ---------- CTA strips on Bexar Blue ----------
   .btn gets its border/radius only under .hero-actions (styles.css), so on a blue
   strip .btn.primary renders #304CB2 on #304CB2 with no border — bare text. */
.services-cta-strip .btn,
.cp-cta-strip .btn,
.ztsa-cta-strip .btn { border-radius: 999px; }

.services-cta-strip .btn.primary,
.cp-cta-strip .btn.primary,
.ztsa-cta-strip .btn.primary {
  background-color: #FFBF27;           /* navy on gold = 10.99:1 */
  color: #0A1628;
  font-weight: 700;
}
.services-cta-strip .btn.primary:hover,
.cp-cta-strip .btn.primary:hover,
.ztsa-cta-strip .btn.primary:hover { background-color: #ffd155; }

.services-cta-strip .btn.ghost,
.cp-cta-strip .btn.ghost,
.ztsa-cta-strip .btn.ghost {
  border: 1px solid rgba(255,255,255,0.65);
  background-color: transparent;
  color: #ffffff;
}
.services-cta-strip .btn.ghost:hover,
.cp-cta-strip .btn.ghost:hover,
.ztsa-cta-strip .btn.ghost:hover { background-color: rgba(255,255,255,0.12); }

/* ============================================================
   The Books We Carry
   ============================================================ */
.books-hero { position: relative; overflow: hidden; background: #0A1628; }
.books-hero img.books-hero-img {
  width: 100%; height: clamp(300px, 44vw, 520px);
  object-fit: cover; display: block; opacity: 0.92;
}
.books-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,22,40,0.10) 30%, rgba(10,22,40,0.88) 100%);
}
.books-hero-content {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 0 2.4rem; text-align: center; color: #fff;
}
.books-hero-content h1 {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem); font-weight: 800;
  letter-spacing: -0.02em; margin: 0 0 0.35rem;
  text-shadow: 0 2px 14px rgba(0,0,0,0.45);
}
.books-hero-content .books-tagline {
  color: #FFBF27; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 0.85rem;
}

.books-intro { max-width: 720px; margin: 0 auto; text-align: center; color: #444444; line-height: 1.75; }

/* Filter chips */
.love-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 1.6rem 0 0.4rem; }
.love-chip {
  border: 1.5px solid #d8dce8; background: #fff; color: #1F2947;
  font-family: inherit; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.45rem 1.05rem; border-radius: 999px; cursor: pointer;
  transition: all 0.15s ease;
}
.love-chip:hover { border-color: #304CB2; }
.love-chip.on[data-love="All"]      { background: #1F2947; border-color: #1F2947; color: #fff; }
.love-chip.on[data-love="Craft"]    { background: #304CB2; border-color: #304CB2; color: #fff; }
.love-chip.on[data-love="People"]   { background: #FFBF27; border-color: #FFBF27; color: #1F2947; }
.love-chip.on[data-love="Mission"]  { background: #D5152E; border-color: #D5152E; color: #fff; }
.love-chip.on[data-love="Progress"] { background: #1F2947; border-color: #1F2947; color: #fff; }

/* Shelf grid */
.book-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.6rem; margin-top: 2rem;
}
.book-card {
  background: #fff; border: 1px solid #e8e8ee; border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 2px 10px rgba(31,41,71,0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.book-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(31,41,71,0.12); }
.book-card[hidden] { display: none; }

.book-cover { height: 210px; background: #eef0f6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.book-cover img { height: 100%; width: 100%; object-fit: contain; padding: 14px; }
.book-cover-ph {
  width: 132px; height: 182px; border-radius: 4px;
  background: linear-gradient(160deg, #1F2947 0%, #304CB2 90%);
  color: #fff; display: flex; flex-direction: column; justify-content: center;
  padding: 14px; text-align: center;
  border-top: 4px solid #FFBF27;
  box-shadow: 0 6px 16px rgba(31,41,71,0.35);
}
.book-cover-ph .ph-title { font-size: 0.72rem; font-weight: 700; line-height: 1.3; }
.book-cover-ph .ph-author { font-size: 0.6rem; margin-top: 0.5rem; color: rgba(255,255,255,0.7); }

.book-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.book-title { font-size: 1.02rem; font-weight: 700; color: #1F2947; line-height: 1.35; margin: 0 0 0.15rem; }
.book-author { font-size: 0.82rem; color: #777; margin: 0 0 0.6rem; }
.book-loves { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.7rem; }
.book-love {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  padding: 0.18rem 0.55rem; border-radius: 999px; color: #fff;
}
.book-love.l-craft    { background: #304CB2; }
.book-love.l-people   { background: #FFBF27; color: #1F2947; }
.book-love.l-mission  { background: #D5152E; }
.book-love.l-progress { background: #1F2947; }
.book-why { font-size: 0.9rem; color: #444444; line-height: 1.7; flex: 1; }
.book-byline { font-size: 0.72rem; color: #999; margin-top: 0.85rem; }
.book-link {
  display: inline-block; margin-top: 0.7rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #304CB2; text-decoration: none;
  border-bottom: 1px solid rgba(48,76,178,0.35); padding-bottom: 2px; align-self: flex-start;
}
.book-link:hover { color: #D5152E; border-bottom-color: rgba(213,21,46,0.4); }
.book-date { font-size: 0.68rem; color: #aaa; letter-spacing: 0.05em; margin-top: 0.35rem; }

/* Hero legibility insurance — lighter overlays (July 26 ruling: more image,
   less shadow) lean on a soft text-shadow instead of heavy gradient. */
.cmmc-hero-content, .cp-hero-content {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55), 0 0 2px rgba(0, 0, 0, 0.35);
}

/* ---------- Long-form prose pages: a civilized reading measure ---------- */
/* Privacy (and any future pure-prose page) was spanning the full container —
   wall-to-wall paragraphs read like a deposition. Cap the column, center it. */
.privacy-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem 3.5rem;
}
.privacy-content h2 { margin-top: 2.2rem; }
