/* ==========================================================================
   1. GRUNDEINSTELLUNGEN & FONTS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime&family=Caveat:wght@600&family=Inter:wght@400;600&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #eef1f5; /* Sanfter, graublauer Hintergrund außerhalb des Buchs */
    color: #333;
    display: flex;
    min-height: 100vh;
}

/* ==========================================================================
   2. FESTE SIDEBAR (LINKS)
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: #2c3e50; /* Dunkles, edles Cover-Blau */
    color: #fff;
    padding: 40px 20px;
    z-index: 10;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
}

/* Der "Ringbuch"-Effekt an der rechten Kante der Sidebar */
.sidebar-ring {
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
    border-right: 3px dashed #bdc3c7; /* Simuliert die Spiralbindung */
}

.nav-bar h2 {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 30px;
    color: #ecf0f1;
    border-bottom: 1px solid #34495e;
    padding-bottom: 10px;
}

.nav-bar ul {
    list-style: none;
}

.nav-bar ul li {
    margin-bottom: 15px;
}

.nav-bar ul li a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-bar ul li a:hover, 
.nav-bar ul li a.active {
    color: #fff;
    background-color: #34495e;
    transform: translateX(5px);
}

/* ==========================================================================
   3. HAUPT-CONTAINER & HEADER
   ========================================================================== */
.notebook-container {
    margin-left: 260px; /* Platzhalter für die feste Sidebar */
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #fff;
}

/* Header mit Hintergrundbild */
.notebook-header {
    height: 250px;
    /* Ein schönes Arbeitsplatz-Hintergrundbild (austauschbar) */
    background-image: url('https://images.unsplash.com/photo-1455390582262-044cdead277a?q=80&w=1200');
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Dunkles Overlay, damit man den Titel gut lesen kann */
.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 50px;
    color: #fff;
}

.header-overlay h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.header-overlay .subtitle {
    font-size: 1.1rem;
    color: #eaedd1;
    font-style: italic;
}

/* ==========================================================================
   4. DIE LINIERTEN SEITEN (NOTIZBUCH-EFFEKT)
   ========================================================================== */
.notebook-page {
    padding: 40px 60px;
    flex: 1;
    position: relative;
    /* Der Linien-Effekt: 24px Zeilenhöhe mit einer feinen blauen Linie */
    background-image: linear-gradient(#e8f4f8 1px, transparent 1px);
    background-size: 100% 28px;
    line-height: 28px; /* Wichtig: Muss exakt mit background-size übereinstimmen! */
}

/* Die rote vertikale Margin-Linie auf der linken Seite */
.notebook-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 45px;
    width: 2px;
    height: 100%;
    background-color: #ff9999;
}

/* Stil für die einzelnen Abschnitte */
.notebook-section {
    margin-bottom: 40px;
    padding-left: 15px; /* Damit der Text nicht auf der roten Linie klebt */
}

/* Titel im Schreibmaschinen-Stil */
.notebook-section h2 {
    font-family: 'Courier Prime', monospace;
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 14px;
    padding-top: 14px; /* Richtet Text auf den Linien aus */
}

.notebook-section p {
    margin-bottom: 28px; /* Genau eine Zeile Abstand */
    text-align: justify;
}

/* Listen-Stile angepasst an die Linien */
.sitemap-list, .sources-list {
    margin-bottom: 28px;
    padding-left: 30px;
}

.sitemap-list li, .sources-list li {
    margin-bottom: 0; /* Verhindert das Verschieben aus dem Linienraster */
}

/* Schicker Trenner, der aussieht wie eine gezogene Linie */
.page-divider {
    border: none;
    border-top: 1px dashed #7f8c8d;
    margin: 28px 0;
}

/* Handschriftlicher Touch für Zitate oder Notizen */
.handwritten {
    font-family: 'Caveat', cursive;
    font-size: 1.6rem;
    color: #2980b9;
    padding-left: 10px;
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
.notebook-footer {
    background-color: #fafbfc;
    border-top: 1px solid #e1e8ed;
    padding: 15px 60px;
    font-size: 0.85rem;
    color: #7f8c8d;
    text-align: right;
}

/* Sanftes Scrollen bei Klick auf die Navigation */
html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   6. KAPITELMENÜ (REGISTERKARTEN / TABS)
   ========================================================================== */
.chapter-menu {
    margin-bottom: 40px;
    padding-left: 15px; /* Ausrichtung an der roten Linie */
    font-family: 'Courier Prime', monospace;
}

.chapter-menu-title {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Die einzelnen Registerkarten */
.tab-item {
    display: flex;
    align-items: center;
    background-color: #fcfcfc;
    border: 1px solid #d1d8e0;
    border-radius: 4px;
    padding: 6px 16px;
    text-decoration: none;
    color: #455a64;
    font-size: 0.95rem;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    position: relative;
    top: 0;
}

/* Die Kapitelnummer im Tab (wie ein kleiner Stempel) */
.tab-number {
    background-color: #e2e8f0;
    color: #64748b;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 10px;
    font-weight: bold;
}

/* Text im Tab */
.tab-text {
    font-weight: 600;
}

/* Hover-Effekt: Der Tab hebt sich leicht an */
.tab-item:hover {
    background-color: #ffffff;
    border-color: #b0bec5;
    box-shadow: 2px 5px 10px rgba(0, 0, 0, 0.1);
    top: -3px; /* Simuliert das "Anheben" des Papiers */
}

/* Der aktive Tab bekommt eine auffällige "Textmarker"-Farbe */
.tab-item.active-tab {
    background-color: #fff9db; /* Sanftes Textmarker-Gelb */
    border: 1px dashed #f59f00;
    color: #d9480f;
    box-shadow: 1px 3px 6px rgba(245, 159, 0, 0.15);
}

.tab-item.active-tab .tab-number {
    background-color: #ffe066;
    color: #f59f00;
}

/* Anpassung für das Linienraster: Das Menü bricht die Linien nicht auf */
.chapter-menu {
    line-height: normal; 
}