/* --- 1. FONTS IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Lato:wght@300;400;700&display=swap');

/* --- 2. VARIABLES --- */
:root {
    --bg-deep: #050505;
    --bg-panel: #0f1115;
    --gold: #c6a87c;
    --gold-glow: #f0d5aa;
    --silver: #a8a8a8;
    --text-main: #e0e0e0;
    
    /* Verbesserte Sekundärfarben für HOHEN Kontrast (z.B. Galerie Text, Links) */
    --text-secondary: #cccccc; 
    --text-tertiary: #aaaaaa;  /* Mittleres Grau für Copyright, Badges, kleine Hinweise */

    --font-title: 'Cinzel', serif;
    --font-body: 'Cormorant Garamond', serif;
    --font-ui: 'Lato', sans-serif;
}

/* --- 3. RESET & BASICS --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-body);
    /* VERGRÖSSERT: Basis-Fließtext von 19px auf 20px/1.25rem */
    font-size: 20px; 
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-title);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h1 { font-size: 3.5rem; line-height: 1.1; text-shadow: 0 5px 15px rgba(0,0,0,0.8); }
h2 { color: var(--gold); border-bottom: 1px solid rgba(198, 168, 124, 0.3); display: inline-block; padding-bottom: 15px; margin-bottom: 40px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- 4. NAVIGATION --- */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(198, 168, 124, 0.2);
}

.logo img { height: 55px; width: auto; filter: drop-shadow(0 0 5px rgba(198, 168, 124, 0.3)); }

.nav-menu { 
    display: flex; gap: 30px; align-items: center; list-style: none; 
}

.nav-item { position: relative; }
.nav-link {
    font-family: var(--font-title); 
    /* VERGRÖSSERT: Navigationslinks von 0.85rem auf 0.9rem */
    font-size: 0.9rem; 
    color: var(--text-main);
    text-transform: uppercase; letter-spacing: 1px; cursor: pointer; padding: 10px 0;
}
.nav-link:hover { color: var(--gold); }

/* Dropdown */
.dropdown {
    position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #0f1115; border: 1px solid var(--gold);
    min-width: 220px; opacity: 0; visibility: hidden;
    transition: 0.3s ease; padding: 10px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.9);
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.dropdown a {
    display: block; padding: 12px 20px;
    font-family: var(--font-body); font-size: 1rem; color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dropdown a:hover { background: rgba(198, 168, 124, 0.1); color: var(--gold); }

/* Mobile Menu */
.mobile-menu-btn { display: none; color: var(--gold); font-size: 1.5rem; cursor: pointer; }

/* --- 5. HERO SECTION (IMAGE BACKGROUND) --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* This creates the Parallax Effect */
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    position: relative; 
    max-width: 900px; 
    padding: 20px;
    text-shadow: 0 4px 10px #000;
}

/* --- FIX: INDEX/HERO HEADLINES SCALE (ONLY CHANGE) --- */
/* Index nutzt i.d.R. .hero, nicht .page-header. Das globale h1 (3.5rem) ist dort zu hart. */
.hero-content h1{
    font-size: clamp(2.0rem, 5vw, 3.5rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.hero-content h2{
    font-size: clamp(1.0rem, 2.2vw, 1.6rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* --- 6. BUTTONS --- */
.btn-epic {
    display: inline-block; padding: 15px 35px;
    background: transparent; border: 1px solid var(--gold); color: var(--gold);
    font-family: var(--font-ui); font-weight: 700; text-transform: uppercase; letter-spacing: 2px;
    font-size: 0.9rem; cursor: pointer; transition: 0.4s;
}
.btn-epic:hover { background: var(--gold); color: #000; box-shadow: 0 0 25px rgba(198, 168, 124, 0.3); }
.btn-epic.primary { background: var(--gold); color: #000; }
.btn-epic.primary:hover { background: #fff; border-color: #fff; box-shadow: 0 0 35px rgba(255, 255, 255, 0.4); }

/* --- 7. UTILITIES & TYPOGRAPHY ADJUSTMENTS --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 100px 0; }

/* Allgemeine Verkleinerung kleinerer Texte */
small, .caption, .subtext {
    font-size: 0.95rem; /* Nochmals leicht erhöht */
    color: var(--text-tertiary);
    font-family: var(--font-ui);
}

/* Footer Global Styling */
footer { 
    background: #020202; 
    border-top: 1px solid var(--gold); 
    padding: 60px 0; 
    margin-top: auto; 
}

/* Copyright Text im Footer (Muss im JS-Markup korrigiert werden, aber hier Fallback) */
footer > div:last-child {
    color: var(--text-tertiary) !important; /* Verwendet jetzt das hellere #aaa */
    font-size: 0.9rem !important; /* Größer und besser lesbar */
    font-family: var(--font-ui);
}

/* --- GALERIE SPEZIFISCHE FIXES (gallery-hueter-1.html, etc.) --- */

/* Textfarbe in Galerie-Karten (Fließtext, z.B. das Zitat) */
.lore-card .card-content p {
    color: var(--text-secondary) !important; /* Hellgrau für gute Lesbarkeit des Haupttexts */
    font-size: 1rem; 
    line-height: 1.6;
}

/* Antagonist/Charakter Badge (z.B. "Antagonist") */
.lore-card .badge {
    font-size: 0.85rem !important; /* Deutlich größer */
    color: var(--text-tertiary) !important; /* Verwendet #aaa */
    letter-spacing: 1.5px;
    font-weight: 700;
}

/* --- SEITEN SPEZIFISCHE FIXES (hueter-band-2.html, etc.) --- */

/* Verfügbarkeits-Hinweis unter dem Button (Bsp: Verfügbar als eBook...) */
.book-cover-wrapper p {
    font-size: 0.95rem !important; /* Vergrößert */
    color: var(--text-secondary) !important; /* Hellerer Kontrast */
    font-family: var(--font-ui);
}

/* Reviews und Metadaten (Hintergrundtextfarbe) */
.review-text, .synopsis-text {
    color: var(--text-secondary);
}

/* --- WIKI INTERNE NAVIGATION --- */
.wiki-internal-nav {
    background: #111; /* Dunkler Hintergrund, passend zum Header */
    padding: 15px 0;
    text-align: center;
    border-bottom: 1px solid #222;
    /* Sticky Positionierung */
    position: sticky; 
    top: 0; 
    z-index: 999; /* Unter dem Global Header (meist z-index 1000+), aber über Inhalt */
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow-x: auto; /* Scrollbar auf Mobile */
}

.wiki-internal-nav .nav-item {
    color: var(--gold); /* Deine globale Gold-Variable */
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    font-family: var(--font-ui, sans-serif); /* Fallback Font */
    transition: all 0.3s ease;
    padding-bottom: 5px;
}

.wiki-internal-nav .nav-item:hover {
    color: #fff;
    text-shadow: 0 0 5px var(--gold);
}

.wiki-internal-nav .nav-item.active {
    color: #fff;
    border-bottom: 2px solid var(--gold);
}

/* Mobile Anpassung */
@media (max-width: 768px) {
    .wiki-internal-nav {
        padding: 15px 10px;
        justify-content: flex-start;
        display: flex;
    }
    .wiki-internal-nav .nav-item {
        margin: 0 10px;
        font-size: 0.8rem;
    }
}

/* --- FIX: HEADLINES IN PAGE HEADERS ON MOBILE (ONLY CHANGE) --- */
/* Problem: Einige Seiten überschreiben h1 im .page-header zu groß. Auf Mobile wird Text abgeschnitten. */
@media (max-width: 768px) {
    .page-header {
        /* Mehr “Luft” nach unten, weniger harte Kante nach oben */
        padding: 110px 20px 70px !important;
    }
    .page-header h1 {
        font-size: 2.0rem !important;
        line-height: 1.15 !important;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    .page-header h2 {
        font-size: 1.1rem !important;
        line-height: 1.2 !important;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
}

/* Zusätzlich: sehr kleine Geräte */
@media (max-width: 420px) {
    .page-header {
        padding: 100px 16px 60px !important;
    }
    .page-header h1 {
        font-size: 1.75rem !important;
    }
}

/* --- 8. RESPONSIVE --- */
/* FIX FÜR GEBROCHENES MENÜ AUF DEM DESKTOP */
@media (min-width: 1025px) {
    .nav-menu {
        display: flex !important; /* Erzwingt Desktop-Ansicht */
        flex-direction: row !important;
        position: static !important;
        padding: 0 !important;
        width: auto !important;
        border-bottom: none !important;
    }
}

@media (max-width: 1024px) {
    .nav-menu {
        display: none; flex-direction: column; position: absolute;
        top: 85px; left: 0; width: 100%; background: #0f1115;
        padding: 20px; border-bottom: 1px solid var(--gold);
    }
    .nav-menu.active { display: flex; }
    .mobile-menu-btn { display: block; }
    .hero { background-attachment: scroll; } /* Disable Parallax on mobile for performance */

    /* Mobile dropdown must not inherit desktop hover transform/visibility logic */
    .dropdown { position: static; transform: none; border: none; box-shadow: none; display: none; opacity: 1; visibility: visible; }
    .nav-item:hover .dropdown { display: block; transform: none; }
}

/* --- 9. FRENCH SPECIFIC ADJUSTMENTS --- */

/* Enable hyphenation for French to prevent large gaps in long words */
html[lang="fr"] body {
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Accented characters in French can sometimes feel "cramped" 
   We slightly increase line-height for better legibility in French */
html[lang="fr"] .synopsis-text, 
html[lang="fr"] .detail-content p {
    line-height: 1.8;
}

/* Because French menu items (e.g., "La Bibliothèque") are longer, 
   we reduce the gap between menu items to prevent them from hitting the logo 
   on medium desktops. */
@media (min-width: 1025px) and (max-width: 1300px) {
    html[lang="fr"] .nav-menu {
        gap: 15px; /* Half of your default 30px */
    }
    
    html[lang="fr"] .nav-link {
        font-size: 0.85rem; /* Slightly smaller to fit the long words */
    }
}

/* Ensure the language switcher doesn't wrap on French mobile */
html[lang="fr"] .nav-item[style*="border-left"] {
    padding-left: 10px !important;
    gap: 5px !important;
}

/* French buttons like "Acheter le livre" can be very long. 
   We ensure they don't break the layout. */
html[lang="fr"] .btn-epic {
    white-space: nowrap;
    padding: 15px 25px; /* Slightly less side padding to compensate for length */
}
