/* css/layout.css */
:root {
  --banner-pad: 2.3rem;
  --footer-offset: 96px; /* default, updated via JS */
}
header {
  display: grid;
  grid-template-columns: auto 1fr auto; /* brand | nav (center) | right controls */
  align-items: center;
  padding: 0.9rem 2rem;
  background-color: rgba(0, 0, 0, 0.55);
  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4000; /* above backdrop overlay */
  backdrop-filter: saturate(140%) blur(8px);
  transition: background-color 240ms ease, backdrop-filter 240ms ease, box-shadow 240ms ease;
  border-radius: 14px; /* leichter Radius */
  box-shadow: 0 10px 28px rgba(0,0,0,0.15); /* Slightly reduced shadow for border visibility */
  border: 1px solid rgba(var(--primary-rgb), 0.3); /* Match footer border color */
  width: calc(100% - 1rem); /* nahezu volle Breite */
  max-width: 1400px; /* großzügiger, wirkt fast vollbreit */
}

/* Glattere Zustände beim Scrollen: Klasse kann per JS gesetzt werden */
/* Vereinheitlichte Transparenz, kein Abdunkeln beim Scrollen */
header.is-transparent { background-color: rgba(0, 0, 0, 0.55); box-shadow: 0 10px 28px rgba(0,0,0,0.22); }
header.is-solid { background-color: rgba(0, 0, 0, 0.55); box-shadow: 0 10px 28px rgba(0,0,0,0.22); }
header.nav-expanded {
  background-color: rgba(8, 10, 18, 0.88);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
  backdrop-filter: saturate(150%) blur(12px);
}

header h1,
header .h1-imitation {
  font-family: 'Orbitron', sans-serif;
  color: var(--primary);
  font-size: 1.8rem;
  margin-right: 3rem;
  font-weight: 300;
}

.brand { display:flex; flex-direction:column; align-items:flex-start; gap:2px; }
.brand h1,
.brand .h1-imitation { margin: 0; }
.tagline {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
  font-size: 0.78rem;
  line-height: 1;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.02em;
  white-space: nowrap; /* keep tagline on one line */
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 900ms ease, transform 900ms ease;
}

/* sichtbare Tagline, per JS-Klasse gesetzt */
.tagline.show {
  opacity: 1;
  transform: translateY(0);
}

/* Teile der Tagline: zweistufiges Erscheinen */
.tagline-part { display: inline-block; }
.tagline-smarter {
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.tagline.show .tagline-smarter {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 700ms; /* nach dem ersten Teil */
}

header h1 a,
header .h1-imitation a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), text-shadow 0.3s;
}

header h1 a:hover,
header .h1-imitation a:hover {
  color: var(--primary);
  transform: scale(1.07) rotate(-2deg);
  text-shadow: 0 0 12px rgba(0, 188, 212, 0.5), 0 2px 8px rgba(0, 188, 212, 0.2);
}

header .h1-imitation {
  font-family: 'Orbitron', sans-serif;
  color: var(--primary);
  font-size: 1.8rem;
  margin-right: 3rem;
  font-weight: 300;
}

.brand .h1-imitation { margin: 0; }

nav { grid-column: 2; justify-self: center; display: flex; align-items: center; }
/* Right control group */
.header-right {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  align-self: center;
}
/* header nav { No margin-left: auto; here } */

/* Hide mobile-only items by default; show only in mobile overlay */
header nav .mobile-only { display: none; }

/* no extra right margin needed for centered nav */
/* Language switch is now a header-level element at the far right */
header .lang-switch {
  margin-left: 0.5rem; /* Adjusted margin for spacing after contact button */
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
header .lang-switch a {
  color: var(--light);
  text-decoration: none;
  opacity: 0.8;
  font-weight: 600;
  font-size: clamp(0.65rem, 0.6vw + 0.55rem, 0.95rem);
  letter-spacing: 0.02em;
}
header .lang-switch a:hover { opacity: 1; }
header .lang-switch a.active { opacity: 1; }
header .lang-switch .sep {
  display: inline;
  opacity: 0.6;
}
/* Mobile menu language switch (hidden by default) */
header nav .nav-lang-mobile { display: none; }

.hero {
  min-height: calc(var(--app-vh, 1vh) * 100);
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  padding: 0;
  margin: 0;
  text-align: left;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); /* Added shadow */
}

@supports (height: 100dvh) {
  .hero {
    min-height: min(calc(var(--app-vh, 1vh) * 100), 100dvh);
  }
}

@supports (height: 100svh) {
  .hero {
    min-height: min(calc(var(--app-vh, 1vh) * 100), 100svh);
  }
}

/* Subtle scroll indicator at bottom center of hero */
.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.9;
  animation: scrollPulse 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  transition: opacity 400ms ease, transform 400ms ease;
}

@keyframes scrollPulse {
  0%   { transform: translateX(-50%) translateY(0px) scale(1);    opacity: 0.9;  box-shadow: 0 0 0 0 rgba(106,214,255,0.55); }
  50%  { transform: translateX(-50%) translateY(4px) scale(1.28); opacity: 0.6;  box-shadow: 0 0 0 10px rgba(106,214,255,0.0); }
  100% { transform: translateX(-50%) translateY(0px) scale(1);    opacity: 0.9;  box-shadow: 0 0 0 0 rgba(106,214,255,0.0); }
}

.scroll-indicator.hidden { opacity: 0 !important; transform: translateX(-50%) scale(0.92); visibility: hidden; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .scroll-indicator { animation: none; }
}

/* Optionally reduce indicator size on very small heights */
@media (max-height: 480px) {
  .scroll-indicator { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 10px; height: 10px; }
}

/* Mobile: give a bit more space to avoid being cut off and to avoid CTA overlap */
@media (max-width: 640px) {
  .scroll-indicator { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
}

.hero > div {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero h1 { /* SEO-Optimierung: War vorher h2 */
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
  font-family: 'Roboto Mono', monospace;
}

/* Reduce gap before the robots list under the typewriter heading */
.hero h1.typewriter { margin-bottom: 0.2rem; }

.hero-claim {
  display: block;
}

.hero-claim__line {
  display: block;
}

.hero-claim__line + .hero-claim__line {
  margin-top: 0.35rem;
}

.hero-claim__line--accent {
  font-weight: 600;
}

.hero p {
  max-width: 700px;
  margin: 0 0 2rem;
  font-size: 1.1rem;
  font-family: 'Roboto Mono', monospace;
}

.hero .hero-claim--tail {
  font-size: 2.5rem;
  margin-top: 1rem;
  color: var(--primary);
  font-family: 'Roboto Mono', monospace;
  line-height: 1.2;
}

/* Clickable robot links inside typed hero lines */
.hero a.robot-link {
  color: inherit;
  text-decoration: none; /* Explicitly remove text-decoration */
  padding-bottom: 1px;
  transition: all 0.2s ease-in-out;
}
.hero a.robot-link:hover,
.hero a.robot-link:focus-visible {
  text-decoration: none; /* Ensure no underline on hover/focus */
  color: var(--accent);
}

/* Add extra space after the last H2 line in hero (e.g., after Reinigungsroboter) */
.hero #typewriter-container h2:last-of-type,
.hero #typed-output h2:last-of-type {
  margin-bottom: 1rem;
}

/* Mobile: Headline umbrechen und gut lesbar halten */
@media (max-width: 640px) {
  /* Use a JS-computed vh unit to avoid dynamic URL bar resizing causing hero height changes while scrolling */
  .hero { justify-content: center; min-height: calc(var(--app-vh, 1vh) * 100); overflow: visible; }

  @supports (height: 100dvh) {
    .hero { min-height: min(calc(var(--app-vh, 1vh) * 100), 100dvh); }
  }

  @supports (height: 100svh) {
    .hero { min-height: min(calc(var(--app-vh, 1vh) * 100), 100svh); }
  }

  /* Avoid initial reload jump: center content and remove extra top padding on mobile */
  .hero > div { padding-top: 0 !important; }

  /* Keep typewriter predictable; no transform to avoid jumps */
  #typewriter-container { display: block; transform: none; will-change: auto; }

  /* Slightly taller mobile hero type for better emphasis */
  .hero h1 { font-size: 1.6rem !important; line-height: 1.2; margin-bottom: 1.8rem; }
  .hero h2 { font-size: 1.25rem !important; line-height: 1.25; margin-bottom: 0.5rem; }
  .hero .hero-claim--tail { font-size: 1.45rem !important; line-height: 1.2; }
  /* Ensure extra gap between H1 and subsequent H2 even with <br> in between */
  .hero #typewriter-container h2,
  .hero #typed-output h2 { margin-top: 1rem !important; }
  /* Increase extra gap after the last H2 on mobile */
  .hero #typewriter-container h2:last-of-type,
  .hero #typed-output h2:last-of-type { margin-bottom: 1.4rem !important; }
  .hero p  { font-size: 1.0rem !important; }
}


/* Landscape phone handling: ensure hero text is not covered by header */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { justify-content: flex-start; }
  .hero > div { padding-top: calc(var(--header-offset, 80px) + 1rem); }
}

/* Force a line-break after specific span on very small screens */
@media (max-width: 400px) {
  .mobile-break-after::after { content: ""; display: block; }
}

/* (Removed unused .mobile-only-br helper) */

.hero-bg-video {
  position: absolute; /* confine background to hero section */
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2; /* behind hero overlay and content */
  pointer-events: none;
  user-select: none;
  background: #000;
  transform: translateZ(0);
  opacity: var(--hero-video-opacity, 1);
  /* Remove transitions to avoid perceived stretching on mobile */
  transition: none;
  contain: layout paint size; /* isolate layout/paint to prevent ripple reflows */
}

/* Nudge video up slightly on mobile so no part appears to "peek" below */
@media (max-width: 640px) {
  .hero-bg-video {
    /* Ensure the video bottom aligns exactly with screen bottom on mobile */
    bottom: 0;
    top: auto;
    transform: none;
  }
}

/* Dunklere Overlay-Schicht über dem Video */
.hero::before {
  content: "";
  position: absolute; /* confine overlay to hero section */
  left: 0; right: 0; top: 0; bottom: 0;
  /* Base overlay is controlled via CSS variable set by JS for smooth fade */
  background: rgba(0, 0, 0, var(--hero-overlay, 0.65));
  transition: none; /* avoid any timing-related flashes on first paint */
  z-index: -1; /* over video, under hero content */
  pointer-events: none;
}



.features {
  display: grid;
  grid-template-columns: 1fr; /* stack all feature cards vertically */
  gap: 1.5rem; /* slightly tighter vertical spacing */
  padding: 1rem 2rem;
  /* Dark tech grid background */
  /* Removed background color and image */
  color: #333; /* dark text for contrast */
  will-change: opacity, transform;
  transform: translateZ(0);
  align-items: start; /* don't equalize card heights across the row */
}

/* Feature details always visible (no collapse) */
.features .feature { cursor: default; }
.features .feature h3 { margin: 0 0 0.4rem 0; display: flex; align-items: center; justify-content: flex-start; gap: 0.5rem; }
.features .feature .feat-title { font-weight: 700; }
.features .feature h3 i,
.features .feature h3 svg {
  color: inherit; /* For font icons */
  fill: currentColor; /* For SVG icons */
}
.features .feature .chevron { display: none; }
.features .feature p { opacity: 1; margin-top: 0; overflow: visible; font-size: 0.95rem; line-height: 1.5; }

.features .feature.is-focused {
  transform: translateY(-25px) scale(1.18);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Utility: can be reused on other sections if needed */
.section-grid {
  background-color: var(--bg-color);
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  color: #eaeaea;
}

/* Robots placeholder section */
.roboter-section {
  min-height: 200px;
  display: grid;
  align-items: center;
  box-shadow: inset 0 10px 15px -5px rgba(0, 0, 0, 0.3);
}

.roboter-section.section-grid {
  background-color: #c5c5c5;
  background-image: none; /* Remove the grid pattern */
}
.roboter-section .container { max-width: 1100px; margin: 0 auto; padding: 2rem 2rem 2.5rem; }
/* Robots dedicated container: remove top padding for flush seam to previous section */
.roboter-section .robots-container { padding-top: 0; }

.roboter-section h2,
.roboter-section h3 {
  color: var(--dark); /* Use the defined dark color */
}
.roboter-placeholder {
  height: 200px;
  width: 100%;
  border-radius: 12px;
  background:
    radial-gradient(1200px 200px at 10% 0%, rgba(0,188,212,0.07), transparent 60%),
    radial-gradient(1200px 200px at 90% 100%, rgba(0,188,212,0.07), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 8px 24px rgba(0,0,0,0.25);
}

/* Anchor offset for robot segment headings to avoid header overlap */
#seg-transport,
#seg-liefer,
#seg-reinigung,
#seg-transport-en,
#seg-delivery-en,
#seg-cleaning-en {
  /* Add extra space so headings are not covered by fixed header */
  scroll-margin-top: calc(var(--header-height, 80px) + 2rem);
}

/* Robot segments: grid for media + text placeholders */
.robot-segment { margin: 1.5rem 0 2rem; }
.robot-segment__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}
.robot-media { min-height: 220px; }
.robot-text-placeholder {
  min-height: 220px;
  width: 100%;
  border: 1px dashed rgba(255,255,255,0.25);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
}

/* Ensure specific robot grids (transport/cleaning/delivery) use the intended two-column layout */
.transport-robot-segment__grid,
.reinigungs-robot-segment__grid,
.liefer-robot-segment__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

/* Center delivery robot image, especially on mobile */
.liefer-robot-media {
  display: flex;
  align-items: center;
  justify-content: center;
}
.liefer-robot-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto; /* center horizontally */
}

@media (max-width: 900px) {
  /* In overlay, make triggers full-width and push chevron to the right */
  body.nav-open header nav .nav-dropdown > a.nav-link { width: 100%; }
  body.nav-open header nav .nav-dropdown > a.nav-link .nav-chevron { margin-left: auto; }
  .robot-segment__grid,
  .transport-robot-segment__grid,
  .reinigungs-robot-segment__grid,
  .liefer-robot-segment__grid { grid-template-columns: 1fr; }

  .brand {
    margin-left: 0.75rem;
  }
}

/* Smooth anchor scrolling and header offset handling */
html { scroll-behavior: smooth; }
section[id], .section-heading { scroll-margin-top: var(--header-offset, 80px); }

/* Smooth content reveal after hero */
body:not(.content-in) .features,
body:not(.content-in) .content-page {
  opacity: 0;
  transform: translateY(24px);
}
body .features,
body .content-page {
  transition: opacity 380ms ease, transform 380ms ease;
  will-change: opacity, transform;
}

/* Mobile: avoid additional translate/opacity animations during initial scroll
   to keep touch scroll feeling 1:1 and prevent the "slipping" sensation. */
@media (max-width: 640px) {
  body:not(.content-in) .features,
  body:not(.content-in) .content-page {
    opacity: 1;
    transform: none;
  }
  body .features,
  body .content-page {
    transition: none;
  }
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.content-page {
  padding: var(--space-2xl) var(--space-lg);
  background: #181818;
}

/* Zusätzlicher Offset für rechtliche Seiten, damit Header nichts verdeckt */
.legal-page { padding-top: 7rem; }

@media (max-width: 640px) {
  .legal-page { padding-top: 6.5rem; }
}

.content-page h1 {
  color: var(--primary);
  font-size: var(--fs-800);
  line-height: var(--lh-tight);
  margin: 0 0 var(--space-lg);
  text-align: center;
}

/* Left-align About page heading */
.content-page.about-page h1,
.content-page.about-page .about-title { text-align: left !important; }

/* About page container for absolute child positioning on mobile */
.content-page.about-page { position: relative; }

/* Use Roboto for About page content */
.content-page.about-page {
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

@media (max-width: 640px) {
  .content-page.about-page h1,
  .content-page.about-page .about-title { text-align: left !important; padding-right: 0; }
}

.content-page h2 {
  color: rgba(0, 188, 212, 0.6);
  margin: var(--space-xl) 0 var(--space-md);
  font-size: var(--fs-600);
  font-weight: 600;
}

.content-page h3 {
  color: rgba(0, 188, 212, 0.6);
  margin: var(--space-lg) 0 var(--space-sm);
  font-size: var(--fs-500);
  font-weight: 500;
}

.content-page p { margin: 0 0 var(--space-md); line-height: var(--lh-regular); }
.content-page a { color: var(--primary); text-decoration: none; }
.content-page a:hover { text-decoration: underline; color: var(--accent); }
.content-page ul { margin: 1rem 0; padding-left: 2rem; }
.content-page li { margin-bottom: 0.5rem; }

/* (Old footer block removed; superseded by final block at end) */

/* Responsive Layout Anpassungen (header/nav collapse) */
@media (max-width: 900px) {
  /* Dimmed backdrop when mobile nav is open, while panel stays right-aligned */
  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2500; /* below nav panel, above page */
    opacity: 1;
    transition: opacity 220ms ease;
  }
  body.nav-closing::before {
    opacity: 0;
    pointer-events: none;
  }
  /* bring header closer to top on tablets/large phones */
  header { top: 0.4rem; }
  header nav { margin: 0; }
  header nav {
    justify-self: end;
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  body.nav-open header nav,
  header nav.open {
    display: flex;
    flex-direction: column;
    position: static; /* expand within header */
    top: auto;
    right: auto;
    left: auto;
    background: transparent;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    padding: 0;
    z-index: auto;
    gap: 0.75rem;
    width: auto;
    min-width: unset;
    align-items: flex-start;
    justify-content: flex-start;
    max-width: none;
    height: auto;
    margin: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    font-family: 'Roboto Mono', monospace;
  }
  /* Collapsible panel: closed by default; sits inside header and expands downward */
  header nav .nav-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    position: static; /* inside header flow */
    width: 100%;
    background: transparent; /* transparent background for menu wrapper */
    border-radius: 0; /* remove rounded corners */
    border: 0; /* remove border */
    padding: 0; /* no padding when collapsed to avoid header height */
    height: 0; /* animate explicit height to avoid jitter */
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    will-change: height, opacity;
    transition: height 240ms cubic-bezier(0.25, 0.1, 0.25, 1), opacity 200ms ease, transform 200ms ease;
    pointer-events: none; /* ignore clicks when closed */
  }
  body.nav-opening header.nav-expanded nav .nav-content-wrapper {
    overflow-y: hidden !important;
    pointer-events: none !important;
  }
  body.nav-closing header nav .nav-content-wrapper {
    transition: none !important;
  }
  /* Open state: expand below header, scrollable if needed */
  body.nav-open header.nav-expanded nav { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  body.nav-open header.nav-expanded nav .nav-content-wrapper {
    padding: 1rem 1.25rem 1.75rem 1.25rem;
    /* height managed via JS to fit content */
    opacity: 1;
    transform: translateY(0);
    overflow-y: auto; /* panel scrollable on mobile */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
    max-width: fit-content; /* limit width on phones */
    width: 100%;
  }
  body.nav-open header nav .nav-link {
    color: var(--light);
    font-size: 1.6rem;
    margin-left: 0;
    font-weight: normal; /* Remove bold font for nav links when nav is open */
    transition: color 0.2s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  /* font and spacing tweaks when open */
  body.nav-open header nav .nav-content-wrapper { gap: 1.6rem; }
  /* Spacing between dropdown blocks inside the wrapper */
  body.nav-open header nav .nav-content-wrapper > .nav-dropdown { padding: 0.35rem 0; }
  /* Extra breathing space from logo to the first dropdown */
  body.nav-open header nav .nav-content-wrapper > .nav-dropdown:first-of-type { margin-top: 0.6rem; }
  /* Only show mobile-only items (e.g., contact button) in overlay on phones */
  header nav .mobile-only { display: none; }
  body.nav-open header nav .mobile-only { display: block; }
  /* Use header-right language switch on mobile; hide nav-lang-mobile helper */
  header nav .nav-lang-mobile { display: none !important; }
  /* Keep lang switch visible on compact screens */
  .header-right {
    gap: clamp(0.35rem, 1.2vw, 0.75rem);
    display: flex;
    align-items: center;
  }
  .header-right .lang-switch {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(0.2rem, 0.8vw, 0.45rem);
    font-size: clamp(0.6rem, 1vw + 0.5rem, 0.9rem);
    order: 0;
  }
  .header-right #hamburger { order: 1; }
  .header-right .header-contact-btn { order: 2; }
  .header-right .lang-switch a {
    font-size: inherit;
  }
  .header-right .lang-switch .sep {
    display: inline-block;
    width: 1px;
    height: 1.1em;
    margin: 0 clamp(0.15rem, 0.6vw, 0.35rem);
    background: rgba(255,255,255,0.55);
    text-indent: -9999px;
    overflow: hidden;
  }
}

/* Mobile overlay nav: dropdowns collapsed by default; expand on toggle */
@media (max-width: 900px) {
  header nav.open .dropdown-content,
  body.nav-open header nav .dropdown-content {
    display: none;
    visibility: hidden; /* Added */
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0.25rem 0 0 0.5rem;
  }
  header nav.open .nav-dropdown.dd-open > .dropdown-content,
  body.nav-open header nav .nav-dropdown.dd-open > .dropdown-content {
    display: block;
    visibility: visible; /* Added */
  }
  header nav.open .dropdown-content a,
  body.nav-open header nav .dropdown-content a { padding: 12px 16px 12px 32px; opacity: 0.9; }
}

/* Between 901px and 1072px: keep inline nav by default, but allow hamburger to open overlay */
@media (max-width: 1072px) and (min-width: 901px) {
  header nav {
    display: flex;
    flex-direction: row; /* Ensure it's a row by default */
    justify-content: center; /* Center the items */
  }
  /* Backdrop overlay for mid-size overlay menu */
  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2500;
    opacity: 1;
    transition: opacity 220ms ease;
  }
  body.nav-closing::before {
    opacity: 0;
    pointer-events: none;
  }
  body.nav-open header nav,
  header nav.open {
    display: flex;
    flex-direction: column;
    position: static; /* expand within header */
    top: auto; right: auto; left: auto;
    background: transparent;
    border-radius: 0; box-shadow: none; border: 0;
    z-index: auto;
    align-items: flex-start;
    justify-content: flex-start;
    width: auto; max-width: none; height: auto; margin: 0;
    opacity: 1; visibility: visible; transform: none;
    font-family: 'Roboto Mono', monospace;
  }
  body.nav-open header nav .nav-link {
    color: var(--light);
    font-size: 1.6rem;
    margin-left: 0;
    font-weight: normal;
  }
  /* Collapsible panel for mid-size as well (inside header) */
  header nav .nav-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    position: static;
    width: 100%;
    background: transparent;
    border-radius: 0;
    border: 0; /* remove border */
    padding: 0; /* no padding when collapsed to avoid header height */
    height: 0; overflow: hidden; opacity: 0; transform: translateY(-6px);
    will-change: height, opacity;
    transition: height 240ms cubic-bezier(0.25, 0.1, 0.25, 1), opacity 200ms ease, transform 200ms ease;
    pointer-events: none;
  }
  body.nav-opening header.nav-expanded nav .nav-content-wrapper {
    overflow-y: hidden !important;
    pointer-events: none !important;
  }
  body.nav-closing header nav .nav-content-wrapper {
    transition: none !important;
  }
  body.nav-open header.nav-expanded nav { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  body.nav-open header.nav-expanded nav .nav-content-wrapper {
    padding: 1rem 1.25rem 1.75rem 1.25rem;
    /* height managed via JS to fit content */
    opacity: 1; transform: none; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; pointer-events: auto; /* scrollable panel */
  }
  /* Spacing between dropdown blocks inside the wrapper (mid-size) */
  body.nav-open header nav .nav-content-wrapper > .nav-dropdown { padding: 0.35rem 0; }
  body.nav-open header nav .nav-content-wrapper > .nav-dropdown:first-of-type { margin-top: 0.6rem; }
  header nav.open .dropdown-content,
  body.nav-open header nav .dropdown-content {
    display: none;
    visibility: hidden; /* Added */
    position: static;
    background-color: #1a1a1a; /* Darker background for distinction */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
    box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.3); /* Subtle shadow */
    padding: 0.5rem 0; /* More padding, consistent with desktop */
    border-radius: 4px; /* Match desktop border-radius */
    margin-top: 0.5rem; /* Add some space from the parent link */
  }
  header nav.open .nav-dropdown.dd-open > .dropdown-content,
  body.nav-open header nav .nav-dropdown.dd-open > .dropdown-content {
    display: block;
    visibility: visible; /* Added */
  }
  header nav.open .dropdown-content a,
  body.nav-open header nav .dropdown-content a { padding: 12px 16px 12px 32px; opacity: 0.9; }
}

@media (max-width: 900px) {
  /* Compact header on small phones */
  header { padding: 0.5rem 0.75rem; justify-content: space-between; width: calc(100% - 2rem); top: 0.8rem; border-radius: 12px; border: 1px solid rgba(var(--primary-rgb), 0.3); }
  header h1,
  header .h1-imitation { margin-right: 0; margin-left: 0.75rem; padding-left: 0; font-size: 1.4rem; }
  .tagline { font-size: 0.7rem; }
  /* Keep header alignment consistent to avoid logo shifts */
  /* no override needed; default center alignment remains */
  header .lang-switch { margin-left: 0.5rem; }
  header .lang-switch a { font-size: 0.8rem; }
  /* (Old mobile footer overrides removed) */
  /* Hide tagline when mobile menu is open to avoid stacking under logo */
  body.nav-open header .tagline { display: none !important; }
  .header-right .lang-switch { margin-right: clamp(1.5rem, 3vw, 2rem); }
}

@media (max-width: 560px) {
  header {
    grid-template-columns: auto auto;
    align-items: center;
    padding: 0.45rem 0.55rem;
    width: calc(100% - 1.1rem);
  }
  header nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
    margin-top: 0.35rem;
  }
  .brand {
    grid-column: 1;
    grid-row: 1;
  }
  .header-right {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .header-right {
    gap: clamp(0.25rem, 1vw, 0.4rem);
  }
  .header-right .lang-switch {
    gap: clamp(0.15rem, 0.8vw, 0.3rem);
  }
  .header-right .lang-switch a {
    font-size: clamp(0.5rem, 1vw + 0.4rem, 0.75rem);
  }
}

/* (Old tablet footer overrides removed) */

/* Desktop: make footer container full-bleed so copy can sit at true screen-left */
/* (Old desktop footer overrides removed) */

/* Tablet layout: 600–900px → Left: copy + LinkedIn, Right: legal links */
/* (Old tablet layout block removed) */

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #1a1a1a; /* Dunkler Hintergrund */
  min-width: 240px; /* Etwas breiter */
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
  z-index: 1000;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0;
}

.dropdown-content a {
  color: var(--light); /* Heller Text */
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 1rem; /* Passend zur restlichen Navi */
  transition: background-color 0.2s, color 0.2s;
}

.dropdown-content a:hover {
  background-color: var(--primary); /* Primärfarbe als Hover-Effekt */
  color: var(--dark); /* Dunkler Text auf Hover */
}



/* If JS forces hide (e.g., after clicking a link), keep it closed even if still hovered */
.nav-dropdown.dd-force-hide .dropdown-content {
  display: none !important;
}

.nav-dropdown .nav-link {
  display: flex;
  align-items: center;
}

/* Features + Banner layout */
.features-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr; /* restore two columns: features + image */
  align-items: start;
  gap: 2rem;
  padding: 0 2rem; /* match inner container padding */
  /* Keep modest spacing below hero; avoid large global offset tied to header height */
  margin-top: 1.5rem;
  background-color: var(--bg-color);
  /* Add breathing room below features before robots section without exposing page bg */
  padding-bottom: 3rem;
}

.features-wrap .section-heading { margin-bottom: 0.5rem; }

.features-wrap .features { grid-column: 1 / 2; }
.features-wrap .feature-image {
  grid-column: 2 / 3;
  align-self: start;
  /* create a sticky viewport-height box below header */
  overflow: hidden;
  border-radius: 0; /* container has no visible radius */
  background: transparent; /* transparent background as requested */
  position: sticky; /* keep image visible while scrolling features */
  top: calc(var(--header-offset, 72px) + var(--banner-pad));
  /* height fills from just below header to just above bottom */
  height: calc(100dvh - (var(--header-offset, 72px) + var(--banner-pad)));
}
.feature-image-figure { margin: 0; }
.feature-image-figure { margin: 0; height: 100%; }
.feature-image-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* preserve aspect ratio, fully visible */
  object-position: top center; /* start just below header */
  background: transparent; /* no forced background; inherit section bg */
  border-radius: 12px; /* radius on the image itself */
  /* Slightly scale down to reduce perceived size without distortion */
  transform: scale(0.9);
  transform-origin: top center;
}


/* Mobile: single column, hide the right image to mirror previous banner behavior */
@media (max-width: 900px) {
  .features-wrap { grid-template-columns: 1fr; gap: 1.25rem; padding: 0 0.5rem; margin-top: 0; margin-bottom: 2rem; }
  .features-wrap .feature-image { display: none; }
  /* Mobile: center section headings for Services and Environments */
  .features-wrap .section-heading,
  .environments-section .section-heading {
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0;
    margin-right: 0;
  }
  /* Align environments container padding with features on mobile */
  .environments-section .env-container { padding: 1rem 0.5rem 0 0.5rem; }
  .environments-section .env-grid { padding: 0; grid-template-columns: 1fr; gap: 0.75rem; }
}

/* Show header contact button on desktop */
@media (min-width: 901px) {
  .header-contact-btn {
    display: block;
    margin-right: clamp(1.5rem, 3vw, 3rem);
  }
}

/* === Environments (Einsatzbereiche) section === */
.environments-section {
  background-color: var(--bg-color);
  color: #eaeaea;
  padding-top: 1rem;
  padding-bottom: 2.5rem;
  position: relative; /* allow decorative shadow */
}
.environments-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 18px; /* subtle band */
  /* Downward fade using Robots section BG (#c5c5c5) */
  background: linear-gradient(to bottom, rgba(197,197,197,0.45), rgba(197,197,197,0) 75%);
  pointer-events: none;
  z-index: 0;
}
.environments-section .env-container { max-width: 1100px; margin: 0 auto; padding: 1.25rem 2rem 0 2rem; position: relative; z-index: 1; }
.environments-section .env-container { max-width: 1100px; margin: 0 auto; padding: 1.25rem 2rem 0 2rem; }
.environments-section .section-heading { text-align: left; margin-top: 1.5rem; margin-bottom: 1rem; padding-left: 2rem; }
.environments-section .section-heading.primary-color-text { color: #c5c5c5; }
.env-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  padding: 0 2rem; /* align with headings and features */
}
.env-card {
  /* Match feature card look, but slightly tighter vertically on desktop */
  background: #c5c5c5;
  color: rgba(0,0,0,0.7);
  padding: 1rem 1.2rem; /* reduced from 1.5rem */
  border-radius: 16px;  /* slightly tighter radius */
  /* very subtle primary-tinted shadow */
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.08), 0 0 0 1px rgba(var(--primary-rgb), 0.06);
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
  font-size: 1.2rem; /* more prominent */
  font-weight: 700;
  line-height: 1.3;
  display: flex;
  align-items: center; /* vertically center text */
  justify-content: center; /* horizontally center text */
  text-align: center;
  flex-direction: column;
  gap: 0.4rem;
}
.env-card:hover { background: var(--primary); color: var(--dark); }
.env-card:hover {
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.12);
}
/* Icon styling similar to features */
.env-icon { font-size: 1.6rem; line-height: 1; }

/* Mobile dropdown toggle inside env-cards */
.env-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.env-toggle:hover { color: #333; background: rgba(0,0,0,0.06); }
.env-card.is-open .env-toggle i { transform: rotate(180deg); transition: transform 0.2s ease; }

.env-details { width: 100%; font-size: 0.95rem; line-height: 1.5; color: rgba(0,0,0,0.75); margin-top: 0.25rem; text-align: left; }
.env-details p { margin: 0.25rem 0 0; }

@media (min-width: 901px) {
  .env-toggle { display: none !important; }
  /* Ensure back content is available for flip on desktop */
  .env-details[hidden] { display: block; }
}
@media (max-width: 900px) {
  .env-card {
    padding: 1.15rem 2.2rem 1.15rem 1.2rem; /* add vertical breathing room */
    border-radius: 14px;
    position: relative;
    min-height: 112px; /* ensure taller touch target and less cramped look */
  }
  /* Place the dropdown chevron at the right inside the tile */
  .env-toggle { position: absolute; top: 0.9rem; right: 0.9rem; }
  /* Keep icon color stable on hover in mobile */
  .env-card .env-icon,
  .env-card:hover .env-icon { color: rgba(0,0,0,0.7); }
  /* Mobile: icon above title; center align content */
  .env-card { align-items: center; text-align: center; }
  .env-card .env-inner { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; width: 100%; }
  .env-card .env-front,
  .env-card .env-back {
    display: flex;
    flex-direction: column; /* stack icon above title/content */
    align-items: center; /* center align content */
    gap: 0.35rem;
  }
  /* Ensure details actually show when card is open */
  .env-card .env-details { display: none !important; }
  .env-card.is-open .env-details { display: block !important; }
  /* Disable flip mechanics on mobile so details sit in normal flow */
  .env-card .env-inner { position: static; transform: none; }
  .env-card .env-front, .env-card .env-back { position: static; transform: none; backface-visibility: visible; }
}

/* Desktop: square, edge-to-edge tiles */
@media (min-width: 901px) {
  /* Desktop: uniform tiles with flip; fixed aspect ratio for visual consistency */
  .env-grid {
    grid-template-columns: repeat(2, 1fr); /* 2x2 */
    gap: 0; /* edge-to-edge */
  }
  .env-card {
    aspect-ratio: 2 / 1; /* consistent tile height */
    padding: 0; /* keep squares exact */
    border-radius: 0; /* inner edges flush */
    /* subtle interior separators + minimal primary glow */
    box-shadow: inset -1px 0 0 rgba(0,0,0,0.08), inset 0 -1px 0 rgba(0,0,0,0.08), 0 2px 6px rgba(var(--primary-rgb), 0.06);
    position: relative;
    perspective: 1000px; /* enable 3D flip */
    overflow: hidden; /* clip overflow; faces may scroll */
  }
  /* Add some vertical space between icon and title on the front side */
  .env-front { gap: 0.35rem; }
  .env-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.6s ease; }
  .env-card:hover .env-inner { transform: rotateY(180deg); }
  .env-front, .env-back { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; backface-visibility: hidden; border-radius: inherit; padding: 1rem; background: inherit; }
  .env-back { transform: rotateY(180deg); align-items: flex-start; justify-content: center; text-align: left; padding: 1rem 1.25rem; overflow: auto; }
  /* Outer rounded corners for 2x2 layout */
  .env-card:nth-child(1) { border-top-left-radius: 12px; }
  .env-card:nth-child(2) { border-top-right-radius: 12px; }
  .env-card:nth-child(3) { border-bottom-left-radius: 12px; }
  .env-card:nth-child(4) { border-bottom-right-radius: 12px; }
  /* Ensure back content is visible even if marked hidden in markup */
  .env-details[hidden] { display: block; }
}
.env-note { color: #bdbdbd; margin: 0.8rem 0 0 0; padding-left: 2rem; font-size: 0.95rem; }

/* Anchor offset to avoid header overlap */
#einsatzbereiche, #industries { scroll-margin-top: calc(var(--header-height, 80px) + 2rem); }

/* Specific styling for header contact button on large desktop screens */
@media (min-width: 1201px) {
  .header-contact-btn {
    /* Removed margin-left to move it further left */
  }
}

/* Specific styling for header contact button on smaller desktop screens */
@media (min-width: 901px) and (max-width: 1200px) {
  .header-contact-btn {
    margin-left: auto; /* Push to the right when space is constrained */
  }
}

/* Removed mobile-contact button in favor of mobile-only dropdown */

/* Keep language switch visible on tablets (901px–1067px) */

.section-heading {
  font-size: var(--fs-600);
  text-align: left;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-weight: 600;
  padding-left: 2rem; /* Align with feature cards */
}

/* Ensure robot section headings align left consistently like Services */
.roboter-section .section-heading {
  text-align: left !important;
  padding-left: 2rem !important;
}
/* When the heading is inside the text column, align with text (no extra left padding) */
.roboter-section .robot-text .section-heading,
.roboter-section .transport-robot-text .section-heading,
.roboter-section .reinigungs-robot-text .section-heading,
.roboter-section .liefer-robot-text .section-heading { padding-left: 0 !important; margin-top: 0; margin-bottom: 0.85rem; }

/* Robot segments: 1/3 text (left), 2/3 media (right) */
.roboter-section .robot-segment__grid,
.roboter-section .transport-robot-segment__grid,
.roboter-section .reinigungs-robot-segment__grid,
.roboter-section .liefer-robot-segment__grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  align-items: start;
}
.roboter-section .robot-text,
.roboter-section .transport-robot-text,
.roboter-section .reinigungs-robot-text,
.roboter-section .liefer-robot-text {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(0,0,0,0.7); /* match feature card text color */
}
@media (min-width: 901px) {
  .roboter-section .transport-robot-text,
  .roboter-section .reinigungs-robot-text,
  .roboter-section .liefer-robot-text {
    font-size: 1.15rem; /* slightly larger on desktop */
  }
}
.roboter-section .robot-media .robot-video,
.roboter-section .transport-robot-media .transport-robot-video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* Cleaning section: text left (1/3), video right (2/3) */
.roboter-section .reinigungs-roboter-segment .reinigungs-robot-segment__grid {
  grid-template-columns: 1fr 2.4fr; /* give the video more horizontal space */
  gap: 1.2rem; /* slightly tighter gap to reclaim width for media */
}
.roboter-section .reinigungs-roboter-segment .reinigungs-robot-segment__grid { align-items: stretch; }
.roboter-section .reinigungs-roboter-segment .reinigungs-robot-media { overflow: hidden; }
.roboter-section .reinigungs-roboter-segment .reinigungs-robot-media .reinigungs-robot-video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.roboter-section .liefer-roboter-segment .liefer-robot-media .liefer-robot-video,
.roboter-section .liefer-roboter-segment .liefer-robot-media .liefer-robot-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

@media (max-width: 900px) {
  .roboter-section .robot-segment__grid,
  .roboter-section .transport-robot-segment__grid,
  .roboter-section .reinigungs-robot-segment__grid,
  .roboter-section .liefer-robot-segment__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  /* Delivery (mobile): ensure text above image regardless of source order */
  .roboter-section .liefer-roboter-segment .liefer-robot-segment__grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  .roboter-section .liefer-roboter-segment .liefer-robot-text { order: 1; }
  .roboter-section .liefer-roboter-segment .liefer-robot-media { order: 2; }
}

/* Transport section: video left (2/3), text right (1/3) */
.roboter-section .robot-segment--transport .transport-robot-segment__grid {
  grid-template-columns: 2fr 1fr;
  gap: 2rem; /* extra space between video and text on desktop */
  margin-top: 1.2rem; /* extra top spacing for the grid */
}

/* Add top spacing on the whole transport section instead of the inner grid */
.roboter-section .robot-segment.robot-segment--transport {
  margin-top: 3rem;
}

/* Transition line between Transport and Cleaning sections */
/* (removed explicit divider; using spacing/visual contrast instead) */

/* Make transport video flush with left screen edge and fill viewport height */
.roboter-section .robot-segment--transport { position: relative; }
.roboter-section .robot-segment--transport .transport-robot-segment__grid { align-items: stretch; }
.roboter-section .robot-segment--transport .transport-robot-media {
  /* Pull video cell to screen-left: compensate container side gutters */
  margin-left: calc(-1 * ((100vw - 100%) / 2));
  overflow: hidden; /* ensure media never overlaps text column */
  /* Desktop: apply shadow on the container so it's not clipped by overflow of ancestors */
  box-shadow: 8px 12px 24px rgba(0, 0, 0, 0.28);
  border-radius: 12px; /* add subtle rounding on desktop as well */
}
.roboter-section .robot-segment--transport .transport-robot-media .transport-robot-video {
  height: 80vh;            /* reach near bottom of the screen */
  width: 100%;             /* contain within grid column width */
  max-width: 100%;
  object-fit: cover;       /* fill vertically without letterboxing */
  border-radius: 12px;     /* match container rounding */
  display: block;
  /* Shadow moved to container to ensure visibility */
  box-shadow: none;
}
/* Prevent intrinsic min-content overflow causing overlap */
.roboter-section .transport-robot-segment__grid > * { min-width: 0; }
.roboter-section .transport-robot-text { position: relative; z-index: 1; }

@media (max-width: 900px) {
  .roboter-section .robot-segment--transport .transport-robot-segment__grid {
    display: flex;
    flex-direction: column-reverse; /* place text above media */
  }
  .roboter-section .robot-segment--transport .transport-robot-media {
    margin-left: 0; /* no full-bleed on mobile */
    border-radius: 12px; /* ensure rounded outer corners on mobile */
    overflow: hidden;    /* clip video corners cleanly */
    /* Subtle shadow around the rounded container */
    box-shadow: 6px 10px 20px rgba(0, 0, 0, 0.25);
  }
  .roboter-section .robot-segment--transport .transport-robot-media .transport-robot-video {
    height: auto;
    width: 100%;
    border-radius: 12px; /* inner radius matches container */
    box-shadow: none;    /* shadow applied on container to avoid clipping */
  }

  /* Cleaning: stack like transport (text above media) on small screens */
  .roboter-section .reinigungs-roboter-segment .reinigungs-robot-segment__grid {
    display: flex;
    flex-direction: column; /* text above media in mobile */
  }
  .roboter-section .reinigungs-roboter-segment .reinigungs-robot-media {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: -6px 10px 20px rgba(0, 0, 0, 0.25);
  }
  .roboter-section .reinigungs-roboter-segment .reinigungs-robot-media .reinigungs-robot-video {
    height: auto;
    width: 100%;
    border-radius: 12px;
    box-shadow: none;
  }

  /* Delivery: smaller image and shadow on the image (not container) */
  .roboter-section .liefer-roboter-segment .liefer-robot-media { overflow: visible; box-shadow: none; display: flex; }
  .roboter-section .liefer-roboter-segment .liefer-robot-media .liefer-robot-image {
    max-height: 55vh; width: auto; max-width: 100%; object-fit: contain;
    display: block; margin-left: auto; margin-right: auto;
    border-radius: 12px; box-shadow: 6px 10px 20px rgba(0,0,0,0.25);
  }
}

/* Desktop: mirror transport styling for cleaning (video right), contained layout */
@media (min-width: 901px) {
  .roboter-section .reinigungs-roboter-segment .reinigungs-robot-media {
    overflow: hidden;
    box-shadow: -8px 12px 24px rgba(0, 0, 0, 0.28);
    border-radius: 12px; /* add subtle rounding on desktop as well */
  }
  .roboter-section .reinigungs-roboter-segment .reinigungs-robot-media .reinigungs-robot-video {
    height: 70vh; /* slightly reduced height on desktop */
    object-fit: cover;
    border-radius: 12px; /* match container rounding */
    box-shadow: none; /* shadow on container to ensure visibility */
  }

  /* Delivery image: preserve aspect ratio with ~80vh target height; shadow on image */
  .roboter-section .liefer-roboter-segment .liefer-robot-media { overflow: visible; box-shadow: none; border-radius: 0; }
  .roboter-section .liefer-roboter-segment .liefer-robot-media .liefer-robot-image {
    height: 80vh; width: auto; max-width: 100%; object-fit: contain;
    display: block; border-radius: 12px; margin-left: auto; margin-right: auto;
    box-shadow: 8px 12px 24px rgba(0, 0, 0, 0.28);
  }

  /* Delivery: place media left, text right on desktop (like transport) */
  .roboter-section .liefer-roboter-segment .liefer-robot-segment__grid {
    display: grid;
    grid-template-columns: 1.6fr 1.4fr; /* make media column slightly narrower */
    gap: 2rem;
  }
  .roboter-section .liefer-roboter-segment .liefer-robot-media { order: 1; }
  .roboter-section .liefer-roboter-segment .liefer-robot-text  { order: 2; }

}

/* Nudge cleaning text column slightly left on very large screens */
@media (min-width: 1201px) {
  .roboter-section .reinigungs-roboter-segment .reinigungs-robot-text {
    margin-left: -0.75rem;
  }
  /* Prepare same behavior for delivery section */
  .roboter-section .liefer-roboter-segment .liefer-robot-text {
    margin-left: -0.75rem;
  }
}

/* Provide generous spacing before delivery section as well */
.roboter-section .liefer-roboter-segment { margin-top: 6rem; }

/* Removed soft inner shadow divider on cleaning section */
/* Add simple whitespace between transport and cleaning sections */
.roboter-section .reinigungs-roboter-segment { margin-top: 6rem; }

/* Pressed-card transition effect at the top of each following robot section */
/* pressed-card effect removed */


/* Use accent color for section headings marked as primary-color-text */
.primary-color-text {
  color: var(--accent);
}

.features-wrap .section-heading.primary-color-text {
  color: #c5c5c5;
}

/* Removed standalone .cursor element */

/* Keep typewriter layout predictable */
#typewriter-container { position: relative; display: inline-block; }
#typed-output { display: inline-block; }

/* Inline caret style while typing (replaces standalone cursor) */
.typing { display: inline-block; border-right: 0.1em solid var(--primary); animation: blink 0.7s step-end infinite; }

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

main {
  flex-grow: 1;
}

/* On mobile, avoid lifting/scaling focused feature to prevent janky reflow */
@media (max-width: 900px) {
  .features .feature.is-focused {
    transform: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  }
}
out predictable */
#typewriter-container { position: relative; display: inline-block; }
#typed-output { display: inline-block; }

/* Inline caret style while typing (replaces standalone cursor) */
.typing { display: inline-block; border-right: 0.1em solid var(--primary); animation: blink 0.7s step-end infinite; }

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

main {
  flex-grow: 1;
}

@media (max-width: 900px) {
  .features .feature.is-focused {
    transform: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  }
}
/* During first-load lock, ensure no transitions run that could cause visual stretch */
body.hero-lock .hero-bg-video { transition: none !important; }
body.hero-lock .hero::before { transition: none !important; }

/* === NAV / DROPDOWNS — FINAL OVERRIDES (append) === */

/* Desktop: Dropdowns sind nur sichtbar, wenn dd-open Klasse gesetzt ist */
@media (min-width: 901px) {
  header nav .nav-dropdown.dd-open > .dropdown-content { display: block !important; visibility: visible !important; }
  /* Zusätzlich: per Hover öffnen, damit Desktop intuitiv bleibt */
  header nav .nav-dropdown:hover > .dropdown-content { display: block !important; visibility: visible !important; }
  header nav .nav-dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px; /* bridge hover gap to dropdown */
  }
  /* Positioniere das Dropdown klar unter dem Trigger und hebe es über den Header-Hintergrund */
  header nav .dropdown-content { top: calc(100% + 8px); left: 0; z-index: 4500; }
  /* Sichere Sichtbarkeit der Links im Dropdown */
  header nav .dropdown-content a { opacity: 1; color: var(--light); }
  /* Sicherstellen, dass Top-Level-Navi-Texte sichtbar bleiben */
  header nav .nav-link,
  header nav .nav-link span { opacity: 1 !important; visibility: visible !important; color: var(--light) !important; }
  /* Desktop: horizontale Anordnung, keine Gaps zusätzlich zu Link-Margins */
  header nav .nav-content-wrapper { display: flex; flex-direction: row; align-items: center; gap: 0; flex-wrap: nowrap; }
  /* Erstes Element ohne linken Außenabstand */
  header nav .nav-content-wrapper > *:first-child > .nav-link { margin-left: 0; }
  header nav .nav-content-wrapper > a.nav-link:first-child { margin-left: 0; }
  /* Chevron-Pfeile in Desktop ausblenden */
  header nav .nav-dropdown > a.nav-link .nav-chevron { display: none !important; }
}

/* Im Overlay niemals per Hover öffnen */
body.nav-open header .nav-dropdown:hover > .dropdown-content {
  display: none !important;
  visibility: hidden !important;
  margin: 0 !important;
}

/* Mobile/Overlay: geschlossene Dropdowns = kein Platz; offen = Abstand */
@media (max-width: 900px) {
  header nav.open .dropdown-content,
  body.nav-open header nav .dropdown-content,
  body.nav-open header nav .dropdown-content {
    display: none !important;
    visibility: hidden !important;
    position: static;
    overflow: hidden;
    margin: 0;          /* <<< verhindert Gap */
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  header nav.open .nav-dropdown.dd-open > .dropdown-content,
  body.nav-open header nav .nav-dropdown.dd-open > .dropdown-content,
  body.nav-open header nav .nav-dropdown.dd-open > .dropdown-content {
    display: block !important;
    visibility: visible !important;
    margin: 0.2rem 0 0.6rem 0; /* Abstand nur wenn geöffnet */
  }
}
/* Ensure dd-force-hide overrides any hover-open on desktop */
@media (min-width: 901px) {
  header nav .nav-dropdown.dd-force-hide > .dropdown-content {
    display: none !important;
    visibility: hidden !important;
  }
}

/* Desktop/Tablet (>=901px): keep inline nav visible by default */
@media (min-width: 901px) {
  header nav .nav-content-wrapper {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    position: static;
    width: auto;
    background: transparent;
    border: 0;
    padding: 0;
    height: auto;           /* prevent unintended collapse */
    overflow: visible;      /* allow pointer events */
    opacity: 1;             /* ensure items are visible */
    transform: none;        /* no translate when inline */
    pointer-events: auto;   /* clickable by default */
  }
}

/* === FOOTER — FINAL LAYOUT (appended) === */
.footer { background: var(--color-bg-footer); color: var(--color-text-muted); border-top: 1px solid rgba(var(--primary-rgb), 0.3); padding: 1.2rem 0; }
.footer .footer__grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.footer .footer__left {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-self: start;
}

.footer .footer__nav {
  grid-column: 2;
}
.footer .footer__copy { font-size: 1rem; line-height: 1.5; }
.footer .footer__nav { /* No specific styles needed here anymore */ }
.footer .footer__list { list-style: none; display: flex; align-items: center; gap: 0.9rem; margin: 0; padding: 0; }
.footer .footer__item a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}
.footer .footer__item a:hover {
  color: var(--primary);
}
.footer .footer__item a.active {
  color: var(--primary);
}
.footer .footer__item a::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.footer .footer__item a:hover::after,
.footer .footer__item a.active::after {
  width: 100%;
}
.footer .footer__item a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.footer .footer__social { width: 28px; height: 28px; color: var(--color-text-muted); }
.footer .footer__social a { display: inline-flex; color: inherit; }
.footer .footer__social a:hover { color: #fff; }
.footer .footer__social svg { width: 100%; height: 100%; display: block; }

.footer .footer__right {
  grid-column: 3;
  justify-self: end;
}

@media (min-width: 901px) {
  .footer .footer__left {
    margin-left: calc(-1 * min(4rem, max(0px, (100vw - 1100px) / 2)));
  }
}

.footer__up-button {
  display: none; /* Hidden by default */
  width: 40px;
  height: 40px;
  background-color: transparent;
  border: 1px solid var(--color-text-muted);
  color: var(--color-text-muted);
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  font-size: 1.2rem;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.footer__up-button:hover {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

@media (max-width: 900px) {
  .footer .footer__grid {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "nav right"
      "left right";
    align-items: start;
    justify-items: start;
    gap: 1rem;
    padding-left: calc(1.25rem + env(safe-area-inset-left, 0px));
    padding-right: calc(1.25rem + env(safe-area-inset-right, 0px));
  }

  .footer .footer__left {
    grid-area: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .footer .footer__nav {
    grid-area: nav;
    justify-self: start; /* ensure left-aligned within grid */
    text-align: left;
  }

  .footer .footer__right {
    grid-area: right;
    justify-self: end;
  }

  .footer .footer__list {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start; /* prevent centering */
    gap: 0.5rem;
  }

  .footer .footer__item a {
    display: block;
    padding: 0.4rem 0;
  }

  .footer .footer__copy {
    font-size: 0.9rem;
  }

  /* Mobile order: LinkedIn icon above copy text */
  .footer .footer__left .footer__social { order: 1; }
  .footer .footer__left .footer__copy { order: 2; text-align: left; }

  .footer__up-button {
    position: static;
    bottom: auto;
    right: auto;
  }
}

@media (max-width: 599px) {
  .footer .footer__copy {
    font-size: 0.8rem;
  }
}

/* Custom style for added page titles (e.g., on About page) */
.page-title {
  font-size: var(--fs-600);
  color: var(--light);
  font-weight: 600;
  text-align: left;
  margin-bottom: var(--space-xl);
}
