:root {
  --primary: #0078a7;
  --secondary: #ff6b00;
  --dark: #263238;
  --light: #f5f7fa;
  --paper: #fff;
  --sidebar-width: 30%;
  --text: #363636;
  --accent-light: #e7f5fb;
  --highlight: #ffecdd;
}

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

body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--light);
}

.document-container {
  position: relative;
  display: flex;
  flex-direction: column;
  width: calc(100% - 250px);
  margin-left: 250px;
  padding-bottom: 80px; /* Add space for fixed navigation */
  background-color: var(--paper);
  box-shadow: 0 4px 20px rgb(0, 0, 0, 0.08);
}

/* Page Styling */
.page {
  position: relative;
  display: none;
  border-bottom: 1px solid #eee;
}

.page.active {
  display: flex;
}

.cover-page {
  position: relative;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  padding: 40px;
  color: white;
  background: linear-gradient(to right, var(--primary), #00538d);
}

.cover-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 800px;
}

.logo {
  position: absolute;
  right: 40px;
  bottom: 40px;
  width: 180px;
  height: auto;
  padding: 10px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  background-color: white;
  border-radius: 4px;
}

.page-number {
  position: absolute;
  right: 20px;
  bottom: 15px;
  font-size: 10px;
  color: #999;
}

.main-content {
  display: flex;
  min-height: 600px;
}

.content {
  position: relative;
  flex: 1;
  padding: 40px;
}

.sidebar {
  width: var(--sidebar-width);
  padding: 40px 30px;
  background-color: var(--accent-light);
  border-left: 1px solid #e0e0e0;
}

h1 {
  margin-bottom: 20px;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  color: white;
}

h2 {
  margin: 0 0 30px 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
}

h3 {
  margin: 30px 0 20px 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--secondary);
}

h4 {
  margin: 25px 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
}

p {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.7;
}

.subtitle {
  max-width: 80%;
  margin-bottom: 40px;
  font-size: 20px;
  line-height: 1.5;
  color: white;
  opacity: 0.85;
}

.technique-preview {
  margin: 30px 0;
  padding: 25px;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgb(0, 0, 0, 0.05);
}

.sidebar-title {
  margin-bottom: 15px;
  padding-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 2px solid var(--secondary);
}

.best-practice {
  margin-bottom: 20px;
  padding: 15px 20px;
  background-color: var(--highlight);
  border-left: 3px solid var(--secondary);
  border-radius: 0 4px 4px 0;
}

.note-box {
  margin: 20px 0;
  padding: 20px;
  background-color: var(--accent-light);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
}

.version-info {
  position: absolute;
  bottom: 100px;
  left: 40px;
  font-size: 12px;
  color: rgb(255, 255, 255, 0.7);
}

ul,
ol {
  margin: 15px 0 20px 25px;
}

li {
  margin-bottom: 8px;
}

.toc-list {
  margin-left: 0;
  list-style-type: none;
}

.toc-list li {
  display: flex;
  margin-bottom: 12px;
}

.toc-list a {
  flex: 1;
  text-decoration: none;
  color: var(--primary);
}

.toc-list .page-ref {
  margin-left: 5px;
  color: var(--secondary);
}

.dots {
  flex: 1;
  margin: 0 5px;
  margin-bottom: 8px;
  border-bottom: 1px dotted #ccc;
}

.signature {
  margin-top: 40px;
  text-align: right;
}

.toc-section {
  margin-top: 60px;
}

.navigation {
  display: none;
}

.nav-button {
  padding: 0.5rem 1rem;
  color: white;
  background: #2c3e50;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.nav-button:hover {
  background: #34495e;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.nav-links a {
  padding: 0.25rem 0.5rem;
  text-decoration: none;
  color: #2c3e50;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: #e67e22;
  background: #f0f0f0;
}

.qualities-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin: 20px 0;
}

.quality {
  min-width: 150px;
  padding: 10px;
  text-align: center;
}

.quality-title {
  margin-bottom: 10px;
  font-weight: bold;
}

/* Responsive styles */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-top: 1px solid #e0e0e0;
    border-left: none;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 26px;
  }

  .cover-page {
    padding: 30px;
  }

  .content {
    padding: 30px;
  }
}

/* Additional styles for techniques grid */
.technique-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin: 30px 0;
}

.technique-card {
  overflow: hidden;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgb(0, 0, 0, 0.05);
}

.technique-card-img {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 160px;
  font-weight: bold;
  color: #999;
  background-color: #f5f5f5;
}

.technique-card-content {
  padding: 20px;
}

.technique-card-title {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}

/* Callout box styles */
.callout {
  position: relative;
  margin: 20px 0;
  padding: 20px;
  background-color: var(--highlight);
  border-radius: 6px;
}

.callout::before {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  font-weight: bold;
  color: white;
  background-color: var(--secondary);
  border-radius: 50%;
  content: '!';
}

.callout p {
  margin-bottom: 0;
  margin-left: 30px;
}

/* Responsive adjustments for technique grid */
@media (max-width: 768px) {
  .technique-grid {
    grid-template-columns: 1fr;
  }
}

/* Additional styles for foil examples and colors */
.foil-example {
  margin: 20px 0;
  text-align: center;
}

.foil-example-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 200px;
  margin-bottom: 10px;
  font-weight: bold;
  color: #666;
  background-color: #f0f0f0;
  border-radius: 4px;
}

.foil-example-placeholder.gold {
  color: rgb(0, 0, 0, 0.7);
  background: linear-gradient(135deg, #f6e27a, #d4af37);
}

.foil-example-placeholder.silver {
  color: rgb(0, 0, 0, 0.7);
  background: linear-gradient(135deg, #e6e6e6, #c0c0c0);
}

.foil-example-placeholder.soft-touch {
  color: rgb(255, 255, 255, 0.9);
  background-color: #303030;
}

.foil-note {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: normal;
  opacity: 0.7;
}

.technique-caption {
  font-size: 14px;
  font-style: italic;
  text-align: center;
  color: #666;
}

.foil-colors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 25px 0;
}

.foil-color {
  text-align: center;
}

.foil-swatch {
  height: 80px;
  margin-bottom: 8px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgb(0, 0, 0, 0.1);
}

.foil-name {
  font-size: 14px;
}

.foil-swatch.gold {
  background: linear-gradient(135deg, #f6e27a, #d4af37);
}

.foil-swatch.silver {
  background: linear-gradient(135deg, #e6e6e6, #c0c0c0);
}

.foil-swatch.matte-gold {
  background-color: #d4af37;
}

.foil-swatch.matte-silver {
  background-color: #c0c0c0;
}

.foil-swatch.copper {
  background: linear-gradient(135deg, #da8a67, #b87333);
}

.foil-swatch.rose-gold {
  background: linear-gradient(135deg, #f8c3b5, #e7a99a);
}

.limitations-list li {
  margin-bottom: 12px;
}

/* Responsive adjustments for foil colors */
@media (max-width: 768px) {
  .foil-colors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .foil-colors-grid {
    grid-template-columns: 1fr;
  }
}

/* Metallic ink examples */
.metallic-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: space-around;
}

.metallic-example {
  width: calc(25% - 15px);
  min-width: 100px;
  text-align: center;
}

.metallic-swatch {
  height: 100px;
  margin-bottom: 8px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgb(0, 0, 0, 0.1);
}

.metallic-label {
  font-size: 13px;
}

.metallic-swatch.silver-only {
  background: linear-gradient(135deg, #e6e6e6, #c0c0c0);
}

.metallic-swatch.silver-cmyk-light {
  background: linear-gradient(135deg, #bfd8e6, #9fbfd1);
}

.metallic-swatch.silver-cmyk-medium {
  background: linear-gradient(135deg, #7cabc6, #5c8ba6);
}

.metallic-swatch.silver-cmyk-heavy {
  background: linear-gradient(135deg, #3e6f91, #254a66);
}

/* Specialty ink examples */
.specialty-example {
  padding: 20px;
  text-align: center;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.specialty-effect {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 120px;
  margin-bottom: 10px;
}

.effect-note {
  font-size: 14px;
  font-style: italic;
  color: #666;
}

.specialty-example.transparent .specialty-effect {
  background-color: #fff;
  box-shadow: 0 0 20px rgb(0, 0, 0, 0.05) inset;
}

.specialty-example.digital-matte .specialty-effect {
  background-color: #f0f0f0;
}

.invisible-yellow-demo {
  display: flex;
  width: 100%;
  height: 120px;
}

.normal-view,
.uv-view {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  color: #666;
}

.normal-view {
  background-color: #fff;
  border-right: 1px solid #eee;
}

.uv-view {
  position: relative;
  overflow: hidden;
  color: #fff;
  background-color: #333;
}

.uv-view::after {
  position: absolute;
  top: 30px;
  left: 50%;
  width: 60%;
  height: 40px;
  background-color: #ff0;
  border-radius: 50%;
  opacity: 0.6;
  filter: blur(10px);
  transform: translateX(-50%);
  animation: glow 2s infinite alternate;
  content: '';
}

@keyframes glow {
  from {
    opacity: 0.4;
    filter: blur(8px);
  }

  to {
    opacity: 0.7;
    filter: blur(12px);
  }
}

/* Color gamut visualization */
.color-gamut-visual {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.gamut-diagram {
  position: relative;
  width: 300px;
  height: 300px;
}

.gamut-shape {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: rgb(255, 255, 255, 0.8);
  border-radius: 50%;
}

.gamut-shape.rgb {
  top: 10px;
  left: 10px;
  width: 280px;
  height: 280px;
  background-color: rgb(0, 150, 255, 0.3);
}

.gamut-shape.pantone {
  top: 40px;
  left: 40px;
  width: 220px;
  height: 220px;
  background-color: rgb(255, 90, 0, 0.3);
}

.gamut-shape.cmyk {
  top: 60px;
  left: 60px;
  width: 180px;
  height: 180px;
  background-color: rgb(0, 180, 140, 0.3);
}

/* File preparation diagrams */
.bleed-diagram {
  position: relative;
  margin: 20px 0;
  padding: 30px;
  border: 1px solid #ccc;
}

.bleed-area {
  padding: 10px;
  border: 2px dashed var(--secondary);
}

.trim-area {
  padding: 20px;
  text-align: center;
  border: 1px solid var(--primary);
}

.safe-area {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
  padding: 15px;
  border: 1px dashed #999;
}

.bleed-label,
.trim-label,
.safe-label {
  position: absolute;
  padding: 0 5px;
  font-size: 12px;
  background-color: white;
}

.bleed-label {
  top: 20px;
  left: 40px;
  color: var(--secondary);
}

.trim-label {
  top: 50px;
  left: 50px;
  color: var(--primary);
}

.safe-label {
  top: 85px;
  left: 65px;
  color: #666;
}

/* Interactive Bleed Visualizer */
.bleed-visualizer {
  position: relative;
  margin: 20px 0;
  padding: 30px;
  border: 1px solid #ccc;
}

.bleed-zone {
  padding: 10px;
  border: 2px dashed var(--secondary);
  transition: box-shadow 0.3s ease;
}

.trim-zone {
  position: relative;
  padding: 20px;
  background: white;
  border: 2px solid var(--primary);
  transition: box-shadow 0.3s ease;
}

.safe-zone {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
  padding: 15px;
  border: 1px dashed #999;
  transition: box-shadow 0.3s ease;
}

/* Labels positioned on their respective borders */
.bleed-visualizer .zone-label {
  position: absolute;
  z-index: 10;
  padding: 0 5px;
  font-size: 12px;
  background-color: white;
}

.bleed-visualizer .bleed-label {
  top: 20px;
  left: 40px;
  color: var(--secondary);
}

.bleed-visualizer .trim-label {
  top: 50px;
  left: 50px;
  color: var(--primary);
}

.bleed-visualizer .safe-label {
  top: 85px;
  left: 65px;
  color: #666;
}

/* Zone hover highlights */
.bleed-zone:hover {
  box-shadow: inset 0 0 0 4px rgb(246, 139, 31, 0.25);
}

.trim-zone:hover {
  box-shadow: inset 0 0 0 4px rgb(2, 38, 98, 0.2);
}

.safe-zone:hover {
  box-shadow: inset 0 0 0 4px rgb(153, 153, 153, 0.25);
}

/* Content placeholder */
.content-placeholder {
  font-size: 14px;
  text-align: center;
  color: #999;
}

/* Step-by-step images */
.step-image {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 250px;
  margin: 15px 0;
  font-style: italic;
  color: #666;
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.image-placeholder {
  padding: 20px;
  text-align: center;
}

/* Software tips */
.software-tips {
  margin-top: 15px;
}

.software-tip {
  margin-bottom: 10px;
  font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .metallic-examples {
    gap: 10px;
  }

  .metallic-example {
    width: calc(50% - 10px);
  }

  .bleed-diagram {
    padding: 20px;
  }

  .bleed-label,
  .trim-label,
  .safe-label {
    font-size: 10px;
  }

  .bleed-label {
    top: 10px;
    left: 25px;
  }

  .trim-label {
    top: 35px;
    left: 35px;
  }

  .safe-label {
    top: 60px;
    left: 45px;
  }
}

/* Interactive elements */
.interactive-button {
  display: inline-block;
  margin: 10px 0;
  padding: 8px 16px;
  font-size: 14px;
  text-decoration: none;
  color: white;
  background-color: var(--primary);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.interactive-button:hover {
  background-color: #006490;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background-color: rgb(0, 0, 0, 0.7);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 80dvh;
  padding: 30px;
  overflow-y: auto;
  background-color: white;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  font-size: 20px;
  background-color: #f0f0f0;
  border-radius: 50%;
  cursor: pointer;
}

.modal-close:hover {
  background-color: #e0e0e0;
}

/* Numbered steps */
.numbered-steps {
  margin-left: 0;
  padding-left: 0;
  counter-reset: step-counter;
  list-style-type: none;
}

.numbered-steps li {
  position: relative;
  margin-bottom: 30px;
  padding-left: 50px;
}

.numbered-steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  font-weight: bold;
  color: white;
  background-color: var(--primary);
  border-radius: 50%;
  content: counter(step-counter);
  counter-increment: step-counter;
}

.numbered-steps li p {
  margin-top: 0;
}

.numbered-steps .step-image {
  margin-top: 15px;
  margin-bottom: 25px;
}

/* Tabs for content sections */
.tabs-container {
  margin: 25px 0;
}

.tabs-navigation {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.tab-button {
  margin-right: 5px;
  padding: 10px 20px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.tab-button.active {
  margin-bottom: -1px;
  font-weight: 600;
  color: var(--primary);
  background-color: white;
  border-bottom: 1px solid white;
}

.tab-button:hover {
  background-color: #e8e8e8;
}

.tab-content {
  display: none;
  padding: 20px;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
}

.tab-content.active {
  display: block;
}

/* Page transitions */
.page-transition {
  opacity: 0.8;
  transition: opacity 0.3s;
}

body {
  opacity: 1;
  transition: opacity 0.3s;
}

/* Expandable sections */
.expandable-section {
  margin: 20px 0;
}

.expandable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background-color: var(--accent-light);
  border-radius: 4px;
  cursor: pointer;
}

.expandable-header::after {
  font-size: 18px;
  font-weight: bold;
  content: '+';
}

.expandable-header.open::after {
  content: '−';
}

.expandable-content {
  display: none;
  padding: 15px;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
}

.expandable-section.open .expandable-content {
  display: block;
}

/* Spot colors comparison */
.spot-process-comparison {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
}

.comparison-item {
  flex: 1;
  min-width: 250px;
}

.comparison-title {
  margin-bottom: 10px;
  font-weight: 600;
  text-align: center;
}

.comparison-image {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 15px;
}

.process-color,
.spot-color {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  font-weight: bold;
  color: white;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgb(0, 0, 0, 0.1);
}

.process-color.cyan {
  background-color: #00a0e4;
}

.process-color.magenta {
  background-color: #e4007c;
}

.process-color.yellow {
  color: #333;
  background-color: #ffed00;
}

.process-color.black {
  background-color: #000;
}

.spot-color.pantone {
  font-size: 10px;
  background-color: #ff5800;
}

.spot-color.silver {
  color: #333;
  background: linear-gradient(135deg, #e6e6e6, #c0c0c0);
}

.spot-color.white {
  color: #333;
  background-color: #fff;
  border: 1px solid #ddd;
}

.spot-color.foil {
  color: #333;
  background: linear-gradient(135deg, #f6e27a, #d4af37);
}

/* Spot colors table */
.spot-colors-table {
  margin: 25px 0;
  overflow-x: auto;
}

.spot-colors-table table {
  width: 100%;
  border-collapse: collapse;
}

.spot-colors-table th,
.spot-colors-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.spot-colors-table th {
  font-weight: 600;
  color: var(--primary);
  background-color: var(--accent-light);
}

.spot-colors-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Spot color samples in modal */
.spot-samples-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.spot-sample {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sample-image {
  width: 100%;
  height: 150px;
  margin-bottom: 10px;
  border-radius: 6px;
}

.sample-title {
  font-size: 14px;
  text-align: center;
}

.sample-image.silver-example {
  background: linear-gradient(135deg, #e6e6e6, #c0c0c0);
}

.sample-image.white-example {
  position: relative;
  background-color: #333;
}

.sample-image.white-example::after {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 24px;
  font-weight: bold;
  color: white;
  transform: translate(-50%, -50%);
  content: 'WHITE';
}

.sample-image.foil-example {
  background: linear-gradient(135deg, #f6e27a, #d4af37);
}

.sample-image.white-metallic {
  position: relative;
  overflow: hidden;
  background-color: #333;
}

.sample-image.white-metallic::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background-color: white;
  content: '';
}

.sample-image.white-metallic::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(135deg, #e6e6e6, #c0c0c0);
  content: '';
}

/* Interactive elements */
.interactive-element {
  margin: 20px 0;
}

@media (max-width: 768px) {
  .spot-process-comparison {
    flex-direction: column;
  }

  .spot-samples-grid {
    grid-template-columns: 1fr;
  }

  .comparison-image {
    justify-content: center;
  }

  .process-color,
  .spot-color {
    width: 40px;
    height: 40px;
    font-size: 12px;
  }

  .spot-color.pantone {
    font-size: 8px;
  }

  .spot-colors-table th,
  .spot-colors-table td {
    padding: 8px 10px;
    font-size: 14px;
  }
}

/* Print styles */
@media print {
  .navigation,
  .interactive-button,
  .modal-overlay {
    display: none !important;
  }

  body {
    margin: 0;
    padding: 0;
  }

  .page {
    border: none;
    break-after: page;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  .main-content {
    box-shadow: none;
  }

  .sidebar {
    color: #000 !important;
    background-color: #f9f9f9 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
} /* Page display fixes */
.page {
  position: relative;
  display: none;
  width: 100%;
}

.page.active {
  display: block;
}

.cover-page {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  padding: 40px;
  color: white;
  background: linear-gradient(to right, var(--primary), #00538d);
}

.cover-page.active {
  display: flex;
}

/* Fixed main content layout */
.main-content {
  display: flex;
  flex-direction: row;
  min-height: 600px;
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }
}

/* Table of Contents Styles */
.toc-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.toc-list {
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.toc-list li {
  margin: 0.75rem 0;
}

.toc-list a {
  display: block;
  padding: 0.5rem;
  text-decoration: none;
  color: #2c3e50;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.toc-list a:hover {
  color: #e67e22;
  background: #f0f0f0;
  transform: translateX(5px);
}

/* Side Navigation Styles */
.nav-container {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  width: 250px;
  overflow-y: auto;
  background-color: #f8f9fa;
  border-right: 1px solid #e9ecef;
}

.side-navigation {
  padding: 2rem 1rem;
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list li {
  margin-bottom: 0.5rem;
}

.nav-list a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #495057;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.nav-list a:hover {
  color: #212529;
  background-color: #e9ecef;
}

.nav-list a.active {
  color: white;
  background-color: #007bff;
}

/* New navigation category styling */
.category-header {
  margin-top: 1rem;
  padding: 1rem 1rem 0.5rem;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  border-bottom: 2px solid var(--primary);
}

.nav-list .sub-item {
  margin-left: 1.25rem;
}

.nav-list .sub-item a {
  position: relative;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
}

.nav-list .sub-item a::before {
  position: absolute;
  left: -0.25rem;
  color: var(--secondary);
  content: '›';
}

.nav-list .sub-item a.active::before {
  color: white;
} /* Cover navigation buttons */
.cover-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 50px;
}

.cover-nav-button {
  padding: 12px 25px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: white;
  background-color: rgb(255, 255, 255, 0.2);
  border: 2px solid rgb(255, 255, 255, 0.3);
  border-radius: 4px;
  transition:
    background-color 0.3s,
    transform 0.2s;
}

.cover-nav-button:hover {
  background-color: rgb(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Responsive adjustments for cover navigation */
@media (max-width: 768px) {
  .cover-navigation {
    flex-direction: column;
    align-items: center;
  }

  .cover-nav-button {
    width: 80%;
  }
}
