/* =========================================================
   Fotograf Theme - Production CSS (cleaned)
   ---------------------------------------------------------
   1) Design Tokens
   2) Reset & Base
   3) Home Overlays (only home/front-page)
   4) Hero/Slider
   5) Header & Navigation (Home)
   6) Dropdowns (Home)
   7) Branding
   8) Footer
   9) Content/Portfolio
   10) Subpages layout overrides
   11) Responsive
   ========================================================= */

/* =========================================================
   1) DESIGN TOKENS
   ========================================================= */
@font-face {
  font-family: "Tommli";
  src: url("../fonts/Tommli-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colors */
  --color-text: #1f1f1f;
  --color-text-soft: #1f1f1fe8;
  --color-white: #ffffff;
  --color-white-soft: #ffffffb6;
  --color-white-soft-02: #f5f5f5f5;
  --color-black: #000000;

  /* Typography */
  --font-base: "Montserrat", Helvetica, Arial, sans-serif;
  --font-hover: "Tommli", var(--font-base);
  --font-fallback-logo: Georgia, serif;

  /* Sizing */
  --header-top-padding: 1.375rem;
  --header-side-padding: 2.5rem;
  --header-menu-gap: 0.625rem;
  --menu-link-width: 9.375rem;
  --menu-link-height: 1.75rem;

  --footer-height: 2.5rem;
  --footer-side-padding: 2.1875rem;

  --top-gradient-height: 9.375rem;
  --bottom-gradient-height: 8.75rem;

  --container-max: 75rem;
  --container-pad-x: 1.25rem;
  --container-pad-top: 7.5rem;
  --container-pad-bottom: 2.5rem;

  /* Effects */
  --hero-fade-duration: 1.2s;
  --hover-duration: 0.2s;
  --hover-lift: -1px;

  /* Z-Index */
  --z-hero: 1;
  --z-overlay-bottom: 50;
  --z-overlay-top: 55;
  --z-footer: 60;
  --z-header: 70;
  --z-dropdown: 80;

  /* Lightbox */
  --lb-top-gap: 14px;       /* fixer Abstand oben */
  --lb-bottom-gap: 14px;    /* fixer Abstand unten */
  --lb-caption-space: 34px; /* reservierter Titelbereich */
}



/* =========================================================
   2) RESET & BASE
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100%;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-white);
}

/* Startseite ohne Scroll */
body.home,
body.front-page {
  overflow: hidden;
  height: 100vh;
}

/* Unterseiten scrollbar */
body:not(.home):not(.front-page) {
  overflow-y: auto;
  height: auto;
}

/* =========================================================
   3) HOME OVERLAYS (ONLY HOME / FRONT-PAGE)
   ========================================================= */
body.home::before,
body.front-page::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--top-gradient-height);
  z-index: var(--z-overlay-top);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(255, 255, 255, 0) 100%
  );
}

body.home::after,
body.front-page::after {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: var(--bottom-gradient-height);
  z-index: var(--z-overlay-bottom);
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.35) 40%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Unterseiten: Overlays explizit aus */
body:not(.home):not(.front-page)::before,
body:not(.home):not(.front-page)::after {
  content: none;
  display: none;
}

/* =========================================================
   4) HERO / SLIDER
   ========================================================= */
.home-hero,
.hero-slider,
.hero-slide {
  width: 100vw;
  height: 100vh;
}

.hero-slider,
.hero-slide {
  background-position: top center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-slide {
  position: absolute;
  inset: 0;
  z-index: var(--z-hero);
  opacity: 0;
  transition: opacity var(--hero-fade-duration) ease;
}

.hero-slide.is-active {
  opacity: 1;
}

/* =========================================================
   5) HEADER & MAIN NAV (HOME)
   ========================================================= */
.site-header--overlay {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 30;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
}

.home-top-nav {
  position: fixed;
  top: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  padding: 22px 20px 0 40px;
  margin-bottom: 40px;
  z-index: var(--z-header);
}

.main-nav--home {
  background: transparent !important;
}

.main-nav--home .menu,
.main-nav--home .menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav--home .menu {
  display: flex;
  align-items: center;
  gap: var(--header-menu-gap);
}

.main-nav--home .menu > li {
  position: relative;
}

.main-nav--home .menu > li > a {
  position: relative;
  display: inline-grid;
  justify-items: start;
  align-items: center;
  width: var(--menu-link-width);
  height: var(--menu-link-height);
  text-decoration: none;
  text-transform: uppercase;
  line-height: 1;
}

.main-nav--home .menu > li > a .label-base,
.main-nav--home .menu > li > a .label-hover {
  grid-area: 1 / 1;
  justify-self: start;
  white-space: nowrap;
}

.main-nav--home .menu > li > a .label-base {
  font-family: var(--font-base);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--color-text);
  opacity: 1;
}

.main-nav--home .menu > li > a .label-hover {
  font-family: var(--font-hover);
  font-size: 1.25rem;
  letter-spacing: 0.035em;
  transform: translateY(3px);
  color: var(--color-text);
  opacity: 0;
  pointer-events: none;
}

.main-nav--home .menu > li > a:hover .label-base {
  opacity: 0;
}

.main-nav--home .menu > li > a:hover .label-hover {
  opacity: 1;
}

.main-nav--home .menu > li > a:hover {
  color: #111;
  text-shadow:
    0 0 1px rgba(0, 0, 0, 0.35),
    0 0 6px rgba(0, 0, 0, 0.18);
  transform: translateY(var(--hover-lift));
  transition:
    color var(--hover-duration) ease,
    text-shadow var(--hover-duration) ease,
    transform var(--hover-duration) ease;
}

/* =========================================================
   6) DROPDOWNS (HOME)
   ========================================================= */
.main-nav--home .menu .sub-menu {
  position: absolute;
  top: calc(100% - 1px);
  left: -15px;
  margin: 0 0 0 1px;
  min-width: 9.5rem;
  padding: .5rem 0;
  display: none;
  z-index: 80;
  background: var(--color-white-soft);
  backdrop-filter: blur(2px);
}

.main-nav--home .menu > li:hover > .sub-menu,
.main-nav--home .menu > li:focus-within > .sub-menu {
  display: block;
}

.main-nav--home .menu .sub-menu li a {
  display: block;
  padding: .55rem .85rem .55rem 0.9rem;
  text-decoration: none;
  text-transform: none;
  font-family: var(--font-base);
  font-size: .75rem;
  color: var(--color-text-soft);
}

.main-nav--home .menu .sub-menu li a:hover {
  background: var(--color-white-soft-02);
}

/* =========================================================
   7) BRANDING / LOGO
   ========================================================= */
.top-brand {
  margin-top: 1.375rem;
  text-align: center;
}

body.home .top-brand,
body.front-page .top-brand {
  margin-top: 6rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 1.125rem;
  text-decoration: none;
  color: var(--color-text);
}

.brand-text {
  font-family: var(--font-base);
  font-size: 2.5rem;
  font-weight: 100;
}

.brand-logo .custom-logo-link,
.top-brand .custom-logo-link {
  display: inline-block;
  line-height: 0;
  vertical-align: middle;
}

.brand-logo .custom-logo,
.top-brand .custom-logo-link .custom-logo {
  display: block;
  width: auto;
  height: 9.375rem;
  object-fit: contain;
}

.brand-logo .custom-logo {
  max-width: 16.25rem;
}

.brand-logo-fallback {
  font-family: var(--font-fallback-logo);
  font-size: 7.5rem;
  line-height: 1;
}

/* Entry-Content: alle Margins/Paddings killen */
body.page-template-page-templatesportfolio-php .entry-content {
  margin: 0 !important;
  padding: 0 !important;
}

body.page-template-page-templatesportfolio-php .entry-content .wp-block-image {
  overflow: hidden; /* wichtig: Zoom bleibt im Rahmen */
}

body.page-template-page-templatesportfolio-php .entry-content .wp-block-image img {
  transform: scale(1);
  filter: brightness(1) contrast(1);
  transition:
    transform 420ms cubic-bezier(.22, .61, .36, 1),
    filter 260ms ease;
  will-change: transform, filter;
  backface-visibility: hidden;
}


/* =========================================================
   8) FOOTER
   ========================================================= */
.site-footer {
  position: fixed;
  inset: auto 0 0 0;
  z-index: var(--z-footer);
  height: var(--footer-height);
  padding: 0 var(--footer-side-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
}

.site-footer .footer-right { position: relative; top: -6px; }
.site-footer .footer-right svg { display: block; }
.footer-legal { display: flex; align-items: center; gap: 1rem; }
.site-footer a {
  font-size: 0.75rem;
  color: var(--color-white);
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

/* ---------------------------------------------------------
   Footer Unterseiten: PNG-Rand + schwarze Links
   --------------------------------------------------------- */

    /* PNG-Rand ÜBER dem Footer (nur Unterseiten) */
    body:not(.home):not(.front-page) .site-footer::before {
      content: '';
      position: absolute;
      top: -29px;
      left: 0;
      width: 100%;
      height: 100px; /* Höhe des PNG */
      background: url('../images/footer-edge2.png') center top;
      background-size: cover;
      background-repeat: no-repeat;
      pointer-events: none;
      z-index: -1;
      filter: drop-shadow(0 -4px 8px rgba(0, 0, 0, 0.1)); /* Schatten nach oben */
    }

    /* Footer-Links schwarz auf Unterseiten */
    body:not(.home):not(.front-page) .site-footer a {
      color: #000 !important;
      text-shadow: none; /* kein weißer Text-Shadow */
    }

    /* Hover-State */
    body:not(.home):not(.front-page) .site-footer a:hover {
      color: #555 !important;
    }

    /* Falls Footer auch Text/Copyright hat (optional) */
    body:not(.home):not(.front-page) .site-footer,
    body:not(.home):not(.front-page) .site-footer p,
    body:not(.home):not(.front-page) .site-footer span {
      color: #000 !important;
    }

/* =========================================================
   9) CONTENT / PORTFOLIO
   ========================================================= */

 .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-pad-top) var(--container-pad-x) var(--container-pad-bottom);
}

/* Standard-Grid (Übersichtsseiten) */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.portfolio-card {
  margin: 0;
  padding: 0;
  border: 0;
}

.portfolio-card img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.portfolio-card h2 {
  margin: 6px 0 0;
  font-size: 1.125rem;
}

/* Portfolio-Seitenlayout */
.portfolio-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.portfolio-children {
  margin: 32px 0;
}

.portfolio-children-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.portfolio-child-card {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  text-decoration: none;
  color: inherit;
}

.portfolio-child-card h3 {
  margin: 6px 0 0;
}

.portfolio-gallery-wrap {
  margin-top: 28px;
}

/* ---------------------------------------------------------
   Gutenberg-Portfolio: Masonry (gleiche Breite, flexible Höhe)
   --------------------------------------------------------- */
body.page-template-page-templatesportfolio-php:not(.home):not(.front-page) .entry-content .wp-block-columns {
  display: block !important;
  column-count: 3 !important;
  column-gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

/* Responsive Breakpoints */
@media (max-width: 1100px) and (min-width: 801px) {
  body.page-template-page-templatesportfolio-php:not(.home):not(.front-page) .entry-content .wp-block-columns {
    column-count: 2 !important;
  }
}

@media (max-width: 800px) and (min-width: 500px) {
  body.page-template-page-templatesportfolio-php:not(.home):not(.front-page) .entry-content .wp-block-columns {
    display: block !important;
    column-count: 2 !important;
    column-gap: 4px !important;
  }
  
  body.page-template-page-templatesportfolio-php:not(.home):not(.front-page) .entry-content .wp-block-column {
    display: inline-block !important;
    width: 100% !important;
    break-inside: avoid !important;
  }
}

@media (max-width: 499px) {
  body.page-template-page-templatesportfolio-php:not(.home):not(.front-page) .entry-content .wp-block-columns {
    display: block !important;
    column-count: 1 !important;
  }
  
  body.page-template-page-templatesportfolio-php:not(.home):not(.front-page) .entry-content .wp-block-column {
    display: block !important;
    width: 100% !important;
  }
}

/* Falls mehrere Columns-Blöcke nacheinander existieren */
body.page-template-page-templatesportfolio-php .entry-content > .wp-block-columns {
  margin-bottom: 4px !important;
}

body.page-template-page-templatesportfolio-php .entry-content > .wp-block-columns:last-of-type {
  margin-bottom: 0 !important;
}

/* WP-Columns neutral für Column-Layout */
body.page-template-page-templatesportfolio-php .entry-content .wp-block-columns > .wp-block-column {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

/* Jedes Bild-Item verhält sich wie Masonry-Block */
body.page-template-page-templatesportfolio-php .entry-content .wp-block-image {
  display: inline-block !important;
  width: 100% !important;
  margin: 0 0 4px 0 !important;
  padding: 0 !important;
  break-inside: avoid !important;
  -webkit-column-break-inside: avoid !important;
  page-break-inside: avoid !important;
  overflow: hidden !important;
  line-height: 0 !important;
  font-size: 0 !important;
  border: 0 !important;
  box-sizing: border-box !important; 
}

/* Link */
body.page-template-page-templatesportfolio-php .entry-content .wp-block-image > a {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  border: 0 !important;
}

/* Bild: gleiche Breite, flexible Höhe, kein Crop */
body.page-template-page-templatesportfolio-php .entry-content .wp-block-image img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  vertical-align: top !important;
  cursor: pointer !important;
  border: 0 !important;
}

/* Caption im Layout ausblenden */
body.page-template-page-templatesportfolio-php .entry-content .wp-block-image figcaption {
  display: none !important;
}

/* Optional: sanftes Hover-Feedback ohne Layout-Shift */
@media (hover: hover) and (pointer: fine) {
  body.page-template-page-templatesportfolio-php .entry-content .wp-block-image img {
    transform: scale(1);
    transition: transform 420ms cubic-bezier(.22, .61, .36, 1), filter 260ms ease;
    will-change: transform, filter;
    backface-visibility: hidden;
  }

  body.page-template-page-templatesportfolio-php .entry-content .wp-block-image:hover img {
    transform: scale(1.03);
    filter: brightness(1.03) contrast(1.02);
  }
}

/* Content buttons */
.entry-content :is(button, input[type="submit"], .wp-block-button__link, .about-contact-link a) {
  transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

@media (hover: hover) {
  .entry-content :is(button, input[type="submit"], .wp-block-button__link, .about-contact-link a):not(:disabled):hover {
    background-color: #e3e3e3;
    color: #222;
    border-color: #444;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
  }
}

.entry-content :is(button, input[type="submit"], .wp-block-button__link, .about-contact-link a):focus-visible {
  outline: 2px solid #444;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .entry-content :is(button, input[type="submit"], .wp-block-button__link, .about-contact-link a) {
    transition: none;
  }
}

/* Entry Header */
.portfolio-videos > .wp-block-group__inner-container,
.portfolio-videos:not(:has(> .wp-block-group__inner-container)) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4rem;
}
.portfolio-videos { padding-top: 2rem; }
.portfolio-videos .wp-block-embed { margin: 0; min-width: 0; }
.portfolio-video-card { min-width: 0; }
.portfolio-video-card .youtube-preview { margin: 0; }
.youtube-preview a { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.youtube-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.youtube-preview a::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: url('../images/play-outline-white.svg') center / contain no-repeat;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .65));
  transition: transform 200ms ease;
}
.youtube-preview a:is(:hover, :focus-visible)::after { transform: translate(-50%, -50%) scale(1.06); }
.youtube-preview a:focus-visible { outline: 3px solid #444; outline-offset: 4px; }
.portfolio-video-card h2 { font-size: 1.375rem; font-weight: 400; line-height: 1.4; margin: 0 0 1rem; }
@media (max-width: 700px) {
  .entry-content h2.wp-block-heading {
    font-size: 1.5rem;
  }
}
.portfolio-video-card p { font-size: .9375rem; line-height: 1.8; margin: 0 0 1.5rem; }
.portfolio-videos .wp-block-embed__wrapper { aspect-ratio: 16 / 9; }
.portfolio-videos iframe { width: 100%; height: 100%; border: 0; }

.entry-content p:has(img.wp-image-993):has(img.wp-image-1007) {
  line-height: 1.9;
}

.entry-content p:has(img.wp-image-1007) > img.wp-image-993 {
  margin-bottom: 1.5rem;
  vertical-align: middle;
}

.entry-content a:has(> img.wp-image-1007) {
  display: inline-block;
  vertical-align: baseline;
  margin-bottom: 1.5rem;
  line-height: 0;
}

.entry-content a > img.wp-image-1007 {
  margin: 0;
  vertical-align: baseline;
}

.entry-header {
  text-align: center;
}

.entry-title {
  font-weight: 400;
  margin-bottom: 40px;
}

/* ---------------------------------------------------------
   PhotoSwipe: konsistente Caption mit/ohne Titel
   --------------------------------------------------------- */

/* Caption immer gleich positioniert (auch wenn leer) */
.pswp__custom-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  height: 28px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  
  background: transparent;
  pointer-events: none;
  
  padding: 0 20px;
  box-sizing: border-box;
}

/* PhotoSwipe UI anpassen */
.pswp {
  --pswp-bg: rgba(0, 0, 0, 0.92);
}

/* ---------------------------------------------------------
   PhotoSwipe: Buttons mit dünnen Linien (outline style)
   --------------------------------------------------------- */

/* Button-Container: transparent, nur Icon sichtbar */
.pswp__button {
  background: transparent !important;
  opacity: 0.8 !important;
  transition: opacity 0.2s ease !important;
}

.pswp__button:hover {
  opacity: 1 !important;
}

/* Schließen-Button (X): dünnes Kreuz */
.pswp__button--close {
  top: 16px !important;
  right: 16px !important;
}

.pswp__button--close::before,
.pswp__button--close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;        /* kleiner: 24px → 18px */
  height: 1.5px;      /* dünner: 2px → 1.5px */
  background: rgba(255, 255, 255, 0.9);
  transform-origin: center;
}

.pswp__button--close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.pswp__button--close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.pswp__button--close:hover::before,
.pswp__button--close:hover::after {
  background: rgba(255, 255, 255, 1);
}

/* Original SVG ausblenden */
.pswp__button--close svg {
  display: none !important;
}

/* Pfeil-Buttons positionieren */
.pswp__button--arrow {
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin-top: 0 !important;
}

.pswp__button--arrow--prev {
  left: 16px !important;
}

.pswp__button--arrow--next {
  right: 16px !important;
}

/* Original-Pfeil-Icons ausblenden */
.pswp__button--arrow svg {
  opacity: 0 !important;
}

/* Dünne Chevron-Pfeile erstellen */
.pswp__button--arrow::before {
  content: '';
  position: absolute;
  top: 50%;
  width: 16px;        /* größer: 12px → 16px */
  height: 16px;       /* größer: 12px → 16px */
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  border-right: 2px solid rgba(255, 255, 255, 0.9);
  transform-origin: center;
}

.pswp__button--arrow--prev::before {
  left: 50%;
  transform: translate(-25%, -50%) rotate(-135deg);
}

.pswp__button--arrow--next::before {
  right: 50%;
  transform: translate(25%, -50%) rotate(45deg);
}

.pswp__button--arrow:hover::before {
  border-color: rgba(255, 255, 255, 1);
}

/* Zoom-Button (falls vorhanden) */
.pswp__button--zoom {
  top: 16px !important;
  right: 72px !important;
}

/* =========================================================
   10) SUBPAGES LAYOUT OVERRIDES (clean)
   ========================================================= */

/* Unterseiten: keine Home-Verläufe */
body:not(.home):not(.front-page)::before,
body:not(.home):not(.front-page)::after {
  content: none !important;
  display: none !important;
}

/* ---------------------------------------------------------
   Header mit PNG-Hintergrund + Schatten (nur Unterseiten)
   --------------------------------------------------------- */

/* Header-Container */
body:not(.home):not(.front-page) .site-header,
body:not(.home):not(.front-page) .site-header--overlay {
  position: fixed !important;
  inset: 0 0 auto 0 !important;
  background: transparent !important; /* KEIN weißer BG mehr */
  z-index: 70 !important;
  min-height: 96px !important;
  transition: min-height .22s ease !important;
}

/* PNG-Hintergrund mit Rand als ::before */
body:not(.home):not(.front-page) .site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: var(--header-edge-url) center bottom;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  z-index: -1; /* hinter Logo/Menü */
  transition: filter 0.3s ease, height 0.22s ease;
  filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0)); /* initial kein Schatten */
}

@media (width > 1000px) {
  body:not(.home):not(.front-page) .site-header::before {
    box-sizing: content-box;
    border-top: 10px solid white;
  }
}

/* Schatten erscheint beim Scrollen */
body.is-scrolled:not(.home):not(.front-page) .site-header::before {
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

/* ---------------------------------------------------------
   Logo & Branding
   --------------------------------------------------------- */

body:not(.home):not(.front-page) .top-brand {
  position: absolute !important;
  left: 40px !important;
  top: 18px !important;
  transform: none !important;
  margin: 0 !important;
  z-index: 71 !important;
  transition: top .22s ease !important;
}

body:not(.home):not(.front-page) .top-brand .brand-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: .5rem !important;
  line-height: 1 !important;
}

body:not(.home):not(.front-page) .top-brand .brand-text {
  font-size: 1.2rem !important;
  line-height: 1 !important;
  margin: 0 !important;
  font-weight: 400 !important;
  transition: font-size .22s ease !important;
}

body:not(.home):not(.front-page) .top-brand .custom-logo {
  max-height: 52px !important;
  width: auto !important;
  display: block !important;
  transition: max-height .22s ease !important;
}

/* ---------------------------------------------------------
   Navigation
   --------------------------------------------------------- */

body:not(.home):not(.front-page) .home-top-nav {
  display: flex !important;
  justify-content: flex-end !important;
  padding: 22px 8px 5px 40px !important;
  margin: 0 !important;
  background: transparent !important;
  transition: none !important;
}

/* ---------------------------------------------------------
   Scroll-Zustand (Header kleiner)
   --------------------------------------------------------- */

body:not(.home):not(.front-page).is-scrolled .site-header,
body:not(.home):not(.front-page).is-scrolled .site-header--overlay {
  min-height: 68px !important;
}

body:not(.home):not(.front-page).is-scrolled .top-brand {
  top: 17px !important; /* zentriert bei 68px Header + 34px Logo */
}

body:not(.home):not(.front-page).is-scrolled .top-brand .brand-text {
  font-size: .78rem !important;
}

body:not(.home):not(.front-page).is-scrolled .top-brand .custom-logo {
  max-height: 34px !important;
}

/* ---------------------------------------------------------
   Content-Bereich
   --------------------------------------------------------- */

/* Content unter fixed Header starten */
body:not(.home):not(.front-page) .site-main,
body:not(.home):not(.front-page) main,
body:not(.home):not(.front-page) .content-area {
  padding-top: 112px !important; /* Platz für den 96px-Header und seine Wellenkante */
}

body:not(.home):not(.front-page) .site-content {
  margin-top: 20px; /* Extra Abstand */
}

body:not(.home):not(.front-page) .entry-header {
  padding-top: 0;
}

/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

/* Hamburger-Button: nur auf Mobile sichtbar */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 10px;
  right: 20px;
  z-index: 101;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  width: 44px;
  height: 44px;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.mobile-menu-toggle span {
  width: 22px;
  height: 2px;
  background: #333; /* dunkles Grau */
  border-radius: 0;
  transition: all 0.3s ease;
}

/* Hamburger auf Startseite: weiß (weil Startseite dunklen Hintergrund hat) */
body.home .mobile-menu-toggle span,
body.front-page .mobile-menu-toggle span {
  background: #333;
}

/* X-Animation (wenn Menü offen) - bleibt DUNKEL weil Menü weiß ist */
body.menu-open .mobile-menu-toggle span {
  background: #333; /* dunkel auf weißem Menü-Hintergrund */
}

body.menu-open .mobile-menu-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.menu-open .mobile-menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .mobile-menu-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hover-Effekt */
.mobile-menu-toggle:hover span {
  background: #000;
}

body.home .mobile-menu-toggle:hover span,
body.front-page .mobile-menu-toggle:hover span {
  background: #333;
}

body.menu-open .mobile-menu-toggle:hover span {
  background: #000; /* wird schwarz beim Hover */
}

/* Mobile: Menü versteckt, Overlay-Style */
@media (max-width: 1000px) {
  body:not(.home):not(.front-page) .site-header::before {
    height: 70px;
    background-size: cover;
    background-position: center top;
  }
  
  /* Hamburger sichtbar - ALLE SEITEN */
  .mobile-menu-toggle {
    display: flex;
  }
  
  /* Navigation: standardmäßig versteckt - ALLE SEITEN */
  .home-top-nav,
  .site-header nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 200px;
    height: 100vh;
    background: #fff !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 80px 30px 30px 20px;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    overflow-y: auto;
    z-index: 99;
  }
  
  /* Menü offen - ALLE SEITEN */
  body.menu-open .home-top-nav,
  body.menu-open .site-header nav {
    right: 0;
  }
  
  /* Menü-Items vertikal - ALLE SEITEN */
  .home-top-nav ul,
  .site-header nav ul {
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }
  
  .home-top-nav li,
  .site-header nav li {
    width: 100%;
  }
  
  .home-top-nav a,
  .site-header nav a {
    color: #000 !important;
    font-size: 1.1rem;
    padding: 10px 0;
    display: block;
    text-shadow: none !important;
  }
  
  /* Untermenüs bleiben im Layout und schieben folgende Hauptpunkte nach unten. */
  .site-header .main-nav--home .menu .sub-menu,
  .site-header .main-nav--home .menu li:hover > .sub-menu,
  .site-header .main-nav--home .menu li:focus-within > .sub-menu {
    position: static;
    min-width: 0;
    width: auto;
    margin: 0 0 0 20px;
    padding: 6px 0;
    list-style: none;
    background: transparent;
    backdrop-filter: none;
    display: none;
  }

  .site-header .main-nav--home .menu li.is-submenu-open > .sub-menu {
    display: block;
  }
  
  /* Logo Mobile - NUR UNTERSEITEN (Startseite behält zentriertes Logo) */
  body:not(.home):not(.front-page) .top-brand {
    position: fixed !important;
    left: 20px !important;
    top: 20px !important;
    z-index: 100;
  }
  
  body:not(.home):not(.front-page) .top-brand .custom-logo {
    max-height: 40px !important;
  }
  
  body:not(.home):not(.front-page) .top-brand .brand-text {
    font-size: 1rem !important;
  }
  
  /* Header-Höhe anpassen - NUR UNTERSEITEN */
  body:not(.home):not(.front-page) .site-header {
    min-height: 70px !important;
  }
  
  /* Content-Padding anpassen - NUR UNTERSEITEN */
  body:not(.home):not(.front-page) .site-main,
  body:not(.home):not(.front-page) main,
  body:not(.home):not(.front-page) .content-area {
    padding-top: 96px !important;
  }
  
}

/* =========================================================
   11) RESPONSIVE
   ========================================================= */

@media (hover: hover) and (pointer: fine) {
  body.page-template-page-templatesportfolio-php .entry-content .wp-block-image:hover img {
    transform: scale(1.035);
    filter: brightness(1.03) contrast(1.02);
  }
}

@media (max-width: 1200px) {
  .home-top-nav {
    justify-content: center;
    padding: 22px 20px 0;
  }

  .main-nav--home .menu {
    display: inline-flex;
    width: auto;
    margin: 0 auto;
  }

  .main-nav--home .menu > li > a {
    width: auto;
    margin: 0 20px;
  }

  .main-nav--home .menu .sub-menu {
    margin: 0 0 0 21px;
  }

  body:not(.home):not(.front-page) .top-brand {
    top: 12px !important;
  }

  body:not(.home):not(.front-page) .site-footer::before {
    top: -46px;
  }

}

@media (max-width: 1024px) {
  :root {
    --header-side-padding: 1.5rem;
    --menu-link-width: 8.5rem;
  }

  .brand-text {
    font-size: 2rem;
  }

  .brand-logo .custom-logo,
  .top-brand .custom-logo-link .custom-logo {
    height: 7.5rem;
  }

  .portfolio-children-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 768px) {
  :root {
    --header-top-padding: 1rem;
    --header-side-padding: 1rem;
    --menu-link-width: 7.5rem;
    --menu-link-height: 1.625rem;
    --top-gradient-height: 7.5rem;
    --bottom-gradient-height: 7rem;
  }

  .home-top-nav {
    margin-bottom: 1.25rem;
  }

  .main-nav--home .menu {
    gap: 0.375rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .main-nav--home .menu > li > a .label-base {
    font-size: 0.8125rem;
  }

  .main-nav--home .menu > li > a .label-hover {
    font-size: 1.0833rem;
  }

  .brand-text {
    font-size: 1.5rem;
  }

  .brand-logo .custom-logo,
  .top-brand .custom-logo-link .custom-logo {
    height: 6rem;
  }

  .container {
    padding-top: 6rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .portfolio-children-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 0 1rem;
  }

  
}

@media (max-width: 500px) {

body.home .top-brand,
  body.front-page .top-brand {
    margin-top: 5 !important;
  }

  body.home .top-brand .custom-logo,
  body.front-page .top-brand .custom-logo {
    max-height: 65px !important; /* kleiner: war ~150px */
  }

  body.home .top-brand .brand-text,
  body.front-page .top-brand .brand-text {
    font-size: 1.1rem !important; /* kleiner */
  }

  body.home .brand-link,
  body.front-page .brand-link {
    gap: 0.3rem !important; /* weniger Abstand */
    flex-wrap: nowrap !important; /* kein Umbruch */
  }
}
