/* ==========================
   Base Theme (LUH / original)
========================== */
:root {
  --primary: #6b8e23;
  --secondary: #c2b280;
  --accent: #ff6b35;
  --light: #fdfdf9;
  --dark: #333;
  --card-bg: #ffffff;
  --shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Faith theme overrides */
.theme-faith {
  --primary: #7a5cff;
  --secondary: #1a1027;
  --accent: #cbb6ff;
  --light: #f5f2ff;
  --dark: #0b0712;
  --card-bg: #14101d;
  --shadow: 0 4px 22px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--secondary);
  color: var(--dark);
}

/* Header / Nav */
.site-header {
  background: var(--light);
  border-bottom: 3px solid var(--primary);
}
.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}
.top-nav a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
  margin-left: 1rem;
}
.top-nav a:hover { color: var(--primary); }

/* Main wrapper */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.25rem;
}

/* Cards / Buttons (original vibe) */
.card {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.85rem 1.1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}
.cta-button:hover { filter: brightness(0.95); }

h1, h2, h3, h4 {
  color: var(--primary);
  margin-top: 0;
}

/* Home book cards */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.book-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border: 2px solid rgba(0,0,0,0.08);
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.book-card:hover { border-color: var(--primary); }

/* Book layout */
.book-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
}
@media (max-width: 900px) {
  .book-layout { grid-template-columns: 1fr; }
}

.sidebar {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1rem;
}
.sidebar img {
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

/* Review button (preserve original intent) */
.review-button {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

/* Footer */
.site-footer {
  background: var(--light);
  border-top: 3px solid var(--primary);
}
.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: grid;
  gap: 1rem;
}
.footer-links a {
  margin-right: 1rem;
  color: var(--dark);
  font-weight: 600;
  text-decoration: none;
}
.footer-links a:hover { color: var(--primary); }

.footer-newsletter, .footer-unsubscribe {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 1rem;
}

.newsletter-form input[type="email"],
.unsubscribe-form input[type="email"],
.unsubscribe-form select {
  width: 100%;
  padding: 12px;
  border: 2px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.unsubscribe-message {
  margin-top: 0.75rem;
  font-weight: 700;
}
.unsubscribe-message.success { color: #1f7a1f; }
.unsubscribe-message.error { color: #b00020; }

.fineprint { margin: 0.5rem 0 0; opacity: 0.8; }

/* Modal (Kindle) */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.55);
}
.modal-content {
  background: var(--light);
  max-width: 520px;
  margin: 10vh auto;
  padding: 1.25rem;
  border-radius: 12px;
  position: relative;
}
.close-modal {
  position: absolute;
  top: 10px; right: 14px;
  font-size: 28px;
  cursor: pointer;
}
.qr-code {
  width: 240px;
  max-width: 100%;
  display: block;
  margin: 0.75rem auto;
}
.favicon-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  color: #fff;
}

.luh-header {
  background: #6b8e23; /* original green */
}

.faith-header {
  background: #3b1366; /* deep purple */
}

.favicon-icon {
  margin-right: 8px;
  font-size: 1.2em;
}
.book-thumb {
  width: 220px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
