/* ═══════════════════════════════════════════════════════
   LOVIZ AI — Workflow Visuals
   n8n-style node cards, bezier curves (service icons removed)
   ═══════════════════════════════════════════════════════ */

/* Site-wide content width — overrides Astro `--container`; keeps one rail with gutters */
:root {
  --content-max: 1200px;
  --content-pad-x: clamp(20px, 4vw, 32px);
  --container: min(var(--content-max), calc(100vw - 2 * var(--content-pad-x)));
}

/* Wider hero + section intros so they align visually with the new content rail */
.hero-content {
  max-width: min(960px, var(--container));
}

.hero-sub {
  max-width: min(52rem, calc(var(--container) - 2 * var(--content-pad-x)));
}

.section .section-desc {
  max-width: min(52rem, calc(var(--container) - 2 * var(--content-pad-x)));
}

.cta-box {
  max-width: min(960px, var(--container));
}

/* Align horizontal padding with workflow-flow / about (Astro uses fixed 28px) */
.navbar-inner,
.section-header,
.tech-wrap,
.footer-grid {
  padding-inline: var(--content-pad-x);
}

/* ───────────────────────────────────────────────────────
   1. WORKFLOW FLOW CONTAINER
   ─────────────────────────────────────────────────────── */
.workflow-flow {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--content-pad-x) 80px;
}

.workflow-flow .flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

/* ───────────────────────────────────────────────────────
   2. WORKFLOW NODES — default state (shared)
   ─────────────────────────────────────────────────────── */
.workflow-node {
  position: relative;
  z-index: 2;
  min-width: 0;
  opacity: 0.4;
  transition: opacity 0.25s var(--ease),
              border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              transform 0.25s var(--ease);
  will-change: opacity, border-color, box-shadow;
}

.workflow-node.visible {
  opacity: 0.5;
}

.workflow-node.active {
  opacity: 1 !important;
  border-color: var(--border-accent) !important;
  box-shadow: 0 0 24px var(--accent-glow), 0 0 60px rgba(6, 182, 212, 0.08);
}

.workflow-node.passive {
  opacity: 0.3;
}

/* ───────────────────────────────────────────────────────
   4. DESKTOP — CLASSIC GRID (no workflow flow)
   ─────────────────────────────────────────────────────── */
@media (min-width: 769px) {
  /* Disable workflow flow container — use classic grids */
  .workflow-flow {
    display: block;
  }

  /* Hide bezier flow lines entirely */
  .workflow-flow .flow-lines {
    display: none;
  }

  /* Services: 3-column grid */
  .workflow-flow[data-section="services"] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  /* Case Studies: 2-column grid */
  .workflow-flow[data-section="cases"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  /* Desktop nodes always fully visible */
  .workflow-node {
    opacity: 1 !important;
    animation: none !important;
  }

  /* Disable active state pseudo-elements on desktop */
  .workflow-node.active::before,
  .workflow-node.active::after {
    display: none;
  }

  /* Hover replaces scroll-active glow */
  .workflow-node:hover {
    border-color: var(--border-accent);
    box-shadow: 0 8px 40px var(--accent-glow);
  }
}

/* ───────────────────────────────────────────────────────
   5. MOBILE — CENTER COLUMN LAYOUT
   ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .workflow-flow {
    padding: 20px var(--content-pad-x) 60px;
    display: block;
  }

  .workflow-flow .flow-lines {
    position: absolute;
  }

  .workflow-node {
    margin-bottom: 76px;
    max-width: 100%;
  }

  /* Align spine with cards: no translateY from .reveal / :active / :hover */
  .workflow-flow .workflow-node,
  .workflow-flow .workflow-node.reveal,
  .workflow-flow .workflow-node.reveal.vis {
    transform: none !important;
  }

  .workflow-flow .workflow-node.svc-card:hover,
  .workflow-flow .workflow-node.case-card:hover,
  .workflow-flow .workflow-node.about-card:hover {
    transform: none !important;
  }

  .workflow-node.active {
    position: relative;
    outline: none;
  }

  .workflow-node.active::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: calc(var(--r-lg) + 2px);
    background: conic-gradient(from var(--angle), var(--accent), transparent 30%, transparent 70%, var(--accent));
    z-index: -1;
    animation: rotateBorder 3s linear infinite;
  }

  .workflow-node.active::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--r-lg);
    background: var(--bg-secondary);
    z-index: -1;
  }

  @keyframes rotateBorder {
    to {
      --angle: 360deg;
    }
  }

  @property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
  }
}

/* ───────────────────────────────────────────────────────
   6. FLOW SPINE (single vertical thread, mobile)
   ─────────────────────────────────────────────────────── */
.flow-lines .flow-spine,
.flow-lines .flow-spine-highlight {
  fill: none;
  stroke-linecap: round;
}

.flow-lines .flow-spine {
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0.22;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  filter: none;
}

/* Per-gap highlight paths (one path per segment; dash + opacity from JS — no transition to avoid scroll jank). */
.flow-lines .flow-spine-highlight {
  stroke: #cffafe;
  stroke-width: 2.5;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.55)) drop-shadow(0 0 14px rgba(6, 182, 212, 0.32));
  transition: none;
  /* stroke-dasharray / offset set in JS from getTotalLength() */
}

/* ───────────────────────────────────────────────────────
   7. CARD-SPECIFIC STYLES TO ENSURE COMPATIBILITY
   ─────────────────────────────────────────────────────── */

/* Service card GSAP stage (large readable canvas) */
.svc-stage {
  width: 100%;
  min-height: clamp(168px, 20vw, 240px);
  aspect-ratio: 360 / 220;
  max-height: 260px;
  margin-bottom: 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(6, 182, 212, 0.06), rgba(15, 23, 42, 0.35));
  overflow: hidden;
  flex-shrink: 0;
}

.svc-stage__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.svc-stage--pipeline .wf-node-outline {
  pointer-events: none;
}

.svc-stage--pipeline .wf-port {
  pointer-events: none;
}

/* Keep existing card padding and layout from Astro CSS */
.workflow-node.svc-card {
  cursor: default;
  display: flex;
  flex-direction: column;
  overflow: visible;
  transition: opacity 0.25s var(--ease),
              border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              transform 0.25s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .svc-stage__svg .ai-core,
  .svc-stage__svg .ai-input,
  .svc-stage__svg .infra-layer {
    animation: none !important;
  }

  .svc-stage--pipeline .wf-bus-seg[data-seg='0'] {
    stroke: rgba(34, 197, 94, 0.88);
    opacity: 1;
  }

  .svc-stage--pipeline .wf-bus-seg[data-seg='1'] {
    stroke: rgba(6, 182, 212, 0.35);
    opacity: 0.55;
  }

  .svc-stage--pipeline .wf-node[data-idx='0'] .wf-node-outline,
  .svc-stage--pipeline .wf-node[data-idx='1'] .wf-node-outline {
    opacity: 1;
    stroke: #22c55e;
    stroke-width: 2.25px;
    filter: none;
  }

  .svc-stage--pipeline .wf-node[data-idx='2'] .wf-node-outline {
    opacity: 0.95;
    stroke: #6b7280;
    stroke-width: 2px;
    filter: none;
  }

  .svc-stage__svg .ai-spoke {
    opacity: 0.55;
    stroke-dashoffset: 0 !important;
  }

  .svc-stage__svg .ai-core {
    opacity: 1;
    transform: none;
  }

  .svc-stage__svg .infra-layer {
    opacity: 1;
    transform: none;
  }

  .svc-stage__svg .infra-led {
    fill: rgba(6, 182, 212, 0.55);
  }

  .svc-stage__svg .infra-pulse {
    opacity: 0.35;
  }

  .flow-lines .flow-spine,
  .flow-lines .flow-spine-highlight {
    animation: none !important;
  }

  .flow-lines .flow-spine-highlight {
    stroke: var(--accent);
    stroke-width: 2.5;
    opacity: 0.55;
  }

  .workflow-node.active {
    animation: none !important;
  }

  .workflow-node.active::before,
  .workflow-node.active::after {
    animation: none !important;
  }
}

.workflow-node.case-card {
  cursor: default;
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding-top: 0;
  transition: opacity 0.25s var(--ease),
              border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              transform 0.25s var(--ease);
}

.case-card__visual-mask {
  margin: 0 -32px 20px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow: hidden;
  line-height: 0;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.case-card__visual {
  margin: 0;
  max-height: clamp(140px, 28vw, 200px);
  overflow: hidden;
}

.case-card__visual img {
  width: 100%;
  height: clamp(140px, 28vw, 200px);
  object-fit: cover;
  object-position: top center;
  display: block;
}

.case-card__visual--center img {
  object-position: center center;
}

@media (max-width: 480px) {
  .case-card__visual {
    max-height: clamp(120px, 36vw, 168px);
  }

  .case-card__visual img {
    height: clamp(120px, 36vw, 168px);
  }
}


/* About: image column + stacked cards */
.about-layout {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--content-pad-x) 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: stretch;
}

/* About cards use the same mobile flow engine as Services (SVG + .workflow-node) */
.about-layout .workflow-flow[data-section="about"] {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  align-self: stretch;
}

.workflow-node.about-card {
  cursor: default;
  display: flex;
  flex-direction: column;
  overflow: visible;
  transition: opacity 0.25s var(--ease),
              border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              transform 0.25s var(--ease);
}

/* Second card grows with the column so the layout balances the tall image */
.about-layout .about-card--fill {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-value-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.about-value-tags span {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.about-visual {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  min-height: 0;
  align-self: stretch;
}

.about-visual img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  display: block;
}

@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr;
    padding: 0 var(--content-pad-x) 40px;
  }

  .about-visual img {
    min-height: 200px;
    max-height: 320px;
  }
}

/* Tech stack: brand icon row above chips */
.tech-icon-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 22px 28px;
  margin: 0 auto 28px;
  padding: 0;
  max-width: 100%;
}

.tech-icon-row span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-icon-row img {
  width: 36px;
  height: 36px;
  opacity: 0.82;
  filter: brightness(0) invert(1);
  transition: opacity 0.2s var(--ease), filter 0.2s var(--ease), transform 0.2s var(--ease);
}

.tech-icon-row img:hover {
  opacity: 1;
  filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(34, 211, 238, 0.35));
  transform: translateY(-2px);
}

/* Card body above in-flow paint; mobile active ring uses negative-z pseudos */
.workflow-node > * {
  position: relative;
  z-index: 2;
}

/* ───────────────────────────────────────────────────────
   8. MOBILE RESPONSIVE TWEAKS FOR WORKFLOW
   ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .workflow-flow {
    padding: 16px var(--content-pad-x) 40px;
  }

  .workflow-node {
    margin-bottom: 64px;
  }
}

/* Case Study Metrics */
.case-metrics {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent, #06b6d4);
  line-height: 1.2;
  margin-top: 12px;
  padding: 0;
}
.case-metrics span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary, #9ca3af);
}

/* ───────────────────────────────────────────────────────
   9. MOBILE MENU FULL-SCREEN OVERLAY (append-only fix)
   ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar-links {
    display: none !important;
  }
  .navbar-links.open {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    position: fixed !important;
    top: 72px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    min-height: calc(100vh - 72px) !important;
    height: auto !important;
    max-height: none !important;
    background: #06080ff2 !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    padding: 20px 28px !important;
    gap: 0 !important;
    z-index: 900 !important;
    overflow-y: auto !important;
    justify-content: flex-start !important;
  }
  .navbar-links.open li {
    display: block !important;
    width: 100% !important;
  }
  .navbar-links.open a {
    display: block !important;
    padding: 16px 0 !important;
    font-size: 1.2rem !important;
    color: #ddd !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: left !important;
  }
  .navbar-links.open .navbar-cta {
    margin-top: 16px !important;
    text-align: center !important;
    display: block !important;
  }
}

/* ───────────────────────────────────────────────────────
   10. HOW IT WORKS — PROCESS GRID
   ─────────────────────────────────────────────────────── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--content-pad-x);
}

.process-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 28px 28px;
  text-align: center;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.process-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.process-step {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.35;
  margin-bottom: 12px;
  line-height: 1;
}

.process-card h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.process-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .process-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .process-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 24px 20px;
  }
  .process-step {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }
}

/* ───────────────────────────────────────────────────────
   11. TESTIMONIALS
   ─────────────────────────────────────────────────────── */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--content-pad-x);
}

.testimonial-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-text::before {
  content: "\201C";
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.3;
  line-height: 0;
  position: relative;
  top: 14px;
  margin-right: 4px;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.testimonial-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .testimonial-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ───────────────────────────────────────────────────────
   12. INLINE CTAS (between sections)
   ─────────────────────────────────────────────────────── */
.section-cta-inline {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--content-pad-x);
}

.cta-inline-box {
  background: linear-gradient(135deg, rgba(6,182,212,0.08), rgba(6,182,212,0.02));
  border: 1px solid var(--border-accent);
  border-radius: var(--r-lg);
  padding: 40px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-inline-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(6,182,212,0.12), transparent 50%);
  pointer-events: none;
}

.cta-inline-box h3 {
  margin-bottom: 12px;
  font-size: 1.4rem;
  position: relative;
}

.cta-inline-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 24px;
  position: relative;
}

.cta-inline-box .btn {
  position: relative;
}

@media (max-width: 768px) {
  .cta-inline-box {
    padding: 28px 20px;
  }
  .cta-inline-box h3 {
    font-size: 1.2rem;
  }
  .cta-inline-box p {
    font-size: 0.88rem;
  }
}


/* ───────────────────────────────────────────────────────
   13. CASE STUDY DETAIL PAGE
   ─────────────────────────────────────────────────────── */
.case-detail-hero {
  margin-top: 72px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.case-detail-img {
  margin: -72px 0 0;
  max-height: 420px;
  overflow: hidden;
  position: relative;
}

.case-detail-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top center;
}

.case-detail-img--inner {
  margin: 0;
}

.case-detail-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(transparent, var(--bg-primary));
}

.case-detail-type {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow2);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid rgba(6,182,212,.15);
  display: inline-block;
  margin-bottom: 8px;
}

.case-detail-metrics {
  display: flex;
  gap: 24px;
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.case-detail-metric {
  text-align: center;
  flex: 1;
}

.case-detail-metric .metric-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}

.case-detail-metric .metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.case-detail-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--content-pad-x);
}

.case-detail-content {
  padding: 60px 0;
}

.case-detail-content .case-study-section {
  max-width: 740px;
  margin-bottom: 40px;
}

.case-detail-content h2,
.case-detail-content .section-header h2 {
  margin-bottom: 16px;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.case-detail-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 48px;
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--accent);
  border: 1px solid var(--border-accent, var(--border));
  border-radius: var(--r-md);
  transition: all 0.3s ease;
  text-decoration: none;
}

.back-link:hover {
  background: var(--accent-glow2);
}

@media (max-width: 768px) {
  .case-detail-hero { margin-top: 60px; }
  .case-detail-img { max-height: 200px; margin: 0; }
  .case-detail-metrics { flex-direction: column; gap: 16px; }
  .case-detail-content { padding: 28px 0 40px; }
}

/* ═══════════════════════════════════════════════════════
   14. LANGUAGE TOGGLE
   ═══════════════════════════════════════════════════════ */
[data-lang="de"] {
  display: none;
}

body.lang-de [data-lang="de"] {
  display: block !important;
}

body.lang-de [data-lang="de"].section-label {
  display: inline-block;
}

body.lang-de [data-lang="de"].hero-sub {
  display: block;
}

body.lang-de [data-lang="en"] {
  display: none;
}

.lang-toggle {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
  user-select: none;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 768px) {
  .lang-toggle {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
    width: 100%;
  }
}

/* ───────────────────────────────────────────────────────
   16. COMPREHENSIVE SPACING FIXES — 2026-04-18 v2
   Combines: section breathing, hero→content gap,
   card equalization, lang-toggle margin safety,
   case detail padding, CTA box refinement
   ─────────────────────────────────────────────────────── */

/* === GLOBAL SECTION BREATHING ROOM === */
.section {
  padding-top: 60px;
  padding-bottom: 100px;
}

@media (max-width: 768px) {
  .section {
    padding-top: 40px;
    padding-bottom: 80px;
  }
}

/* === WORKFLOW FLOW CONTAINER — more spacing === */
@media (min-width: 769px) {
  .workflow-flow {
    padding-top: 48px;
    padding-bottom: 88px;
  }
  .workflow-flow[data-section="cases"] {
    gap: 28px;
  }
  .workflow-flow[data-section="services"] {
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .workflow-flow {
    padding-top: 28px;
    padding-bottom: 68px;
  }
}

/* === ABOUT LAYOUT MORE SPACING === */
.about-layout {
  padding-bottom: 56px;
}

/* === PROCESS GRID MORE SPACING === */
.process-grid {
  padding-bottom: 48px;
}

/* === TESTIMONIAL GRID MORE SPACING === */
.testimonial-grid {
  padding-bottom: 48px;
}

/* === CASE CARD HEIGHT EQUALIZATION === */
@media (min-width: 769px) {
  .workflow-flow[data-section="cases"] .workflow-node.case-card {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
}

/* === LANG-TOGGLE MARGIN SAFETY === */
/* Prevent hidden sibling elements from pushing margin */
[data-lang="de"] p,
[data-lang="de"] h2,
[data-lang="de"] h3,
[data-lang="de"] .section-desc,
[data-lang="de"] .section-header {
  margin: 0;
}
body.lang-de [data-lang="de"] p,
body.lang-de [data-lang="de"] h2,
body.lang-de [data-lang="de"] h3 {
  margin-bottom: 16px;
}
body.lang-de [data-lang="de"] .section-desc {
  margin-bottom: 12px;
}
body.lang-de [data-lang="de"] .section-header {
  margin-bottom: 12px;
}

/* === CASE DETAIL PAGE — FIX ALL SPACING === */

/* Increase content padding bottom so it does not crowd footer */
.case-detail-content {
  padding-bottom: 100px;
}

@media (max-width: 768px) {
  .case-detail-content {
    padding-bottom: 80px;
  }
}

/* Hero → Content: add proper gap instead of relying on combined sections */
#case-detail .section-header {
  margin-bottom: 48px;
}

/* More space between challenge/solution/results */
.case-detail-content .case-study-section {
  margin-bottom: 48px;
}

/* More space between last text section and metrics */
.case-detail-metrics {
  margin: 48px 0 40px;
  padding: 28px;
}

/* Back link more prominent */
.back-link {
  margin-top: 64px;
  padding: 14px 24px;
}

/* Mobile back link full-width centered */
@media (max-width: 768px) {
  .back-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .case-detail-content .case-study-section {
    margin-bottom: 36px;
  }
  .case-detail-metrics {
    padding: 20px;
  }
}

/* === CTA BOXES MORE BREATHING ROOM === */
@media (min-width: 769px) {
  .cta-inline-box {
    padding: 48px 36px;
  }
}

@media (max-width: 768px) {
  .cta-inline-box {
    padding: 32px 20px;
  }
}

/* === FOOTER TOP SPACING === */
.case-detail-metrics + .case-tags + p + .cta-inline-box + p {
  margin-bottom: 32px;
}


/* ───────────────────────────────────────
   DATENSCHUTZ PAGE — proper formatting
   ─────────────────────────────────────── */
.datenschutz-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px;
}

.datenschutz-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-primary, #f1f5f9);
}

.datenschutz-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text-secondary, #94a3b8);
}

.datenschutz-content p {
  margin-bottom: 12px;
  line-height: 1.7;
  color: var(--text-secondary, #cbd5e1);
}

.datenschutz-content a {
  color: var(--accent, #06b6d4);
  text-decoration: underline;
}

.datenschutz-content ul {
  margin: 8px 0 16px 24px;
  list-style: disc;
}

.datenschutz-content ul li {
  margin-bottom: 6px;
  line-height: 1.6;
  color: var(--text-secondary, #cbd5e1);
}

.datenschutz-stand {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.1));
}

/* ─── IMPRESSUM PAGE ─── same styling reuse ─── */
#impressum .about-card--fill {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px;
}

#impressum .about-card--fill p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: var(--text-secondary, #cbd5e1);
}

#impressum .about-card--fill a {
  color: var(--accent, #06b6d4);
  text-decoration: underline;
}

/* ═══ LANG DESKTOP TOGGLE HOVER ═══ */
.lang-desktop:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
@media (max-width: 768px) {
  .lang-desktop {
    display: none !important;
  }
}

/* ═══ DATENSCHUTZ PAGE STYLING ═══ */
.workflow-flow[data-section="datenschutz"] .workflow-node.about-card {
  max-width: 740px;
  margin: 0 auto;
}

.workflow-flow[data-section="datenschutz"] .workflow-node.about-card h2 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 1.25rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.workflow-flow[data-section="datenschutz"] .workflow-node.about-card h2:first-child {
  margin-top: 0;
}

.workflow-flow[data-section="datenschutz"] .workflow-node.about-card h3 {
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.workflow-flow[data-section="datenschutz"] .workflow-node.about-card p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.workflow-flow[data-section="datenschutz"] .workflow-node.about-card ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.workflow-flow[data-section="datenschutz"] .workflow-node.about-card li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.workflow-flow[data-section="datenschutz"] .workflow-node.about-card a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.workflow-flow[data-section="datenschutz"] .datenschutz-stand {
  margin-top: 32px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Same for impressum page */
.workflow-flow[data-section="impressum"] .workflow-node.about-card {
  max-width: 740px;
  margin: 0 auto;
}

.workflow-flow[data-section="impressum"] .workflow-node.about-card p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.workflow-flow[data-section="impressum"] .workflow-node.about-card a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.workflow-flow[data-section="impressum"] .workflow-node.about-card strong {
  color: var(--text);
}


/* FIX5: Ensure cases have 28px gap */
@media (min-width: 769px) {
  .workflow-flow[data-section="cases"] {
    gap: 28px !important;
  }
  .workflow-node.case-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }
}

/* ───────────────────────────────────────
   DATENSCHUTZ / IMPRESSUM — section-header gap
   H1 touches top edge of content panel — add breathing room
   ─────────────────────────────────────── */
#datenschutz .section-header,
#impressum .section-header {
  padding-block-start: 32px;
}

@media (max-width: 768px) {
  #datenschutz .section-header,
  #impressum .section-header {
    padding-block-start: 24px;
  }
}

/* ───────────────────────────────────────────────────────
   17. CTA INLINE — TOP MARGIN SPACING FIX — 2026-04-18
   ─────────────────────────────────────────────────────── */
.section-cta-inline {
  margin-top: 40px;
}

@media (max-width: 768px) {
  .section-cta-inline {
    margin-top: 28px;
  }
}

/* ═══ FIX: Double language toggle on desktop — 2026-04-19 ═══ */
/* Desktop: hide mobile lang toggle (#langToggle inside .navbar-links), show desktop toggle (.lang-desktop) */
@media (min-width: 769px) {
  #langToggle {
    display: none !important;
  }
  .lang-desktop {
    display: inline-block !important;
  }
  /* Ensure navbar-links is flex on desktop */
  .navbar-links {
    display: flex !important;
  }
}

/* Mobile: hide desktop lang toggle, show mobile toggle */
@media (max-width: 768px) {
  .lang-desktop {
    display: none !important;
  }
  #langToggle {
    display: inline-block !important;
  }
}


/* ───────────────────────────────────────────────────────
   18. CASE STUDY CARD — Floating Badge + Stats Bar
   ─────────────────────────────────────────────────────── */

/* --- Option B: Floating Metric Overlay --- */
.case-card__visual-mask {
  position: relative;
}

.case-card__metric-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(6, 182, 212, 0.92);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
  box-shadow: 0 2px 12px rgba(6, 182, 212, 0.4);
  backdrop-filter: blur(4px);
  font-size: 0.85rem;
}

.case-card__metric-badge__icon {
  font-size: 1rem;
  line-height: 1;
}

.case-card__metric-badge__value {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}

.case-card__metric-badge__label {
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.9;
  line-height: 1;
}

/* --- Option A: Stats Bar at Card Bottom --- */
.case-stats-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 0 0;
  margin-top: 14px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
}

.case-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary, #9ca3af);
}

.case-stat-item .stat-icon {
  font-size: 0.85rem;
}

.case-stat-item .stat-text {
  white-space: nowrap;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .case-card__metric-badge {
    top: 8px;
    left: 8px;
    padding: 4px 10px 4px 8px;
  }
  .case-card__metric-badge__value {
    font-size: 0.85rem;
  }
  .case-card__metric-badge__label {
    font-size: 0.65rem;
  }
}

/* --- Result Metric Line --- */
.case-card__result-metric {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 8px 14px;
  background: rgba(6, 182, 212, 0.06);
  border-radius: 6px;
  border-left: 3px solid var(--accent, #06b6d4);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent, #06b6d4);
}
.case-card__metric-badge { display: none !important; }


/* ═══ FIX: Navbar links right-aligned — 2026-04-20 ═══ */
/* Push nav links to the right, with language toggle spaced after them */
@media (min-width: 769px) {
  .navbar-inner {
    display: flex;
    align-items: center;
  }
  .navbar-links {
    margin-left: auto;  /* pushes nav links to the right */
  }
  .lang-desktop {
    order: 0;            /* default order */
    margin-left: 20px;   /* spacing from nav links */
  }
  .menu-toggle {
    margin-left: 8px;
  }
}

