/* ============================================
   FIX: Mobile Responsive + Feature-Block Bilder
   Wird NACH style.css geladen und ueberschreibt gezielt.
   Datum: 2026-03-01
   ============================================ */

/* --- Desktop: Bilder in Feature-Blocks --- */
img.feature-block-visual {
  min-height: 0 !important;
  max-height: 400px !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 16px !important;
  border: none !important;
}

/* Composing-Animationen auf der Homepage behalten min-height */
div.feature-block-visual {
  min-height: 540px;
}

/* Desktop: Feature-Block Grid */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.feature-block.reverse {
  direction: rtl;
}
.feature-block.reverse > * {
  direction: ltr;
}

/* ============================================
   TABLET (max 900px)
   ============================================ */
@media (max-width: 900px) {

  /* --- Section Padding reduzieren --- */
  .section {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  /* --- Feature-Blocks: 1 Spalte, Text vor Visual --- */
  .feature-block,
  .feature-block.reverse {
    grid-template-columns: 1fr !important;
    direction: ltr !important;
    gap: 2rem;
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .feature-block .feature-block-content { order: 1; }
  .feature-block .feature-block-visual,
  .feature-block img.feature-block-visual { order: 2; }

  /* Feature-Bilder */
  img.feature-block-visual {
    max-height: 320px !important;
    margin: 0 auto;
    display: block;
  }

  /* Composing-Container */
  div.feature-block-visual {
    min-height: 0 !important;
    max-height: 400px;
    max-width: 500px;
    margin: 0 auto;
    overflow: hidden;
  }

  /* Alle Composing-Animationen */
  [class*="cm-"][class*="-comp"] {
    min-height: 300px !important;
    max-height: 400px !important;
    overflow: hidden;
  }

  /* Feature-Unterseiten Hero-Bild */
  .feature-visual-img {
    max-height: 350px !important;
  }

  /* --- IG Chat kleiner --- */
  .cm-ig-chat {
    min-height: 420px !important;
    max-width: 100% !important;
    padding: 1.2rem !important;
  }
}

/* ============================================
   MOBILE (max 768px)
   ============================================ */
@media (max-width: 768px) {

  /* --- Section Padding kompakter --- */
  .section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .feature-block,
  .feature-block.reverse {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* --- FUNNEL FLOW FIX --- */
  .cm-funnel-wrap {
    padding: 1.5rem 0.5rem !important;
    min-height: 0 !important;
  }

  /* Stationen als 3er-Grid */
  .cm-funnel-stations {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem !important;
    padding: 0 !important;
  }

  .cm-funnel-station {
    max-width: none !important;
    flex: none !important;
  }

  .cm-funnel-ico {
    width: 48px !important;
    height: 48px !important;
  }

  .cm-funnel-ico svg {
    width: 20px !important;
    height: 20px !important;
  }

  .cm-funnel-title {
    font-size: 0.7rem !important;
  }

  .cm-funnel-sub {
    display: none !important;
  }

  /* Verbindungslinie + Traveler + Tooltips ausblenden */
  .cm-funnel-conn-wrap,
  .cm-funnel-traveler,
  .cm-funnel-tooltip,
  .cm-funnel-burst {
    display: none !important;
  }

  /* Result-Bar kompakter */
  .cm-funnel-result-bar {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-top: 1rem !important;
    padding-top: 1rem !important;
  }

  .cm-funnel-result-item {
    opacity: 1 !important;
    transform: none !important;
  }

  .cm-funnel-result-val {
    font-size: 0.95rem !important;
  }

  .cm-funnel-result-label {
    font-size: 0.75rem !important;
  }

  /* Replay Button kompakter */
  .cm-funnel-replay {
    margin-top: 0.75rem !important;
    font-size: 0.8rem !important;
    padding: 0.5rem 1rem !important;
  }

  /* --- IG CHAT FIX --- */
  .cm-ig-chat {
    min-height: 380px !important;
    max-width: 100% !important;
    padding: 1rem !important;
  }

  .cm-ig-dm-b {
    font-size: 0.85rem !important;
    max-width: 85% !important;
    padding: 0.6rem 0.8rem !important;
  }

  /* --- Alle Composings kleiner --- */
  [class*="cm-"][class*="-comp"] {
    min-height: 250px !important;
    max-height: 350px !important;
    overflow: hidden;
  }

  /* --- Feature-Bilder --- */
  img.feature-block-visual {
    max-height: 240px !important;
  }

  div.feature-block-visual {
    max-height: 350px;
  }

  .feature-visual-img {
    max-height: 280px !important;
  }
}

/* ============================================
   SMALL MOBILE (max 480px)
   ============================================ */
@media (max-width: 480px) {

  .section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .feature-block,
  .feature-block.reverse {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
    gap: 1.5rem;
  }

  /* Funnel: 2er-Grid auf kleinen Screens */
  .cm-funnel-stations {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.8rem !important;
  }

  .cm-funnel-ico {
    width: 42px !important;
    height: 42px !important;
  }

  .cm-funnel-ico svg {
    width: 18px !important;
    height: 18px !important;
  }

  .cm-funnel-title {
    font-size: 0.6rem !important;
  }

  .cm-funnel-wrap {
    padding: 1rem 0.25rem !important;
  }

  /* IG Chat noch kompakter */
  .cm-ig-chat {
    min-height: 320px !important;
    padding: 0.8rem !important;
    gap: 0.4rem !important;
  }

  .cm-ig-dm-b {
    font-size: 0.8rem !important;
    padding: 0.5rem 0.7rem !important;
  }

  /* Alle Composings */
  [class*="cm-"][class*="-comp"] {
    min-height: 220px !important;
    max-height: 280px !important;
  }

  /* Feature-Bilder */
  img.feature-block-visual {
    max-height: 180px !important;
  }

  div.feature-block-visual {
    max-height: 280px;
  }

  .feature-visual-img {
    max-height: 200px !important;
  }
}
