/*
Theme Name: Die Chroniken von Eldoria
Author: Buskerberg
Description: Ein Fantasy-Theme für Geschichtenerzähler und Abenteurer.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* --- GRUNDLEGENDE VARIABLEN & RESET --- */
:root {
    --bg-parchment: #f3e5ab;
    --bg-dark: #2c241b;
    --text-dark: #3e2723;
    --accent-gold: #d4af37;
    --accent-red: #8a0303;
    --border-style: 3px double #5d4037;
}

* { box-sizing: border-box; }

body {
    font-family: 'Crimson Text', serif;
    margin: 0;
    line-height: 1.6;
    font-size: 18px;
    color: var(--text-dark);
    background-color: var(--bg-parchment);
    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E"),
        radial-gradient(circle at center, transparent 50%, rgba(44, 36, 27, 0.2) 100%);
    background-repeat: repeat, no-repeat;
    background-size: 150px 150px, cover;
    background-attachment: scroll, fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    color: #2b1d0e;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent-red);
    transition: color 0.3s ease;
}

a:hover { color: var(--accent-red); }

/* --- HEADER & NAVIGATION --- */
header#masthead {
    background-color: var(--bg-dark);
    color: var(--accent-gold);
    padding: 2rem 0;
    text-align: center;
    border-bottom: 5px solid var(--accent-gold);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.site-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 0px #000;
}
.site-title a {
    color: var(--accent-gold);
    border: none;
    /* Schatten: Horizontal, Vertikal, Weichzeichnung, Farbe */
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.8); 
    text-decoration: none;
}

.site-description {
    font-family: 'Crimson Text', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: #bcaaa4;
}

nav#site-navigation {
    background-color: #3e2723;
    padding: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #5d4037;
}

nav#site-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

nav#site-navigation a {
    color: var(--bg-parchment);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    border: none;
    font-size: 1.1rem;
}

nav#site-navigation a:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 5px var(--accent-gold);
}

/* --- LAYOUT --- */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* --- CONTENT --- */
main article {
    background: rgba(255, 255, 255, 0.4);
    border: var(--border-style);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.1);
    position: relative;
}

main article::before, main article::after {
    content: "✥";
    position: absolute;
    color: var(--accent-red);
    font-size: 1.5rem;
}
main article::before { top: 5px; left: 10px; }
main article::after { bottom: 5px; right: 10px; }

.post-meta {
    font-size: 0.9rem;
    color: #6d4c41;
    margin-bottom: 1rem;
    font-style: italic;
    border-bottom: 1px solid #a1887f;
    padding-bottom: 0.5rem;
}

.read-more-btn {
    display: inline-block;
    background-color: var(--accent-red);
    color: #fff;
    padding: 0.5rem 1rem;
    font-family: 'Cinzel', serif;
    border: 2px solid #5d0000;
    margin-top: 1rem;
    border-radius: 3px;
    transition: background 0.3s;
}

.read-more-btn:hover { background-color: #5d0000; color: #fff; border-bottom: 2px solid #5d0000;}

/* --- SIDEBAR & WIDGETS --- */
.widget {
    background: #e6d5a7;
    border: 1px solid #8d6e63;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
}

.widget-title {
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.widget ul { list-style: none; padding: 0; }
.widget ul li {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #bcaaa4;
}
.widget ul li::before { content: "⚔ "; color: var(--accent-red); font-size: 0.8rem; }

/* WP Search Input Fix */
.widget input[type="search"], .widget input[type="text"] {
    width: 100%;
    padding: 10px;
    background: #fff8e1;
    border: 2px solid #5d4037;
    font-family: 'Crimson Text', serif;
}

/* --- FOOTER --- */
footer#colophon {
    background-color: var(--bg-dark);
    color: #d7ccc8;
    padding: 3rem 0 1rem 0;
    border-top: 5px solid var(--accent-gold);
    margin-top: 3rem;
}

.footer-widgets {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0 1rem;
}

.footer-widgets .widget {
    background: transparent; border: none; box-shadow: none; padding: 0; color: #d7ccc8;
}
.footer-widgets .widget-title { color: var(--accent-gold); border-color: var(--accent-gold); }
.footer-widgets a { color: #d7ccc8; border-bottom: 1px dotted #8d6e63; }
.footer-widgets ul li { border-color: #4e342e; }

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #4e342e;
    font-size: 0.9rem;
    font-family: 'Cinzel', serif;
}

/* Responsive */
@media (max-width: 768px) {
    .container, .footer-widgets { grid-template-columns: 1fr; }
    nav#site-navigation ul { flex-direction: column; align-items: center; gap: 1rem; }
}

/* --- ZUSATZ: KOMMENTARE & FORMULARE --- */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #a1887f;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-list li {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid #bcaaa4;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 3px;
}

.comment-author cite {
    font-style: normal;
    font-weight: bold;
    font-family: 'Cinzel', serif;
    color: var(--accent-red);
}

.comment-metadata {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.comment-metadata a {
    color: #6d4c41;
    border: none;
}

/* Kommentar Formular Felder */
.comment-form label {
    display: block;
    margin-bottom: 0.2rem;
    font-weight: bold;
    color: var(--text-dark);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px;
    background: #fff8e1; /* Pergament-Heller */
    border: 2px solid #5d4037;
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.comment-form input[type="submit"] {
    background-color: var(--accent-red);
    color: #fff;
    padding: 0.8rem 1.5rem;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    border: 2px solid #5d0000;
    cursor: pointer;
    transition: background 0.3s;
}

.comment-form input[type="submit"]:hover {
    background-color: #5d0000;
}

/* Navigation zwischen Beiträgen (Single) */
.post-navigation {
    margin: 2rem 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.nav-links { width: 100%; display: flex; justify-content: space-between;}
.nav-subtitle { display: block; font-size: 0.8rem; color: #6d4c41; text-transform: uppercase;}
.nav-title { font-weight: bold; color: var(--accent-red); }

/* --- ZUSATZ: SUCHFORMULAR & LUPE --- */

/* Container für relative Positionierung */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%; /* Falls du es insgesamt schmaler willst: z.B. 250px */
}

/* Das Eingabefeld */
.widget input[type="search"].search-field, 
.widget input[type="text"].search-field {
    width: 100%;
    height: 40px; /* Etwas flacher/schmaler als vorher */
    padding: 5px 40px 5px 15px; /* Rechts Platz lassen für die Lupe */
    background: #fff8e1;
    border: 2px solid #5d4037;
    border-radius: 4px; /* Leicht abgerundet */
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    color: var(--text-dark);
}

/* Der neue Lupen-Button */
.search-submit {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px; /* Gleiche Höhe wie das Input-Feld */
    background: transparent; /* Kein Hintergrund */
    border: none;
    color: var(--text-dark); /* Dunkelbraune Lupe */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Hover-Effekt für die Lupe */
.search-submit:hover {
    color: var(--accent-red); /* Wird rot beim Drüberfahren */
    transform: scale(1.1);    /* Wird leicht größer */
    background: transparent;
}

/* Fokus-Zustand für das Input-Feld (optional für bessere Sichtbarkeit) */
.search-field:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 5px rgba(138, 3, 3, 0.2);
}

/* --- ZUSATZ: FOOTER NAVIGATION (Korrigiert) --- */
.footer-navigation {
    margin-top: 2rem;
    border-top: 1px solid #4e342e;
    padding-top: 1.5rem;
    text-align: center; /* Zentrierung für den Container */
}

.footer-menu {
    list-style: none !important; /* Erzwingt das Entfernen von Punkten */
    padding: 0;
    margin: 0;
    display: flex;       /* Macht die Liste horizontal */
    flex-wrap: wrap;     /* Erlaubt Umbruch auf Handys */
    justify-content: center; /* Zentriert die Items horizontal */
    align-items: center;
    gap: 2rem;           /* Abstand zwischen den Links */
}

.footer-menu li {
    display: inline-block; /* Sicherheitsnetz, falls flex mal hakt */
    margin: 0;
    position: relative;
}

/* Dekorative Punkte zwischen den Links (heller) */
.footer-menu li:not(:last-child)::after {
    content: "•";
    position: absolute;
    right: -1.2rem; /* Position genau mittig im Abstand */
    top: 50%;
    transform: translateY(-50%);
    color: #8d6e63; /* Mittelbraun für den Trenner */
}

.footer-menu a {
    color: #f3e5ab; /* HIER GEÄNDERT: Helles Pergament für bessere Lesbarkeit */
    font-family: 'Cinzel', serif;
    font-size: 1rem; /* Etwas größer */
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: none;
    transition: all 0.3s ease;
}

.footer-menu a:hover {
    color: #ffffff; /* Weiß beim Drüberfahren */
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.6); /* Leuchtender Gold-Schein */
}

/* --- ZUSATZ: HAUPTNAVIGATION DROPDOWNS (Unterseiten) --- */

/* 1. Eltern-Elemente vorbereiten */
nav#site-navigation ul li {
    position: relative; /* Wichtig, damit das Untermenü am Elternteil "klebt" */
}

/* 2. Das Untermenü (Standardmäßig versteckt) */
nav#site-navigation ul ul {
    display: none;       /* Unsichtbar */
    position: absolute;  /* Losgelöst vom normalen Textfluss */
    top: 100%;           /* Direkt unter dem Menüpunkt */
    left: 0;
    background-color: #3e2723; /* Dunkles Holz (wie die Hauptnavi) */
    min-width: 220px;    /* Mindestbreite, damit Text reinpasst */
    z-index: 9999;       /* Muss über dem Inhalt (Artikel) schweben */
    border: 1px solid #5d4037;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); /* Schatten für "Schwebe"-Effekt */
    
    /* Flex-Regeln der Hauptnavi überschreiben: */
    flex-direction: column; 
    gap: 0; 
}

/* 3. Anzeigen beim Drüberfahren (Hover) */
nav#site-navigation ul li:hover > ul {
    display: block; /* Jetzt sichtbar machen */
    animation: fadeIn 0.3s ease; /* Kleiner Einblend-Effekt */
}

/* 4. Styling der Unter-Links */
nav#site-navigation ul ul li {
    display: block;
    border-bottom: 1px solid #4e342e; /* Trennlinie zwischen Punkten */
    margin: 0;
}

nav#site-navigation ul ul li:last-child {
    border-bottom: none;
}

nav#site-navigation ul ul a {
    display: block;       /* Klickfläche über ganze Breite */
    padding: 10px 15px;
    font-size: 0.95rem;   /* Etwas kleiner als Hauptpunkte */
    text-transform: none; /* Groß/Kleinschreibung normal lassen (optional) */
    white-space: nowrap;  /* Verhindert Zeilenumbruch bei kurzen Titeln */
}

nav#site-navigation ul ul a:hover {
    background-color: rgba(212, 175, 55, 0.1); /* Sanftes Gold-Leuchten im Hintergrund */
}

/* Kleine Animation für das Einblenden */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- ZUSATZ: CUSTOM LOGO --- */
.custom-logo-link {
    display: inline-block; /* Wichtig für die Zentrierung */
	border: 0px solid red;
}

.custom-logo {
    max-height: 150px; /* Begrenzt die Höhe, damit der Header nicht explodiert */
    width: auto;       /* Behält das Seitenverhältnis bei */
    display: block;
    margin: 0 auto;    /* Zentriert das Bild */
}

/* --- ZUSATZ: LOGIN WIDGET STYLING --- */

/* Eingabefelder im Login */
#loginform p {
    margin-bottom: 0.8rem;
}

#loginform label {
    display: block;
    font-size: 0.9rem;
    font-weight: bold;
    color: #6d4c41;
}

#loginform input[type="text"],
#loginform input[type="password"] {
    width: 100%;
    padding: 8px;
    background: #fff8e1;
    border: 2px solid #5d4037;
    font-family: 'Crimson Text', serif;
    border-radius: 3px;
}

/* Der "Eintreten" Button */
#loginform input[type="submit"] {
    background-color: var(--bg-dark);
    color: var(--accent-gold);
    border: 1px solid var(--text-dark);
    padding: 0.5rem 1rem;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    width: 100%;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

#loginform input[type="submit"]:hover {
    background-color: var(--accent-red);
    color: #fff;
}

/* Avatar Bild rund machen */
.user-avatar img {
    border-radius: 50%;
    border: 3px double var(--accent-gold);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

/* --- ZUSATZ: CUSTOM LOGIN PAGE --- */

.eldoria-custom-login form {
    background: rgba(44, 36, 27, 0.05); /* Ganz leicht abgedunkelter Hintergrund */
    padding: 2rem;
    border: 1px solid #bcaaa4;
    border-radius: 4px;
}

.eldoria-custom-login label {
    display: block;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--accent-red);
    margin-bottom: 0.5rem;
}

.eldoria-custom-login input[type="text"],
.eldoria-custom-login input[type="password"] {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    background-color: #fff;
    border: 2px solid #5d4037;
    margin-bottom: 1.5rem;
    font-family: 'Crimson Text', serif;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1); /* Innerer Schatten für Tiefe */
}

.eldoria-custom-login input[type="text"]:focus,
.eldoria-custom-login input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Checkbox "Erinnern" */
.eldoria-custom-login .login-remember {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

/* Der Große Button */
.eldoria-custom-login input[type="submit"] {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    background-color: var(--accent-red);
    color: #fff;
    border: 3px double #3e0000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.eldoria-custom-login input[type="submit"]:hover {
    background-color: #5d0000;
    transform: scale(1.02);
}

/* --- ZUSATZ: FULLWIDTH FÜR AUTH-SEITEN --- */

/* 1. Das Raster (Grid) aufheben und Flexbox nutzen */
body.page-template-page-login .container,
body.page-template-page-register .container,
body.page-template-page-lostpassword .container {
    display: flex;           /* Flexbox statt Grid */
    justify-content: center; /* Alles mittig schieben */
    grid-template-columns: none; /* Raster löschen */
    max-width: 100%;         /* Container darf volle Breite nutzen */
}

/* 2. Den Hauptinhalt begrenzen, damit er nicht zu breit wird */
body.page-template-page-login main,
body.page-template-page-register main,
body.page-template-page-lostpassword main {
    width: 100%;
    max-width: 600px; /* Die Box soll schön kompakt und edel bleiben */
    margin: 0 auto;   /* Zentriert das main-Element sicherheitshalber */
}