/* ==========================================================================
   STYLESHEET DO LEITOR VISUAL DE E-BOOKS DIGITAIS
   ========================================================================== */

:root {
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Outfit', sans-serif;
  --font-title: 'Cinzel', serif;

  --color-green: #10b981;
  --color-green-dark: #064e3b;
  --color-green-light: #ecfdf5;

  --color-blue: #2563eb;
  --color-blue-dark: #1e3a8a;
  --color-blue-light: #eff6ff;

  --bg-shelf: #0f172a;
  --bg-paper: #ffffff;
  --text-book: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #1e293b;
  font-family: var(--font-serif);
  color: var(--text-book);
  line-height: 1.8;
  font-size: 1.125rem;
  padding-bottom: 60px;
}

/* TOPBAR */
.reader-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: white;
  font-family: var(--font-sans);
}

.reader-topbar-left, .reader-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.back-link {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.back-link:hover { color: white; }

.book-badge {
  background: #065f46;
  color: #a7f3d0;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
}
.badge-blue {
  background: #1e3a8a;
  color: #bfdbfe;
}

.book-title-nav {
  font-weight: 700;
  font-size: 1.05rem;
}

.switch-book-btn {
  background: rgba(255,255,255,0.1);
  color: white;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s ease;
}
.switch-book-btn:hover { background: rgba(255,255,255,0.2); }

.print-btn {
  background: #f59e0b;
  color: #0f172a;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}
.print-btn:hover {
  background: #d97706;
  color: white;
}

/* VIEWPORT & PAPER */
.book-viewport {
  max-width: 900px;
  margin: 30px auto 0 auto;
  padding: 0 16px;
}

.book-paper {
  background: var(--bg-paper);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  overflow: hidden;
  padding: 60px 70px;
}

@media (max-width: 768px) {
  .book-paper { padding: 30px 20px; border-radius: 0; }
}

/* CAPA */
.book-cover-page {
  background: radial-gradient(circle at 50% 30%, #064e3b, #022c22);
  color: white;
  border-radius: 12px;
  padding: 50px 30px;
  text-align: center;
  margin-bottom: 50px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.cover-blue {
  background: radial-gradient(circle at 50% 30%, #1e3a8a, #0f172a);
}

.cover-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.cover-main-title {
  font-family: var(--font-title);
  font-size: 2.8rem;
  line-height: 1.15;
  margin-bottom: 16px;
  font-weight: 900;
  letter-spacing: 1px;
}

.highlight-green { color: #34d399; }
.highlight-blue { color: #60a5fa; }

.cover-subtitle {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 30px auto;
  opacity: 0.9;
  line-height: 1.5;
}

.cover-image-box {
  margin: 20px auto 30px auto;
}

.cover-3d-img {
  max-width: 220px;
  border-radius: 12px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.cover-footer {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  opacity: 0.75;
}

/* SUMÁRIO */
.book-toc-page {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 36px 40px;
  margin-bottom: 60px;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  color: #0f172a;
}

.toc-divider {
  height: 2px;
  background: #cbd5e1;
  margin: 16px 0 24px 0;
}

.toc-list {
  list-style: none;
  display: grid;
  gap: 14px;
}

.toc-list a {
  display: flex;
  justify-content: space-between;
  color: #334155;
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px dotted #cbd5e1;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}

.toc-list a:hover {
  color: #10b981;
}

.theme-blue-reader .toc-list a:hover {
  color: #2563eb;
}

/* CAPÍTULOS */
.book-chapter {
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

.chapter-number {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #10b981;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.theme-blue-reader .chapter-number { color: #2563eb; }

.book-chapter h2 {
  font-family: var(--font-title);
  font-size: 2rem;
  color: #0f172a;
  margin-bottom: 24px;
  line-height: 1.25;
}

.book-chapter h3 {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  color: #1e293b;
  margin: 28px 0 12px 0;
}

.lead-text {
  font-size: 1.25rem;
  font-style: italic;
  color: #334155;
  margin-bottom: 20px;
}

p {
  margin-bottom: 18px;
}

/* CAIXAS DE DESTAQUE */
.callout-box {
  border-radius: 8px;
  padding: 22px 26px;
  margin: 24px 0;
  border-left: 5px solid #cbd5e1;
}

.callout-box h4 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.info-box { background: #ecfdf5; border-left-color: #10b981; color: #064e3b; }
.info-box-blue { background: #eff6ff; border-left-color: #2563eb; color: #1e3a8a; }
.success-box { background: #f0fdf4; border-left-color: #22c55e; color: #14532d; }
.warning-box { background: #fffbeb; border-left-color: #f59e0b; color: #78350f; }

/* TABELAS */
.table-container {
  overflow-x: auto;
  margin: 24px 0;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.styled-table th, .styled-table td {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.styled-table th {
  background: #0f172a;
  color: white;
  font-weight: 700;
}

.styled-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* CARDS DE FASES */
.phase-card {
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.phase-1 { background: #f0fdf4; border-color: #86efac; }
.phase-2 { background: #fefce8; border-color: #fde047; }
.phase-3 { background: #eff6ff; border-color: #93c5fd; }

.phase-tag {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.08);
  display: inline-block;
  margin-bottom: 8px;
}

.routine-timeline {
  list-style: none;
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.routine-timeline li {
  font-size: 1rem;
  color: #1e293b;
  padding-left: 8px;
  border-left: 3px solid #10b981;
}

/* CARDS DE RECEITA VISUAL */
.recipe-visual-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  margin-bottom: 24px;
  overflow: hidden;
}

.recipe-visual-header {
  background: #f8fafc;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.recipe-icon { font-size: 1.8rem; }
.recipe-visual-header h3 { margin: 0; font-size: 1.15rem; font-family: var(--font-sans); }
.recipe-visual-header small { color: var(--text-muted); font-size: 0.85rem; }

.recipe-visual-body {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .recipe-visual-body { grid-template-columns: 1fr; }
}

.recipe-col strong {
  display: block;
  font-family: var(--font-sans);
  margin-bottom: 8px;
  color: #0f172a;
}

.recipe-col ul {
  list-style: none;
  display: grid;
  gap: 4px;
  font-size: 0.95rem;
}

/* GUIA DO PRATO */
.plate-guide-box {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 14px;
  margin: 24px 0;
  font-family: var(--font-sans);
}

@media (max-width: 650px) {
  .plate-guide-box { grid-template-columns: 1fr; }
}

.plate-item {
  padding: 20px;
  border-radius: 8px;
  color: white;
}

.plate-green { background: #059669; }
.plate-orange { background: #d97706; }
.plate-blue { background: #2563eb; }

.plate-item strong { display: block; font-size: 1.1rem; margin-bottom: 6px; }
.plate-item p { font-size: 0.85rem; margin: 0; opacity: 0.95; }

/* DOCUMENTO JURÍDICO */
.legal-doc-box {
  background: #fdfdfd;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  padding: 30px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 24px 0;
  color: #0f172a;
}

.legal-header {
  text-align: center;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.4;
}

.legal-footer {
  margin-top: 30px;
  text-align: right;
}

/* SCRIPTS */
.script-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.script-header {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 800;
  color: #1e40af;
  margin-bottom: 10px;
}

/* FAQ */
.faq-accordion {
  display: grid;
  gap: 16px;
}

.faq-item {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 18px 22px;
  border-radius: 8px;
}

.faq-item h4 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: #0f172a;
  margin-bottom: 8px;
}

/* FINAL PAGE */
.book-final-page {
  text-align: center;
  padding: 40px 20px 10px 20px;
  font-family: var(--font-sans);
}

.book-final-page h3 { font-size: 1.5rem; color: #0f172a; margin-bottom: 8px; }
.book-final-page p { color: var(--text-muted); font-size: 1rem; }
.final-brand { font-size: 0.8rem; font-weight: 700; color: #94a3b8; margin-top: 24px; }

/* PRINT STYLES */
@media print {
  body { background: white; padding: 0; color: black; }
  .no-print { display: none !important; }
  .book-viewport { max-width: 100%; margin: 0; padding: 0; }
  .book-paper { box-shadow: none; padding: 0; border-radius: 0; }
  .book-chapter { page-break-after: always; }
}
