/* ==========================================================
   Boito – WBCE CMS Template
   Elegantes Design im Stil des späten 19. Jahrhunderts
   ========================================================== */

/* Google Fonts werden in index.php eingebunden */

/* ----------------------------------------------------------
   1. CSS-Variablen & Reset
---------------------------------------------------------- */
:root {
  --ink:            #1a1208;
  --sepia:          #6b4c2a;
  --sepia-light:    #c9a96e;
  --parchment:      #f5eed8;
  --parchment-dark: #e8dbb8;
  --cream:          #fdf9f0;
  --red-accent:     #8b1a1a;
  --gold:           #b8860b;
  --gold-bright:    #d4a017;
  --gray-text:      #2e2416;
  --nav-height:     64px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  line-height: 1.75;
}

/* ----------------------------------------------------------
   2. Navigation
---------------------------------------------------------- */
#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-height);
  background: rgba(26, 18, 8, 0.97);
  border-bottom: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
}

#site-nav .nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sepia-light);
  text-decoration: none;
  white-space: nowrap;
}

/* show_menu2-generierte Navigation */
#site-nav ul {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}

#site-nav ul li a,
#site-nav ul li span {
  display: block;
  padding: 0 1.1rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--parchment);
  text-decoration: none;
  line-height: var(--nav-height);
  transition: color 0.25s;
}

#site-nav ul li a:hover,
#site-nav ul li.current_page a,
#site-nav ul li.active a {
  color: var(--gold-bright);
}

/* Dropdown */
#site-nav ul li { position: relative; }

#site-nav ul li ul {
  display: none;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  min-width: 200px;
  background: rgba(26, 18, 8, 0.97);
  border: 1px solid var(--gold);
  border-top: none;
  flex-direction: column;
  gap: 0;
}

#site-nav ul li:hover > ul { display: flex; }

#site-nav ul li ul li a {
  line-height: 1;
  padding: 0.8rem 1.2rem;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(184,134,11,0.15);
}

/* ----------------------------------------------------------
   3. Page header (unterhalb der fixen Nav)
---------------------------------------------------------- */
#page-header {
  margin-top: var(--nav-height);
  background: var(--ink);
  padding: 4rem 3rem 3.5rem;
  border-bottom: 2px solid var(--gold);
  position: relative;
  overflow: hidden;
}

/* dezente Linienstruktur im Hintergrund */
#page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 80px,
    rgba(184, 134, 11, 0.04) 80px,
    rgba(184, 134, 11, 0.04) 81px
  );
  pointer-events: none;
}

#page-header .page-eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 0.8rem;
}

#page-header h1.page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--parchment);
  position: relative;
}

#page-header h1.page-title em {
  font-style: italic;
  color: var(--sepia-light);
}

#page-header .page-subtitle {
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(245, 238, 216, 0.72);
  border-left: 2px solid var(--gold);
  padding-left: 1.2rem;
  max-width: 600px;
}

/* ----------------------------------------------------------
   4. Layout-Wrapper
---------------------------------------------------------- */
#wrapper {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 3rem;
}

/* ----------------------------------------------------------
   5. Hauptbereich (zweispaltig mit optionaler Sidebar)
---------------------------------------------------------- */
#content-area {
  display: grid;
  grid-template-columns: 1fr;   /* Standardmäßig einspaltig */
  gap: 3rem;
  padding: 4rem 0;
}

/* Wenn Sidebar aktiv: zweispaltig */
#content-area.has-sidebar {
  grid-template-columns: 1fr 320px;
}

/* ----------------------------------------------------------
   6. Hauptinhalt
---------------------------------------------------------- */
#main-content {
  min-width: 0;   /* verhindert Overflow in Grid */
}

/* Typografie im Inhaltsbereich */
#main-content h1,
#main-content h2,
#main-content h3,
#main-content h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

#main-content h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
#main-content h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--parchment-dark);
}
#main-content h3 { font-size: 1.3rem; }
#main-content h4 { font-size: 1.1rem; font-weight: 400; font-style: italic; }

#main-content p {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--gray-text);
  margin-bottom: 1.4rem;
  line-height: 1.85;
}

/* Initialbuchstabe beim ersten Absatz */
#main-content > p:first-of-type::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 700;
  line-height: 0.7;
  float: left;
  margin: 0.05em 0.12em 0 0;
  color: var(--red-accent);
}

#main-content a {
  color: var(--sepia);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
  transition: color 0.2s;
}
#main-content a:hover { color: var(--gold-bright); }

#main-content ul,
#main-content ol {
  margin: 0 0 1.4rem 1.5rem;
  color: var(--gray-text);
  font-weight: 400;
}
#main-content ul li,
#main-content ol li { margin-bottom: 0.4rem; }

#main-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-left: 3px solid var(--gold);
  background: var(--parchment);
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--sepia);
  line-height: 1.7;
}

#main-content img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  border: 1px solid var(--sepia-light);
  padding: 6px;
  margin: 1.5rem 0;
}

#main-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
#main-content th {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sepia);
  border-bottom: 2px solid var(--gold);
  padding: 0.6rem 0.8rem;
  text-align: left;
}
#main-content td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--parchment-dark);
  color: var(--gray-text);
  font-weight: 400;
}
#main-content tr:hover td { background: var(--parchment); }

#main-content hr {
  border: none;
  border-top: 1px solid var(--parchment-dark);
  margin: 2.5rem 0;
}

/* Ornament-Trennlinie: wird von CKEditor als HTML eingefügt */
.ornament {
  text-align: center;
  color: var(--gold);
  font-size: 1.6rem;
  letter-spacing: 0.6rem;
  margin: 2rem 0;
  opacity: 0.7;
}

/* ----------------------------------------------------------
   7. Sidebar
---------------------------------------------------------- */
#sidebar {
  min-width: 0;
}

.sidebar-widget {
  background: var(--parchment);
  border: 1px solid var(--parchment-dark);
  padding: 1.8rem;
  margin-bottom: 2rem;
  position: relative;
}

.sidebar-widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--gold);
}

.sidebar-widget h3 {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sepia);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--parchment-dark);
}

.sidebar-widget p,
.sidebar-widget li {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--gray-text);
  line-height: 1.65;
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-widget ul li {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(232,219,184,0.6);
}
.sidebar-widget ul li:last-child { border-bottom: none; }

.sidebar-widget a {
  color: var(--sepia);
  text-decoration: none;
  transition: color 0.2s;
}
.sidebar-widget a:hover { color: var(--gold-bright); }

/* ----------------------------------------------------------
   8. Trennband / dunkle Sektion
---------------------------------------------------------- */
.dark-section {
  background: var(--ink);
  padding: 4rem 3rem;
  margin: 2rem -3rem;
  position: relative;
}

.dark-section blockquote {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1.6rem;
  line-height: 1.7;
  color: var(--parchment);
  border: none;
  background: transparent;
  padding: 0;
}

.dark-section .quote-author {
  display: block;
  margin-top: 1.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--sepia-light);
}

/* ----------------------------------------------------------
   9. Footer
---------------------------------------------------------- */
#site-footer {
  background: #0a0804;
  border-top: 1px solid rgba(184, 134, 11, 0.3);
  padding: 2.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

#site-footer .footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--sepia-light);
}

#site-footer .footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
#site-footer .footer-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  color: rgba(201, 169, 110);
  text-decoration: none;
  padding: 0 0.8rem;
  border-right: 1px solid rgba(184, 134, 11, 0.2);
  transition: color 0.2s;
}
#site-footer .footer-nav li:last-child a { border-right: none; }
#site-footer .footer-nav a:hover { color: var(--sepia-light); }

#site-footer .footer-info {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(201, 169, 110);
  text-align: right;
  line-height: 1.9;
}

/* ----------------------------------------------------------
   10. Scroll-Reveal-Animation
---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ----------------------------------------------------------
   11. Utility-Klassen (für Redakteure im CKEditor nutzbar)
---------------------------------------------------------- */
.text-center { text-align: center; }
.text-sepia   { color: var(--sepia); }
.text-gold    { color: var(--gold); }
.lead {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--sepia);
  border-left: 2px solid var(--gold);
  padding-left: 1.2rem;
  margin-bottom: 1.8rem;
}
.fact-box {
  background: var(--parchment);
  border: 1px solid var(--parchment-dark);
  border-left: 3px solid var(--gold);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.4rem;
  font-size: 0.98rem;
}
.fact-label {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sepia);
  display: block;
  margin-bottom: 0.2rem;
}

/* ----------------------------------------------------------
   12. Hamburger-Button
---------------------------------------------------------- */
#nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid rgba(184, 134, 11, 0.4);
  border-radius: 3px;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}

#nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--sepia-light);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}

/* Animiertes X beim Öffnen */
#site-nav.is-open #nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#site-nav.is-open #nav-toggle span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#site-nav.is-open #nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----------------------------------------------------------
   13. Responsive
---------------------------------------------------------- */
@media (max-width: 900px) {
  #content-area.has-sidebar {
    grid-template-columns: 1fr;
  }
  #wrapper      { padding: 0 1.5rem; }
  #page-header  { padding: 3rem 1.5rem 2.5rem; }
  #site-footer  { padding: 2rem 1.5rem; flex-direction: column; align-items: flex-start; }
  #site-footer .footer-info { text-align: left; }

  #site-nav {
    padding: 0 1.5rem;
    flex-wrap: wrap;
    height: auto;
    min-height: var(--nav-height);
    align-items: center;
  }

  #nav-toggle { display: flex; }

  /* Menü standardmäßig ausgeblendet */
  #site-nav > ul {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(184, 134, 11, 0.25);
    padding: 0.5rem 0 1rem;
  }

  /* Menü sichtbar wenn nav .is-open */
  #site-nav.is-open > ul { display: flex; }

  #site-nav ul li a,
  #site-nav ul li span {
    line-height: 1;
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    display: block;
  }

  /* Dropdown-Untermenü immer eingerückt anzeigen */
  #site-nav ul li ul {
    display: flex !important;
    position: static;
    border: none;
    background: transparent;
    flex-direction: column;
    padding-left: 1.2rem;
    border-left: 1px solid rgba(184, 134, 11, 0.2);
    margin: 0 0 0.25rem 0.5rem;
  }

  #site-nav ul li ul li a {
    font-size: 0.82rem;
    padding: 0.5rem 0.5rem;
    border-bottom: none;
    color: rgba(245, 238, 216, 0.65);
  }
}

@media (max-width: 640px) {
  #page-header h1.page-title { font-size: 2rem; }
  #site-footer .footer-nav ul { flex-direction: column; }
  #site-footer .footer-nav a  { border-right: none; padding: 0.2rem 0; }
}
