/* art-deco.css - Art-Déco-spezifische Designelemente */

/* Chapter Cards mit Art Déco Styling */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

/* Verbesserte Chapter Cards mit gleicher Höhe und fester Positionierung des Buttons */
.chapter-card {
  position: relative;
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.4s ease, 
              border-color 0.3s ease;
  padding: var(--space-6);
  border-left: 3px solid var(--deco-primary);
  height: 500px; /* Feste Höhe für alle Karten */
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(203, 161, 53, 0.1);
}

.chapter-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, transparent 70%, var(--highlight) 100%);
  opacity: 0.2;
  z-index: 0;
  transition: opacity 0.4s ease;
}

.chapter-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15), 0 0 20px rgba(203, 161, 53, 0.1);
  border-color: var(--highlight);
}

.chapter-card:hover::before {
  opacity: 0.3;
}

/* Goldene Kante am unteren Rand beim Hover hinzufügen */
.chapter-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--highlight), transparent);
  transition: width 0.5s ease;
}

.chapter-card:hover::after {
  width: 100%;
}

.chapter-number {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  color: var(--accent-primary);
  opacity: 0.5;
  z-index: 1;
  font-weight: 700;
}

.chapter-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.chapter-header {
  margin-bottom: var(--space-4);
  height: 80px; /* Feste Höhe für Titelbereich */
}

.chapter-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-1);
  color: var(--accent-primary);
  position: relative;
  text-transform: uppercase;
  padding-bottom: var(--space-1);
  letter-spacing: var(--letter-spacing-wider);
}

.chapter-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--deco-primary);
}

.chapter-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  font-style: italic;
}

.chapter-quote-container {
  margin-bottom: var(--space-4);
  flex-grow: 0;
  height: 140px; /* Feste Höhe für Zitatbereich */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.chapter-quote {
  position: relative;
  font-family: var(--font-heading);
  font-style: italic;
  padding: 1.2rem 1.5rem;
  margin: 0;
  color: var(--text-primary);
  border-left: 3px solid var(--highlight);
  background-color: rgba(203, 161, 53, 0.05);
  border-radius: 0 8px 8px 0;
  font-size: var(--text-base);
  line-height: 1.5;
}

.chapter-quote::before {
  content: '"';
  position: absolute;
  top: -15px;
  left: 10px;
  font-size: 3rem;
  color: var(--highlight);
  opacity: 0.3;
  font-family: var(--font-heading);
  line-height: 1;
}

.chapter-description {
  flex-grow: 1;
  overflow: hidden;
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.chapter-link-container {
  margin-top: auto;
  text-align: center;
}

/* Button-Styling */
.chapter-link {
  display: inline-block;
  padding: var(--space-2) var(--space-6);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chapter-link:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dekorative Ecken für Karten */
.deco-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--highlight);
  opacity: 0.6;
  z-index: 1;
}

.deco-corner-tl {
  top: 10px;
  left: 10px;
  border-right: none;
  border-bottom: none;
}

.deco-corner-tr {
  top: 10px;
  right: 10px;
  border-left: none;
  border-bottom: none;
}

.deco-corner-bl {
  bottom: 10px;
  left: 10px;
  border-right: none;
  border-top: none;
}

.deco-corner-br {
  bottom: 10px;
  right: 10px;
  border-left: none;
  border-top: none;
}

/* Art Déco Dekorationselemente */
.deco-divider {
  position: relative;
  margin: 0 auto 3rem auto;
  height: 20px;
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deco-line {
  height: 1px;
  flex-grow: 1;
  background: linear-gradient(90deg, transparent, var(--highlight), transparent);
}

.deco-diamond {
  width: 10px;
  height: 10px;
  background-color: var(--highlight);
  transform: rotate(45deg);
  margin: 0 15px;
}

/* Zitatstil */
.chapter-quote {
  position: relative;
  font-family: var(--font-heading);
  font-style: italic;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  color: var(--text-primary);
  border-left: 3px solid var(--highlight);
  background-color: rgba(203, 161, 53, 0.05);
  border-radius: 0 8px 8px 0;
}

.chapter-quote::before {
  content: '"';
  position: absolute;
  top: -15px;
  left: 10px;
  font-size: 4rem;
  color: var(--highlight);
  opacity: 0.3;
  font-family: var(--font-heading);
  line-height: 1;
}

/* Chapter-Link Button */
.chapter-link {
  margin-top: var(--space-4);
  display: inline-block;
}

/* Art Déco Rahmen für Bilder */
.art-deco-frame {
  position: relative;
  padding: 1rem;
  border: 1px solid var(--highlight);
  background-color: var(--bg-secondary);
  box-shadow: 0 4px 10px var(--shadow);
}

.art-deco-frame::before,
.art-deco-frame::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--highlight);
}

.art-deco-frame::before {
  top: -10px;
  left: -10px;
  border-right: none;
  border-bottom: none;
}

.art-deco-frame::after {
  bottom: -10px;
  right: -10px;
  border-left: none;
  border-top: none;
}

.art-deco-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* Seitentitel mit Art-Déco-Elementen */
.page-title {
  position: relative;
  text-align: center;
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-6);
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--highlight), transparent);
}

.page-title-deco {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 20px;
  display: flex;
  justify-content: space-between;
}

.page-title-deco::before,
.page-title-deco::after {
  content: '';
  width: 10px;
  height: 10px;
  background-color: var(--highlight);
  transform: rotate(45deg);
}

/* Art Déco Buttons */
.art-deco-button {
  position: relative;
  overflow: hidden;
}

.art-deco-button::before,
.art-deco-button::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: var(--highlight);
  opacity: 0.5;
  transition: opacity var(--transition-normal);
}

.art-deco-button:hover::before,
.art-deco-button:hover::after {
  opacity: 0.8;
}

.art-deco-button::before {
  top: 0;
  left: 0;
}

.art-deco-button::after {
  bottom: 0;
  right: 0;
}

/* Success Line im Art Déco Stil */
.success-line-container {
  position: fixed;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  height: 80%;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-line {
  width: 2px;
  height: 100%;
  background-color: rgba(203, 161, 53, 0.2);
  position: relative;
}

.success-line-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--highlight);
  transition: height 0.5s ease;
}

.success-nodes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.success-node {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) scale(1);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  border: 2px solid var(--highlight);
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 2;
}

.success-node::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--highlight);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.success-node:hover,
.success-node.active {
  transform: translateX(-50%) scale(1.3);
}

.success-node.active::before {
  opacity: 1;
}

/* Lesson Tracker im Art Déco Stil */
.lesson-tracker {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 90;
}

.tracker-toggle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tracker-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 1s ease;
}

.tracker-toggle:hover::before {
  left: 100%;
}

.tracker-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.tracker-icon {
  color: white;
}

.tracker-content {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 300px;
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 15px var(--shadow);
  padding: var(--space-4);
  transform: scale(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.tracker-content.expanded {
  transform: scale(1);
  opacity: 1;
  pointer-events: all;
}

.tracker-content h3 {
  margin-bottom: var(--space-3);
  color: var(--accent-primary);
  font-family: var(--font-heading);
  position: relative;
  padding-bottom: var(--space-2);
}

.tracker-content h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--highlight);
}

/* Progress Bar im Tracker */
.tracker-progress {
  margin: var(--space-3) 0;
}

.progress-bar {
  height: 6px;
  background-color: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background-color: var(--highlight);
  width: 0;
  transition: width 0.5s ease;
}

.progress-text {
  text-align: right;
  font-size: var(--text-sm);
  margin-top: var(--space-1);
  color: var(--text-secondary);
}

/* Checklist für Lektionen */
.lesson-checklist {
  max-height: 300px;
  overflow-y: auto;
  margin-top: var(--space-4);
}

.lesson-item {
  display: flex;
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
}

.lesson-item:hover {
  background-color: var(--bg-secondary);
}

.lesson-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.lesson-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--highlight);
  border-radius: 3px;
  margin-right: var(--space-3);
  transition: all 0.3s ease;
}

.lesson-checkbox input:checked ~ .checkmark {
  background-color: var(--highlight);
}

.checkmark:after {
  content: '';
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.lesson-checkbox input:checked ~ .checkmark:after {
  display: block;
}

.lesson-title {
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.lesson-item.completed .lesson-title {
  color: var(--highlight);
}

/* Animationen für Chapter Completion */
@keyframes completion-pulse {
  0% {
    transform: scale(1);
    background-color: var(--highlight);
  }
  50% {
    transform: scale(1.1);
    background-color: var(--accent-primary);
  }
  100% {
    transform: scale(1);
    background-color: var(--highlight);
  }
}

.animate-completion .checkmark {
  animation: completion-pulse 0.8s ease;
}

/* 4-Spalten-Grid für Kapitel */
.chapter-grid.four-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-8);
}

/* Responsive Anpassungen */
@media (max-width: 1200px) {
  .chapter-grid.four-columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .chapter-grid.four-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .chapter-grid.four-columns {
    grid-template-columns: 1fr;
  }
}

/* CSS für den Vorwort-Button */
.preface-button-container {
  text-align: center;
  /* margin-bottom: var(--space-8); */
}

.preface-button {
  display: inline-block;
  padding: var(--space-3) var(--space-8);
  background-color: transparent;
  color: var(--highlight);
  border: 2px solid var(--highlight);
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: 1px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(203, 161, 53, 0.1);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.preface-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(203, 161, 53, 0.2), transparent);
  transition: var(--transition-slow);
}

.preface-button:hover {
  background-color: var(--highlight);
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(203, 161, 53, 0.2);
  text-decoration: none;
}

.preface-button:hover::before {
  left: 100%;
}

/* Kapitelseiten-Styling */
.chapter-page {
  background-color: var(--bg-primary);
}

.chapter-detail {
  padding: var(--space-8) 0;
}

.chapter-header {
  text-align: center;
  margin-bottom: var(--space-12);
  position: relative;
}

.chapter-number-badge {
  display: inline-block;
  width: 60px;
  height: 60px;
  background-color: var(--highlight);
  color: var(--bg-primary);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 60px;
  text-align: center;
  margin-bottom: var(--space-4);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


.quote-container {
  max-width: 800px;
  margin: 0 auto var(--space-12) auto;
  text-align: center;
  padding: var(--space-6);
  position: relative;
  background-color: rgba(203, 161, 53, 0.05);
  border-radius: 8px;
}

.quote-container::before,
.quote-container::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--highlight);
  opacity: 0.6;
}

.quote-container::before {
  top: 15px;
  left: 15px;
  border-right: none;
  border-bottom: none;
}

.quote-container::after {
  bottom: 15px;
  right: 15px;
  border-left: none;
  border-top: none;
}

.quote-text {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

.quote-author {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--highlight);
}

.chapter-content h2 {
  font-size: var(--text-3xl);
  margin-top: var(--space-12);
  margin-bottom: var(--space-6);
  color: var(--accent-primary);
  position: relative;
  padding-bottom: var(--space-2);
}

.chapter-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--highlight);
}

.chapter-content h3 {
  font-size: var(--text-2xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  color: var(--accent-primary);
}

.chapter-content p {
  margin-bottom: var(--space-6);
  font-size: var(--text-base);
  color: var(--text-primary);
}

.chapter-content .text-right {
  text-align: right;
}

.chapter-quote {
  position: relative;
  font-family: var(--font-heading);
  font-style: italic;
  padding: var(--space-6) var(--space-8);
  margin: var(--space-6) 0;
  color: var(--text-primary);
  border-left: 3px solid var(--highlight);
  background-color: rgba(203, 161, 53, 0.05);
  border-radius: 0 8px 8px 0;
  font-size: var(--text-lg);
  line-height: 1.6;
}

.chapter-quote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 4rem;
  color: var(--highlight);
  opacity: 0.3;
  font-family: var(--font-heading);
  line-height: 1;
}

.highlight-quote {
  border-left-width: 5px;
  background-color: rgba(203, 161, 53, 0.1);
}

.signature {
  text-align: right;
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--text-secondary);
  margin-top: var(--space-8);
}

.chapter-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(203, 161, 53, 0.2);
}

.back-to-overview,
.next-chapter {
  display: flex;
  align-items: center;
  color: var(--text-primary);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: 4px;
  transition: all var(--transition-normal);
}

.back-to-overview:hover,
.next-chapter:hover {
  color: var(--highlight);
  background-color: rgba(203, 161, 53, 0.05);
  text-decoration: none;
}

.nav-icon {
  width: 24px;
  height: 24px;
  color: currentColor;
}

.back-to-overview .nav-icon {
  margin-right: var(--space-2);
}

.next-chapter .nav-icon {
  margin-left: var(--space-2);
}

.mark-as-read {
  text-align: center;
  margin-top: var(--space-8);
}

.mark-as-read .btn {
  display: inline-flex;
  align-items: center;
  padding: var(--space-3) var(--space-6);
}

.btn-icon {
  margin-right: var(--space-2);
}

.marked {
  background-color: var(--bg-secondary);
  color: var(--highlight);
  border: 1px solid var(--highlight);
}

.art-deco-heading {
  position: relative;
  padding-left: var(--space-4);
}

.art-deco-heading::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background-color: var(--highlight);
  transform: rotate(45deg);
}

.featured-quote {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-style: italic;
  color: #CBA135;
  border-left: 4px solid #CBA135;
  padding-left: 2.5rem;
  position: relative;
  margin: 3rem 0;
  background-color: rgba(255, 236, 190, 0.08);
  line-height: 1.7;
  animation: fadeInQuote 1s ease-in-out;
}

.featured-quote::before {
  content: "♦";
  position: absolute;
  left: 0.5rem;
  top: 0.2rem;
  font-size: 1.2rem;
  color: #CBA135;
  animation: pulseDiamond 1.5s infinite;
}

.dark-mode .featured-quote {
  color: #E8C77B;
  border-left-color: #E8C77B;
  background-color: rgba(232, 199, 123, 0.05);
}

.dark-mode .featured-quote::before {
  color: #E8C77B;
}

@keyframes fadeInQuote {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseDiamond {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}
