/*
Theme Name: I Love My Bible
Theme URI: https://ilovemybible.co.za/
Author: I LOVE MY BIBLE
Description: Ligte, responsiewe tema vir I LOVE MY BIBLE — 'n inisiatief wat minder-bevoorregte mense van Bybels en Christelike leesstof voorsien. Bevat 'n Leesplanne-inhoudstipe wat na YouVersion skakel.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ilmb
Tags: one-column, custom-menu, translation-ready, accessibility-ready
*/

/* ==========================================================================
   1. Tokens
   Brand colours sampled directly from the logo artwork.
   The band blue is the logo blue (#2066A3): white text on it scores 6.02:1,
   whereas the original Canva band (#6E9AC3) scored only 2.97:1 and failed
   WCAG AA for both normal and large text.
   ========================================================================== */
:root {
  --ilmb-blue:       #2066A3;
  --ilmb-blue-dark:  #17517F;
  --ilmb-blue-soft:  #EAF1F7;
  --ilmb-red:        #D9232A;
  --ilmb-green:      #84BF43;
  --ilmb-green-dark: #5E8F2A;

  --ilmb-ink:        #1C1C1E;
  --ilmb-muted:      #55555E;
  --ilmb-line:       #E3E3E8;
  --ilmb-bg:         #FFFFFF;
  --ilmb-bg-soft:    #F6F7F9;

  --ilmb-serif: 'Roboto Slab', Georgia, 'Times New Roman', serif;
  --ilmb-sans:  'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --ilmb-wrap: 1140px;
  --ilmb-gap:  clamp(1.5rem, 4vw, 3.5rem);
  --ilmb-band: clamp(2.75rem, 7vw, 5.5rem);
  --ilmb-radius: 10px;
}

/* ==========================================================================
   2. Reset and base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ilmb-bg);
  color: var(--ilmb-ink);
  font-family: var(--ilmb-serif);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ilmb-blue); text-underline-offset: 0.18em; }
a:hover, a:focus { color: var(--ilmb-blue-dark); }

:focus-visible {
  outline: 3px solid var(--ilmb-blue);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--ilmb-sans);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.85rem, 1.4rem + 2.1vw, 2.85rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.2vw, 2rem); }
h3 { font-size: clamp(1.15rem, 1.03rem + 0.55vw, 1.4rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ilmb-blue); color: #fff;
  padding: 0.85rem 1.35rem; font-family: var(--ilmb-sans); font-weight: 700;
  border-radius: 0 0 var(--ilmb-radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ==========================================================================
   3. Layout primitives
   ========================================================================== */
.ilmb-wrap {
  width: min(100% - 2.5rem, var(--ilmb-wrap));
  margin-inline: auto;
}

.ilmb-band { padding-block: var(--ilmb-band); }

.ilmb-band--blue {
  background: var(--ilmb-blue);
  color: #fff;
  font-family: var(--ilmb-sans);
}
.ilmb-band--blue h1,
.ilmb-band--blue h2,
.ilmb-band--blue h3 { color: #fff; }
.ilmb-band--blue a { color: #fff; text-decoration-thickness: 2px; }
.ilmb-band--blue a:hover, .ilmb-band--blue a:focus { color: #fff; }
.ilmb-band--blue :focus-visible { outline-color: #fff; }

.ilmb-band--soft { background: var(--ilmb-bg-soft); }

/* Two-column split: collapses to one column below 768px. */
.ilmb-split {
  display: grid;
  gap: var(--ilmb-gap);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .ilmb-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .ilmb-split--narrow { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
}

/* ==========================================================================
   4. Header
   ========================================================================== */
.ilmb-header {
  border-bottom: 1px solid var(--ilmb-line);
  background: var(--ilmb-bg);
}
.ilmb-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.15rem;
}
.ilmb-logo { display: inline-flex; align-items: center; text-decoration: none; }
.ilmb-logo img { width: clamp(150px, 22vw, 215px); }
.ilmb-nav ul {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.6rem;
  list-style: none; margin: 0; padding: 0;
}
.ilmb-nav a {
  font-family: var(--ilmb-sans); font-weight: 600; font-size: 1rem;
  color: var(--ilmb-ink); text-decoration: none;
  padding: 0.35rem 0; display: inline-block;
  border-bottom: 2px solid transparent;
}
.ilmb-nav a:hover, .ilmb-nav a:focus { color: var(--ilmb-blue); border-bottom-color: var(--ilmb-blue); }
.ilmb-nav .current-menu-item > a,
.ilmb-nav .current_page_item > a { color: var(--ilmb-blue); border-bottom-color: var(--ilmb-blue); }

/* ==========================================================================
   5. Buttons
   ========================================================================== */
.ilmb-btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--ilmb-sans); font-weight: 700; font-size: 1rem;
  line-height: 1.2; text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: var(--ilmb-radius);
  border: 2px solid var(--ilmb-blue);
  background: var(--ilmb-blue); color: #fff;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ilmb-btn:hover, .ilmb-btn:focus {
  background: var(--ilmb-blue-dark); border-color: var(--ilmb-blue-dark); color: #fff;
}
.ilmb-btn--ghost { background: transparent; color: var(--ilmb-blue); }
.ilmb-btn--ghost:hover, .ilmb-btn--ghost:focus { background: var(--ilmb-blue); color: #fff; }

/* On the blue band the button inverts so it stays legible. */
.ilmb-band--blue .ilmb-btn {
  background: #fff; border-color: #fff; color: var(--ilmb-blue);
}
.ilmb-band--blue .ilmb-btn:hover,
.ilmb-band--blue .ilmb-btn:focus {
  background: var(--ilmb-blue-soft); border-color: var(--ilmb-blue-soft); color: var(--ilmb-blue-dark);
}

.ilmb-btn__ext { font-size: 0.85em; }

/* ==========================================================================
   6. Reading plans (Leesplanne)
   ========================================================================== */
.ilmb-plans {
  display: grid; gap: 1.6rem;
  grid-template-columns: 1fr;
  list-style: none; margin: 0; padding: 0;
}
@media (min-width: 600px) { .ilmb-plans--2, .ilmb-plans--3, .ilmb-plans--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .ilmb-plans--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .ilmb-plans--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ilmb-plan {
  display: flex; flex-direction: column;
  background: var(--ilmb-bg);
  border: 1px solid var(--ilmb-line);
  border-radius: var(--ilmb-radius);
  overflow: hidden;
  transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}
.ilmb-plan:hover, .ilmb-plan:focus-within {
  border-color: var(--ilmb-blue);
  box-shadow: 0 8px 22px rgba(32, 102, 163, 0.16);
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
  .ilmb-plan, .ilmb-btn { transition: none; }
  .ilmb-plan:hover, .ilmb-plan:focus-within { transform: none; }
}

.ilmb-plan__media { background: var(--ilmb-blue-soft); }
.ilmb-plan__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
/* Shorter than a real 3:4 cover: a plan with no artwork should not produce a
   700px-tall card. Grid rows stretch, so mixed heights still line up. */
.ilmb-plan__media--empty {
  aspect-ratio: 16 / 9;
  display: grid; place-items: center;
  font-family: var(--ilmb-sans); font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  color: var(--ilmb-blue); text-align: center; padding: 1rem;
}

.ilmb-plan__body { padding: 1.25rem 1.35rem 1.45rem; display: flex; flex-direction: column; flex: 1 1 auto; }

.ilmb-plan__part {
  font-family: var(--ilmb-sans); font-weight: 700;
  font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ilmb-green-dark); margin-bottom: 0.45rem;
}
.ilmb-plan__title { font-size: 1.2rem; margin-bottom: 0.5rem; }
.ilmb-plan__title a { color: var(--ilmb-ink); text-decoration: none; }
.ilmb-plan__title a:hover, .ilmb-plan__title a:focus { color: var(--ilmb-blue); text-decoration: underline; }
/* Plan descriptions run 400-550 characters. Clamp them on the card so the grid
   stays even; the full text is on the plan's own page. */
.ilmb-plan__excerpt {
  font-family: var(--ilmb-sans); font-size: 0.96rem; line-height: 1.5;
  color: var(--ilmb-muted); margin-bottom: 1.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ilmb-plan__actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ilmb-plan__actions .ilmb-btn { font-size: 0.92rem; padding: 0.65rem 1.15rem; }

.ilmb-plans-empty {
  font-family: var(--ilmb-sans); color: var(--ilmb-muted);
  background: var(--ilmb-bg-soft); border: 1px dashed var(--ilmb-line);
  border-radius: var(--ilmb-radius); padding: 1.5rem; text-align: center;
}

/* Series navigation between plan parts */
.ilmb-series {
  display: grid; gap: 1rem; grid-template-columns: 1fr;
  margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--ilmb-line);
}
@media (min-width: 620px) { .ilmb-series { grid-template-columns: 1fr 1fr; } }
.ilmb-series__link {
  font-family: var(--ilmb-sans); text-decoration: none;
  border: 1px solid var(--ilmb-line); border-radius: var(--ilmb-radius);
  padding: 1rem 1.25rem; display: block; color: var(--ilmb-ink);
}
.ilmb-series__link:hover, .ilmb-series__link:focus { border-color: var(--ilmb-blue); color: var(--ilmb-ink); }
.ilmb-series__link--next { text-align: right; grid-column: 2; }
@media (max-width: 619px) { .ilmb-series__link--next { text-align: left; grid-column: 1; } }
.ilmb-series__dir {
  display: block; font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ilmb-muted);
  margin-bottom: 0.3rem;
}
.ilmb-series__name { font-weight: 700; color: var(--ilmb-blue); }

/* ==========================================================================
   7. Content pages
   ========================================================================== */
.ilmb-hero__text { font-family: var(--ilmb-serif); font-size: clamp(1.05rem, 1rem + 0.32vw, 1.22rem); }
.ilmb-lede { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.3rem); color: var(--ilmb-muted); }
.ilmb-band--blue .ilmb-lede { color: #E6EFF7; }

.ilmb-entry { max-width: 68ch; }
.ilmb-entry ul, .ilmb-entry ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.ilmb-entry li { margin-bottom: 0.35em; }
.ilmb-entry blockquote {
  margin: 1.6em 0; padding: 0.4em 0 0.4em 1.3em;
  border-left: 4px solid var(--ilmb-green); color: var(--ilmb-muted); font-style: italic;
}
.ilmb-entry img { border-radius: var(--ilmb-radius); margin-block: 1.4em; }
.ilmb-page-title { margin-bottom: 1.2rem; }

.ilmb-cover { border-radius: var(--ilmb-radius); box-shadow: 0 10px 30px rgba(0,0,0,0.22); }

.ilmb-contact { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem); text-align: center; }
.ilmb-contact a { font-weight: 700; }

/* ==========================================================================
   8. Footer
   ========================================================================== */
.ilmb-footer {
  background: var(--ilmb-bg-soft);
  border-top: 1px solid var(--ilmb-line);
  font-family: var(--ilmb-sans);
  padding-block: 2.75rem;
  color: var(--ilmb-muted);
  font-size: 0.95rem;
}
.ilmb-footer__inner { display: grid; gap: 1.25rem; }
@media (min-width: 720px) {
  .ilmb-footer__inner { grid-template-columns: 1fr auto; align-items: center; }
}
.ilmb-footer a { color: var(--ilmb-blue); font-weight: 600; }
.ilmb-footer__nav ul { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.ilmb-footer__nav a { text-decoration: none; }
.ilmb-footer__nav a:hover, .ilmb-footer__nav a:focus { text-decoration: underline; }

/* ==========================================================================
   9. 404
   ========================================================================== */
.ilmb-404 { text-align: center; padding-block: clamp(3rem, 9vw, 6rem); }
.ilmb-404 .ilmb-btn { margin-top: 1.25rem; }

/* ==========================================================================
   10. Small spacing utilities
   ========================================================================== */
.ilmb-mt-md { margin-top: 1.5rem; }
.ilmb-mt-lg { margin-top: 1.75rem; }
.ilmb-mt-xl { margin-top: 2.25rem; }
.ilmb-mb-xl { margin-bottom: 3rem; }
.ilmb-measure { max-width: 62ch; }
