/* style.css - E-book Interativo: Gestão Estratégica de Custos para Operadores Logísticos */

:root {
  --primary-color: #0b51a6;
  --primary-light: #2563eb;
  --primary-dark: #072d5e;
  --navy-deep: #0f1e2e;
  --secondary-color: #f2b705;
  --secondary-hover: #ffd033;
  --accent-orange: #f28c38;
  --bg-color: #f4f7fb;
  --surface-color: #ffffff;
  --text-main: #1e293b;
  --text-muted: #475569;
  --text-light: #64748b;
  --border-color: #dbe3ee;
  --success-color: #16a34a;
  --danger-color: #dc2626;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* TOP NAVIGATION BAR */
.top-nav {
  background: var(--navy-deep);
  color: #ffffff;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--secondary-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}

.top-nav-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
}

.brand-link img {
  height: 38px;
  width: auto;
}

.brand-badge-pill {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(242, 183, 5, 0.16);
  color: var(--secondary-color);
  border: 1px solid rgba(242, 183, 5, 0.4);
  padding: 4px 10px;
  border-radius: 20px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-link-btn {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-pdf-top {
  background: var(--secondary-color);
  color: var(--navy-deep);
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(242, 183, 5, 0.25);
}

.btn-pdf-top:hover {
  background: var(--secondary-hover);
  transform: translateY(-1px);
}

/* HERO HEADER */
.ebook-hero {
  background: linear-gradient(135deg, #0b3c7c 0%, #072348 60%, #051833 100%);
  color: #ffffff;
  padding: 56px 24px 48px;
  position: relative;
  overflow: hidden;
}

.ebook-hero::after {
  content: '';
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(242, 183, 5, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--secondary-color);
  background: rgba(242, 183, 5, 0.14);
  border: 1px solid rgba(242, 183, 5, 0.35);
  padding: 6px 14px;
  border-radius: 30px;
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.16;
  margin-bottom: 16px;
  letter-spacing: -0.6px;
}

.hero-title span {
  color: var(--secondary-color);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #dbeafe;
  max-width: 780px;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 26px;
}

/* READING CONTROLS BAR */
.controls-panel {
  background: rgba(15, 30, 46, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  backdrop-filter: blur(8px);
}

.mode-switch-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mode-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.mode-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.mode-btn:hover {
  border-color: var(--secondary-color);
  color: #ffffff;
}

.mode-btn.active {
  background: var(--secondary-color);
  color: var(--navy-deep);
  border-color: var(--secondary-color);
  box-shadow: 0 4px 14px rgba(242, 183, 5, 0.3);
}

.lotacao-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.86rem;
  color: #e2e8f0;
  user-select: none;
  transition: all 0.2s;
}

.lotacao-filter-toggle:hover {
  border-color: #60a5fa;
}

.lotacao-filter-toggle input {
  accent-color: var(--secondary-color);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.hero-book-card {
  background: linear-gradient(160deg, #1d3247 0%, #111e2b 100%);
  border: 2px solid rgba(242, 183, 5, 0.45);
  border-radius: 16px;
  padding: 26px 24px;
  width: 270px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.hero-book-card img.badge-seal {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 12px;
}

.hero-book-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: #ffffff;
  margin-bottom: 6px;
}

.hero-book-card p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 16px;
}

/* MAIN LAYOUT: SIDEBAR TOC + CONTENT */
.ebook-layout {
  max-width: 1360px;
  margin: 34px auto 70px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: start;
}

/* SIDEBAR TABLE OF CONTENTS */
.toc-sidebar {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px 16px;
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  box-shadow: 0 6px 20px rgba(15, 30, 46, 0.05);
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.toc-header h2 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--primary-dark);
}

.toc-search {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 12px;
  font-family: var(--font-main);
}

.toc-search:focus {
  outline: none;
  border-color: var(--primary-color);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  transition: all 0.18s;
}

.toc-link:hover {
  background: #eff6ff;
  color: var(--primary-color);
}

.toc-link.active {
  background: var(--primary-color);
  color: #ffffff;
}

.toc-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(11, 81, 166, 0.1);
  color: var(--primary-color);
  padding: 2px 6px;
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toc-link.active .toc-num {
  background: var(--secondary-color);
  color: var(--navy-deep);
}

.toc-tag-ltl {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 3px;
}

/* CHAPTER CONTAINERS */
.chapters-wrapper {
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.chapter-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(15, 30, 46, 0.05);
  transition: box-shadow 0.25s;
}

.chapter-card.ltl-chapter {
  border-left: 5px solid var(--accent-orange);
}

.chapter-header {
  background: linear-gradient(90deg, #f8fafc 0%, #eff6ff 100%);
  padding: 24px 30px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.chapter-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.chapter-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--primary-color);
  color: #ffffff;
  padding: 4px 11px;
  border-radius: 6px;
}

.ltl-pill-badge {
  font-size: 0.76rem;
  font-weight: 700;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
  padding: 4px 11px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.skip-ltl-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
}

.chapter-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--navy-deep);
  line-height: 1.25;
}

.chapter-essence {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 820px;
}

/* CHAPTER TOOLBAR (SWITCH + SHARE) */
.chapter-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.btn-chapter-mode {
  background: #ffffff;
  color: var(--primary-color);
  border: 1.5px solid var(--primary-color);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
}

.btn-chapter-mode:hover {
  background: var(--primary-color);
  color: #ffffff;
}

.btn-share-action {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-share-action:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.btn-share-action.ig-btn {
  background: #162636;
  color: var(--secondary-color);
  border-color: #162636;
}

.btn-share-action.ig-btn:hover {
  background: #0f1e2e;
  color: #ffffff;
}

/* CARDS VIEW MODE */
.chapter-cards-view {
  padding: 28px 30px;
}

.topic-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.topic-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 12px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(11, 81, 166, 0.08);
  background: #ffffff;
}

.topic-card.ltl-box {
  border-top-color: var(--accent-orange);
  background: #fffdf9;
}

.topic-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.topic-card-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--primary-color);
  background: #e0f2fe;
  padding: 3px 9px;
  border-radius: 6px;
}

.topic-card.ltl-box .topic-card-num {
  color: #c2410c;
  background: #ffedd5;
}

.topic-card-share {
  display: flex;
  gap: 5px;
}

.icon-share-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  transition: all 0.18s;
}

.icon-share-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.topic-card h3 {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--navy-deep);
  line-height: 1.32;
  margin-top: 4px;
}

.topic-card p {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.58;
}

.topic-card-highlight {
  background: #fef9c3;
  border-left: 3px solid var(--secondary-color);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #713f12;
}

.cards-view-footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* FULL TEXT VIEW MODE */
.chapter-full-view {
  padding: 32px 34px;
  display: none;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
}

body.mode-full .chapter-full-view {
  display: block;
}

body.mode-full .chapter-cards-view {
  display: none;
}

/* Individual override per chapter */
.chapter-card.force-full .chapter-full-view {
  display: block !important;
}

.chapter-card.force-full .chapter-cards-view {
  display: none !important;
}

.chapter-card.force-cards .chapter-cards-view {
  display: block !important;
}

.chapter-card.force-cards .chapter-full-view {
  display: none !important;
}

/* Filter: Only Lotacao (hide LTL specific blocks) */
body.only-lotacao .ltl-chapter {
  opacity: 0.55;
}

body.only-lotacao .ltl-chapter .chapter-cards-view,
body.only-lotacao .ltl-chapter .chapter-full-view {
  display: none !important;
}

body.only-lotacao .ltl-box {
  display: none !important;
}

.prose-content h3 {
  font-family: var(--font-heading);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 26px 0 12px;
}

.prose-content h3:first-child {
  margin-top: 0;
}

.prose-content p {
  font-size: 1.03rem;
  color: var(--text-main);
  margin-bottom: 16px;
  line-height: 1.74;
}

.prose-content ul,
.prose-content ol {
  margin: 0 0 18px 22px;
  color: var(--text-main);
}

.prose-content li {
  margin-bottom: 8px;
  font-size: 1rem;
}

.callout-box {
  background: #eff6ff;
  border-left: 4px solid var(--primary-color);
  padding: 18px 22px;
  border-radius: 0 10px 10px 0;
  margin: 20px 0;
}

.callout-box.warning-callout {
  background: #fefce8;
  border-left-color: var(--secondary-color);
}

.callout-box.ltl-callout {
  background: #fff7ed;
  border-left-color: var(--accent-orange);
}

.callout-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy-deep);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* DATA TABLES FOR AI & READERS */
.ebook-table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.ebook-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #ffffff;
}

.ebook-table th {
  background: var(--navy-deep);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
}

.ebook-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

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

/* LOGICO SCREENSHOT SHOWCASE */
.logico-showcase {
  background: #0f1e2e;
  color: #ffffff;
  border-radius: 12px;
  padding: 22px 24px;
  margin: 26px 0;
  border: 1px solid rgba(242, 183, 5, 0.35);
}

.logico-showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.logico-showcase-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logico-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.logico-figure {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.logico-figure img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 6px;
  cursor: zoom-in;
  background: #ffffff;
}

.logico-figure figcaption {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-top: 8px;
  line-height: 1.4;
}

/*SHARE IMAGE GENERATOR MODAL & HIDDEN 540x675 CANVAS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 17, 28, 0.82);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  padding: 26px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  max-height: 92vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-main);
}

/* Social Card Preview (540x675 scaled * 2 = 1080x1350px) */
.social-preview-viewport {
  width: 378px;
  height: 472.5px;
  margin: 14px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.ig-export-canvas {
  width: 540px;
  height: 675px;
  transform: scale(0.7);
  transform-origin: top left;
  background: linear-gradient(160deg, #1d3247 0%, #162636 55%, #111e2b 100%);
  padding: 36px 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
}

.ig-export-canvas::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 7px;
  background: linear-gradient(90deg, #facc15, #f28c38);
}

.ig-exp-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.ig-exp-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #facc15;
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.38);
  padding: 5px 12px;
  border-radius: 20px;
}

.ig-exp-book-label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-top: 8px;
}

.ig-exp-badge {
  width: 104px;
  height: 104px;
  object-fit: contain;
  flex-shrink: 0;
}

.ig-exp-body {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ig-exp-title {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.24;
  color: #ffffff;
}

.ig-exp-text {
  font-size: 16.5px;
  line-height: 1.54;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  border-left: 4px solid #facc15;
  padding: 16px 18px;
  border-radius: 0 10px 10px 0;
}

.ig-exp-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.ig-exp-url {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  color: #facc15;
  letter-spacing: 0.4px;
}

/* LEAD MAGNET FORM */
.lead-form-group {
  margin-bottom: 14px;
}

.lead-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 5px;
}

.lead-form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-main);
}

/* TOAST NOTIFICATION */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy-deep);
  color: #ffffff;
  border-left: 4px solid var(--secondary-color);
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 3000;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: all 0.25s;
}

.toast-msg.show {
  opacity: 1;
  transform: translateY(0);
}

/* AUTHOR BYLINE TOP & FOOTER */
.author-byline-top {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 7px 16px;
  border-radius: 30px;
  font-size: 0.94rem;
  color: #f8fafc;
}

.linkedin-author-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  transition: color 0.2s;
}

.linkedin-author-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.author-footer-card {
  margin: 34px auto 0;
  max-width: 720px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(242, 183, 5, 0.35);
  border-radius: 14px;
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  flex-wrap: wrap;
}

.author-footer-info {
  flex: 1;
  min-width: 240px;
}

.author-footer-label {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--secondary-color);
  margin-bottom: 4px;
}

.author-footer-info h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.author-footer-info p {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

.btn-linkedin-footer {
  background: #0a66c2;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 11px 20px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-linkedin-footer:hover {
  background: #004182;
  transform: translateY(-1px);
}

/* LIGHTBOX MODAL FOR IMAGES */
.lightbox-container {
  position: relative;
  max-width: 94vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #0f1e2e;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(242, 183, 5, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

.lightbox-container img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
}

.lightbox-caption {
  margin-top: 12px;
  font-size: 0.95rem;
  color: #f8fafc;
  text-align: center;
  max-width: 820px;
  line-height: 1.45;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  background: var(--secondary-color);
  color: var(--navy-deep);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* FOOTER CTA */
.ebook-footer-cta {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--navy-deep) 100%);
  color: #ffffff;
  padding: 60px 24px;
  text-align: center;
  border-top: 4px solid var(--secondary-color);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .ebook-layout {
    grid-template-columns: 1fr;
  }
  .toc-sidebar {
    position: static;
    max-height: none;
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-book-card {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem;
  }
  .chapter-header,
  .chapter-cards-view,
  .chapter-full-view {
    padding: 20px 18px;
  }
  .social-preview-viewport {
    width: 297px;
    height: 371px;
  }
  .ig-export-canvas {
    transform: scale(0.55);
  }
}

/* PRINT / PDF EXPORT MODE */
@media print {
  .top-nav,
  .controls-panel,
  .toc-sidebar,
  .chapter-toolbar,
  .topic-card-share,
  .cards-view-footer,
  .ebook-footer-cta,
  .modal-overlay {
    display: none !important;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
  .ebook-layout {
    display: block;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .chapter-card {
    box-shadow: none;
    border: 1px solid #cbd5e1;
    margin-bottom: 28px;
    page-break-inside: avoid;
  }
  .chapter-cards-view,
  .chapter-full-view {
    display: block !important;
  }
}
