/* ==========================================
   Jennerjahn Theme – theme.css
   Hauptstylesheet ohne @import (Schriften kommen aus fonts.css).
   ========================================== */

:root {
    /* Basisfarbe für den Body / allgemeine Hintergründe (alter Originalwert) */
    --bg-creme:       #f7f5f0;
    --bg-surface:     #ffffff;
    /* Neuer Grauton speziell und ausschließlich für die Textflächen der Unterseiten */
    --bg-text-panel:  #f2efe9;
    --bg-gray-panel:  #d8d5ce; /* Monochromes Grau für leere/Buchcover-Bildflächen */
    --text-main:      #1c1b18;
    --text-muted:     #5c5852;
    --text-light:     #8c8780;
    --border-color:   #e2ddd3;
    --border-light:   #eae5dc;

    --font-serif:   'EB Garamond',      Garamond,  Georgia, serif;
    --font-sans:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Montserrat',        -apple-system, BlinkMacSystemFont, sans-serif;

    --header-height:    58px;
    --transition-smooth: all 0.2s ease-out;

    /* Steuerbarer Bildausschnitt für das Startseiten-Titelfoto */
    --hero-object-position: center center;

    /* Hauptüberschriften (Seitentitel / Unterseiten) */
    --page-title-size:   clamp(1.75rem, 4vw, 2.15rem);
    --page-title-weight: 700;

    /* Website-Titel im Header-Balken (Faktor 1,2: 1.24rem * 1.2 = 1.488rem -> 1.49rem, fett) */
    --site-title-size:   1.49rem;
    --site-title-weight: 700;

    /* Bildposition für das linke Foto auf „leben" (vertikal mittig) */
    --leben-image-pos-y: center;
}

/* =====================
   RESET
   ===================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-creme);
    color:            var(--text-main);
    font-family:      var(--font-serif);
    font-size:        1.12rem;
    line-height:      1.8;
    -webkit-font-smoothing: antialiased;
}

a {
    color:           var(--text-main);
    text-decoration: none;
    transition:      var(--transition-smooth);
    border-bottom:   1px solid var(--border-color);
}

a:hover,
a:focus {
    color:              var(--text-muted);
    border-bottom-color: var(--text-main);
    outline:            none;
}

a:focus-visible {
    outline:        2px solid var(--text-main);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height:    auto;
    display:   block;
}

/* =====================
   TOP HEADER BAR (Sticky / Fixed)
   ===================== */
.top-header {
    position:         fixed;
    top:              0;
    left:             0;
    width:            100%;
    height:           var(--header-height);
    background-color: var(--bg-surface);
    border-bottom:    1px solid var(--border-light);
    display:          flex;
    align-items:      center;
    justify-content:  space-between;
    padding:          0 2.2rem;
    z-index:          1000;
}

/* Berücksichtigung der eingeloggten WordPress-Admin-Bar */
body.admin-bar .top-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .top-header {
        top: 46px;
    }
}

/* "Paul Jennerjahn" links im Balken – fett und etwas größer */
.top-header .site-title {
    font-family:    var(--font-sans);
    font-size:      var(--site-title-size);
    font-weight:    var(--site-title-weight);
    letter-spacing: 0.04em;
    text-transform: lowercase;
    white-space:    nowrap;
}

.top-header .site-title a {
    border-bottom: none;
    color:         var(--text-main);
}

/* Navigation */
.top-header .main-nav ul {
    display:     flex;
    list-style:  none;
    gap:         1.8rem;
    padding:     0;
    margin:      0;
    align-items: center;
}

.top-header .main-nav a {
    font-family:    var(--font-sans);
    font-size:      0.82rem;
    font-weight:    400;
    letter-spacing: 0.06em;
    color:          var(--text-muted);
    border-bottom:  1px solid transparent;
    padding-bottom: 2px;
}

/* Aktiver Menüpunkt */
.top-header .main-nav a:hover,
.top-header .main-nav a.active,
.top-header .main-nav .current-menu-item > a,
.top-header .main-nav .current-menu-ancestor > a,
.top-header .main-nav .current-page-ancestor > a {
    color:              var(--text-main);
    border-bottom-color: var(--text-main);
}

/* Mobile Hamburger-Button */
.nav-toggle {
    display:          none;
    flex-direction:   column;
    gap:              5px;
    background:       none;
    border:           none;
    cursor:           pointer;
    padding:          0.2rem;
}

.nav-toggle span {
    width:            20px;
    height:           1px;
    background-color: var(--text-main);
    display:          block;
}

/* =====================
   STARTSEITE: GANZSEITIGES TITELFOTO
   ===================== */
.hero-fullscreen {
    position:            fixed;
    top:                 var(--header-height);
    left:                0;
    width:               100%;
    /* Höhe mit 100svh und Fallback auf 100vh */
    height:              calc(100vh - var(--header-height));
    height:              calc(100svh - var(--header-height));
    background-size:     cover;
    background-position: var(--hero-object-position);
    background-repeat:   no-repeat;
    z-index:             1;
}

body.admin-bar .hero-fullscreen {
    top: calc(var(--header-height) + 32px);
    height: calc(100vh - var(--header-height) - 32px);
    height: calc(100svh - var(--header-height) - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .hero-fullscreen {
        top: calc(var(--header-height) + 46px);
        height: calc(100vh - var(--header-height) - 46px);
        height: calc(100svh - var(--header-height) - 46px);
    }
}

/* =====================
   SPLIT LAYOUT (Unterseiten)
   ===================== */
.site-wrapper {
    display:     flex;
    min-height:  100vh;
    padding-top: var(--header-height);
}

body.admin-bar .site-wrapper {
    padding-top: calc(var(--header-height) + 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-wrapper {
        padding-top: calc(var(--header-height) + 46px);
    }
}

/* Linkes fixiertes Bild-Panel */
.split-left {
    width:               45%;
    height:              calc(100vh - var(--header-height));
    height:              calc(100svh - var(--header-height));
    position:            fixed;
    top:                 var(--header-height);
    left:                0;
    background-size:     cover;
    background-position: center 20%;
    background-color:    var(--bg-gray-panel);
    z-index:             1;
}

body.admin-bar .split-left {
    top: calc(var(--header-height) + 32px);
    height: calc(100vh - var(--header-height) - 32px);
    height: calc(100svh - var(--header-height) - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .split-left {
        top: calc(var(--header-height) + 46px);
        height: calc(100vh - var(--header-height) - 46px);
        height: calc(100svh - var(--header-height) - 46px);
    }
}

/* Buchseite mit Cover: Vollständig sichtbar & zentriert auf Grau */
.split-left--contain {
    background-size:     contain !important;
    background-repeat:   no-repeat !important;
    background-position: center center !important;
    background-color:    var(--bg-gray-panel) !important;
}

/* Rechtes scrollbares Panel (nutzt die neue Variable --bg-text-panel) */
.split-right {
    margin-left:      45%;
    width:            55%;
    min-height:       calc(100vh - var(--header-height));
    min-height:       calc(100svh - var(--header-height));
    background-color: var(--bg-text-panel);
    padding:          3.5rem 4.5rem 5rem 4.5rem;
    box-shadow:       -15px 0 35px rgba(0, 0, 0, 0.03);
    z-index:          2;
    display:          flex;
    flex-direction:   column;
}

/* =====================
   CONTENT AREA
   ===================== */
.content-area {
    flex: 1;
}

/* =====================
   SEITENTITEL
   ===================== */
.page-title {
    font-family:   var(--font-serif);
    font-size:     var(--page-title-size);
    font-weight:   var(--page-title-weight);
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
    word-break:    break-word;
}

/* =====================
   FLIESSTEXT
   ===================== */
p {
    margin-bottom: 1.5rem;
}

p.lead {
    font-size:     1.15rem;
    line-height:   1.75;
    color:         var(--text-muted);
    margin-bottom: 2rem;
}

/* =====================
   ENTRY CONTENT (Gutenberg)
   ===================== */
.entry-content h2 {
    font-size:     1.8rem;
    font-weight:   400;
    margin-top:    2.5rem;
    margin-bottom: 1rem;
}

.entry-content h3 {
    font-size:     1.35rem;
    font-weight:   500;
    margin-top:    2rem;
    margin-bottom: 0.8rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left:  2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

/* BLOCKSTIL: Notizen (enger Abstand) für den Gruppen-Block */
.wp-block-group.is-style-notizen-eng p {
    margin-bottom: 0.45rem;
    line-height:   1.6;
}

/* =====================
   QUOTE-BOX (Zitat-Stil)
   ===================== */
.quote-box,
blockquote.is-style-zitat-box {
    margin:         2.5rem 0;
    padding-left:   1.5rem;
    border-left:    2px solid var(--border-color);
    font-style:     italic;
    color:          var(--text-muted);
}

.quote-box cite,
blockquote.is-style-zitat-box cite {
    display:        block;
    margin-top:     0.8rem;
    font-style:     normal;
    font-family:    var(--font-sans);
    font-size:      0.82rem;
    letter-spacing: 0.04em;
    color:          var(--text-light);
}

/* =====================
   TERMINE / EVENT-CARD
   ===================== */
.event-card {
    border-bottom:  1px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom:  2.5rem;
}

.event-card:last-child {
    border-bottom:  none;
    margin-bottom:  0;
    padding-bottom: 0;
}

.event-title {
    font-family:   var(--font-serif);
    font-size:     1.4rem;
    font-weight:   400;
    margin-bottom: 1rem;
    line-height:   1.35;
}

.event-title a {
    border-bottom: none;
}

.event-title a:hover {
    color: var(--text-muted);
}

.event-meta-info {
    font-family:    var(--font-sans);
    font-size:      0.88rem;
    color:          var(--text-muted);
    line-height:    1.6;
}

/* =====================
   BLOG / NEWS-LIST
   ===================== */
.news-list {
    display:        flex;
    flex-direction: column;
    gap:            2.5rem;
}

.news-item {
    border-bottom:  1px solid var(--border-color);
    padding-bottom: 2rem;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item-date {
    font-family:    var(--font-sans);
    font-size:      0.78rem;
    font-weight:    400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color:          var(--text-light);
    margin-bottom:  0.4rem;
}

.news-item-title {
    font-family:    var(--font-serif);
    font-size:      1.4rem;
    font-weight:    400;
    margin-bottom:  0.8rem;
    line-height:    1.35;
}

.news-item-title a {
    border-bottom: none;
}

.news-item-link {
    display:        inline-block;
    margin-top:     0.8rem;
    font-family:    var(--font-sans);
    font-size:      0.82rem;
    letter-spacing: 0.04em;
    color:          var(--text-muted);
}

/* =====================
   FOOTER
   ===================== */
footer.site-footer {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    flex-wrap:       wrap;
    gap:             1rem;
    margin-top:      5rem;
    padding-top:     2rem;
    border-top:      1px solid var(--border-color);
    font-family:     var(--font-sans);
    font-size:       0.78rem;
    color:           var(--text-light);
}

footer.site-footer a {
    color:         var(--text-muted);
    border-bottom: none;
}

footer.site-footer a:hover {
    color: var(--text-main);
}

footer.site-footer ul {
    list-style:  none;
    display:     flex;
    gap:         1rem;
    flex-wrap:   wrap;
    padding:     0;
    margin:      0;
}

/* Screenreader Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* =====================
   LEBEN-SEITE: Autorenfoto vertikal mittig (oben & unten gleich viel beschnitten)
   ===================== */
.page-leben .split-left,
.split-left--leben {
    background-position: center center;
    background-position: center var(--leben-image-pos-y, center);
}

/* =====================
   BLOG „tag und farbe": Vollansicht aller Beiträge
   ===================== */
.blog-entry {
    border-bottom:     1px solid var(--border-color);
    padding-bottom:    2.5rem;
    margin-bottom:     3rem;
    scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

body.admin-bar .blog-entry {
    scroll-margin-top: calc(var(--header-height) + 32px + 1.5rem);
}

@media screen and (max-width: 782px) {
    body.admin-bar .blog-entry {
        scroll-margin-top: calc(var(--header-height) + 46px + 1.5rem);
    }
}

.blog-entry:last-child {
    border-bottom:  none;
    margin-bottom:  0;
    padding-bottom: 0;
}

.blog-entry-header {
    margin-bottom: 1.2rem;
}

.blog-entry-date {
    font-family:    var(--font-sans);
    font-size:      0.78rem;
    font-weight:    400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color:          var(--text-light);
    margin-bottom:  0.3rem;
}

.blog-entry-title {
    font-family:   var(--font-serif);
    font-size:     1.4rem;
    font-weight:   400;
    line-height:   1.35;
    margin-bottom: 0;
}

/* =====================
   RESPONSIVE – Mobile & Kleine Bildschirme (<= 960px)
   ===================== */
@media (max-width: 960px) {
    .nav-toggle {
        display: none !important;
    }

    .top-header {
        padding: 0 1.2rem;
    }

    .top-header .main-nav {
        display:    block;
        position:   static;
        background: transparent;
        border:     none;
        padding:    0;
    }

    .top-header .main-nav ul {
        display:        flex;
        flex-direction: row;
        align-items:    center;
        gap:            1.2rem;
    }

    .top-header .main-nav a {
        font-size: 0.82rem;
    }

    .site-wrapper {
        flex-direction: column;
    }

    .split-left {
        position: relative;
        top:      0;
        width:    100%;
        height:   45vh;
        height:   45svh;
    }

    .split-right {
        margin-left: 0;
        width:       100%;
        padding:     2.5rem 1.5rem 4rem 1.5rem;
        box-shadow:  none;
        min-height:  auto;
    }

    .page-title {
        font-size: clamp(1.6rem, 5vw, 1.85rem);
    }
}

/* Handy-Bildschirme (<= 768px, inkl. 360px & 390px):
   Name oben, alle 5 Menüpunkte nebeneinander in 2. Zeile darunter */
@media (max-width: 768px) {
    :root {
        --header-height:   78px;
        --site-title-size: 1.32rem; /* 1.1rem * 1.2 = 1.32rem, fett */
    }

    .top-header {
        height:          var(--header-height);
        flex-direction:  column;
        justify-content: center;
        align-items:     flex-start;
        padding:         0.55rem 1rem;
        gap:             0.35rem;
    }

    .top-header .site-title {
        font-size:   var(--site-title-size);
        font-weight: var(--site-title-weight);
        line-height: 1.2;
    }

    .top-header .main-nav {
        width: 100%;
    }

    .top-header .main-nav ul {
        display:         flex;
        flex-direction:  row;
        justify-content: space-between;
        align-items:     center;
        width:           100%;
        gap:             0.25rem;
        padding:         0;
        margin:          0;
    }

    .top-header .main-nav a {
        font-size:      clamp(0.72rem, 2.5vw, 0.78rem);
        letter-spacing: 0.02em;
        white-space:    nowrap;
        padding:        2px 0;
    }
}
