* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #040608;
  color: #ffffff;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
      circle at 18% 78%,
      rgba(40, 120, 190, 0.10) 0%,
      transparent 22%
    ),
    radial-gradient(
      circle at 82% 18%,
      rgba(30, 95, 160, 0.08) 0%,
      transparent 20%
    ),
    linear-gradient(
      135deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(35, 105, 170, 0.035) 35%,
      rgba(0, 0, 0, 0) 55%
    ),
    linear-gradient(
      25deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(20, 85, 145, 0.03) 45%,
      rgba(0, 0, 0, 0) 70%
    );
}

/* =========================================
   HEADER – DREI GEDÄMPFTE FARBWELTEN
   Zwei begrenzte Lichtinseln, dunkle Mitte.
   Die Menüstruktur und Funktionen bleiben unverändert.
   ========================================= */

/* Portfolio und allgemeine Seiten */
body[data-page="portfolio"],
body[data-page="ueber-mich"],
body[data-page="kontakt"] {
  --header-base: #050c13;
  --header-light-left: rgba(13, 88, 129, .50);
  --header-light-right: rgba(10, 65, 102, .43);
  --header-accent: #89d7f1;
  --header-border-color: rgba(112, 194, 224, .46);
  --header-accent-glow: rgba(104, 202, 236, .45);
}

/* Portale und Portal-Unterseiten */
body[data-page="portale"] {
  --header-base: #0d0a13;
  --header-light-left: rgba(93, 35, 128, .52);
  --header-light-right: rgba(67, 35, 104, .46);
  --header-accent: #c888e9;
  --header-border-color: rgba(164, 107, 202, .46);
  --header-accent-glow: rgba(176, 96, 222, .42);
}

/* Genealogie und genealogische Unterseiten */
body[data-page="genealogie"] {
  --header-base: #100d0b;
  --header-light-left: rgba(113, 66, 35, .55);
  --header-light-right: rgba(93, 58, 35, .43);
  --header-accent: #e1bb8d;
  --header-border-color: rgba(204, 157, 103, .47);
  --header-accent-glow: rgba(221, 164, 98, .42);
}

.site-header {
  position: relative;
  z-index: 1000;
  overflow: visible;
  isolation: isolate;
  background-color: var(--header-base, #050c13);
  background-image:
    radial-gradient(ellipse 27% 180% at 24% 50%, var(--header-light-left, rgba(13, 88, 129, .50)) 0%, transparent 96%),
    radial-gradient(ellipse 29% 165% at 78% 60%, var(--header-light-right, rgba(10, 65, 102, .43)) 0%, transparent 96%);
  border-bottom: 1px solid var(--header-border-color, rgba(112, 194, 224, .46));
  backdrop-filter: blur(10px);
}

/* Schmale, ruhige Linie statt einer durchgehenden Leuchtkante */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 5%, var(--header-accent, #89d7f1) 25%, transparent 49%, var(--header-accent, #89d7f1) 77%, transparent 97%);
  opacity: .26;
}

/* Vorhandene Details farblich anpassen, ohne ihre Logik zu ändern */
.site-header .header-logo {
  text-shadow: 0 0 18px var(--header-accent-glow, rgba(104, 202, 236, .45));
}
.site-header .header-logo::after {
  background: linear-gradient(90deg, transparent, var(--header-accent, #89d7f1), transparent);
  opacity: .62;
}
.site-header .main-nav a.mega-trigger::after,
.site-header .main-nav a.mega-trigger:hover::after,
.site-header .main-nav a.mega-trigger.active::after,
.site-header .main-nav a.mega-trigger.mega-hovered::after {
  background: var(--header-accent, #89d7f1);
  box-shadow: 0 0 5px var(--header-accent-glow, rgba(104, 202, 236, .45)),
              0 0 12px var(--header-accent-glow, rgba(104, 202, 236, .45));
}

.header-inner {
  max-width: 1200px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 120px 1fr 180px;
  align-items: center;
  gap: 30px;
}

/* BR */

.header-logo {
  position: relative;
  color: #d9eaf2;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -2px;
  text-shadow: 0 0 18px rgba(111, 182, 217, 0.22);
}

.header-logo::after {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  width: 125px;
  height: 1px;
  background: linear-gradient(
      90deg,
      transparent,
      rgba(111, 182, 217, 0.65),
      transparent
    );
  transform: rotate(-12deg);
  pointer-events: none;
}

/* MENÜ */

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 38px;
}

.main-nav a {
  position: relative;
  padding: 26px 0 22px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  transition: color 0.25s ease,
    text-shadow 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #ffffff;
}

.main-nav a.active::after,
.main-nav a:hover::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 42px;
  height: 1px;
  background: #6fb6d9;
  box-shadow: 0 0 7px rgba(111, 182, 217, 0.75),
    0 0 14px rgba(111, 182, 217, 0.30);
  transform: translateX(-50%);
}

/* SOCIAL – gleiche Position auf allen Seiten */

.social-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  justify-self: end;
  gap: 13px;
  margin: 0;
  padding: 0;
}

.social-links a {
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  transition: transform .2s ease, opacity .2s ease;
}

.social-links img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.social-links a:hover {
  opacity: .75;
  transform: translateY(-2px);
}

.social-links a:focus-visible {
  outline: 2px solid var(--header-accent, #89d7f1);
  outline-offset: 4px;
  border-radius: 3px;
}

/* =========================================
   EINHEITLICHE MEGA-MENÜS – KATEGORIEFARBEN
   Gleiches Verhalten und Layout, eigene Farbwelt.
   ========================================= */

body[data-page="portfolio"],
body[data-page="kontakt"],
body[data-page="ueber-mich"] {
  --menu-hint: #8ba9ba;
}

body[data-page="portale"] {
  --menu-hint: #af92c5;
}

body[data-page="genealogie"] {
  --menu-hint: #c5aa8b;
}

#richwin-mega-menu {
  display: block;
  box-sizing: border-box;
  width: min(230px, calc(100vw - 24px));
  min-width: 0;
  max-width: calc(100vw - 24px);
  max-height: min(76vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 18px;
  border: 1px solid var(--header-border-color);
  border-radius: 0 0 12px 12px;
  background-color: var(--header-base);
  background-image:
    radial-gradient(ellipse at 15% 0%, var(--header-light-left), transparent 75%),
    radial-gradient(ellipse at 100% 100%, var(--header-light-right), transparent 85%);
  box-shadow: 0 20px 45px rgba(0,0,0,.55);
  scrollbar-width: thin;
  scrollbar-color: var(--header-border-color) transparent;
}

#richwin-mega-menu[data-menu="portale"] {
  width: min(265px, calc(100vw - 24px));
}
#richwin-mega-menu[data-menu="genealogie"] {
  width: min(315px, calc(100vw - 24px));
}
#richwin-mega-menu[data-menu="kontakt"] {
  width: min(245px, calc(100vw - 24px));
}

#richwin-mega-menu .mega-portfolio-column {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  gap: 0;
}

/* Die Kontakt-Links verhalten sich wie die Links unter Portfolio. */
#richwin-mega-menu .mega-link,
#richwin-mega-menu .mega-link:hover,
#richwin-mega-menu .mega-link:focus-visible {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#richwin-mega-menu .mega-link:hover,
#richwin-mega-menu .mega-link:focus-visible,
#richwin-mega-menu .mega-portfolio-title:hover,
#richwin-mega-menu .mega-portfolio-title:focus-visible {
  color: var(--header-accent);
}

#richwin-mega-menu .mega-link-icon {
  color: var(--header-accent);
}

#richwin-mega-menu .mega-portfolio-title {
  border-bottom-color: var(--header-border-color);
}

#richwin-mega-menu .mega-portfolio-group {
  border-top-color: var(--header-border-color);
}

#richwin-mega-menu .mega-portfolio-children {
  border-left-color: var(--header-border-color);
}

#richwin-mega-menu .mega-portfolio-hint {
  color: var(--menu-hint);
}

#richwin-mega-menu .mega-simple-link {
  padding: 13px 6px 8px;
}

@media (max-width: 480px) {
  #richwin-mega-menu {
    max-height: 70vh;
  }
}

/* INTRO */

.intro-section {
  background: linear-gradient(
      180deg,
      rgba(8, 10, 12, 0.88) 0%,
      rgba(8, 10, 12, 0.72) 100%
    );
}

.intro-inner {
  max-width: 1200px;
  min-height: 400px;
  margin: 0 auto;
  padding: 55px 32px;
  display: grid;
  grid-template-columns: 1.5fr 0.7fr;
  gap: 80px;
  align-items: center;
}

.intro-text {
  max-width: 650px;
}

.intro-small {
  margin: 0 0 18px;
  font-size: 25px;
}

.intro-text h1 {
  margin: 0 0 22px;
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
}

.intro-text h1 span {
  color: #6fb6d9;
  text-shadow: 0 0 18px rgba(111, 182, 217, 0.16);
}

.intro-text p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.7;
}

.intro-image {
  display: flex;
  justify-content: center;
}

.intro-image img {
  width: 270px;
  height: 270px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  border: 1px solid rgba(111, 182, 217, 0.55);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.48),
    0 0 24px rgba(111, 182, 217, 0.10);
}

/* ================================================== */

/* STARTSEITE – PORTFOLIO ÜBERSICHT */

/* ================================================== */

.portfolio-overview {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 32px 90px;
}

/* -------------------------------------------------- */

/* 4 PORTFOLIO-KACHELN */

/* -------------------------------------------------- */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.portfolio-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 0.76 / 1;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.24);
  transition: transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.portfolio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.05) 0%,
      rgba(0, 0, 0, 0.12) 42%,
      rgba(0, 0, 0, 0.88) 100%
    );
  z-index: 1;
}

.portfolio-card:hover {
  transform: translateY(-5px);
  border-color: rgba(70, 170, 255, 0.6);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38),
    0 0 24px rgba(50, 150, 255, 0.10);
}

.portfolio-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.portfolio-card-content h2 {
  margin: 0 0 10px;
  font-size: 1.55rem;
  line-height: 1.05;
}

.portfolio-card-content h2 a {
  color: #ffffff;
  text-decoration: none;
}

.portfolio-card-content p {
  max-width: 220px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.55;
}

.portfolio-card-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  transition: background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.portfolio-card-button:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #111111;
  transform: translateX(3px);
}

/* -------------------------------------------------- */

/* KACHEL-HINTERGRÜNDE */

/* -------------------------------------------------- */

.motion-banner {
  background-image: url("images/portfolio/motion-visuals/hero_motion-visuals.webp");
  background-position: center;
}

.print-media {
  background-image: url("images/general/Hero_Print-media.webp");
  background-position: center;
}

.landing-pages {
  background-image: url("images/general/Hero_Webdesign.webp");
  background-position: center;
}

.photography {
  background-image: url("images/general/Hero_Fotografie.webp");
  background-position: center;
}

.ai-label.portfolio-card-ai {
  left: 20px;
  bottom: auto;
  top: 20px;
}
/* -------------------------------------------------- */

/* GENEALOGIE + PORTALE – BREITE BANNER */

/* -------------------------------------------------- */

.portfolio-wide-stack {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portfolio-wide {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.24);
  transition: transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.portfolio-wide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.10) 0%,
      rgba(0, 0, 0, 0.18) 42%,
      rgba(0, 0, 0, 0.88) 100%
    );
  z-index: 1;
}

.portfolio-wide:hover {
  transform: translateY(-3px);
  border-color: rgba(70, 170, 255, 0.55);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(50, 150, 255, 0.08);
}

.portfolio-wide-content {
  position: relative;
  z-index: 2;
  min-height: 250px;
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 32px;
}

.portfolio-wide-text {
  width: min(360px, 42%);
}

.portfolio-wide-text h2 {
  margin: 0 0 12px;
  font-size: 2rem;
  line-height: 1;
}

.portfolio-wide-text h2 a {
  color: #ffffff;
  text-decoration: none;
}

.portfolio-wide-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.55;
}

.portfolio-wide-button {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  font-size: 19px;
  transition: background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.portfolio-wide-button:hover {
  background: #ffffff;
  color: #111111;
  transform: translateX(3px);
}

.portals {
  background-image: url("images/general/Hero_portalwelt.webp");
  background-position: center;
}

.genealogy {
  background-image: url("images/general/Hero_Genealogie.webp");
  background-position: center;
}

.ai-label.portfolio-wide-ai {
  left: 22px;
  bottom: 20px;
}

@media (max-width: 1000px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-card {
    aspect-ratio: 0.9 / 1;
  }

}

@media (max-width: 700px) {
  .portfolio-overview {
    padding: 35px 20px 70px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-card {
    aspect-ratio: 1 / 1;
  }

  .portfolio-wide {
    min-height: 330px;
  }

  .portfolio-wide::before {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.06) 0%,
        rgba(0, 0, 0, 0.32) 48%,
        rgba(0, 0, 0, 0.92) 100%
      );
  }

  .portfolio-wide-content {
    min-height: 330px;
    padding: 30px 24px;
    align-items: flex-end;
    justify-content: space-between;
  }

  .portfolio-wide-text {
    width: calc(100% - 60px);
  }

}

/* KI-HINWEIS */

.ai-label {
  position: absolute;
  z-index: 5;
  left: 12%;
  bottom: 25px;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  display: block;
  cursor: pointer;
  appearance: none;
}

.ai-label img {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* RESPONSIVE */

@media (max-width: 800px) {
  .header-inner {
    padding: 20px;
  }

  .main-nav {
    margin-right: 0;
  }

  .intro-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 50px 24px;
  }

  .intro-image {
    order: -1;
  }

  .intro-image img {
    width: 220px;
  }

  .project-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 24px;
  }

  .project-content h2 {
    padding-left: 0;
  }

  .project-button {
    width: fit-content;
  }

  .ai-label {
    left: 24px;
  }

}

/* KI-POPUP */

.ai-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.ai-modal.is-open {
  display: flex;
}

.ai-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.ai-modal-window {
  position: relative;
  z-index: 2;
  width: min(520px, calc(100% - 40px));
  padding: 34px;
  background: #181818;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.ai-modal-window h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.ai-modal-window p {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.6;
  color: #dddddd;
}

#aiModalClose {
  display: block;
  margin-left: auto;
  padding: 11px 24px;
  border: 1px solid #ffffff;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
  transition: 0.2s ease;
}

#aiModalClose:hover {
  background: #ffffff;
  color: #111111;
}

/* MOTION-BANNER UNTERSEITE */

.motion-page-hero {
  position: relative;
  min-height: 650px;
  background-image: url("images/portfolio/motion-visuals/hero_motion-visuals.webp");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.motion-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}

.motion-page-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  min-height: 650px;
  margin: 0 auto;
  padding: 120px 32px;
  display: flex;
  align-items: center;
}

.motion-page-text {
  width: 33.33%;
  max-width: 420px;
}

.motion-page-text h1 {
  margin: 0 0 22px;
  font-size: 6.3rem;
  line-height: 0.9;
  font-weight: 800;
}

.motion-page-subtitle {
  margin: 0 0 20px;
  color: #00d99a;
  font-size: 18px;
  font-weight: 500;
}

.motion-page-text p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

.motion-page-ai {
  left: 12%;
  bottom: 40px;
}

/* MOTION-BANNER GALERIE */

.motion-gallery {
  max-width: 1200px;
  margin: 50px auto 90px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: start;
}

.motion-gallery-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.motion-gallery img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.motion-gallery-left,
.motion-gallery-right {
  width: 100%;
}

.motion-gallery-center {
  width: 100%;
}

.motion-gallery-center img {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

@media (max-width: 950px) {
  .motion-gallery {
    grid-template-columns: 170px minmax(0, 1fr) 170px;
    gap: 12px;
  }

  .motion-gallery-column {
    gap: 12px;
  }

}

@media (max-width: 700px) {
  .motion-gallery {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .motion-gallery-left,
  .motion-gallery-center,
  .motion-gallery-right {
    width: 100%;
  }

  .motion-gallery img {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

}

/* =========================================
   KACHEL-START AUF ALLEN 3 HAUPTSEITEN
   Desktop-Abgleich anhand der aktuellen Seiten
   Portfolio: Referenz | Portale: +30px | Genealogie: -10px
   ========================================= */

/* =========================================
   PORTALE – HAUPTÜBERSICHT
   Eigenständige Farbwelt, kompakter Einstieg,
   einheitliche Kacheln, 15 Portal-Akzente
   ========================================= */

/* Nur die Portal-Hauptseite: Unterseiten bleiben unverändert. */
body:has(.portal-overview) {
  background: #090b10;
}

.portal-intro {
  background: transparent;
}

.portal-intro-inner {
  width: min(1136px, calc(100% - 48px));
  max-width: 1136px;
  margin: 0 auto;
  padding: 42px 0 20px;
}

.portal-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 800;
}

.portal-intro-text {
  max-width: 680px;
}

.portal-intro-text p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: #d0d4dc;
}

.portal-intro-text p:last-child {
  margin-bottom: 0;
}


.portal-overview {
  width: min(1136px, calc(100% - 48px));
  max-width: 1136px;
  margin: 0 auto;
  padding: 25px 0 34px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.portal-overview .portal-card {
  --portal-accent: #7d8793;
  --portal-glow-strong: rgba(125,135,147,.24);
  --portal-glow-soft: rgba(125,135,147,.10);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  height: 380px;
  min-height: 380px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(125,135,147,.34);
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 16% 15%, var(--portal-glow-strong), transparent 75%),
    radial-gradient(ellipse at 95% 90%, var(--portal-glow-soft), transparent 70%),
    linear-gradient(155deg, #111722, #090b10);
  box-shadow: 0 14px 35px rgba(0,0,0,.25);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

/* Die 15 Portal-Farbwerte werden unabhängig vom Kartenlayout gepflegt. */
.portal-overview .portal-card-merch {
  --portal-accent: #cb9740;
  --portal-glow-strong: rgba(203,151,64,.38);
  --portal-glow-soft: rgba(203,151,64,.15);
}
.portal-overview .portal-card-01 {
  --portal-accent: #6fb04a;
  --portal-glow-strong: rgba(111,176,74,.38);
  --portal-glow-soft: rgba(111,176,74,.15);
}
.portal-overview .portal-card-02 {
  --portal-accent: #a14ac9;
  --portal-glow-strong: rgba(161,74,201,.40);
  --portal-glow-soft: rgba(161,74,201,.17);
}
.portal-overview .portal-card-03 {
  --portal-accent: #d97a34;
  --portal-glow-strong: rgba(217,122,52,.39);
  --portal-glow-soft: rgba(217,122,52,.16);
}
.portal-overview .portal-card-04 {
  --portal-accent: #7d8793;
  --portal-glow-strong: rgba(125,135,147,.30);
  --portal-glow-soft: rgba(125,135,147,.13);
}
.portal-overview .portal-card-05 {
  --portal-accent: #4b84e6;
  --portal-glow-strong: rgba(75,132,230,.42);
  --portal-glow-soft: rgba(75,132,230,.18);
}
.portal-overview .portal-card-06 {
  --portal-accent: #b83f50;
  --portal-glow-strong: rgba(184,63,80,.28);
  --portal-glow-soft: rgba(184,63,80,.11);
}
.portal-overview .portal-card-07 {
  --portal-accent: #27a9a0;
  --portal-glow-strong: rgba(39,169,160,.28);
  --portal-glow-soft: rgba(39,169,160,.11);
}
.portal-overview .portal-card-08 {
  --portal-accent: #cb9740;
  --portal-glow-strong: rgba(203,151,64,.38);
  --portal-glow-soft: rgba(203,151,64,.15);
}
.portal-overview .portal-card-09 {
  --portal-accent: #c76992;
  --portal-glow-strong: rgba(199,105,146,.38);
  --portal-glow-soft: rgba(199,105,146,.15);
}
.portal-overview .portal-card-10 {
  --portal-accent: #788e43;
  --portal-glow-strong: rgba(120,142,67,.38);
  --portal-glow-soft: rgba(120,142,67,.15);
}
.portal-overview .portal-card-11 {
  --portal-accent: #69bfcf;
  --portal-glow-strong: rgba(105,191,207,.38);
  --portal-glow-soft: rgba(105,191,207,.15);
}
.portal-overview .portal-card-12 {
  --portal-accent: #ac654b;
  --portal-glow-strong: rgba(172,101,75,.38);
  --portal-glow-soft: rgba(172,101,75,.15);
}
.portal-overview .portal-card-13 {
  --portal-accent: #ad4697;
  --portal-glow-strong: rgba(173,70,151,.38);
  --portal-glow-soft: rgba(173,70,151,.15);
}
.portal-overview .portal-card-14 {
  --portal-accent: #6562c6;
  --portal-glow-strong: rgba(101,98,198,.38);
  --portal-glow-soft: rgba(101,98,198,.15);
}
.portal-overview .portal-card-15 {
  --portal-accent: #279c75;
  --portal-glow-strong: rgba(39,156,117,.38);
  --portal-glow-soft: rgba(39,156,117,.15);
}

/* Bildfläche bleibt anklickbar; vorhandene Bilder werden nicht beschnitten. */
.portal-overview .portal-card-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.portal-overview .portal-card-image > a {
  display: block;
  width: 100%;
  height: 100%;
}

.portal-overview .portal-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 14px 10px 92px;
  object-fit: contain;
  object-position: center 15%;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,.35));
  transform: translateY(-15px);
}

.portal-overview .portal-card-04 .portal-card-image img {
  filter: grayscale(100%) drop-shadow(0 12px 20px rgba(0,0,0,.35));
  border-radius: 28px;
}

.portal-overview .portal-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(4,8,13,.02) 0%, rgba(4,8,13,.08) 35%,
    rgba(4,8,13,.55) 62%, rgba(4,8,13,.97) 100%);
}

/* Gleich hohe Textbereiche: Überschriften und Buttons fluchten. */
.portal-overview .portal-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  flex: 0 0 160px;
  width: 100%;
  min-height: 160px;
  margin: 0;
  padding: 18px;
  background: transparent;
  text-align: left;
}

.portal-overview .portal-card-content h2 {
  margin: 0 0 7px;
  padding: 0;
  border: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.portal-overview .portal-card-content h2 a,
.portal-overview .portal-card-content h2 a:visited {
  color: inherit;
  text-decoration: none;
}

.portal-overview .portal-card-type {
  margin: 0 0 4px;
  color: #d2d6dc;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 500;
}

.portal-overview .portal-card-title {
  margin: 0;
  color: var(--portal-accent);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
}

.portal-overview .portal-card-status,
.portal-overview .portal-card-work {
  margin: 5px 0 0;
  color: #c4c9d1;
  font-size: 11px;
  line-height: 1.4;
}

.portal-overview .portal-card-button {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  align-self: flex-start;
  width: fit-content;
  min-width: 0;
  min-height: 36px;
  margin: 18px 0 0;
  padding: 9px 13px;
  border: 1px solid var(--portal-accent);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transition: background .25s ease, border-color .25s ease,
    box-shadow .25s ease, transform .25s ease;
}

.portal-overview .portal-card-button::after {
  content: "›";
  color: var(--portal-accent);
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 300;
  line-height: .7;
}

.portal-overview .portal-card-button:not(.disabled):hover,
.portal-overview .portal-card-button:not(.disabled):focus-visible {
  border-color: var(--portal-accent);
  background: var(--portal-glow-soft);
  color: #fff;
  box-shadow: 0 0 18px var(--portal-glow-soft);
  transform: translateY(-2px);
}

.portal-overview .portal-card-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, var(--portal-glow-strong), transparent 75%);
  color: rgba(255,255,255,.16);
  font-size: 22px;
  font-weight: 800;
  padding-bottom: 150px;
}

.portal-overview .portal-card-button.disabled {
  opacity: .42;
  pointer-events: none;
  cursor: default;
  text-decoration: none;
}

.portal-overview .portal-card:has(.portal-card-button.disabled) {
  cursor: default;
}

.portal-overview .portal-card:not(:has(.portal-card-button.disabled)):hover {
  transform: translateY(-4px);
  border-color: var(--portal-accent);
  box-shadow: 0 16px 38px rgba(0,0,0,.35), 0 0 22px var(--portal-glow-soft);
}

.portal-overview .portal-card:hover .portal-card-image img {
  transform: translateY(-15px) scale(1.045);
}

/* Die Bildverlinkung macht die gesamte aktive Kachel anklickbar. */
.portal-overview .portal-card-image > a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}

.portal-note {
  width: min(1136px, calc(100% - 48px));
  max-width: 1136px;
  margin: 0 auto;
  padding: 0 0 65px;
  color: #c7cfd8;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 950px) {
  .portal-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .portal-intro-inner,
  .portal-overview,
  .portal-note {
    width: calc(100% - 36px);
  }
  .portal-intro-inner {
    padding-top: 32px;
  }
  .portal-overview {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 20px;
  }
  .portal-overview .portal-card {
    height: 260px;
    min-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-overview .portal-card,
  .portal-overview .portal-card-image img,
  .portal-overview .portal-card-button {
    transition: none;
  }
}

/* -------------------------------------------------- */

/* PORTAL DETAILSEITE */

/* -------------------------------------------------- */

.portal-detail-hero {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* PORTAL #01 HERO */

.portal-detail-hero-01 {
  background-image: linear-gradient(
      rgba(66, 64, 47, 0.78),
      rgba(66, 64, 47, 0.78)
    ),
    url("images/portale/portal-01/portal_01_hero-background.webp");
}

.portal-detail-hero-inner {
  max-width: 1136px;
  min-height: 650px;
  margin: 0 auto;
  padding: 70px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

/* HERO BILD */

.portal-detail-hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-detail-hero-image img {
  width: 100%;
  max-width: 470px;
  height: auto;
  display: block;
}

/* HERO TEXT */

.portal-detail-hero-text {
  max-width: 470px;
}

.portal-detail-number {
  margin: 0 0 18px;
  font-size: 56px;
  line-height: 1;
  font-weight: 800;
}

.portal-detail-hero-text h1 {
  margin: 0 0 22px;
  color: #8cc945;
  font-size: 24px;
  font-weight: 500;
}

.portal-detail-description {
  margin: 0 0 34px;
  font-size: 15px;
  line-height: 1.7;
}

/* UNIKAT KAUFEN */

.portal-detail-buy {
  display: inline-block;
  min-width: 190px;
  padding: 13px 24px;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  background: #8cc945;
  color: #111111;
  font-size: 13px;
  font-weight: 700;
}

.portal-detail-buy.disabled {
  opacity: 0.45;
  text-decoration: line-through;
  pointer-events: none;
}

/* PORTAL DETAIL NAVIGATION */

.portal-detail-navigation {
  max-width: 1136px;
  margin: 28px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-detail-navigation a {
  min-width: 180px;
  padding: 11px 20px;
  border: 1px solid #8cc945;
  border-radius: 999px;
  color: #8cc945;
  text-decoration: none;
  text-align: center;
  font-size: 13px;
  transition: background 0.2s ease,
    color 0.2s ease;
}

.portal-detail-navigation a:hover {
  background: #8cc945;
  color: #111111;
}

/* PORTAL DETAIL INHALT */

.portal-detail-content {
  max-width: 1136px;
  margin: 55px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px;
  align-items: start;
}

.portal-detail-section,
.portal-process-section {
  min-width: 0;
}

/* ÜBERSCHRIFTEN */

.portal-detail-section-heading {
  margin-bottom: 24px;
}

.portal-detail-section-heading h2 {
  margin: 0 0 10px;
  color: #8cc945;
  font-size: 22px;
  font-weight: 800;
}

.portal-detail-section-heading p {
  margin: 0;
  max-width: 480px;
  color: #d5d5d5;
  font-size: 13px;
  line-height: 1.6;
}

/* DETAILGALERIE */

.portal-detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.portal-detail-gallery img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.portal-detail-gallery img:first-child {
  grid-column: span 2;
  height: 260px;
}

/* ENTSTEHUNGSPROZESS */

.portal-process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.portal-process-card {
  margin: 0;
  padding: 10px;
  background: #1b1b1b;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-process-card p {
  margin: 0 0 9px;
  font-size: 11px;
  color: #dddddd;
}

.portal-process-card p span {
  color: #8cc945;
  font-weight: 700;
}

.portal-process-card img {
  width: 100%;
  height: 125px;
  object-fit: cover;
  display: block;
}

/* NAVIGATION UNTEN */

.portal-detail-navigation-bottom {
  margin-top: 55px;
  margin-bottom: 80px;
}

/* RESPONSIVE PORTAL DETAILSEITE */

@media (max-width: 1000px) {
  .portal-detail-hero-inner,
  .portal-detail-navigation,
  .portal-detail-content {
    max-width: calc(100% - 48px);
  }

  .portal-detail-hero-inner {
    gap: 40px;
  }

  .portal-detail-number {
    font-size: 46px;
  }

  .portal-detail-content {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 700px) {
  .portal-detail-hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 50px 0;
  }

  .portal-detail-hero-text {
    max-width: none;
  }

  .portal-detail-number {
    font-size: 40px;
  }

  .portal-detail-navigation {
    gap: 14px;
  }

  .portal-detail-navigation a {
    min-width: 0;
    flex: 1;
  }

  .portal-process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 500px) {
  .portal-detail-gallery {
    grid-template-columns: 1fr;
  }

  .portal-detail-gallery img:first-child {
    grid-column: auto;
  }

  .portal-process-grid {
    grid-template-columns: 1fr;
  }

}

/* PORTAL #02 */

.portal-detail-hero-02 {
  background-image: linear-gradient(
      rgba(76, 37, 86, 0.78),
      rgba(76, 37, 86, 0.78)
    ),
    url("images/portale/portal-02/portal_02_hero-background.webp");
}

.portal-detail-hero-02 .portal-detail-hero-text h1 {
  color: #d952e0;
}

.portal-detail-inspiration {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.portal-detail-hero-02 .portal-detail-buy {
  background: #d952e0;
}

.portal-detail-navigation-02 a {
  border-color: #d952e0;
  color: #d952e0;
}

.portal-detail-navigation-02 a:hover {
  background: #d952e0;
  color: #111111;
}

.portal-detail-hero-02 + .portal-detail-navigation
+ .portal-detail-content
.portal-detail-section-heading h2 {
  color: #d952e0;
}

.portal-detail-hero-02 + .portal-detail-navigation
+ .portal-detail-content
.portal-process-card p span {
  color: #d952e0;
}

/* PORTAL #03 */

.portal-detail-hero-03 {
  background-image: linear-gradient(
      rgba(75, 46, 48, 0.80),
      rgba(75, 46, 48, 0.80)
    ),
    url("images/portale/portal-03/portal_03_hero-background.webp");
}

.portal-detail-hero-03 .portal-detail-hero-text h1 {
  color: #ff8652;
}

.portal-detail-hero-03 .portal-detail-buy {
  background: #ff8652;
}

.portal-detail-navigation-03 a {
  border-color: #ff8652;
  color: #ff8652;
}

.portal-detail-navigation-03 a:hover {
  background: #ff8652;
  color: #111111;
}

.portal-detail-hero-03 + .portal-detail-navigation
+ .portal-detail-content
.portal-detail-section-heading h2 {
  color: #ff8652;
}

.portal-detail-hero-03 + .portal-detail-navigation
+ .portal-detail-content
.portal-process-card p span {
  color: #ff8652;
}

/* PORTAL #04 */

.portal-detail-hero-04 {
  background-image: linear-gradient(
      rgba(40, 40, 40, 0.82),
      rgba(40, 40, 40, 0.82)
    ),
    url("images/portale/portal-04/portal_04_hero-background.webp");
}

.portal-detail-hero-04 .portal-detail-hero-text h1 {
  color: #bdbdbd;
}

.portal-detail-hero-04 .portal-detail-buy {
  background: #bdbdbd;
}

.portal-detail-hero-image-04 img {
  border-radius: 28px;
  filter: grayscale(100%);
}

.portal-detail-navigation-04 a {
  border-color: #bdbdbd;
  color: #bdbdbd;
}

.portal-detail-navigation-04 a:hover {
  background: #bdbdbd;
  color: #111111;
}

.portal-detail-hero-04 + .portal-detail-navigation
+ .portal-detail-content
.portal-detail-section-heading h2 {
  color: #bdbdbd;
}

.portal-detail-hero-04 + .portal-detail-navigation
+ .portal-detail-content
.portal-process-card p span {
  color: #bdbdbd;
}

.portal-detail-gallery-placeholder {
  grid-template-columns: 1fr;
}

.portal-detail-gallery-placeholder img:first-child {
  grid-column: auto;
  width: 100%;
  height: auto;
  min-height: 260px;
  object-fit: cover;
  filter: grayscale(100%);
}

/* PORTAL #05 */

.portal-detail-hero-05 {
  background-image: linear-gradient(
      rgba(10, 37, 97, 0.80),
      rgba(10, 37, 97, 0.80)
    ),
    url("images/portale/portal-05/portal_05_hero-background.webp");
}

.portal-detail-hero-05 .portal-detail-hero-text h1 {
  color: #168bff;
}

.portal-detail-hero-05 .portal-detail-buy {
  background: #0047e0;
  color: #ffffff;
}

.portal-detail-navigation-05 a {
  border-color: #168bff;
  color: #168bff;
}

.portal-detail-navigation-05 a:hover {
  background: #168bff;
  color: #111111;
}

.portal-detail-hero-05 + .portal-detail-navigation
+ .portal-detail-content
.portal-detail-section-heading h2 {
  color: #168bff;
}

.portal-detail-hero-05 + .portal-detail-navigation
+ .portal-detail-content
.portal-process-card p span {
  color: #168bff;
}

.portal-award-card {
  margin-bottom: 34px;
  padding: 14px;
  border: 2px solid #ffcc14;
  background: #171717;
  text-align: center;
}

.portal-award-card img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 18px;
}

.portal-award-card p {
  margin: 7px 0;
  font-size: 12px;
  line-height: 1.5;
}

.portal-award-card a {
  color: #ffcc14;
}

.portal-process-heading-05 {
  margin-top: 0;
}

/* -------------------------------------------------- */

/* WEBSITE INTRO */

/* -------------------------------------------------- */

.site-intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #0a0a0a;
  animation: introScreenOut 1s ease-out forwards;
}

.site-intro-name {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0)
    scale(0.82);
  transform-origin: center center;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  animation: introNameAnimation 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes introNameAnimation {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0)
      scale(0.75);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0)
      scale(5);
  }

}

@keyframes introScreenOut {
  0%,
  82% {
    opacity: 1;
    visibility: visible;
  }

  100% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

}

/* -------------------------------------------------- */

/* PRINT MEDIEN UNTERSEITE */

/* -------------------------------------------------- */

.print-page-hero {
  position: relative;
  min-height: 650px;
  background-image: url("images/portfolio/print/hero_print-medien.webp");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.print-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
}

.print-page-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  min-height: 650px;
  margin: 0 auto;
  padding: 120px 32px;
  display: flex;
  align-items: center;
}

.print-page-text {
  width: 33.33%;
  max-width: 420px;
}

.print-page-text h1 {
  margin: 0 0 22px;
  font-size: 6.3rem;
  line-height: 0.9;
  font-weight: 800;
}

.print-page-subtitle {
  margin: 0 0 20px;
  color: #e29c69;
  font-size: 18px;
  font-weight: 500;
}

.print-page-text p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

.print-page-ai {
  left: 12%;
  bottom: 40px;
}

/* -------------------------------------------------- */

/* PRINT GALERIE */

/* -------------------------------------------------- */

.print-gallery {
  max-width: 1200px;
  margin: 50px auto 90px;
  padding: 0 24px;
  column-count: 3;
  column-gap: 14px;
}

.print-gallery-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  overflow: hidden;
  background: #1b1b1b;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.print-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease,
    filter 0.35s ease;
}

.print-gallery-item:hover img {
  transform: scale(1.015);
  filter: brightness(1.04);
}

.print-gallery-item-large,
.print-gallery-item-wide,
.print-gallery-item-tall {
  grid-column: auto;
  grid-row: auto;
}

@media (max-width: 950px) {
  .print-page-text {
    width: 45%;
  }

  .print-page-text h1 {
    font-size: 4.8rem;
  }

  .print-gallery {
    column-count: 2;
  }

}

@media (max-width: 700px) {
  .print-page-hero-inner {
    min-height: 580px;
    padding: 80px 24px;
  }

  .print-page-text {
    width: 100%;
    max-width: 460px;
  }

  .print-page-text h1 {
    font-size: 3.8rem;
  }

  .print-gallery {
    column-count: 1;
  }

}

/* -------------------------------------------------- */

/* LANDING PAGES UNTERSEITE */

/* -------------------------------------------------- */

.landing-page-hero {
  position: relative;
  min-height: 650px;
background-image: url("images/portfolio/webdesign-digital-ads/hero_webdesign-digital-ads.webp");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.landing-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}

.landing-page-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  min-height: 650px;
  margin: 0 auto;
  padding: 120px 32px;
  display: flex;
  align-items: center;
}

.landing-page-text {
  width: 33.33%;
  max-width: 420px;
}

.landing-page-text h1 {
  margin: 0 0 22px;
  font-size: 6.3rem;
  line-height: 0.9;
  font-weight: 800;
}

.landing-page-subtitle {
  margin: 0 0 20px;
  color: #b37af2;
  font-size: 18px;
  font-weight: 500;
}

.landing-page-text p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

.landing-page-ai {
  left: 12%;
  bottom: 40px;
}

.landing-gallery {
  max-width: 1200px;
  margin: 50px auto 90px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.landing-gallery-item {
  margin: 0;
  overflow: hidden;
  background: #1b1b1b;
}

.landing-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease,
    filter 0.3s ease;
}

.landing-gallery-item:hover img {
  transform: scale(1.015);
  filter: brightness(1.04);
}

@media (max-width: 950px) {
  .landing-page-text {
    width: 45%;
  }

  .landing-page-text h1 {
    font-size: 4.8rem;
  }

  .landing-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 700px) {
  .landing-page-hero-inner {
    min-height: 580px;
    padding: 80px 24px;
  }

  .landing-page-text {
    width: 100%;
    max-width: 460px;
  }

  .landing-page-text h1 {
    font-size: 3.8rem;
  }

  .landing-gallery {
    grid-template-columns: 1fr;
  }

}

/* FOTOGRAFIE UNTERSEITE */

.photo-page-hero {
  position: relative;
  min-height: 650px;
  background-image: url("images/portfolio/fotografie/hero_fotografie.webp");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.photo-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}

.photo-page-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  min-height: 650px;
  margin: 0 auto;
  padding: 120px 32px;
  display: flex;
  align-items: center;
}

.photo-page-text {
  width: 33.33%;
  max-width: 420px;
}

.photo-page-text h1 {
  margin: 0 0 22px;
  font-size: 6.3rem;
  line-height: 0.9;
  font-weight: 800;
}

.photo-page-subtitle {
  margin: 0 0 20px;
  color: #f0b429;
  font-size: 18px;
  font-weight: 500;
}

.photo-page-text p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

.photo-page-ai {
  left: 12%;
  bottom: 40px;
}

/* VORHER / NACHHER */

.photo-compare-section {
  max-width: 1200px;
  margin: 60px auto 90px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.photo-compare-card h3 {
  margin: 18px 0 0;
  text-align: center;
  font-size: 1.5rem;
}

.image-compare {
  position: relative;
  width: 100%;
  aspect-ratio: 1386 / 962;
  overflow: hidden;
  background: #111;
}

.image-compare-base,
.image-compare-top {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.image-compare-overlay {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
}

.image-compare-overlay .image-compare-top {
  width: 200%;
  max-width: none;
}

.image-compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #ffffff;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 3;
}

.image-compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
  color: #111111;
  font-size: 20px;
  font-weight: 700;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 4;
}

.image-compare-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 5;
}

/* FOTO-PROJEKTE */

.photo-project-section {
  max-width: 1200px;
  margin: 0 auto 90px;
  padding: 0 24px;
}

.photo-project-section h2 {
  margin: 0 0 24px;
  text-align: center;
  font-size: 1.7rem;
}

.photo-project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.photo-project-grid img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 950px) {
  .photo-page-text {
    width: 45%;
  }

  .photo-page-text h1 {
    font-size: 4.8rem;
  }

}

@media (max-width: 700px) {
  .photo-page-hero-inner {
    min-height: 580px;
    padding: 80px 24px;
  }

  .photo-page-text {
    width: 100%;
    max-width: 460px;
  }

  .photo-page-text h1 {
    font-size: 3.8rem;
  }

  .photo-compare-section {
    grid-template-columns: 1fr;
  }

  .photo-project-grid {
    grid-template-columns: 1fr;
  }

}

/* =========================================
   GENEALOGIE – HAUPTSEITE
   Erdiges, ruhiges Forschungsarchiv
   ========================================= */

body:has(.genealogy-page) {
  background: #15110d;
}

.genealogy-page {
  --genealogy-background: #15110d;
  --genealogy-card: #211a14;
  --genealogy-accent: #b38a5a;
  --genealogy-accent-bright: #d8b890;
  --genealogy-border: rgba(179,138,90,.32);
  --genealogy-text: #f5efe6;
  --genealogy-text-soft: #cdbfaf;
  max-width: 1200px;
  margin: 0 auto;
  padding: 42px 32px 80px;
  color: var(--genealogy-text);
}

.genealogy-intro {
  max-width: 720px;
  margin-bottom: 12px;
}

.genealogy-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.08;
  font-weight: 800;
}

.genealogy-intro-lead {
  margin: 0 0 10px;
  color: var(--genealogy-accent-bright);
  font-size: 14px;
  font-weight: 700;
}

.genealogy-intro-text {
  color: var(--genealogy-text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.genealogy-intro-text p {
  margin: 0 0 8px;
}

.genealogy-section {
  margin-bottom: 48px;
}

.genealogy-section > h2 {
  margin: 0 0 18px;
  color: var(--genealogy-text);
  font-size: clamp(21px, 2.3vw, 27px);
  line-height: 1.2;
  font-weight: 800;
}

.genealogy-overview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.genealogy-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: 270px;
  padding: 27px 24px 23px;
  text-align: center;
  border: 1px solid var(--genealogy-border);
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 18% 8%, rgba(139,98,59,.20), transparent 75%),
    linear-gradient(150deg, #2a2119, #15110d 98%);
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.genealogy-card-wide {
  grid-column: span 3;
}

.genealogy-card-icon {
  display: block;
  margin-bottom: 14px;
}

.genealogy-card-icon img {
  display: block;
  width: 62px;
  height: 62px;
  object-fit: contain;
  transition: transform .25s ease;
}

.genealogy-card h3 {
  margin: 0 0 10px;
  color: var(--genealogy-text);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
}

.genealogy-card h3 a {
  color: inherit;
  text-decoration: none;
}

.genealogy-card p {
  max-width: 290px;
  margin: 0;
  color: var(--genealogy-text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.genealogy-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 9px 13px;
  border: 1px solid var(--genealogy-border);
  border-radius: 8px;
  background: transparent;
  color: var(--genealogy-text);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background .25s ease, border-color .25s ease;
}

.genealogy-card-link:hover,
.genealogy-line-link:hover {
  border-color: var(--genealogy-accent-bright);
  background: rgba(179,138,90,.16);
  color: var(--genealogy-text);
}

.genealogy-card:hover,
.genealogy-line-card:hover {
  transform: translateY(-4px);
  border-color: var(--genealogy-accent);
  box-shadow: 0 16px 35px rgba(0,0,0,.3), 0 0 20px rgba(179,138,90,.12);
}

.genealogy-card:hover img,
.genealogy-line-card:hover img {
  transform: translateY(-3px);
}

/* Bestehende vier Familienlinien bleiben als zweite Ebene erhalten. */
.genealogy-lines-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.genealogy-line-card {
  min-width: 0;
  min-height: 315px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--genealogy-border);
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 18% 8%, rgba(139,98,59,.17), transparent 75%),
    linear-gradient(150deg, #2a2119, #15110d 98%);
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.genealogy-line-card > a:first-child {
  display: block;
  padding-top: 28px;
}

.genealogy-line-card img {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: contain;
  transition: transform .25s ease;
}

.genealogy-line-card h3 {
  margin: 12px 0 10px;
  color: var(--genealogy-text);
  font-size: 18px;
  font-weight: 700;
}

.genealogy-line-card p {
  margin: 0;
  padding: 0 20px;
  color: var(--genealogy-text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.genealogy-line-link {
  width: auto;
  margin: auto 18px 20px;
  padding: 10px 13px;
  border: 1px solid var(--genealogy-border);
  border-radius: 8px;
  background: transparent;
  color: var(--genealogy-text);
  font-size: 12px;
  text-decoration: none;
  transition: background .25s ease, border-color .25s ease;
}

/* Der frühere Kontakt-/Impressum-/Datenschutz-Kachelblock ist ausgeblendet. */
.genealogy-info-grid,
.genealogy-footer {
  display: none;
}

@media (max-width: 950px) {
  .genealogy-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .genealogy-card,
  .genealogy-card-wide {
    grid-column: auto;
  }
  .genealogy-lines-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .genealogy-page {
    padding: 32px 18px 60px;
  }
  .genealogy-overview-grid,
  .genealogy-lines-grid {
    grid-template-columns: 1fr;
  }
  .genealogy-card {
    min-height: 250px;
  }
  .genealogy-line-card {
    min-height: 280px;
  }
}

/* =====================================================
   RICHWIN DESIGN – MEGA-MENÜ
   Zentrale Navigation
   ===================================================== */

.site-header {
  z-index: 1000;
  overflow: visible;
}

.main-nav .mega-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.main-nav .mega-chevron {
  color: #82bdd8;
  font-size: 17px;
  line-height: 0;
  transform: translateY(-2px);
  transition: transform .2s ease;
}

.main-nav .mega-hovered .mega-chevron {
  transform: translateY(-2px) rotate(180deg);
}

.main-nav a.mega-hovered {
  color: #fff;
}

.main-nav a.mega-hovered::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 42px;
  height: 1px;
  background: #6fb6d9;
  box-shadow: 0 0 9px rgba(111,182,217,.7);
  transform: translateX(-50%);
}

.mega-menu-panel[hidden] {
  display: none !important;
}

.mega-menu-panel {
  position: absolute;
  z-index: 1100;
  top: 100%;
  left: 50%;
  width: min(960px, calc(100vw - 48px));
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.05fr;
  gap: 26px;
  transform: translateX(-50%);
  border: 1px solid rgba(111,182,217,.62);
  border-radius: 0 0 14px 14px;
  background: linear-gradient(135deg, rgba(9,21,32,.98), rgba(4,10,17,.985));
  box-shadow: 0 20px 54px rgba(0,0,0,.65), 0 0 24px rgba(64,157,204,.12);
  backdrop-filter: blur(18px);
  color: #fff;
}

.mega-menu-panel[data-menu="genealogie"] {
  grid-template-columns: minmax(0, 1.4fr) minmax(230px, .8fr);
  max-width: 700px;
}

.mega-menu-panel[data-menu="kontakt"] {
  display: block;
  max-width: 310px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.mega-column {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.mega-column + .mega-column {
  border-left: 1px solid rgba(111,182,217,.25);
  padding-left: 24px;
}

.mega-heading {
  margin: 0 0 8px;
  color: #f1f8fc;
  font-size: 14px;
  font-weight: 700;
}

.mega-link {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 9px;
  border-radius: 7px;
  color: #d6e2e9;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.mega-link-icon {
  width: 17px;
  flex: 0 0 17px;
  color: #7cb9d3;
  text-align: center;
  font-size: 16px;
}

a.mega-link:hover,
a.mega-link:focus-visible {
  background: linear-gradient(90deg, rgba(67,139,177,.25), rgba(67,139,177,.07));
  color: #fff;
  outline: 1px solid rgba(111,182,217,.35);
}

.mega-link-pending {
  opacity: .52;
  cursor: default;
}

.mega-link-pending small {
  margin-left: auto;
  font-size: 10px;
  opacity: .75;
}

.mega-group-title {
  margin: 10px 0 1px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.mega-genealogy-group .mega-link {
  padding-left: 16px;
  min-height: 27px;
  font-size: 12px;
}

.mega-genealogy-group .mega-link-icon {
  font-size: 12px;
}

.mega-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #fff;
  text-decoration: none;
}

.mega-preview img {
  display: block;
  width: 100%;
  height: 138px;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(111,182,217,.22);
  border-radius: 8px;
  background: #0e1924;
}

.mega-preview strong {
  font-size: 15px;
}

.mega-preview > span {
  color: #c4d4dd;
  font-size: 12px;
  line-height: 1.5;
  padding-right: 22px;
}

.mega-preview b {
  position: absolute;
  right: 0;
  bottom: 0;
  color: #93d5ed;
  font-size: 23px;
  font-weight: 400;
}

.mega-preview:hover strong {
  color: #9ed7ef;
}

/* Tablet und Smartphone: Menü wird unter dem Header umgebrochen. */

@media (max-width: 950px) {
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 9px 18px;
    padding: 12px 20px;
  }

  .header-logo {
    flex: 0 0 auto;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 22px;
  }

  .main-nav a {
    padding: 10px 0 12px;
    font-size: 13px;
  }

  .main-nav a.active::after,
  .main-nav a:hover::after,
  .main-nav a.mega-hovered::after {
    bottom: 5px;
  }

  .social-links {
    margin-left: auto;
  }

  .mega-menu-panel {
    width: calc(100vw - 24px);
    padding: 18px;
    gap: 16px;
  }

  .mega-column + .mega-column {
    padding-left: 16px;
  }

}

@media (max-width: 620px) {
  .mega-menu-panel,
  .mega-menu-panel[data-menu="genealogie"] {
    grid-template-columns: 1fr;
    max-width: none;
    max-height: 70vh;
    overflow-y: auto;
  }

  .mega-menu-panel[data-menu="kontakt"] {
    width: min(320px, calc(100vw - 24px));
    right: 12px;
  }

  .mega-column + .mega-column {
    border-left: 0;
    border-top: 1px solid rgba(111,182,217,.25);
    padding: 14px 0 0;
  }

  .mega-preview img {
    height: 120px;
  }

  .main-nav {
    gap: 4px 14px;
  }

  .main-nav a {
    font-size: 12px;
  }

}

/* =========================================
   MEGA-MENÜ – EINHEITLICHE TYPOGRAFIE
   ========================================= */

/* Einheitliche Schrift */

.mega-menu-panel {
  font-family: Arial, sans-serif;
  font-size: 13px;
}

/* Alle Menüpunkte gleich darstellen */

.mega-menu-panel .mega-link,
.mega-menu-panel .mega-genealogy-group .mega-link {
  color: #dce8ee;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  min-height: 32px;
  padding: 7px 9px;
}

/* Einheitliche Überschriften */

.mega-menu-panel .mega-heading,
.mega-menu-panel .mega-group-title {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

/* Geplante Seiten nicht mehr abdunkeln */

.mega-menu-panel .mega-link-pending {
  opacity: 1;
  color: #dce8ee;
}

/* "geplant" nicht mehr anzeigen */

.mega-menu-panel .mega-link-pending small {
  display: none;
}

/* Icons einheitlich */

.mega-menu-panel .mega-link-icon {
  color: #83bdd6;
  font-size: 14px;
}

/* Genealogie – gleiche Textdarstellung */

.mega-menu-panel .mega-genealogy-group {
  opacity: 1;
}

.mega-menu-panel .mega-genealogy-group .mega-link {
  padding-left: 16px;
}

/* Hover bleibt dezent blau */

.mega-menu-panel a.mega-link:hover,
.mega-menu-panel a.mega-link:focus-visible {
  color: #ffffff;
  background: rgba(111, 182, 217, 0.13);
}

/* Vorschautext vereinheitlichen */

.mega-menu-panel .mega-preview strong {
  font-size: 13px;
  font-weight: 700;
}

.mega-menu-panel .mega-preview > span {
  color: #dce8ee;
  font-size: 12px;
}

/* =========================================
   MEGA-MENÜ – KOMPAKTES LAYOUT
   ========================================= */

/* Gesamtbreite und Spaltenabstände */

.mega-menu-panel {
  width: min(800px, calc(100vw - 32px));
  padding: 16px 18px;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(0, 1.05fr);
}

/* Trennlinien näher an die Inhalte */

.mega-column + .mega-column {
  padding-left: 12px;
}

/* Weniger Abstand zwischen Menüpunkten */

.mega-column {
  gap: 0;
}

/* Einheitliche Schrift und Zeilenhöhe */

.mega-menu-panel .mega-link,
.mega-menu-panel .mega-genealogy-group .mega-link {
  min-height: 26px;
  padding: 3px 6px;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  color: #dce8ee;
}

/* Überschriften */

.mega-menu-panel .mega-heading,
.mega-menu-panel .mega-group-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
}

.mega-menu-panel .mega-heading {
  margin: 0 0 5px;
}

.mega-menu-panel .mega-group-title {
  margin: 7px 0 2px;
}

/* Icons einheitlich */

.mega-menu-panel .mega-link-icon {
  width: 15px;
  flex: 0 0 15px;
  font-size: 13px;
  color: #83bdd6;
}

/* Genealogie ebenfalls kompakter */

.mega-menu-panel[data-menu="genealogie"] {
  width: min(620px, calc(100vw - 32px));
  max-width: 620px;
  grid-template-columns: minmax(0, 1.35fr)
    minmax(0, 0.85fr);
  gap: 12px;
}

.mega-menu-panel .mega-genealogy-group .mega-link {
  padding-left: 12px;
}

/* Kontakt kompakter */

.mega-menu-panel[data-menu="kontakt"] {
  width: min(270px, calc(100vw - 32px));
  max-width: 270px;
}

/* Vorschaubereich */

.mega-menu-panel .mega-preview {
  gap: 5px;
}

.mega-menu-panel .mega-preview img {
  height: 115px;
}

.mega-menu-panel .mega-preview strong {
  font-size: 14px;
}

.mega-menu-panel .mega-preview > span {
  font-size: 13px;
  line-height: 1.35;
}

/* Tablet */

@media (max-width: 950px) {
  .mega-menu-panel {
    width: calc(100vw - 24px);
    padding: 14px;
    gap: 10px;
  }

  .mega-column + .mega-column {
    padding-left: 10px;
  }

}

/* Smartphone */

@media (max-width: 620px) {
  .mega-menu-panel,
  .mega-menu-panel[data-menu="genealogie"] {
    width: calc(100vw - 24px);
    max-width: none;
    grid-template-columns: 1fr;
  }

  .mega-column + .mega-column {
    padding: 10px 0 0;
  }

}

/* =========================================
   MEGA-MENÜ – SPALTEN ENGER ZUSAMMEN
   ========================================= */

@media (min-width: 951px) {
  /* Gesamtmenü schmaler */

  .mega-menu-panel {
    width: min(650px, calc(100vw - 32px));
    grid-template-columns: 1fr 1fr 1.05fr;
    gap: 6px;
    padding: 14px 12px;
  }

  /* Abstand an den Trennlinien reduzieren */

  .mega-column + .mega-column {
    padding-left: 7px;
  }

  /* Genealogie ebenfalls schmaler */

  .mega-menu-panel[data-menu="genealogie"] {
    width: min(510px, calc(100vw - 32px));
    max-width: 510px;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 8px;
  }

  /* Kontakt behält seine kompakte Breite */

  .mega-menu-panel[data-menu="kontakt"] {
    width: 270px;
    max-width: 270px;
  }

}

/* Einleitungsbereiche – Hintergrund wie Genealogie */

.intro-section,
.portal-intro {
  background: transparent;
}

/* =========================================
   FOTOGRAFIE – VORHER / NACHHER VERGLEICH
   ========================================= */

.photo-compare-block {
  min-width: 0;
}

.photo-compare {
  --split: 50%;
  position: relative;
  width: 100%;
  aspect-ratio: 1386 / 962;
  overflow: hidden;
  isolation: isolate;
  background: #111;
  user-select: none;
}

/* Beide Fotos exakt übereinander */

.photo-compare-before,
.photo-compare-after {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.photo-compare-before {
  position: absolute;
  inset: 0;
}

/* Zweites Foto rechts der Trennlinie */

.photo-compare-after-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  clip-path: inset(0 0 0 var(--split));
}

.photo-compare-after {
  position: absolute;
  inset: 0;
}

/* Weiße Trennlinie */

.photo-compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 2px;
  background: #fff;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}

/* Runder Griff mit Pfeilen */

.photo-compare-line::after {
  content: "‹ ›";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(0,0,0,.25);
}

/* Unsichtbarer, bedienbarer Schieberegler */

.photo-compare-range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}

/* Beschriftung */

.photo-compare-block h2 {
  margin: 18px 0 0;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

/* =========================================
   FOTOGRAFIE – 4 BILDER NEBENEINANDER
   ========================================= */

.photo-project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.photo-project-grid img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
}

/* Tablet */

@media (max-width: 900px) {
  .photo-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

/* Smartphone */

@media (max-width: 600px) {
  .photo-project-grid {
    grid-template-columns: 1fr;
  }

  .photo-project-grid img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

}

/* MENÜSTRICHE – FEINER MIT STÄRKEREM GLOW */

.main-nav a.mega-trigger::after,
.main-nav a.mega-trigger:hover::after,
.main-nav a.mega-trigger.active::after,
.main-nav a.mega-trigger.mega-hovered::after {
  height: 1px;

  box-shadow:
    0 0 5px rgba(111, 182, 217, 0.85),
    0 0 12px rgba(111, 182, 217, 0.55),
    0 0 20px rgba(111, 182, 217, 0.25);
}

.main-nav a.mega-trigger:hover::after,
.main-nav a.mega-trigger.mega-hovered::after {
  box-shadow:
    0 0 7px rgba(111, 182, 217, 0.95),
    0 0 16px rgba(111, 182, 217, 0.65),
    0 0 25px rgba(111, 182, 217, 0.35);
}

/* =========================================
   HEADER – DAUERHAFTE LEUCHTSTRICHE
   ========================================= */

/* Dropdown-Pfeile vollständig ausblenden */

.main-nav .mega-chevron {
  display: none !important;
}

/* Position der Menüpunkte */

.main-nav a.mega-trigger {
  position: relative;
  gap: 0;
}

/* Strich dauerhaft anzeigen */

.main-nav a.mega-trigger::after,
.main-nav a.mega-trigger:hover::after,
.main-nav a.mega-trigger.active::after,
.main-nav a.mega-trigger.mega-hovered::after {
  content: "";
  position: absolute;

  left: 50%;
  bottom: 14px;

  width: 30px;
  height: 1px;

  border-radius: 999px;
  background: #85c9e5;

  box-shadow:
    0 0 5px rgba(111, 182, 217, .9),
    0 0 12px rgba(111, 182, 217, .65),
    0 0 20px rgba(111, 182, 217, .3);

  transform: translateX(-50%);

  transition: width .25s ease, box-shadow .25s ease;
}

/* Hover: etwas längerer und stärkerer Glow */

.main-nav a.mega-trigger:hover::after,
.main-nav a.mega-trigger.mega-hovered::after {
  width: 38px;
  box-shadow:
    0 0 7px rgba(111, 182, 217, 1),
    0 0 16px rgba(111, 182, 217, .75),
    0 0 25px rgba(111, 182, 217, .4);
}

/* Keine Striche bei Menüpunkten ohne Dropdown */

.main-nav a:not(.mega-trigger)::after {
  content: none;
}

/* Korrekte Position bei schmaleren Bildschirmen */

@media (max-width: 950px) {
  .main-nav a.mega-trigger::after,
  .main-nav a.mega-trigger:hover::after,
  .main-nav a.mega-trigger.active::after,
  .main-nav a.mega-trigger.mega-hovered::after {
    bottom: 4px;
  }
}

/* =========================================
   MOTION-KACHEL – VIDE0HINTERGRUND
   ========================================= */

.motion-banner {
  background-image: none;
  background-color: #071019;
}

.motion-card-video {
  position: absolute;
  inset: 0;
  z-index: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  pointer-events: none;
}

/* Text und Button bleiben über dem Video */

.motion-banner .portfolio-card-content {
  position: relative;
  z-index: 2;
}

/* PROFILBILD – AUCH MOBIL KREISRUND */

@media (max-width: 800px) {
  .intro-image img {
    width: 220px;
    height: 220px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
  }
}



/* =========================================
   STARTSEITE – KACHELN FINAL
   ========================================= */

/* VIER KLEINE KACHELN */

/* Text oben links, Button unten links */
.portfolio-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  height: 100%;
  padding: 24px;
  text-align: left;
}

.portfolio-card-content h2 {
  margin: 0 0 12px;
  font-size: 27px;
  line-height: 1.15;
}

.portfolio-card-content p {
  max-width: 240px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

/* Button am unteren linken Rand */
.portfolio-card-button {
  margin-top: auto;
}

/* KI-Icons ganz unten rechts */
.ai-label.portfolio-card-ai {
  position: absolute;
  left: auto;
  right: 20px;
  top: auto;
  bottom: 24px;
  z-index: 5;
  transform: none;
}


/* =========================================
   BREITE BANNER – PORTALE & GENEALOGIE
   ========================================= */

/* Text links, Button rechts */
.portfolio-wide-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  width: 100%;
  min-height: 250px;
  padding: 36px 40px;
}

.portfolio-wide-text {
  width: min(400px, 45%);
  margin: 0;
  text-align: left;
}

.portfolio-wide-text h2 {
  margin: 0 0 12px;
  font-size: 36px;
  line-height: 1.15;
}

.portfolio-wide-text p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

/* Button rechts */
.portfolio-wide-button {
  margin: 0;
  flex-shrink: 0;
}

/* KI-Icon unten rechts */
.ai-label.portfolio-wide-ai {
  position: absolute;
  left: auto;
  right: 22px;
  top: auto;
  bottom: 20px;
  z-index: 5;
  transform: none;
}


/* =========================================
   BUTTONS – WIE AUF DER PORTAL-SEITE
   ========================================= */

.portfolio-card-button,
.portfolio-wide-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 0 0 auto;
  width: fit-content;
  min-width: 0;
  height: 38px;
  padding: 9px 14px;
  border: 1px solid rgba(111, 182, 217, .5);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background .25s ease,
    border-color .25s ease,
    box-shadow .25s ease,
    transform .25s ease;
}

/* Kleinen Button unten halten */
.portfolio-card-button {
  margin-top: auto;
}

/* Pfeile */
.portfolio-card-button span,
.portfolio-wide-button span {
  color: #85c9e5;
  font-size: 23px;
  font-weight: 300;
  line-height: .7;
}

/* Hover */
.portfolio-card-button:hover,
.portfolio-wide-button:hover {
  background: rgba(111, 182, 217, .13);
  border-color: #85c9e5;
  color: #fff;
  box-shadow: 0 0 16px rgba(111, 182, 217, .15);
  transform: translateY(-2px);
}


/* =========================================
   MOBILE ANPASSUNGEN
   ========================================= */

@media (max-width: 700px) {

  .portfolio-card-content {
    padding: 22px;
  }

  .portfolio-card-content h2 {
    font-size: 25px;
  }

  .portfolio-card-content p {
    font-size: 14px;
  }

  .ai-label.portfolio-card-ai {
    right: 20px;
    bottom: 22px;
  }

  .portfolio-wide-content {
    min-height: 330px;
    padding: 30px 24px;
    align-items: flex-end;
    gap: 16px;
  }

  .portfolio-wide-text {
    width: min(100%, 420px);
  }

  .portfolio-wide-text h2 {
    font-size: 30px;
  }

  .portfolio-wide-text p {
    font-size: 14px;
  }

  .portfolio-wide-button {
    margin-bottom: 34px;
  }

  .ai-label.portfolio-wide-ai {
    right: 20px;
    bottom: 16px;
  }
}

/* =========================================
   STARTSEITE – TEXTPOSITIONEN FINAL
   ========================================= */

/* Kleine Kacheln: Text wieder nach unten */
.portfolio-card-content {
  justify-content: flex-end;
  padding-bottom: 24px;
}

/* Abstand zwischen Beschreibung und Button */
.portfolio-card-content p {
  margin-bottom: 20px;
}

/* Button bleibt unten links */
.portfolio-card-button {
  margin-top: 0;
}

/* Große Banner: Text weiter nach oben */
.portfolio-wide-text {
  align-self: flex-start;
  margin-top: 0;
}

/* Mobile Ansicht */
@media (max-width: 700px) {
  .portfolio-wide-text {
    align-self: flex-start;
  }
}

/* =========================================
   STARTSEITE – KACHELN KOMPLETT KLICKBAR
   ========================================= */

/* Kacheln als Klickfläche vorbereiten */
.portfolio-card,
.portfolio-wide {
  position: relative;
  cursor: pointer;
}

/* Vorhandenen Überschriften-Link
   über die gesamte Kachel ausdehnen */
.portfolio-card-content h2 a::after,
.portfolio-wide-text h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* Eigentliche Links weiterhin bedienbar */
.portfolio-card-content,
.portfolio-wide-content {
  position: relative;
  z-index: 2;
}

/* KI-Buttons liegen über der Klickfläche */
.ai-label.portfolio-card-ai,
.ai-label.portfolio-wide-ai {
  position: absolute;
  z-index: 10;
}

/* Hover-Effekt bei Klickfläche */
.portfolio-card:hover,
.portfolio-wide:hover {
  cursor: pointer;
}

/* =========================================
   GLOBALE KLICKBARE KACHELN
   ========================================= */

/* Nur Kacheln mit aktivem Link */
.portfolio-card:has(a[href]),
.portfolio-wide:has(a[href]),
.portal-card:has(a[href]:not(.disabled)),
.merch-card:has(a[href]:not(.disabled)) {
  position: relative;
  cursor: pointer;
}

/* Link-Klickfläche auf ganze Kachel ausdehnen */
.portfolio-card-content h2 a::after,
.portfolio-wide-text h2 a::after,
.portal-card-image > a::after,
.merch-card a:not(.disabled):first-of-type::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* Links mit eigenem Button über der Fläche */
.portfolio-card-button,
.portfolio-wide-button,
.portal-card-button,
.merch-card-button {
  position: relative;
  z-index: 4;
}

/* KI-Icons bleiben separat bedienbar */
.ai-label {
  z-index: 10;
}

/* Deaktivierte Links nicht anklickbar */
.portal-card:has(.portal-card-button.disabled) {
  cursor: default;
}

/* Info-Kacheln ohne Links bleiben unverändert */
.about-skill-card,
.about-timeline-card,
.about-project-card:not(:has(a[href])) {
  cursor: default;
}


/* =========================================
   PORTALE & GENEALOGIE – TEXT ABDUNKLUNG
   ========================================= */

.portfolio-wide-text {
  position: relative;
  z-index: 2;
  isolation: isolate;
}

/* Dezente schwarze Fläche hinter dem Text */
.portfolio-wide-text::before {
  content: "";
  position: absolute;

  top: -25px;
  bottom: -25px;
  left: -40px;
  right: -35px;

  z-index: -1;
  pointer-events: none;

  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.20) 0%,
    rgba(0, 0, 0, 0.15) 55%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* =========================================
   KONTAKT-DROPDOWN – DYNAMISCHE POSITION
   Folgt dem tatsächlichen Kontakt-Menüpunkt,
   unabhängig von der Anzahl der Header-Links.
   ========================================= */

.main-nav a[data-nav="kontakt"] {
  anchor-name: --richwin-kontakt-trigger;
}

@supports (left: anchor(center)) {
  .mega-menu-panel[data-menu="kontakt"] {
    position-anchor: --richwin-kontakt-trigger;
    left: anchor(center);
    right: auto;
    transform: translateX(-50%);
  }
}

/* Auf schmalen Mobilbildschirmen vollständig sichtbar. */
@media (max-width: 620px) {
  .mega-menu-panel[data-menu="kontakt"] {
    left: auto;
    right: 12px;
    transform: none;
  }
}

/* =========================================
   STARTSEITE – INTRO OHNE PORTRÄT
   Text nur über den ersten zwei Kacheln
   ========================================= */

.intro-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  min-height: 0;
  padding-top: 42px;
  padding-bottom: 48px;
}

.intro-text {
  grid-column: 1;
  width: 100%;
  max-width: none;
}

.intro-image {
  display: none;
}

/* Smartphone: Text nutzt volle Breite */

@media (max-width: 700px) {
  .intro-inner {
    grid-template-columns: 1fr;
    padding-top: 40px;
    padding-bottom: 55px;
  }
}
/* Abstand zwischen Intro und Portfolio verkleinern */
@media (min-width: 801px) {
  .portfolio-overview {
    margin-top: -48px;
  }
}


/* =========================================
   GENEALOGIE – 4 HAUPTKACHELN
   Passend zur Menüstruktur
   ========================================= */

/* Vier gleich große Spalten */

.genealogy-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

/* Gleiche Kachelgröße */

.genealogy-overview-grid .genealogy-card {
  grid-column: auto;
  min-height: 285px;
  padding: 28px 19px 23px;
}

/* Gleiche Icongröße */

.genealogy-overview-grid .genealogy-card-icon img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

/* Einheitliche Überschriften */

.genealogy-overview-grid .genealogy-card h3 {
  font-size: 18px;
}

/* Beschreibungen */

.genealogy-overview-grid .genealogy-card p {
  max-width: 230px;
  margin-bottom: 20px;
}

/* Buttons unten ausrichten */

.genealogy-overview-grid .genealogy-card-link {
  margin-top: auto;
}

/* =========================================
   TABLET – 2 SPALTEN
   ========================================= */

@media (max-width: 950px) {

  .genealogy-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

/* =========================================
   SMARTPHONE – 1 SPALTE
   ========================================= */

@media (max-width: 650px) {

  .genealogy-overview-grid {
    grid-template-columns: 1fr;
  }

  .genealogy-overview-grid .genealogy-card {
    min-height: 250px;
  }

}

/* =========================================
   GENEALOGIE – KACHELABSTÄNDE
   ========================================= */

@media (min-width: 951px) {
  .genealogy-page .genealogy-overview-grid {
    margin-top: 60px;
    gap: 18px;
  }
}

/* PORTALE – MENÜABSTÄNDE */

#richwin-mega-menu[data-menu="portale"]
.mega-portfolio-group {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Portal-Merch ohne lange Unterstreichung */

#richwin-mega-menu[data-menu="portale"]
.mega-portfolio-title {
  padding-bottom: 4px;
  border-bottom: none;
}

/* Trennlinie erst vor Portal 01 */

#richwin-mega-menu[data-menu="portale"]
.mega-portfolio-group + .mega-link {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(200, 136, 233, .22);
}

/* Kompakte Vorschau */

#richwin-mega-menu[data-menu="portale"]
.mega-portfolio-hint {
  gap: 2px;
  font-size: 10px;
}

/* PORTALE – KOMPAKTES DROPDOWN */

#richwin-mega-menu[data-menu="portale"]
.mega-portfolio-group {
  margin: 0;
  padding: 0;
  border: none;
}

#richwin-mega-menu[data-menu="portale"]
.mega-portfolio-group > summary {
  gap: 2px;
  padding: 2px 6px 3px;
}

#richwin-mega-menu[data-menu="portale"]
.mega-portfolio-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: none;
  font-size: 13px;
  font-weight: 400;
}

#richwin-mega-menu[data-menu="portale"]
.portal-menu-icon {
  color: #c888e9;
  font-size: 14px;
}

#richwin-mega-menu[data-menu="portale"]
.mega-portfolio-hint {
  gap: 1px;
  margin: 0 0 2px 20px;
  font-size: 10px;
  line-height: 1.3;
}

#richwin-mega-menu[data-menu="portale"]
.mega-portfolio-group + .mega-link {
  margin-top: 2px;
  padding-top: 3px;
  border-top: none;
}

#richwin-mega-menu[data-menu="portale"]
.mega-column {
  gap: 0;
}

/* Portale – Raute vor Portal-Merch */

#richwin-mega-menu[data-menu="portale"]
.mega-portfolio-title::before {
  content: "◇";
  display: inline-block;
  color: #c888e9;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  margin-right: 0px;
}

/* =========================================
   GENEALOGIE – KOMPAKTES DROPDOWN
   ========================================= */

/* Lange Trennlinien entfernen */

#richwin-mega-menu[data-menu="genealogie"]
.mega-portfolio-group {
  margin: 0;
  padding: 0;
  border-top: none;
}

/* Kategorieüberschriften */

#richwin-mega-menu[data-menu="genealogie"]
.mega-portfolio-title {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding-bottom: 3px;
  border-bottom: 1px solid #d8b890;
  font-size: 13px;
  font-weight: 700;
}

/* Unterstreichung schmal halten */

#richwin-mega-menu[data-menu="genealogie"]
.mega-portfolio-title::after {
  display: none;
}

/* Abstände verringern */

#richwin-mega-menu[data-menu="genealogie"]
.mega-portfolio-group > summary {
  padding: 3px 4px;
  gap: 2px;
}

/* Vorschau der Unterseiten kompakt */

#richwin-mega-menu[data-menu="genealogie"]
.mega-portfolio-hint {
  margin: 1px 0 5px 4px;
  gap: 2px;
  line-height: 1.3;
  font-size: 10px;
}

/* Abstand zwischen den Kategorien */

#richwin-mega-menu[data-menu="genealogie"]
.mega-portfolio-group + .mega-portfolio-group {
  margin-top: 5px;
}

/* Bildarchiv näher an Familienregister */

#richwin-mega-menu[data-menu="genealogie"]
.mega-portfolio-group + .mega-link {
  margin-top: 4px;
  padding-top: 3px;
  border-top: none;
}

/* =========================================
   GENEALOGIE – AUSRICHTUNG & MENÜBREITE
   ========================================= */

/* Schmal, wenn alle Kategorien geschlossen sind */

#richwin-mega-menu[data-menu="genealogie"] {
  width: 190px;
  max-width: calc(100vw - 24px);
  grid-template-columns: minmax(0, 1fr);
  transition: width .25s ease;
}

/* Breiter, sobald eine Kategorie geöffnet ist */

#richwin-mega-menu[data-menu="genealogie"]:has(
  .mega-portfolio-group[open]
) {
  width: 300px;
  max-width: calc(100vw - 24px);
}

/* Alle Hauptkategorien linksbündig */

#richwin-mega-menu[data-menu="genealogie"]
.mega-portfolio-group > summary {
  padding-left: 0;
}

/* Bildarchiv ebenfalls bündig */

#richwin-mega-menu[data-menu="genealogie"]
.mega-column > .mega-link {
  padding-left: 0;
}

/* Unterkategorien leicht eingerückt lassen */

#richwin-mega-menu[data-menu="genealogie"]
.mega-portfolio-children {
  padding-left: 12px;
}

/* PORTALE – DYNAMISCHE MENÜBREITE */

#richwin-mega-menu[data-menu="portale"] {
  width: 165px;
  max-width: calc(100vw - 24px);
  grid-template-columns: minmax(0, 1fr);
  transition: width .25s ease;
}

/* Portal-Merch aufgeklappt */

#richwin-mega-menu[data-menu="portale"]:has(
  .mega-portfolio-group[open]
) {
  width: 190px;
}


/* =========================================
   PORTALE – DUNKLER HEADER MIT FARBLICHT
   ========================================= */

body[data-page="portale"] {
  --header-base: #090b10;
  --header-accent: #c888e9;
  --header-border-color: rgba(164, 107, 202, .28);
  --header-accent-glow: rgba(176, 96, 222, .25);
}

body[data-page="portale"] .site-header {
  background-color: #090b10;

  background-image:
    radial-gradient(
      ellipse 30% 140% at 8% 0%,
      rgba(130, 40, 52, .22),
      transparent 90%
    ),

    radial-gradient(
      ellipse 35% 150% at 32% 5%,
      rgba(100, 27, 145, .25),
      transparent 90%
    ),

    radial-gradient(
      ellipse 32% 140% at 67% 0%,
      rgba(160, 35, 96, .20),
      transparent 90%
    ),

    radial-gradient(
      ellipse 28% 140% at 86% 0%,
      rgba(205, 102, 32, .23),
      transparent 90%
    ),

    linear-gradient(
      to bottom,
      #10101a 0%,
      #0b0d14 65%,
      #090b10 100%
    );

  border-bottom: 1px solid rgba(164, 107, 202, .20);
}

/* Dezente untere Lichtkante */

body[data-page="portale"] .site-header::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(184, 96, 200, .35) 45%,
    rgba(205, 110, 60, .22) 75%,
    transparent
  );
  opacity: .45;
}

/* Dezenter Logo-Lichtstrich */

body[data-page="portale"] .header-logo::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(210, 125, 165, .55),
    transparent
  );
  opacity: .6;
}


/* PORTALE – KOMPAKTE KACHELN UND BILDPOSITION */

.portal-overview .portal-card {
  height: 290px;
  min-height: 290px;
}

/* Bilder oben, direkt über den Überschriften */
.portal-overview .portal-card-image img {
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  height: 125px;
  padding: 0 12px;
  object-fit: contain;
  object-position: center;
  transform: none;
}

/* Text und Buttons kompakt darunter */
.portal-overview .portal-card-content {
  flex: 0 0 155px;
  min-height: 155px;
  padding: 12px 18px 14px;
}

/* Bisherigen Hover-Effekt erhalten */
.portal-overview .portal-card:hover .portal-card-image img {
  transform: scale(1.045);
}

/* Platzhalter 06 und 07 */
.portal-overview .portal-card-placeholder {
  padding-bottom: 110px;
}

/* Smartphone */
@media (max-width: 600px) {
  .portal-overview .portal-card {
    height: 290px;
    min-height: 290px;
  }
}


/* PORTALE – SICHTBARE, DEZENTE LICHTINSELN */

body:has(.portal-overview) {
  background-color: #090b10;

  background-image:
    radial-gradient(
      ellipse 250px 190px at 15% 20%,
      rgba(145, 60, 190, 0.16),
      transparent 100%
    ),
    radial-gradient(
      ellipse 280px 230px at 85% 50%,
      rgba(205, 55, 115, 0.12),
      transparent 100%
    ),
    radial-gradient(
      ellipse 260px 210px at 20% 85%,
      rgba(225, 115, 40, 0.11),
      transparent 100%
    ),
    linear-gradient(#090b10, #090b10);
}


/* =========================================
   EINHEITLICHE TYPOGRAFIE – HAUPTSEITEN
   Vorlage: Portale
   ========================================= */

/* HAUPTÜBERSCHRIFTEN */

.intro-text h1,
.portal-intro h1,
.genealogy-intro h1 {
  font-family: Arial, sans-serif;
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.2;
}

/* EINLEITUNGSTEXTE */

.intro-text p,
.portal-intro-text p,
.genealogy-intro-text p {
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

/* KACHELÜBERSCHRIFTEN */

.portfolio-card-content h2,
.portal-overview .portal-card-content h2,
.genealogy-card h3 {
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

/* KACHELBESCHREIBUNGEN */

.portfolio-card-content p,
.genealogy-card p {
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
}

/* PORTAL-SUBLINES */

.portal-overview .portal-card-type {
  font-size: 11px;
  font-weight: 500;
}

.portal-overview .portal-card-title {
  font-size: 12px;
  font-weight: 600;
}

/* =========================================
   HAUPTSEITEN – EINHEITLICHES RASTER
   ========================================= */

@media (min-width: 951px) {

  /* Gleiche Höhe der Einleitungsbereiche */
  .intro-section,
  .portal-intro {
    height: 330px;
  }

  /* Portfolio: gleiche Startposition */
  .intro-inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 42px;
    padding-bottom: 0;
  }

  /* Einleitungstexte breiter */
  .intro-text {
    grid-column: 1;
    width: 100%;
    max-width: 900px;
  }

  .portal-intro-text {
    max-width: 900px;
  }

  /* Hei! = Position des Zurück-Buttons */
  .intro-text > .intro-small {
    display: flex;
    align-items: center;
    min-height: 36px;
    margin: 0 0 24px;
    font-size: 14px;
  }

  /* Gleicher Beginn der Kachelbereiche */
  .portfolio-overview {
    margin-top: 0;
    padding-top: 25px;
  }

  .portal-overview {
    padding-top: 25px;
  }

}

/* Tablet und Smartphone: flexible Höhe */
@media (max-width: 950px) {

  .intro-section,
  .portal-intro {
    height: auto;
  }

  .intro-inner {
    min-height: 0;
  }

  .intro-text,
  .portal-intro-text {
    max-width: 100%;
  }

  .intro-text > .intro-small {
    min-height: 36px;
    margin-bottom: 24px;
    font-size: 14px;
  }

  .portfolio-overview {
    margin-top: 0;
  }

}


/* =========================================
   HAUPTSEITEN – EINHEITLICHE TYPOGRAFIE
   Vorlage: Portale
   ========================================= */

/* Hauptüberschriften */
.intro-text h1,
.portal-intro h1,
.genealogy-intro h1 {
  font-family: Arial, sans-serif;
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

/* Fließtexte */
.intro-text > p:not(.intro-small),
.portal-intro-text p,
.genealogy-intro-text p {
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.55;
  letter-spacing: normal;
  color: #d0d4dc;
  margin: 0 0 10px;
}

/* Letzter Absatz ohne zusätzlichen Abstand */
.intro-text > p:last-child,
.portal-intro-text p:last-child,
.genealogy-intro-text p:last-child {
  margin-bottom: 0;
}



/* =========================================
   HEADER – FESTE MENÜPOSITIONEN
   Portfolio und Kontakt bleiben an ihren Positionen.
   Über mich steht rechts neben Kontakt.
   ========================================= */

@media (min-width: 951px) {
  .header-inner {
    grid-template-columns: 180px minmax(0, 1fr) 180px;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(4, 105px);
    justify-content: center;
    align-items: center;
    gap: 0;
    width: 100%;
    /* Verschiebt das vierteilige Raster so, dass die bisherigen
       Mittelpunkte von Portfolio und Kontakt erhalten bleiben. */
    padding: 0 0 0 105px;
  }

  .main-nav a[data-nav="portfolio"],
  .main-nav a[data-nav="portale"],
  .main-nav a[data-nav="genealogie"] {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    transform: none;
  }

  .main-nav a[data-nav="kontakt"] {
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
    left: auto;
    transform: none;
  }

  .main-nav a[data-nav="ueber-mich"] {
    grid-column: 4;
    grid-row: 1;
    justify-self: center;
    left: auto;
    transform: none;
  }
}


/* =========================================
   HAUPTSEITEN – EINHEITLICHE KACHELBREITEN
   Portfolio / Portale / Genealogie
   4 gleich breite Spalten; 16px Abstand.
   Individuelle Kachelhöhen bleiben erhalten.
   ========================================= */

/* Alle drei Inhaltsraster haben denselben Außenabstand. */
.portfolio-overview,
.genealogy-page {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 32px;
  padding-right: 32px;
}

.portal-overview {
  width: calc(100% - 64px);
  max-width: 1136px;
  margin-left: auto;
  margin-right: auto;
}

/* Gleiche Spalten- und Reihenabstände für die vier Hauptkacheln. */
.portfolio-grid,
.portal-overview,
.genealogy-page .genealogy-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Inhalte dürfen die gemeinsame Spaltenbreite nicht aufweiten. */
.portfolio-grid > *,
.portal-overview > *,
.genealogy-page .genealogy-overview-grid > * {
  min-width: 0;
}

@media (max-width: 950px) {
  .portfolio-overview,
  .genealogy-page {
    padding-left: 24px;
    padding-right: 24px;
  }

  .portal-overview {
    width: calc(100% - 48px);
  }

  .portfolio-grid,
  .portal-overview,
  .genealogy-page .genealogy-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .portfolio-overview,
  .genealogy-page {
    padding-left: 20px;
    padding-right: 20px;
  }

  .portal-overview {
    width: calc(100% - 40px);
  }

  .portfolio-grid,
  .portal-overview,
  .genealogy-page .genealogy-overview-grid {
    grid-template-columns: 1fr;
  }
}

/* Bildbeschriftungen unter den Portfolio-Bildern ausblenden */
.motion-showcase figcaption,
.print-showcase figcaption,
.web-showcase figcaption,
.photo-showcase figcaption,
.web-showcase .web-loop-caption {
  display: none !important;
}
/* Zurueck zum Portfolio – vier Portfolio-Unterseiten */
.portfolio-back-nav {
  box-sizing: border-box;
  width: min(100%, 1136px);
  margin: 0 auto;
  padding: 17px 24px 0;
}
.portfolio-back-nav a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(125, 184, 215, .30);
  border-radius: 7px;
  background: rgba(14, 25, 36, .65);
  color: #d9e7f1;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.portfolio-back-nav a:hover,
.portfolio-back-nav a:focus-visible {
  border-color: #8dcced;
  background: rgba(125, 184, 215, .11);
  color: #fff;
}
.portfolio-back-nav a:focus-visible { outline: 2px solid #8dcced; outline-offset: 3px; }
@media (max-width: 680px) {
  .portfolio-back-nav { padding: 14px 16px 0; }
}
/* PORTAL-UNTERSEITEN #01–#05
   Gleiche Hero-Hoehe wie Motion & Visuals: 430px am Desktop.
   Ganz unten in die vorhandene style.css einfuegen.
   Keine weiteren Dateien oder Seitenelemente aendern. */
@media (min-width: 701px) {
  .portal-detail-hero .portal-detail-hero-inner {
    height: 430px !important;
    min-height: 430px !important;
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }
  .portal-detail-hero .portal-detail-hero-image img {
    width: auto;
    max-width: 100%;
    max-height: 340px;
    object-fit: contain;
  }
}

/* Auf schmalen Displays bleiben die beiden Spalten untereinander;
   der Inhalt darf hoeher werden, damit nichts ueberlappt. */
@media (max-width: 700px) {
  .portal-detail-hero .portal-detail-hero-inner {
    height: auto !important;
    min-height: 0 !important;
    padding-top: 74px !important;
    padding-bottom: 42px !important;
  }
  .portal-detail-hero .portal-detail-hero-image img {
    width: auto;
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
  }
}
/* ============================================================
   PORTALE 01–05 – dunkler, klarer Hero-Hintergrund
   Ganz am ENDE der vorhandenen style.css ergänzen.
   Die Boxfotos, Beschriftungen und Galerien bleiben unberührt.
   ============================================================ */

/* Weicher Schatten unter dem Header; Bild bleibt sichtbar statt milchig. */
.portal-detail-hero.portal-detail-hero-01,
.portal-detail-hero.portal-detail-hero-02,
.portal-detail-hero.portal-detail-hero-03,
.portal-detail-hero.portal-detail-hero-04,
.portal-detail-hero.portal-detail-hero-05 {
  background-image:
    linear-gradient(
      180deg,
      rgba(14, 7, 22, 0.78) 0%,
      rgba(9, 9, 16, 0.52) 24%,
      rgba(5, 8, 13, 0.37) 57%,
      rgba(5, 8, 13, 0.58) 100%
    ),
    var(--portal-landscape);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Korrekte Dateiendungen: die Hintergrundbilder liegen als WebP vor. */
.portal-detail-hero.portal-detail-hero-01 {
  --portal-landscape: url("images/portale/portal-01/portal_01_hero-background.webp");
}
.portal-detail-hero.portal-detail-hero-02 {
  --portal-landscape: url("images/portale/portal-02/portal_02_hero-background.webp");
}
.portal-detail-hero.portal-detail-hero-03 {
  --portal-landscape: url("images/portale/portal-03/portal_03_hero-background.webp");
}
.portal-detail-hero.portal-detail-hero-04 {
  --portal-landscape: url("images/portale/portal-04/portal_04_hero-background.webp");
}
.portal-detail-hero.portal-detail-hero-05 {
  --portal-landscape: url("images/portale/portal-05/portal_05_hero-background.webp");
}

/* Text und Holzbox bleiben bewusst oberhalb der Hintergründe. */
.portal-detail-hero .portal-detail-hero-inner {
  position: relative;
  z-index: 1;
}
/* PORTAL #01 BIS #05: Hero-Landschaft weich in den dunklen Seitenhintergrund ausblenden.
   Nur die Hintergrundgrafik wird unten abgedunkelt; Boxen und Texte bleiben scharf.
   Diesen Block GANZ UNTEN an die bestehende style.css anhaengen. */
.portal-detail-hero {
  position: relative;
  isolation: isolate;
}
.portal-detail-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 125px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(9, 11, 16, 0) 0%,
    rgba(9, 11, 16, .18) 22%,
    rgba(9, 11, 16, .60) 63%,
    #090b10 100%
  );
}
.portal-detail-hero > .portal-detail-hero-inner {
  position: relative;
  z-index: 1;
}
@media (max-width: 700px) {
  .portal-detail-hero::before {height: 85px;}
}

/* ==========================================================
   STARTSEITE – WEBDESIGN & DIGITAL ADS (NOVEMBER 2026)
   1. Hero innerhalb der Kachel nach oben setzen
   2. Unteren Verlauf verstärken, damit die Bildkante verschwindet
   3. Nur das KI-Icon dieser einen Kachel ausblenden
   Andere Portfolio-Kacheln bleiben unverändert.
   ========================================================== */

/* WEBDESIGN – Hero gezielt nach oben verschieben */

.portfolio-card.landing-pages {
  background-image: none;
}

.portfolio-card.landing-pages::after {
  content: "";
  position: absolute;
  inset: -15% 0 0 0;
  z-index: 0;
  background: url("images/general/Hero_Webdesign.webp")
              center center / cover no-repeat;
  pointer-events: none;
}

.portfolio-card.landing-pages::before {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.01) 0%,
    rgba(0, 0, 0, 0.07) 27%,
    rgba(0, 0, 0, 0.38) 49%,
    rgba(0, 0, 0, 0.82) 67%,
    rgba(0, 0, 0, 0.97) 84%,
    #050608 100%
  );
}

.portfolio-card.landing-pages .ai-label.portfolio-card-ai {
  display: none !important;
}

/* ============================================================
   STARTSEITE – ALLE HINWEIS-ICONS ZENTRAL STEUERN
   Gilt für KI-Grafiken und runde i-Icons gleichermaßen.
   Hier die gewünschte sichtbare Größe ändern: 20px.
   Die Klickfläche bleibt unabhängig davon 28px groß.
   ============================================================ */
.portfolio-overview {
  --hinweis-groesse: 20px;      /* Sichtbare Größe: KI + i */
  --hinweis-schrift: 13px;      /* Schriftgröße des i */
  --hinweis-abstand: 8px;       /* Abstand zur rechten/unteren Ecke */
}

/* Gleiche Position und komfortable Klickfläche für alle Hinweise. */
.portfolio-overview .portfolio-card .ai-label.portfolio-card-ai,
.portfolio-overview .portfolio-wide .ai-label.portfolio-wide-ai {
  left: auto !important;
  top: auto !important;
  right: var(--hinweis-abstand) !important;
  bottom: var(--hinweis-abstand) !important;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* KI-Bild und HTML-i: exakt dieselbe äußere Größe. */
.portfolio-overview .portfolio-card .ai-label.portfolio-card-ai img,
.portfolio-overview .portfolio-wide .ai-label.portfolio-wide-ai img,
.portfolio-overview .portfolio-card .ai-label.portfolio-card-ai .photo-info-icon,
.portfolio-overview .portfolio-wide .ai-label.portfolio-wide-ai .photo-info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--hinweis-groesse) !important;
  height: var(--hinweis-groesse) !important;
  max-width: var(--hinweis-groesse) !important;
  max-height: var(--hinweis-groesse) !important;
  object-fit: contain;
  flex: 0 0 var(--hinweis-groesse);
}

/* Nur die runden i-Icons erhalten die weiße Kreisfläche. */
.portfolio-overview .photo-info-icon {
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font: 700 var(--hinweis-schrift)/1 Arial, Helvetica, sans-serif;
}

.portfolio-overview .ai-label:hover .photo-info-icon,
.portfolio-overview .ai-label:focus-visible .photo-info-icon {
  background: #d9eaf2;
}

/* Webdesign bleibt bewusst ohne KI-Icon. */
.portfolio-card.landing-pages .ai-label.portfolio-card-ai {
  display: none !important;
}


/* ==========================================================
   STARTSEITE – VERLÄUFE V15
   Webdesign: untere Bildkante stärker abdunkeln.
   Portale + Genealogie: keine rechteckige Fläche hinter
   dem Text; weicher Verlauf über die volle Bannerhöhe.
   ========================================================== */

/* Webdesign: Schwarz setzt höher und kräftiger ein. */
.portfolio-overview .portfolio-card.landing-pages::before {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.02) 0%,
    rgba(0, 0, 0, 0.12) 24%,
    rgba(0, 0, 0, 0.46) 43%,
    rgba(0, 0, 0, 0.85) 61%,
    rgba(0, 0, 0, 0.97) 79%,
    #050608 100%
  );
}

/* Die bisherige isolierte Textfläche erzeugte die sichtbare
   rechteckige Kante: nur auf diesen beiden Bannern ausblenden. */
.portfolio-overview .portfolio-wide.portals .portfolio-wide-text::before,
.portfolio-overview .portfolio-wide.genealogy .portfolio-wide-text::before {
  display: none;
}

/* Ein durchgängiger, weicher Verlauf von links bis zur Mitte;
   rechts zusätzliche Abdunklung für den Entdecken-Button. */
.portfolio-overview .portfolio-wide.portals::before,
.portfolio-overview .portfolio-wide.genealogy::before {
  background:
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.57) 20%,
      rgba(0, 0, 0, 0.30) 40%,
      rgba(0, 0, 0, 0) 66%
    ),
    linear-gradient(
      to left,
      rgba(0, 0, 0, 0.60) 0%,
      rgba(0, 0, 0, 0.17) 23%,
      rgba(0, 0, 0, 0) 50%
    );
}


/* ==========================================================
   STARTSEITE – TEXTSATZ V16 (15.11.2026)
   Hei! besser sichtbar, Intro-Text angenehm schmal,
   kontrollierte Zeilenumbrüche der sechs Kachelbeschreibungen.
   ========================================================== */

/* Einleitung: ungefähr bis zur Mitte zwischen Kachel 2 und 3. */
.intro-section .intro-text > p:not(.intro-small) {
  max-width: 610px;
}

/* Hei! passend zum übrigen Einstieg, ohne Seitenbuttons zu ändern. */
.intro-section .intro-text > .intro-small {
  font-size: 20px;
  line-height: 1.35;
}

/* Gewünschte Umbrüche auf größeren Bildschirmen. */
.portfolio-overview .start-copy-break {
  display: initial;
}

/* Auf schmalen Screens den Browser natürlich umbrechen lassen. */
@media (max-width: 700px) {
  .portfolio-overview .start-copy-break {
    display: none;
  }
  .intro-section .intro-text > p:not(.intro-small) {
    max-width: 100%;
  }
}


/* ==========================================================
   RICHWINDESIGN – PORTFOLIO LIGHT MODE V18
   Zentraler Umschalter in script.js. Standard bleibt dunkel.
   Nur body[data-page="portfolio"] (Startseite & Portfolio).
   Portalwelten, Genealogie und ihre Unterseiten nicht ändern.
   ========================================================== */

/* Schalter rechts neben den Social-Icons */
body[data-page="portfolio"] .social-links {
  gap: 12px;
}
body[data-page="portfolio"] .portfolio-theme-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin-left: 5px;
  padding: 5px;
  color: var(--header-accent, #89d7f1);
  background: rgba(143, 189, 217, .08);
  border: 1px solid var(--header-border-color, rgba(143,189,217,.35));
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
body[data-page="portfolio"] .portfolio-theme-toggle:hover {
  background: rgba(143, 189, 217, .2);
  transform: translateY(-1px);
}
body[data-page="portfolio"] .portfolio-theme-toggle:focus-visible {
  outline: 2px solid var(--header-accent, #89d7f1);
  outline-offset: 3px;
}
body[data-page="portfolio"] .portfolio-theme-toggle svg { width: 17px; height: 17px; }
body[data-page="portfolio"] .portfolio-theme-toggle [hidden] { display: none; }

/* Zentrale Light-Farben */
body[data-page="portfolio"][data-theme="light"] {
  --header-base: #f4f7f9;
  --header-light-left: rgba(157, 203, 227, .28);
  --header-light-right: rgba(194, 217, 229, .24);
  --header-accent: #276b91;
  --header-border-color: rgba(64, 112, 139, .30);
  --header-accent-glow: rgba(80, 154, 198, .2);
  --menu-hint: #536c7c;
  background: #f1f4f6;
  color: #202f39;
  color-scheme: light;
}
body[data-page="portfolio"][data-theme="light"]::before {
  background:
    radial-gradient(ellipse at 12% 5%, rgba(173,207,224,.26), transparent 42%),
    radial-gradient(ellipse at 89% 90%, rgba(218,229,234,.24), transparent 36%);
}
body[data-page="portfolio"][data-theme="light"] .site-header {
  background-color: var(--header-base);
  box-shadow: 0 5px 18px rgba(31, 69, 89, .05);
}
body[data-page="portfolio"][data-theme="light"] .site-header .header-logo {
  color: #24475c;
}
body[data-page="portfolio"][data-theme="light"] .site-header .main-nav a,
body[data-page="portfolio"][data-theme="light"] .main-nav a {
  color: #2d485a;
}
body[data-page="portfolio"][data-theme="light"] .site-header .main-nav a:hover,
body[data-page="portfolio"][data-theme="light"] .site-header .main-nav a.active {
  color: #0c3857;
}
/* Bestehende weiße Social-Icons bleiben sichtbar auf zart getönter Fläche. */
body[data-page="portfolio"][data-theme="light"] .social-links > a {
  background: #27465a;
  border-radius: 5px;
  padding: 3px;
  flex-basis: 26px;
  width: 26px;
  height: 26px;
}
body[data-page="portfolio"][data-theme="light"] .social-links > a img {
  width: 19px;
  height: 19px;
}
body[data-page="portfolio"][data-theme="light"] #richwin-mega-menu,
body[data-page="portfolio"][data-theme="light"] .mega-menu-panel {
  color: #243e4d;
  background-color: #f7fafc;
}
body[data-page="portfolio"][data-theme="light"] #richwin-mega-menu a,
body[data-page="portfolio"][data-theme="light"] .mega-menu-panel a {
  color: #26475d;
}
body[data-page="portfolio"][data-theme="light"] #richwin-mega-menu a:hover,
body[data-page="portfolio"][data-theme="light"] .mega-menu-panel a:hover {
  color: #0c6c9e;
}

/* Intro auf der Startseite: dunkler Text auf hellem Hintergrund. */
body[data-page="portfolio"][data-theme="light"] .intro-section {
  background: transparent;
}
body[data-page="portfolio"][data-theme="light"] .intro-text h1,
body[data-page="portfolio"][data-theme="light"] .intro-text .intro-small {
  color: #172b38;
}
body[data-page="portfolio"][data-theme="light"] .intro-text h1 span {
  color: #2e789f;
  text-shadow: none;
}
body[data-page="portfolio"][data-theme="light"] .intro-text p:not(.intro-small) {
  color: #3d5261;
}
/* Kartenbilder behalten bewusst ihre dunklen Verläufe und weiße Typografie. */
body[data-page="portfolio"][data-theme="light"] .portfolio-card,
body[data-page="portfolio"][data-theme="light"] .portfolio-wide {
  color: #fff;
  border-color: rgba(49, 84, 108, .2);
  box-shadow: 0 14px 32px rgba(50, 68, 84, .12);
}
body[data-page="portfolio"][data-theme="light"] .portfolio-card-content,
body[data-page="portfolio"][data-theme="light"] .portfolio-wide-content,
body[data-page="portfolio"][data-theme="light"] .portfolio-card-content p,
body[data-page="portfolio"][data-theme="light"] .portfolio-wide-text p {
  color: #fff;
}
/* Für Portfolio-Unterseiten: Hero-Fotografien und Text bleiben dunkel/weiß. */
body[data-page="portfolio"][data-theme="light"] .motion-page-hero,
body[data-page="portfolio"][data-theme="light"] .print-page-hero,
body[data-page="portfolio"][data-theme="light"] .landing-page-hero,
body[data-page="portfolio"][data-theme="light"] .photo-page-hero {
  color: #fff;
}
body[data-page="portfolio"][data-theme="light"] .motion-page-hero h1,
body[data-page="portfolio"][data-theme="light"] .print-page-hero h1,
body[data-page="portfolio"][data-theme="light"] .landing-page-hero h1,
body[data-page="portfolio"][data-theme="light"] .photo-page-hero h1 {
  color: #fff;
}
/* Neutrale Flächen unter den Hero-Motiven. */
body[data-page="portfolio"][data-theme="light"] .print-gallery-item {
  background: #dce3e8;
}
body[data-page="portfolio"][data-theme="light"] .photo-compare-block h2,
body[data-page="portfolio"][data-theme="light"] .photo-compare-card h3,
body[data-page="portfolio"][data-theme="light"] .photo-project-grid h2 {
  color: #253d4a;
}
/* KI-/Bildnachweis-Popup bleibt für Kontrast in seiner dunklen Gestaltung. */

@media (max-width: 700px) {
  body[data-page="portfolio"] .portfolio-theme-toggle {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    margin-left: 0;
  }
  body[data-page="portfolio"] .social-links { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="portfolio"] .portfolio-theme-toggle { transition: none; }
}

/* RichwinDesign – Soft Light Mode V19
   Nur für den Portfolio-Light-Mode.
   Dark Mode, Portale, Genealogie und Kachelbilder bleiben unverändert.
   Zum Schluss der bestehenden style.css hinzufügen. */
body[data-page="portfolio"][data-theme="light"] {
  --header-base: #c6d2da;
  --header-light-left: rgba(134, 177, 198, .46);
  --header-light-right: rgba(185, 200, 213, .40);
  background-color: #c9d3d9;
  background-image:
    radial-gradient(ellipse 68% 48% at 16% 20%, rgba(228, 238, 241, .70) 0%, transparent 100%),
    radial-gradient(ellipse 60% 52% at 90% 78%, rgba(141, 173, 190, .36) 0%, transparent 100%),
    linear-gradient(145deg, #c0cbd2 0%, #d1dce1 46%, #bccbd3 100%);
  background-attachment: fixed;
  color: #203542;
}

/* Keine zweite helle Ebene über dem Verlauf. */
body[data-page="portfolio"][data-theme="light"]::before {
  background: none;
}

/* Ruhiger, etwas dunklerer Header mit weichen Lichtinseln. */
body[data-page="portfolio"][data-theme="light"] .site-header {
  background-color: var(--header-base);
  background-image:
    radial-gradient(ellipse 40% 150% at 18% 50%, var(--header-light-left), transparent 100%),
    radial-gradient(ellipse 40% 150% at 82% 50%, var(--header-light-right), transparent 100%);
  box-shadow: 0 5px 18px rgba(27, 55, 75, .09);
}
/* ==========================================================
   RICHWINDESIGN – HEADER FEINSCHLIFF V20
   Nur Portfolio: ein Modus-Icon, feste Social-Position,
   dunkle Icons ohne Kacheln im Soft-Light-Mode.
   Diese Regeln ganz unten in style.css einfügen.
   ========================================================== */

/* Social-Icons in beiden Modi an derselben Position. */
body[data-page="portfolio"] .site-header .social-links {
  position: relative;
  gap: 13px;
}

body[data-page="portfolio"][data-theme="light"] .site-header .social-links > a {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Die vorhandenen hellen Bild-Icons ohne Kasten dunkel einfärben. */
body[data-page="portfolio"][data-theme="light"] .site-header .social-links > a img {
  width: 20px;
  height: 20px;
  filter: brightness(0) saturate(100%);
  opacity: .82;
}
body[data-page="portfolio"][data-theme="light"] .site-header .social-links > a:hover img {
  opacity: 1;
}

/* Theme-Schalter nicht als zusätzliches Flex-Element zählen:
   die Social-Icons bleiben daher beim Umschalten exakt stehen. */
body[data-page="portfolio"] .site-header .portfolio-theme-toggle {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}
body[data-page="portfolio"] .site-header .portfolio-theme-toggle:hover {
  transform: translateY(-50%);
}

/* Genau ein Symbol anzeigen: Dark = Sonne, Light = Mond. */
body[data-page="portfolio"] .portfolio-theme-toggle .theme-toggle-sun[hidden],
body[data-page="portfolio"] .portfolio-theme-toggle .theme-toggle-moon[hidden] {
  display: none !important;
}
body[data-page="portfolio"] .portfolio-theme-toggle .theme-toggle-sun:not([hidden]),
body[data-page="portfolio"] .portfolio-theme-toggle .theme-toggle-moon:not([hidden]) {
  display: block;
}

/* Auch auf schmalen Bildschirmen die Icons gleich positionieren. */
@media (max-width: 700px) {
  body[data-page="portfolio"] .site-header .social-links { gap: 10px; }
  body[data-page="portfolio"] .site-header .portfolio-theme-toggle {
    right: calc(100% + 8px);
  }
}
/* RichwinDesign V21 – genau ein Theme-Icon je Modus.
   Ganz unten in style.css anhaengen.
   Dark: Sonne als Wechseloption; Light: Mond als Wechseloption.
   Setzt sich ueber aeltere hidden-/display-Regeln hinweg. */
body[data-page="portfolio"] .site-header .portfolio-theme-toggle svg.theme-toggle-sun,
body[data-page="portfolio"] .site-header .portfolio-theme-toggle svg.theme-toggle-moon {
  display: none !important;
}
body[data-page="portfolio"][data-theme="dark"] .site-header .portfolio-theme-toggle svg.theme-toggle-sun,
body[data-page="portfolio"][data-theme="light"] .site-header .portfolio-theme-toggle svg.theme-toggle-moon {
  display: block !important;
}
/* RichwinDesign – Light-Mode-Header V22
   Einheitliche Schrift- und Iconfarbe wie "Ich bin" (#172b38).
   Nur Portfolio im Light Mode. Dark Mode bleibt unverändert.
   Am Ende der bestehenden style.css einfuegen. */
body[data-page="portfolio"][data-theme="light"] {
  --portfolio-header-ink: #172b38;
}

body[data-page="portfolio"][data-theme="light"] .site-header .header-logo,
body[data-page="portfolio"][data-theme="light"] .site-header .main-nav a,
body[data-page="portfolio"][data-theme="light"] .site-header .portfolio-theme-toggle {
  color: var(--portfolio-header-ink);
}

/* Die eingebundenen hellen Social-Icons ohne Hintergrundkasten
   auf das gleiche dunkle Blaugrau einfärben. */
body[data-page="portfolio"][data-theme="light"] .site-header .social-links > a img {
  filter: brightness(0) saturate(100%) invert(13%) sepia(26%) saturate(778%) hue-rotate(155deg) brightness(94%) contrast(92%);
  opacity: 1;
}

/* Aktiven Navigationspunkt weiterhin durch seine Unterstreichung kennzeichnen. */
body[data-page="portfolio"][data-theme="light"] .site-header .main-nav a.active {
  color: var(--portfolio-header-ink);
}
/* ============================================================
   RICHWINDESIGN – PORTFOLIO-UNTERSEITEN / SOFT LIGHT MODE V23
   Gilt nur, wenn der Portfolio-Light-Mode aktiviert ist.
   In die globale style.css ganz unten einsetzen.
   Dark Mode, Portale und Genealogie bleiben unverändert.

   ZENTRALE FARBEN: Hier können die Unterseiten später gemeinsam
   angepasst werden, ohne vier CSS-Dateien anzufassen.
   ============================================================ */
body[data-page="portfolio"][data-theme="light"] {
  --portfolio-light-ink: #172b38;
  --portfolio-light-muted: #3d5261;
  --portfolio-light-subtle: #506b7d;
  --portfolio-light-accent: #276b91;
  --portfolio-light-panel: rgba(231, 238, 242, .66);
  --portfolio-light-panel-strong: rgba(240, 245, 248, .83);
  --portfolio-light-edge: rgba(50, 86, 108, .23);
}

/* Die Abschnitte unterhalb der Hero-Motive tragen die weiche,
   blaugraue Hintergrundwelt weiter – nicht die alten schwarzen Bänder. */
body[data-page="portfolio"][data-theme="light"] .motion-description,
body[data-page="portfolio"][data-theme="light"] .print-description,
body[data-page="portfolio"][data-theme="light"] .web-description,
body[data-page="portfolio"][data-theme="light"] .photo-description {
  background: transparent;
  color: var(--portfolio-light-ink);
}

/* Texte in Beschreibungen und Galerien: einheitlich dunkel. */
body[data-page="portfolio"][data-theme="light"] .motion-showcase,
body[data-page="portfolio"][data-theme="light"] .print-showcase,
body[data-page="portfolio"][data-theme="light"] .web-showcase,
body[data-page="portfolio"][data-theme="light"] .photo-showcase,
body[data-page="portfolio"][data-theme="light"] .motion-description-inner,
body[data-page="portfolio"][data-theme="light"] .print-description-inner,
body[data-page="portfolio"][data-theme="light"] .web-description-inner,
body[data-page="portfolio"][data-theme="light"] .photo-description-inner {
  color: var(--portfolio-light-ink);
}

body[data-page="portfolio"][data-theme="light"] .motion-description-inner > p:not(.motion-page-subtitle),
body[data-page="portfolio"][data-theme="light"] .print-description-inner > p:not(.print-page-subtitle),
body[data-page="portfolio"][data-theme="light"] .web-description-inner > p:not(.web-page-subtitle),
body[data-page="portfolio"][data-theme="light"] .photo-description-inner > p:not(.photo-page-subtitle),
body[data-page="portfolio"][data-theme="light"] .motion-showcase-intro p,
body[data-page="portfolio"][data-theme="light"] .print-showcase-intro p,
body[data-page="portfolio"][data-theme="light"] .web-showcase-intro p,
body[data-page="portfolio"][data-theme="light"] .photo-showcase-intro p,
body[data-page="portfolio"][data-theme="light"] .motion-project-heading p,
body[data-page="portfolio"][data-theme="light"] .print-project-heading p,
body[data-page="portfolio"][data-theme="light"] .web-project-heading p,
body[data-page="portfolio"][data-theme="light"] .photo-project-heading p {
  color: var(--portfolio-light-muted);
}

/* Überschriften und Details der aufklappbaren Kategorien. */
body[data-page="portfolio"][data-theme="light"] .motion-project-heading h2,
body[data-page="portfolio"][data-theme="light"] .print-project-heading h2,
body[data-page="portfolio"][data-theme="light"] .web-project-heading h2,
body[data-page="portfolio"][data-theme="light"] .photo-project-heading h2,
body[data-page="portfolio"][data-theme="light"] .print-feature-header h3 {
  color: var(--portfolio-light-ink);
}

body[data-page="portfolio"][data-theme="light"] .motion-page-subtitle,
body[data-page="portfolio"][data-theme="light"] .print-page-subtitle,
body[data-page="portfolio"][data-theme="light"] .web-page-subtitle,
body[data-page="portfolio"][data-theme="light"] .photo-page-subtitle,
body[data-page="portfolio"][data-theme="light"] .motion-showcase-intro > span,
body[data-page="portfolio"][data-theme="light"] .print-showcase-intro > span,
body[data-page="portfolio"][data-theme="light"] .web-showcase-intro > span,
body[data-page="portfolio"][data-theme="light"] .photo-showcase-intro > span,
body[data-page="portfolio"][data-theme="light"] .motion-project-number,
body[data-page="portfolio"][data-theme="light"] .print-project-number,
body[data-page="portfolio"][data-theme="light"] .web-project-number,
body[data-page="portfolio"][data-theme="light"] .photo-project-number,
body[data-page="portfolio"][data-theme="light"] .motion-project-action,
body[data-page="portfolio"][data-theme="light"] .print-project-action,
body[data-page="portfolio"][data-theme="light"] .web-project-action,
body[data-page="portfolio"][data-theme="light"] .photo-project-action {
  color: var(--portfolio-light-accent);
}

body[data-page="portfolio"][data-theme="light"] .motion-project-count,
body[data-page="portfolio"][data-theme="light"] .print-project-count,
body[data-page="portfolio"][data-theme="light"] .web-project-count,
body[data-page="portfolio"][data-theme="light"] .photo-project-count {
  color: var(--portfolio-light-subtle);
}

body[data-page="portfolio"][data-theme="light"] :is(
  .motion-showcase-intro, .print-showcase-intro,
  .web-showcase-intro, .photo-showcase-intro,
  .motion-project-heading, .print-project-heading,
  .web-project-heading, .photo-project-heading
) {
  border-bottom-color: var(--portfolio-light-edge);
}

/* Karten: helle Einfassung und ein ruhiger Kontrast zur Seite.
   WICHTIG: Fotos/GIFs/Videos selbst werden nicht eingefärbt. */
body[data-page="portfolio"][data-theme="light"] .motion-work,
body[data-page="portfolio"][data-theme="light"] .motion-work.motion-work-feature,
body[data-page="portfolio"][data-theme="light"] .print-work,
body[data-page="portfolio"][data-theme="light"] .web-work,
body[data-page="portfolio"][data-theme="light"] .photo-work {
  background: linear-gradient(155deg, var(--portfolio-light-panel-strong), var(--portfolio-light-panel));
  border-color: var(--portfolio-light-edge);
  box-shadow: 0 9px 24px rgba(40, 64, 82, .07);
  color: var(--portfolio-light-ink);
}

body[data-page="portfolio"][data-theme="light"] .motion-work figcaption,
body[data-page="portfolio"][data-theme="light"] .print-work figcaption,
body[data-page="portfolio"][data-theme="light"] .web-work figcaption,
body[data-page="portfolio"][data-theme="light"] .photo-work figcaption,
body[data-page="portfolio"][data-theme="light"] .web-carservice-loop .web-loop-caption {
  color: var(--portfolio-light-muted);
}

/* Spezielle aufklappbare Motion-Icon-Gruppe. */
body[data-page="portfolio"][data-theme="light"] .motion-showcase .motion-lekkerland-icons {
  background: var(--portfolio-light-panel);
  border-color: var(--portfolio-light-edge);
}
body[data-page="portfolio"][data-theme="light"] .motion-showcase .motion-lekkerland-icons > summary {
  color: var(--portfolio-light-ink);
}
body[data-page="portfolio"][data-theme="light"] .motion-showcase .motion-lekkerland-icons > summary span {
  color: var(--portfolio-light-muted);
}
body[data-page="portfolio"][data-theme="light"] .motion-showcase .motion-lekkerland-icons .motion-work {
  background: var(--portfolio-light-panel-strong);
}

/* Foto-Auswahlfelder: helle Bedienelemente statt grauem Text auf Schwarz. */
body[data-page="portfolio"][data-theme="light"] .photo-showcase .photo-wirelane-choice {
  background: var(--portfolio-light-panel-strong);
  color: var(--portfolio-light-ink);
  border-color: var(--portfolio-light-edge);
}
body[data-page="portfolio"][data-theme="light"] .photo-showcase .photo-wirelane-choice.is-active,
body[data-page="portfolio"][data-theme="light"] .photo-showcase .photo-wirelane-choice:hover {
  background: rgba(104, 159, 190, .22);
  color: var(--portfolio-light-ink);
}

/* Bewusst dunkel lassen: Bildvergleich, Werbebanner-Bühnen,
   Fotos mit Transparenz und ihre im Bild liegenden Beschriftungen. */
body[data-page="portfolio"][data-theme="light"] .photo-compare,
body[data-page="portfolio"][data-theme="light"] .photo-wirelane-viewer,
body[data-page="portfolio"][data-theme="light"] .web-carservice-loop .web-loop-stage {
  background-color: #0a1119;
}

/* Keine Veränderung an Header, Hero, Popups oder Dark Mode. */
/* RichwinDesign V24 – Dropdown-Typografie im Portfolio-Light-Mode
   Nur Portfolio. Dark Mode und die separaten Portale-/Genealogie-Seiten bleiben unverändert.
   Ganz unten an style.css anfuegen. */

body[data-page="portfolio"][data-theme="light"] .site-header #richwin-mega-menu {
  --menu-hint: #415767;
  color: #172b38;
}

/* Titel, Gruppen, Links und Kontakt-/Rechtliches-Menue einheitlich dunkel. */
body[data-page="portfolio"][data-theme="light"] .site-header #richwin-mega-menu .mega-heading,
body[data-page="portfolio"][data-theme="light"] .site-header #richwin-mega-menu .mega-portfolio-title,
body[data-page="portfolio"][data-theme="light"] .site-header #richwin-mega-menu .mega-link,
body[data-page="portfolio"][data-theme="light"] .site-header #richwin-mega-menu .mega-simple-link a,
body[data-page="portfolio"][data-theme="light"] .site-header #richwin-mega-menu a {
  color: #172b38;
}

/* Untertitel bleiben lesbar, aber visuell nachgeordnet. */
body[data-page="portfolio"][data-theme="light"] .site-header #richwin-mega-menu .mega-portfolio-hint,
body[data-page="portfolio"][data-theme="light"] .site-header #richwin-mega-menu .mega-portfolio-hint span {
  color: #415767;
}

/* Farbige Hover-/Fokuszustaende erhalten. */
body[data-page="portfolio"][data-theme="light"] .site-header #richwin-mega-menu a:hover,
body[data-page="portfolio"][data-theme="light"] .site-header #richwin-mega-menu a:focus-visible {
  color: #21688c;
}
