/* ================================================
   PERSÖNLICHE HOMEPAGE – Hauptstylesheet
   ================================================ */

/* ---------- Light Mode ---------- */
:root {
  --color-bg-page:      #e8ecf4;
  --color-bg-content:   #ffffff;
  --color-border-nav:   #d0d8ea;
  --color-text:         #1a2340;
  --color-footer-bg:    #dde3f0;
  --color-footer-text:  #4a5670;
  --color-link:         #2a4a80;
  --color-link-hover:   #1a3060;
  --color-h1-border:    #c8d2e8;
  --header-gradient:    linear-gradient(to right, #2a4a80, #3d6ab5);
  --header-text:        #ffffff;
  --header-text-muted:  rgba(255,255,255,0.78);
  --header-active-line: #ffffff;
  --toggle-bg:          rgba(255,255,255,0.18);
  --toggle-border:      rgba(255,255,255,0.45);
}

/* ---------- Dark Mode (System) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg-page:      #151b2e;
    --color-bg-content:   #1e2640;
    --color-border-nav:   #2d3a58;
    --color-text:         #dde4f4;
    --color-footer-bg:    #131929;
    --color-footer-text:  #7a8aaa;
    --color-link:         #7aa0e0;
    --color-link-hover:   #a0bfed;
    --color-h1-border:    #2d3a58;
    --header-gradient:    linear-gradient(to right, #1a2f55, #2a4a80);
    --header-text:        #e8eef8;
    --header-text-muted:  rgba(220,232,255,0.70);
    --header-active-line: #e8eef8;
    --toggle-bg:          rgba(255,255,255,0.10);
    --toggle-border:      rgba(255,255,255,0.22);
  }
}

/* ---------- Manuell: Dark ---------- */
:root[data-theme="dark"] {
  --color-bg-page:      #151b2e;
  --color-bg-content:   #1e2640;
  --color-border-nav:   #2d3a58;
  --color-text:         #dde4f4;
  --color-footer-bg:    #131929;
  --color-footer-text:  #7a8aaa;
  --color-link:         #7aa0e0;
  --color-link-hover:   #a0bfed;
  --color-h1-border:    #2d3a58;
  --header-gradient:    linear-gradient(to right, #1a2f55, #2a4a80);
  --header-text:        #e8eef8;
  --header-text-muted:  rgba(220,232,255,0.70);
  --header-active-line: #e8eef8;
  --toggle-bg:          rgba(255,255,255,0.10);
  --toggle-border:      rgba(255,255,255,0.22);
}

/* ---------- Manuell: Light ---------- */
:root[data-theme="light"] {
  --color-bg-page:      #e8ecf4;
  --color-bg-content:   #ffffff;
  --color-border-nav:   #d0d8ea;
  --color-text:         #1a2340;
  --color-footer-bg:    #dde3f0;
  --color-footer-text:  #4a5670;
  --color-link:         #2a4a80;
  --color-link-hover:   #1a3060;
  --color-h1-border:    #c8d2e8;
  --header-gradient:    linear-gradient(to right, #2a4a80, #3d6ab5);
  --header-text:        #ffffff;
  --header-text-muted:  rgba(255,255,255,0.78);
  --header-active-line: #ffffff;
  --toggle-bg:          rgba(255,255,255,0.18);
  --toggle-border:      rgba(255,255,255,0.45);
}

/* ---------- Reset & Basis ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.75;
  background: var(--color-bg-page);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.25s, color 0.25s;
}

a { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--color-link-hover); text-decoration: underline; }

/* ---------- Gesamtbreite ---------- */
.page-wrapper {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

/* ---------- KOMBINIERTER HEADER / NAV ---------- */
.site-header {
  width: 100%;
  background: var(--header-gradient);
  transition: background 0.25s;
  border-bottom: 2px solid rgba(255,255,255,0.25);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
  min-height: 70px;
  width: 100%;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 0;
}

.header-logo img {
  display: block;
  width: 136px;
  height: 62px;
}

/* Navigation: zentriert in der mittleren Spalte */
.site-nav {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.nav-list li {
  display: flex;
  align-items: stretch;
}

.nav-list li a {
  display: flex;
  align-items: center;
  padding: 0 15px;
  font-family: Georgia, serif;
  font-size: 0.90rem;
  color: var(--header-text-muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
  height: 70px;
}

.nav-list li a:hover {
  color: var(--header-text);
  background: rgba(255,255,255,0.10);
  text-decoration: none;
}

.nav-list li a.active {
  color: var(--header-text);
  border-bottom-color: rgba(255,255,255,0.70);
  font-weight: bold;
}

/* Toggle ganz rechts */
.theme-toggle {
  justify-self: end;
  align-self: center;
  background: var(--toggle-bg);
  border: 1.5px solid var(--toggle-border);
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--header-text);
  transition: background 0.2s;
  line-height: 1;
}
.theme-toggle:hover { background: rgba(255,255,255,0.28); }



/* Hamburger (nur mobil) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px; height: 20px;
  background: none; border: none;
  cursor: pointer; padding: 0;
  justify-self: end;
  align-self: center;
}
.nav-toggle span {
  display: block; height: 2px;
  background: var(--header-text);
  border-radius: 2px;
}

/* ---------- SEITENRAHMEN + INHALT ---------- */
.page-wrapper {
  padding: 0 20px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content-box {
  background: var(--color-bg-content);
  border-radius: 0 0 0 0;
  padding: 32px 36px;
  flex: 1;
  transition: background 0.25s;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--color-bg-content);
  border-radius: 0 0 12px 12px;
  padding: 6px 20px;
  text-align: center;
  font-size: 0.80rem;
  color: var(--color-footer-text);
  margin-bottom: 20px;
  transition: background 0.25s;
  border-top: 1px solid var(--color-border-nav);
}
.site-footer a { color: var(--color-footer-text); }
.site-footer a:hover { color: var(--color-link-hover); }

/* ---------- TYPOGRAFIE ---------- */
.content-box h1 {
  font-size: 1.6rem; font-weight: normal;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-h1-border);
  padding-bottom: 0.5rem;
}
.content-box h2 { font-size: 1.2rem; font-weight: bold; margin: 1.5rem 0 0.5rem; }
.content-box p  { margin-bottom: 1rem; }
.content-box ul, .content-box ol { padding-left: 1.4rem; margin-bottom: 1rem; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 700px) {
  .page-wrapper { padding: 0 10px 0; }
  .content-box  { padding: 18px 16px; }

  .header-inner {
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto auto;
    padding: 8px 14px;
    min-height: auto;
    gap: 0 8px;
  }

  .header-logo {
    grid-column: 1;
    grid-row: 1;
    padding: 4px 0;
  }

  .nav-toggle {
    display: flex;
    grid-column: 2;
    grid-row: 1;
  }

  .theme-toggle {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: none;
    justify-content: flex-start;
  }

  .site-nav.open { display: flex; }

  .nav-list {
    flex-direction: column;
    width: 100%;
    justify-content: flex-start;
    border-top: 1px solid rgba(255,255,255,0.20);
    padding: 4px 0;
  }

  .nav-list li a {
    height: auto;
    padding: 10px 14px;
    border-bottom: none;
    border-left: 3px solid transparent;
    white-space: normal;
  }

  .nav-list li a.active {
    border-left-color: rgba(255,255,255,0.70);
    border-bottom: none;
  }
}

/* ---- Bilder mit Ausblendeffekt (verwendbar auf allen Seiten) ---- */
.img-fade-right {
  float: right;
  margin: 0 0 1rem 1.5rem;
  width: 200px;
}

.img-fade-right img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  -webkit-mask-image: radial-gradient(
    ellipse 115% 115% at 50% 68%, black 60%, transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 115% 115% at 50% 68%, black 60%, transparent 100%
  );
}

.img-fade-left {
  float: left;
  margin: 0 1.5rem 1rem 0;
  width: 200px;
}

.img-fade-left img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  -webkit-mask-image: radial-gradient(
    ellipse 105% 105% at 50% 50%, black 50%, transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 105% 105% at 50% 50%, black 50%, transparent 100%
  );
}


/* ---- Fotogalerie ---- */
.foto-galerie {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 1.5rem 0;
}

.foto-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: var(--color-border-nav);
}

.foto-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s, opacity 0.2s;
}

.foto-thumb:hover img {
  transform: scale(1.05);
  opacity: 0.88;
}

/* ---- Lightbox ---- */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#lightbox.aktiv {
  display: flex;
}

#lb-inhalt {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lb-bild {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

#lb-name {
  color: rgba(255,255,255,0.70);
  font-size: 0.85rem;
  margin-top: 10px;
  text-align: center;
  font-family: Georgia, serif;
}

#lb-prev, #lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 1.6rem;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
  z-index: 1001;
}

#lb-prev { left: 16px; }
#lb-next { right: 16px; }
#lb-prev:hover, #lb-next:hover { background: rgba(255,255,255,0.25); }

#lb-close {
  position: fixed;
  top: 14px;
  right: 18px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  padding: 6px 11px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
  z-index: 1001;
}
#lb-close:hover { background: rgba(255,255,255,0.25); }

@media (max-width: 640px) {
  .foto-galerie { grid-template-columns: repeat(2, 1fr); }
  #lb-prev { left: 6px; padding: 10px 12px; }
  #lb-next { right: 6px; padding: 10px 12px; }
}