/* === noir-layout.css === */
/* Bei.Gretel Noir Theme — Footer, Popup, Responsive, Subpage-Header, Breadcrumb, Dividers, Premium Footer */

/* ========================================================
   12. FOOTER
   ======================================================== */

body.noir footer,
body.noir .noir-footer {
  background: linear-gradient(to bottom, var(--bg-noir), #0a0a0a);
  background-image: none;
  border-top: 1px solid var(--glass-border);
  margin-top: 0;
}

body.noir footer > div.wrapper.flex.c4 {
  padding: 4rem 2rem;
}

body.noir footer > div.wrapper.flex.c4 > div,
body.noir footer > div.wrapper.flex.c4 > div * {
  color: var(--text-secondary);
  line-height: 1.6;
}

body.noir footer h3 {
  color: var(--gold);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

body.noir footer a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

body.noir footer a:hover {
  color: var(--gold-light);
}

body.noir footer ul#footerNavigation {
  position: static;
  background: none;
  background-color: transparent;
  border-top: 1px solid rgba(201,168,76,0.1);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  overflow: visible;
}

body.noir footer ul#footerNavigation li {
  display: inline-block;
}

body.noir footer ul#footerNavigation li > a,
body.noir footer ul#footerNavigation li > span {
  display: inline-block;
  padding: 1rem 1rem 0.6rem;
  text-decoration: none;
}

body.noir footer ul#footerNavigation li > a span,
body.noir footer ul#footerNavigation li > span span {
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

body.noir footer ul#footerNavigation li > a:hover span {
  color: var(--gold);
}

/* ========================================================
   13. POPUP — Noir Gutschein/Promo Popup
   ======================================================== */

/* Overlay */
body.noir .popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: var(--z-popup);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
body.noir .popup-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Popup Container */
body.noir div#popup {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: calc(var(--z-popup) + 1);
  width: min(480px, 90vw);
  max-height: 90vh;
  overflow-y: auto;
  display: none;
  opacity: 0;
  background: linear-gradient(165deg, rgba(26, 26, 26, 0.97), rgba(13, 13, 13, 0.98));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep), var(--shadow-glow);
  padding: clamp(2rem, 4vw, 3rem);
  text-align: center;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
body.noir div#popup.visible {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: popupIn var(--dur-slow) var(--ease-out) both;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Close Button */
body.noir div#popup .popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: var(--icon-button-size);
  height: var(--icon-button-size);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  padding: 0;
  z-index: 10;
}
body.noir div#popup .popup-close:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
}

/* Icon (Gutschein-SVG) */
body.noir div#popup .popup-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  color: var(--gold);
  opacity: 0.8;
}
body.noir div#popup .popup-icon svg {
  width: 100%;
  height: 100%;
}

/* Body — WYSIWYG Content from CMS */
body.noir div#popup .popup-body {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Headline */
body.noir div#popup .popup-body h2,
body.noir div#popup .popup-body h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}
body.noir div#popup .popup-body p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
}
body.noir div#popup .popup-body p:last-child {
  margin-bottom: 0;
}

/* CTA-Link als Gold-Button */
body.noir div#popup .popup-body a {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 2rem;
  background: var(--gold);
  color: var(--bg-noir);
  font-family: var(--font-body-bold);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: all var(--dur-fast) var(--ease-out);
}
body.noir div#popup .popup-body a:hover {
  background: var(--gold-light);
  box-shadow: var(--shadow-glow);
}

/* Gold-Linie als Trenner über dem CTA */
body.noir div#popup .popup-body a::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold-muted);
  margin: 0 auto 1.25rem;
}

/* Mobile */
@media (max-width: 480px) {
  body.noir div#popup {
    padding: 2rem 1.5rem;
  }
  body.noir div#popup .popup-icon {
    width: 48px;
    height: 48px;
  }
}

/* ========================================================
   14. RESPONSIVE
   ======================================================== */

/* Tablet */
@media only screen and (max-width: 768px) {
  /* Nav responsive → noir-nav.css */

  body.noir .split {
    gap: 2rem;
  }

  body.noir .stats-bar {
    flex-wrap: wrap;
    gap: 2rem;
  }

  body.noir .hero-section {
    min-height: 0;
    padding: 100px 0 0;
  }

  body.noir .hero-split {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  body.noir .hero-content {
    max-width: 600px;
    margin: 0 auto;
  }

  body.noir .hero-logo {
    margin-left: auto;
    margin-right: auto;
  }

  body.noir .hero-actions {
    justify-content: center;
  }

  body.noir .hero-image {
    max-width: min(500px, 100%);
    margin: 0 auto;
  }

  body.noir footer > div.wrapper.flex.c4 > div {
    text-align: center;
    margin-bottom: 2rem;
  }

  body.noir footer ul#footerNavigation {
    flex-direction: column;
    align-items: center;
  }

  body.noir footer ul#footerNavigation li {
    display: block;
    text-align: center;
  }

  body.noir footer ul#footerNavigation li > a,
  body.noir footer ul#footerNavigation li > span {
    padding: 0.5rem 1rem;
  }
}

/* Mobile */
@media only screen and (max-width: 480px) {
  /* Nav responsive → noir-nav.css */

  body.noir .split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  body.noir .stats-bar {
    flex-direction: column;
    gap: 1.5rem;
  }

  body.noir .hero-section {
    padding-top: 90px;
  }

  body.noir .hero-content h1 {
    font-size: 1.8rem;
  }
}

/* ========================================================
   14b. SUBPAGE CONTENT PADDING
   Fixed header overlaps content on pages without hero
   ======================================================== */

/* Pages WITHOUT hero (no .header class on body): add top padding */
body.noir:not(.header) #content {
  padding-top: 100px;
}

/* Pages WITH hero: hero section has its own padding-top */
body.noir.header #content {
  padding-top: 0;
}

/* First CE on subpages: extra top padding for breathing room */
body.noir:not(.header) #content > .ce:first-child {
  padding-top: clamp(2rem, 4vw, 4rem);
}

/* ========================================================
   14c. SUBPAGE HEADER (Eyebrow + Title für Seiten ohne Hero)
   ======================================================== */

body.noir .subpage-header {
  text-align: center;
  padding: clamp(3rem, 6vw, 6rem) var(--section-pad-x) clamp(2rem, 4vw, 3rem);
  max-width: 800px;
  margin: 0 auto;
}

body.noir .subpage-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

body.noir .subpage-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0;
}

body.noir .subpage-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 1.25rem auto 0;
}

body.noir .subpage-subtitle {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* ========================================================
   23. FOOTER NOIR OVERRIDE
   Styles the existing footer structure for dark theme
   ======================================================== */

body.noir footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--glass-border);
}

body.noir footer .wrapper {
  color: var(--text-secondary);
}

body.noir footer h3 {
  color: var(--gold);
}

body.noir footer p {
  color: var(--text-secondary);
}

body.noir footer a {
  color: var(--gold);
}

body.noir footer a:hover {
  color: var(--gold-light);
}

body.noir footer #footerNavigation a {
  color: var(--text-secondary);
}

body.noir footer #footerNavigation a:hover {
  color: var(--gold);
}

/* ========================================================
   BREADCRUMB NAVIGATION (SEO — visuell versteckt, JSON-LD bleibt)
   ======================================================== */

body.noir .breadcrumb {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================================
   27. SECTION DIVIDERS — Visueller Flow zwischen Sektionen
   ======================================================== */

/* Gold-Line-Divider zwischen Homepage-Sections */
body.noir .section + .section {
  position: relative;
}

body.noir .section + .section::before {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

/* Kein Divider nach Hero */
body.noir .hero-section + .section::before {
  display: none;
}

/* ========================================================
   28. NOIR PREMIUM FOOTER
   ======================================================== */

/* Old PW footer ausblenden im Noir-Modus */
body.noir footer {
  display: none !important;
}

body.noir .noir-footer {
  display: block !important;
  background: linear-gradient(to bottom, var(--bg-noir), #080808);
  border-top: 1px solid rgba(201,168,76,0.15);
  padding: 0;
  color: var(--text-secondary);
}

body.noir .noir-footer-inner {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: var(--section-pad-y) var(--section-pad-x) 0;
}

/* Logo + Tagline */
body.noir .noir-footer-brand {
  text-align: center;
  margin-bottom: 3.5rem;
}

body.noir .noir-footer-brand svg {
  width: 80px;
  height: auto;
  opacity: 0.85;
  margin-bottom: 1rem;
  filter: brightness(1.3);
}

body.noir .noir-footer-brand .footer-tagline {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Footer Nav Grid */
body.noir .noir-footer-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

body.noir .noir-footer-nav h4 {
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 600;
}

body.noir .noir-footer-nav a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.3rem 0;
  transition: color var(--dur-fast) ease;
}

body.noir .noir-footer-nav a:hover {
  color: var(--gold-light);
}

/* Gold Divider */
body.noir .noir-footer-divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 2.5rem;
}

/* Signature Quote */
body.noir .noir-footer-quote {
  text-align: center;
  margin-bottom: 2.5rem;
}

body.noir .noir-footer-quote blockquote {
  font-family: var(--font-accent);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: var(--text-secondary);
  font-style: normal;
  line-height: 1.4;
}

body.noir .noir-footer-quote blockquote em {
  color: var(--gold);
  font-style: normal;
}

/* Legal Bar */
body.noir .noir-footer-legal {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem var(--section-pad-x);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

body.noir .noir-footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

body.noir .noir-footer-legal a:hover {
  color: var(--gold);
}

@media only screen and (max-width: 48rem) {
  body.noir .noir-footer-nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
    text-align: center;
  }
}

@media only screen and (max-width: 30rem) {
  body.noir .noir-footer-nav {
    grid-template-columns: 1fr;
    text-align: center;
  }

  body.noir .noir-footer-legal {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}
