/* ════════════════════════════════════════════
   Lezen met Goesting — global stylesheet
   ════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --navy:      #1b3a6b;
  --orange:    #e85d04;
  --green:     #1a7a4a;
  --red:       #c0392b;
  --cream:     #f5f1e8;
  --white:     #ffffff;
  --muted:     #6c7a8d;
  --border:    rgba(27,58,107,0.1);
  --font-body: 'Nunito', sans-serif;
  --font-head: 'Merriweather', Georgia, serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: var(--font-body); color: var(--navy); background: var(--cream); }


/* ════ NAVBAR ════ */
.site-nav {
  background: var(--cream); padding: 0.85rem 3rem;
  display: flex; justify-content: space-between; align-items: center; gap: 2rem;
  border-bottom: 3px solid var(--orange);
}
.site-nav-brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; flex-shrink: 0;
}
.site-nav-brand img  { height: 48px; width: auto; }
.site-nav-brand span {
  font-weight: 900; font-size: 1.05rem; color: var(--red);
  line-height: 1.1; white-space: nowrap;
}
.site-nav-links { display: flex; align-items: center; gap: 2rem; }
.site-nav-links a {
  font-weight: 800; font-size: 1rem; color: var(--navy);
  text-decoration: none; transition: color 0.15s;
}
.site-nav-links a:hover,
.site-nav-links a.active { color: var(--orange); }

.site-nav-mobile {
  display: none; padding: 0.85rem 1.5rem;
  justify-content: space-between; align-items: center;
  border-bottom: 3px solid var(--orange);
}
.nav-toggler { background: none; border: none; cursor: pointer; font-size: 1.8rem; color: var(--navy); }

.mobile-menu { background: var(--cream); display: none; flex-direction: column; border-top: 2px solid var(--border); }
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-weight: 800; font-size: 1rem; color: var(--navy);
  text-decoration: none; padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:hover { color: var(--orange); }

@media (max-width: 640px) {
  .site-nav        { display: none; }
  .site-nav-mobile { display: flex; }
}


/* ════ SHARED PAGE HEADER ════ */
.page-header { padding: 3rem 3rem 2.5rem; color: var(--white); }
.page-header-inner { max-width: 1100px; margin: 0 auto; }
.page-header h1 {
  font-family: var(--font-head);
  font-weight: 700; font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1; margin-bottom: 0.6rem; text-align: center;
}
.page-header p { font-size: 1rem; color: rgba(255,255,255,0.78); line-height: 1.75; max-width: 760px; text-align: center; margin: 0 auto; }

.page-header--green { background: var(--green); }
.page-header--navy  { background: var(--navy);  }
.page-header--red   { background: var(--red);   }


/* ════ SHARED FOOTER ════ */
footer {
  background: var(--navy); color: rgba(255,255,255,0.4);
  text-align: center; padding: 1.5rem; font-size: 0.82rem;
}
footer a { color: var(--orange); text-decoration: none; }
footer a:hover { text-decoration: underline; }


/* ════ SCROLL REVEAL ════ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }


/* ════ INDEX — HERO ════ */
#hero { background: var(--white); padding: 3rem 3rem 4rem; }

.hero-grid {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 70fr 30fr;
  gap: 3rem; align-items: center;
}
.hero-left h1 {
  font-family: var(--font-head);
  font-weight: 700; font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--red); line-height: 1.15; margin-bottom: 1.5rem; text-align: center;
}
.hero-left h2 {
  font-family: var(--font-head);
  font-weight: 700; font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: var(--navy); line-height: 1.45; margin-bottom: 1.6rem; text-align: center;
}
.hero-left p { font-size: 0.96rem; color: var(--muted); line-height: 1.82; text-align: center; }

.hero-right { display: flex; justify-content: center; align-items: center; }
.hero-right img {
  width: 100%; max-width: 370px; height: auto;
  filter: drop-shadow(0 8px 24px rgba(27,58,107,0.12));
}


/* ════ INDEX — ONTDEKKERS SECTION ════ */
#ontdekkers { background: var(--green); padding: 4.5rem 3rem; }

.ontdekkers-grid {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 35fr 65fr;
  gap: 4rem; align-items: center;
}
.ontdekkers-text h2 {
  font-family: var(--font-head);
  font-weight: 700; font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white); line-height: 1.15; margin-bottom: 1.5rem; text-align: center;
}
.ontdekkers-text p {
  font-size: 0.97rem; color: rgba(255,255,255,0.88);
  line-height: 1.84; text-align: center; margin-bottom: 1.4rem;
}
.link-italic-orange {
  display: block; text-align: center; font-weight: 700; font-style: italic;
  font-size: 1.02rem; color: var(--orange); text-decoration: none; transition: opacity 0.15s;
}
.link-italic-orange:hover { opacity: 0.72; text-decoration: underline; }


/* ════ INDEX — TOPPERS SECTION ════ */
#toppers { background: var(--white); padding: 4.5rem 3rem; }

.toppers-grid {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 65fr 35fr;
  gap: 4rem; align-items: center;
}
.toppers-text h2 {
  font-family: var(--font-head);
  font-weight: 700; font-size: clamp(2rem, 4vw, 3rem);
  color: var(--navy); line-height: 1.15; margin-bottom: 1.5rem; text-align: center;
}
.toppers-text p {
  font-weight: 700; font-size: 0.97rem; color: var(--navy);
  line-height: 1.84; text-align: center; margin-bottom: 1.5rem;
}
.link-bold-orange {
  display: block; text-align: center; font-weight: 800; font-size: 1.02rem;
  color: var(--orange); text-decoration: none; transition: opacity 0.15s;
}
.link-bold-orange:hover { opacity: 0.72; text-decoration: underline; }

@media (max-width: 768px) {
  #hero, #ontdekkers, #toppers { padding: 2.5rem 1.5rem; }
  .hero-grid, .ontdekkers-grid, .toppers-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-right img { max-width: 260px; }
  .toppers-img  { order: 2; }
  .toppers-text { order: 1; }
}


/* ════ SEARCH BAR ════ */
.search-bar {
  background: var(--white); border-bottom: 2px solid var(--border);
  padding: 0.85rem 3rem; position: sticky; top: 0; z-index: 40;
  box-shadow: 0 2px 10px rgba(27,58,107,0.06);
}
.search-bar-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; }
.search-wrap { position: relative; flex: 1; max-width: 320px; }
.search-wrap svg {
  position: absolute; left: 0.9rem; top: 50%;
  transform: translateY(-50%); pointer-events: none; color: var(--muted);
}
.search-input {
  width: 100%; border: 2px solid var(--border); border-radius: 30px;
  padding: 0.52rem 1rem 0.52rem 2.5rem;
  font-family: var(--font-body); font-size: 0.88rem; color: var(--navy);
  outline: none; background: var(--cream); transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--orange); background: var(--white); }
.result-count { font-size: 0.82rem; color: var(--muted); font-weight: 700; margin-left: auto; }
.result-count strong { color: var(--navy); }


/* ════ BOOK CARD GRID ════ */
.grid-wrap {
  max-width: 1100px; margin: 2rem auto 4rem; padding: 0 2rem;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.5rem;
}
.no-results {
  text-align: center; padding: 4rem 1rem; color: var(--muted);
  display: none; max-width: 1100px; margin: 0 auto;
}


/* ════ BOOK CARD ════ */
.book-card {
  cursor: pointer; display: flex; flex-direction: column;
  background: var(--white); border-radius: 8px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(27,58,107,0.09);
  transition: transform 0.2s, box-shadow 0.2s;
}
.book-card:hover        { transform: translateY(-5px); box-shadow: 0 10px 28px rgba(27,58,107,0.18); }
.book-card:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.cover-wrap {
  width: 100%; padding-top: 141.18%;
  position: relative; overflow: hidden; flex-shrink: 0;
}
.cover-wrap img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; transition: transform 0.3s ease;
}
.book-card:hover .cover-wrap img { transform: scale(1.04); }

.cover-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1rem 0.75rem; text-align: center;
}
.cover-fallback .fb-spine  { position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: rgba(0,0,0,0.2); }
.cover-fallback .fb-emoji  { font-size: 2.4rem; margin-bottom: 0.55rem; opacity: 0.8; }
.cover-fallback .fb-title  { font-family: var(--font-head); font-size: 0.74rem; font-weight: 700; color: rgba(255,255,255,0.95); line-height: 1.3; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.cover-fallback .fb-author { font-size: 0.62rem; color: rgba(255,255,255,0.65); margin-top: 0.3rem; }

.card-info  { padding: 0.75rem 0.85rem 1rem; flex: 1; }
.card-title { font-weight: 800; font-size: 0.82rem; color: var(--navy); line-height: 1.3; margin-bottom: 0.25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-maker { font-size: 0.73rem; color: var(--muted); font-weight: 600; margin-bottom: 0.45rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.age-badge  { display: inline-block; background: rgba(232,93,4,0.1); color: var(--orange); font-weight: 800; font-size: 0.68rem; padding: 0.18rem 0.6rem; border-radius: 20px; }

@media (max-width: 700px) {
  .search-bar, .grid-wrap { padding-left: 1rem; padding-right: 1rem; }
  .page-header             { padding: 2rem 1.5rem; }
  .grid-wrap               { gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 420px) {
  .grid-wrap { grid-template-columns: repeat(2, 1fr); }
}


/* ════ MODAL ════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,20,40,0.6); z-index: 200;
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--white); border-radius: 14px;
  width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 24px 70px rgba(10,20,40,0.28);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.modal-top { display: flex; border-radius: 14px 14px 0 0; overflow: hidden; background: var(--navy); }

.modal-cover-side {
  width: 150px; flex-shrink: 0;
  aspect-ratio: 425 / 600; position: relative; overflow: hidden;
}
.modal-cover-side img { width: 100%; height: 100%; object-fit: cover; display: block; }

.modal-cover-fallback {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1rem; text-align: center;
}
.modal-cover-fallback .fb-emoji { font-size: 2.8rem; margin-bottom: 0.5rem; opacity: 0.7; }
.modal-cover-fallback .fb-title { font-family: var(--font-head); font-size: 0.7rem; color: rgba(255,255,255,0.85); font-weight: 700; line-height: 1.3; }

.modal-meta-side {
  flex: 1; padding: 1.6rem 1.6rem 1.4rem; color: var(--white);
  display: flex; flex-direction: column; justify-content: flex-end; position: relative;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.15); border: none; border-radius: 50%;
  width: 34px; height: 34px; font-size: 1.1rem; color: var(--white);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover  { background: rgba(255,255,255,0.28); }
.modal-title-text   { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; line-height: 1.28; margin-bottom: 0.35rem; padding-right: 2.5rem; }
.modal-maker        { font-size: 0.88rem; color: rgba(255,255,255,0.7); font-weight: 700; margin-bottom: 0.75rem; }
.modal-month-tag    { font-size: 0.75rem; color: rgba(255,255,255,0.55); font-weight: 700; margin-bottom: 0.75rem; }
.modal-age-pill     { display: inline-block; background: var(--orange); color: var(--white); font-weight: 800; font-size: 0.78rem; padding: 0.25rem 0.85rem; border-radius: 20px; }

.modal-body  { padding: 1.6rem 1.75rem; }
.modal-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.modal-desc  { font-size: 0.96rem; line-height: 1.82; color: #3a3a3a; }

.modal-footer    { padding: 1rem 1.75rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.btn-close-modal {
  background: var(--navy); color: var(--white); border: none;
  border-radius: 30px; padding: 0.6rem 1.75rem;
  font-family: var(--font-body); font-weight: 800; font-size: 0.88rem;
  cursor: pointer; transition: background 0.15s;
}
.btn-close-modal:hover { background: var(--orange); }

@media (max-width: 700px) {
  .modal-cover-side { width: 120px; }
}


/* ════ NIEUWE TOPPERS — MONTHS ════ */
.months-wrap { max-width: 1100px; margin: 0 auto; padding: 2.5rem 2rem 4rem; }
.month-section { margin-bottom: 3.5rem; }

.month-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.25rem; padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--orange);
}
.month-label { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--navy); line-height: 1; }
.month-year  {
  font-weight: 700; font-size: 0.88rem; color: var(--muted);
  background: rgba(27,58,107,0.07); border-radius: 20px; padding: 0.22rem 0.85rem;
}
.month-new-badge {
  background: var(--orange); color: var(--white);
  font-weight: 800; font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; border-radius: 20px;
  padding: 0.22rem 0.75rem; margin-left: auto;
}
.month-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }

@media (max-width: 900px) { .month-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .months-wrap { padding: 1.5rem 1rem 3rem; }
  .month-grid  { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
}


/* ════ NIEUWS ════ */
.news-wrap {
  max-width: 900px; margin: 0 auto;
  padding: 3rem 2rem 5rem;
  display: flex; flex-direction: column; gap: 3rem;
}

.news-item {
  background: var(--white); border-radius: 12px; overflow: hidden;
  box-shadow: 0 3px 18px rgba(27,58,107,0.09);
  display: grid; grid-template-columns: 1fr;
  transition: box-shadow 0.2s;
}
.news-item:hover            { box-shadow: 0 8px 32px rgba(27,58,107,0.15); }
.news-item.side-by-side     { grid-template-columns: 300px 1fr; }

.news-img { position: relative; overflow: hidden; background: var(--navy); }
.news-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.news-item:hover .news-img img { transform: scale(1.04); }

.news-item.featured     .news-img { height: 380px; }
.news-item.side-by-side .news-img { min-height: 240px; }

.news-cat {
  position: absolute; top: 1rem; left: 1rem;
  background: var(--orange); color: var(--white);
  font-weight: 800; font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; border-radius: 20px; padding: 0.28rem 0.85rem;
}

.news-body { padding: 1.75rem 2rem 2rem; display: flex; flex-direction: column; }

.news-date {
  font-size: 0.78rem; font-weight: 700; color: var(--muted);
  margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.4rem;
}
.news-date::before {
  content: ""; display: inline-block;
  width: 14px; height: 2px; background: var(--orange); border-radius: 2px;
}

.news-title {
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem;
  color: var(--navy); line-height: 1.3; margin-bottom: 0.85rem;
}
.news-item.featured .news-title { font-size: 1.6rem; }

.news-text { font-size: 0.96rem; color: #3a3a3a; line-height: 1.82; flex: 1; }

.news-read-more {
  display: inline-block; margin-top: 1.25rem; font-weight: 800; font-size: 0.88rem;
  color: var(--orange); text-decoration: none; transition: opacity 0.15s;
}
.news-read-more:hover  { opacity: 0.7; text-decoration: underline; }
.news-read-more::after { content: " →"; }

.news-divider { border: none; border-top: 2px dashed var(--border); margin: 0; }

@media (max-width: 700px) {
  .news-wrap { padding: 2rem 1rem 3.5rem; gap: 2rem; }
  .news-item.side-by-side { grid-template-columns: 1fr; }
  .news-item.side-by-side .news-img,
  .news-item.featured     .news-img { height: 220px; }
  .news-body  { padding: 1.25rem 1.25rem 1.5rem; }
  .news-title { font-size: 1.1rem !important; }
}
