/* =============================================
   5 SEKUNDEN BUCH - STYLE.CSS
   Vollständig lokal, responsiv, mit WOFF2-Fonts
   ============================================= */

 /* ===== LOKALE SCHRIFTARTEN (WOFF2) ===== */
@font-face {
    font-family: 'Montserrat';
    src: url('/de/assets/fonts/Montserrat-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/de/assets/fonts/Montserrat-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('/de/assets/fonts/PlayfairDisplay-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('/de/assets/fonts/PlayfairDisplay-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #FFFFFF;
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    color: #0E2841;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background-color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0E2841;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333333;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: #0E2841;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #333333;
    position: relative;
    transition: all 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background-color: #333333;
    transition: all 0.3s;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* ===== MAIN CONTENT ===== */
main {
    padding: 40px 0;
}

.section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background-color: #0E2841;
}

.hero {
    text-align: center;
    padding: 60px 0;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.subtitle {
    font-size: 1.25rem;
    color: #555555;
    margin-bottom: 30px;
}

.book-cover {
    display: block;
    max-width: 300px;
    height: auto;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    transform-origin: center center;
}

/* Hover-Effekt für klickbares Cover */
a .book-cover {
    cursor: pointer;
}

a:hover .book-cover {
    animation: buch-atmet 5s ease-in-out infinite;
}

@keyframes buch-atmet {
    0% {
        transform: translateY(-5px) scale(1);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
    }
    50% {
        transform: translateY(-8px) scale(1.025);
        box-shadow: 0 22px 50px rgba(0, 0, 0, 0.22);
    }
    100% {
        transform: translateY(-5px) scale(1);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    a:hover .book-cover {
        animation: none;
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
    }
}

/* ===== ZITATE (GRID-LAYOUT MIT KONSISTENTER BREITE) ===== */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.quote-card {
    background: #F7F5F2;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #0E2841;
    transition: transform 0.3s ease;
    text-align: center;
}

.quote-card p {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-style: italic;
    color: #555555;
    margin: 0;
}

/* ===== NEUE ELEMENTE FÜR DIE STARTSEITE ===== */
.intro-text {
    max-width: 700px;
    margin: 20px auto;
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: center;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
}

.cta-section {
    text-align: center;
    background-color: #F7F5F2;
    padding: 60px 0;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

/* ===== ZITATE (ALTER STIL - FALLBACK) ===== */
.quote {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-style: italic;
    color: #555555;
    text-align: center;
    margin: 30px auto;
    max-width: 800px;
    padding: 20px;
    border-left: 3px solid #0E2841;
    background-color: #F7F5F2;
    border-radius: 0 8px 8px 0;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: #7A9E8E;
    color: #FFFFFF;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
    cursor: pointer;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    margin: 10px 5px;
}

.btn:hover {
    background-color: #6B8F7F;
}

/* ===== INHALTSVERZEICHNIS (für buch.html) – einklappbar ===== */
.table-of-contents {
    max-width: 800px;
    margin: 0 auto;
}

/* Reset nur für Listen allgemein – Einrückung steuern die Ebenen-Regeln darunter */
.table-of-contents ul,
.table-of-contents .toc-level {
    list-style: none;
}

.table-of-contents > .toc-level-1 {
    padding: 0;
    margin: 0;
}

/* Oberste Ebene: nur die großen Teile */
.toc-level-1 > .toc-node,
.toc-level-1 > .toc-section-leaf {
    margin-bottom: 12px;
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    background: #FFFFFF;
    overflow: hidden;
}

.toc-level-1 > .toc-node:last-child,
.toc-level-1 > .toc-section-leaf:last-child {
    margin-bottom: 0;
}

/* Toggle-Button (ganze Zeile klickbar) – Pfeil nur bei aufklappbaren Ebenen */
.toc-toggle {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 16px 18px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.toc-toggle:hover {
    background: #FAFAFA;
}

.toc-toggle:hover .toc-chevron {
    border-color: #6B8F7F;
}

.toc-toggle:focus-visible {
    outline: 2px solid #0E2841;
    outline-offset: -2px;
}

/* Animierter Pfeil vor dem Titel (nur .toc-toggle = aufklappbar) */
.toc-chevron {
    flex: 0 0 auto;
    display: inline-block;
    width: 0.65em;
    height: 0.65em;
    margin-top: 0.5em;
    border-right: 2.5px solid #7A9E8E;
    border-bottom: 2.5px solid #7A9E8E;
    transform: rotate(-45deg); /* zeigt nach rechts = eingeklappt */
    transform-origin: 50% 50%;
    transition: transform 0.28s ease, border-color 0.2s ease, margin-top 0.28s ease;
}

.toc-toggle[aria-expanded="true"] .toc-chevron {
    transform: rotate(45deg); /* zeigt nach unten = ausgeklappt */
    margin-top: 0.35em;
}

.toc-label {
    flex: 1 1 auto;
    min-width: 0;
}

/* Hauptebene: goldgelb wie 2. Ebene, etwas größer */
.toc-part-title {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #0E2841;
    font-weight: 700;
    line-height: 1.3;
}

.toc-part-sub,
.toc-quote {
    display: block;
    margin-top: 6px;
    font-size: 0.95rem;
    color: #666666;
    font-style: italic;
    font-weight: 400;
}

/* 2. Ebene (Kapitel) – goldgelb */
.toc-toggle strong {
    display: block;
    font-family: 'Playfair Display', serif;
    color: #0E2841;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
}

/* Eingeklappte Listen */
.toc-level[hidden] {
    display: none !important;
}

/* Ebenen deutlich einrücken (Spezifität > .table-of-contents .toc-level) */
.table-of-contents .toc-level-2 {
    padding: 8px 16px 16px 2.5rem;
    margin: 0 0 0 1rem;
    border-top: 1px solid #F0F0F0;
    border-left: 3px solid #B8C8B8;
}

.table-of-contents .toc-level-3 {
    padding: 6px 12px 12px 2rem;
    margin: 6px 0 0 1.25rem;
    border-top: none;
    border-left: 3px solid #D0D8D0;
}

/* Einträge ohne Unterebene */
.toc-leaf {
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid #F3F3F3;
}

.toc-level-2 > .toc-leaf:last-child,
.toc-level-3 > .toc-leaf:last-child,
.toc-level-2 > .toc-node:last-child {
    border-bottom: none;
}

.toc-leaf strong {
    display: block;
    font-family: 'Playfair Display', serif;
    color: #0E2841;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.toc-leaf p {
    margin: 0;
    font-size: 0.95rem;
    color: #666666;
    font-style: italic;
}

/* Kapitel mit Unterpunkten */
.toc-level-2 > .toc-node {
    margin: 0;
    padding: 4px 0;
    border-bottom: 1px solid #F3F3F3;
}

.toc-level-2 > .toc-node .toc-toggle {
    padding: 10px 8px;
}

/* Hilfe ohne Unterkapitel (oberste Ebene, kein Pfeil) */
.toc-section-leaf {
    padding: 16px 18px 16px 18px;
}

.toc-section-leaf .toc-part-title {
    margin-bottom: 6px;
    /* gleiche goldene, größere Schrift wie aufklappbare Hauptebene */
    font-size: 1.35rem;
    color: #0E2841;
}

.toc-section-leaf p {
    margin: 0;
    font-size: 0.95rem;
    color: #666666;
    font-style: italic;
}

/* Etwas mehr Luft für den Pfeil in der Hauptebene */
.toc-level-1 > .toc-node > .toc-toggle .toc-chevron {
    margin-top: 0.55em;
    width: 0.7em;
    height: 0.7em;
}

.toc-level-1 > .toc-node > .toc-toggle[aria-expanded="true"] .toc-chevron {
    margin-top: 0.4em;
}

.book-description {
    text-align: center;
}

.book-description p {
    margin-bottom: 20px;
    text-align: left;
}

/* ===== LESEPROBE (40vh, Verlauf, aufklappbar) ===== */
.reading-sample {
    display: block;
    box-sizing: border-box;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background-color: #FFFFFF;
    padding: 40px 40px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border-top: 4px solid #0E2841;
}

.reading-sample-clip {
    position: relative;
    display: block;
    box-sizing: border-box;
}

/* Eingeklappt: feste Viewport-Höhe, Rest abschneiden */
.reading-sample.is-collapsed .reading-sample-clip {
    max-height: 40vh !important;
    height: 40vh !important;
    overflow: hidden !important;
}

.reading-sample.is-expanded .reading-sample-clip {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

.reading-sample-inner {
    display: block;
}

.reading-sample-fade {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6rem;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.75) 40%,
        #FFFFFF 100%
    );
}

.reading-sample.is-collapsed .reading-sample-fade {
    display: block;
}

.reading-sample-actions {
    position: relative;
    z-index: 3;
    text-align: center;
    margin-top: 4px;
    padding: 12px 0 4px;
    background: #FFFFFF;
}

.reading-sample-toggle {
    min-width: 200px;
}

@media (max-width: 768px) {
    .reading-sample {
        padding: 28px 18px 16px;
        max-width: 100%;
    }

    .reading-sample.is-collapsed .reading-sample-clip {
        max-height: 40vh !important;
        height: 40vh !important;
    }

    .reading-sample-fade {
        height: 5rem;
    }
}

/* ===== LEGAL CONTENT ===== */
.legal-content,
.about-me-content,
.book-description,
.contact-content,
.help-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 20px;
    color: #0E2841;
    border-bottom: 1px solid #EEEEEE;
    padding-bottom: 10px;
}

.legal-content h3 {
    font-size: 1.25rem;
    margin-top: 25px;
    margin-bottom: 15px;
    color: #555555;
}

.legal-content p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.legal-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.legal-content li {
    margin-bottom: 8px;
}

/* ===== FOOTER ===== */
footer {
    background-color: #F5F5F5;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

footer p {
    font-size: 0.9rem;
    color: #666666;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #666666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #0E2841;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: #FFFFFF;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 15px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu-btn.active .hamburger {
        background-color: transparent;
    }

    .mobile-menu-btn.active .hamburger::before {
        top: 0;
        transform: rotate(45deg);
    }

    .mobile-menu-btn.active .hamburger::after {
        bottom: 0;
        transform: rotate(-45deg);
    }

    .quote {
        font-size: 1.1rem;
        padding: 15px;
    }

    .book-cover {
        max-width: 250px;
    }

    .toc-toggle {
        padding: 14px 14px;
    }

    .table-of-contents .toc-level-2 {
        padding-left: 1.75rem;
        margin-left: 0.65rem;
    }

    .table-of-contents .toc-level-3 {
        padding-left: 1.5rem;
        margin-left: 0.85rem;
    }

    .toc-section-leaf {
        padding-left: 18px;
    }

    .legal-content h2 {
        font-size: 1.4rem;
    }

    .legal-content h3 {
        font-size: 1.1rem;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    /* Neue Responsive-Anpassungen */
    .hero-buttons {
        flex-direction: column;
    }

    .footer-links {
        gap: 10px;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }

    .nav-links {
        gap: 30px;
    }

    .nav-links a {
        font-size: 1rem;
    }
}

/* ===== FLYING HELP BUTTON ===== */
.help-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #7A9E8E;
    color: #FFFFFF;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.help-floating-btn:hover {
    background-color: #6B8F7F;
    transform: scale(1.1);
}

.help-floating-btn span {
    display: block;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .help-floating-btn {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 10px;
    }
}

.help-floating-btn::after {
    content: "Hilfe & Unterstützung";
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
    background-color: #333333;
    color: #FFFFFF;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.help-floating-btn:hover::after {
    opacity: 1;
}

/* ===== ERROR PAGES ===== */
.error-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
}

.error-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.error-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}