/* RUNDEX_MOBILFUNK_MASTER_REPAIR_V1
   One consolidated local stylesheet. No global RUNDEX files touched. */

:root {
  --mf-master-header-bottom: 0px;
  --mf-master-subnav-h: 72px;
}

/* Main header: fixed, but geometry remains owned by the canonical RUNDEX shell. */
body.category-mobilfunk .site-header {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 15000 !important;
  transform: none !important;
}

/* Original second menu is moved to body by JS, never cloned. */
body.category-mobilfunk [data-mf-master-subnav="1"] {
  position: fixed !important;
  top: var(--mf-master-header-bottom) !important;
  right: 0 !important;
  bottom: auto !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 14990 !important;
  margin: 0 !important;
  transform: none !important;
  background: rgba(255,255,255,.985) !important;
  border-top: 1px solid #e4e8ee !important;
  border-bottom: 1px solid #dde3ea !important;
  box-shadow: 0 5px 18px rgba(15,23,42,.035) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.category-mobilfunk [data-mf-master-subnav="1"] .category-bar-inner {
  width: min(1296px, calc(100% - 64px)) !important;
  min-height: 72px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: flex !important;
  align-items: stretch !important;
  gap: 28px !important;
}

body.category-mobilfunk [data-mf-master-subnav="1"] .category-identity {
  flex: 0 0 auto !important;
  min-width: 220px !important;
  padding-right: 28px !important;
  display: flex !important;
  align-items: center !important;
  border-right: 1px solid #e2e7ed !important;
}

body.category-mobilfunk [data-mf-master-subnav="1"] .category-links {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: stretch !important;
  gap: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body.category-mobilfunk [data-mf-master-subnav="1"] .category-links::-webkit-scrollbar,
body.category-mobilfunk [data-mf-master-subnav="1"] .rr-nav::-webkit-scrollbar {
  display: none;
}

body.category-mobilfunk [data-mf-master-subnav="1"] .category-links a {
  flex: 0 0 auto !important;
  min-height: 72px !important;
  padding: 0 17px !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* results.php legacy second-nav markup, same geometry. */
body.category-mobilfunk [data-mf-master-subnav="1"].rr-bar .rr-wrap {
  width: min(1296px, calc(100% - 64px)) !important;
  min-height: 72px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

body.category-mobilfunk [data-mf-master-subnav="1"].rr-bar .rr-nav {
  width: 100% !important;
  min-height: 72px !important;
  display: flex !important;
  align-items: stretch !important;
  gap: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  scrollbar-width: none;
}

body.category-mobilfunk [data-mf-master-subnav="1"].rr-bar .rr-nav a {
  flex: 0 0 auto !important;
  min-height: 72px !important;
  padding: 0 17px !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* Flow replacement sits exactly where the original second menu was. */
body.category-mobilfunk .mf-master-subnav-spacer {
  display: block !important;
  width: 100% !important;
  height: calc(var(--mf-master-subnav-h) + 24px) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
}

/* Only created if the canonical header was not already fixed. */
body.category-mobilfunk .mf-master-header-spacer {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
}

/*
 * HERO: no padding/margin/height rewrite.
 * A background plate sits behind the existing hero geometry.
 */
body.category-mobilfunk .mf-hero {
  position: relative !important;
  z-index: 1 !important;
}

body.category-mobilfunk .mf-hero::before {
  content: "" !important;
  position: absolute !important;
  z-index: -1 !important;
  top: -18px !important;
  right: -18px !important;
  bottom: -18px !important;
  left: -18px !important;
  border: 1px solid #dbe2ea !important;
  border-radius: 28px !important;
  background: linear-gradient(135deg,#ffffff 0%,#fbfcfe 100%) !important;
  box-shadow: 0 18px 48px rgba(15,23,42,.075) !important;
  pointer-events: none !important;
}

body.category-mobilfunk .mf-hero-photo {
  box-shadow: 0 10px 28px rgba(15,23,42,.105) !important;
}

/* Never allow the old floating demo UI to appear below/over the page. */
body.category-mobilfunk footer ~ [class*="rx-ai"],
body.category-mobilfunk > [class*="rx-ai-float"],
body.category-mobilfunk > [class*="rx-ai-dock"],
body.category-mobilfunk > [class*="rx-ai-panel"],
body.category-mobilfunk > [class*="rx-ai-launch"] {
  display: none !important;
}

/* Compact results: real CHECK24 content starts immediately after the nav. */
body.category-mobilfunk .rr-head {
  display: none !important;
}

html {
  scroll-padding-top: calc(var(--mf-master-header-bottom) + var(--mf-master-subnav-h) + 12px) !important;
}

body.category-mobilfunk [id] {
  scroll-margin-top: calc(var(--mf-master-header-bottom) + var(--mf-master-subnav-h) + 12px) !important;
}

@media (max-width: 900px) {
  body.category-mobilfunk [data-mf-master-subnav="1"] .category-bar-inner,
  body.category-mobilfunk [data-mf-master-subnav="1"].rr-bar .rr-wrap {
    width: 100% !important;
    min-height: 60px !important;
    padding: 0 14px !important;
    gap: 0 !important;
  }

  body.category-mobilfunk [data-mf-master-subnav="1"] .category-identity {
    display: none !important;
  }

  body.category-mobilfunk [data-mf-master-subnav="1"] .category-links a,
  body.category-mobilfunk [data-mf-master-subnav="1"].rr-bar .rr-nav a {
    min-height: 60px !important;
    padding: 0 14px !important;
  }

  body.category-mobilfunk .mf-master-subnav-spacer {
    height: calc(var(--mf-master-subnav-h) + 16px) !important;
  }

  body.category-mobilfunk .mf-hero::before {
    top: -10px !important;
    right: -8px !important;
    bottom: -10px !important;
    left: -8px !important;
    border-radius: 22px !important;
  }
}
