/* =============================================
   BV Business Directory – Frontend Styles v30
   ============================================= */

:root {
  --bv-primary:     #0b425f;
  --bv-primary-lt:  #e3eef4;
  --bv-primary-dk:  #083248;
  --bv-accent:      #c0392b;
  --bv-tag-bg:      #0b425f;
  --bv-tag-text:    #ffffff;
  --bv-bg:          #eeeeee;
  --bv-card:        #ffffff;
  --bv-text:        #151f28;
  --bv-muted:       #6b7a8d;
  --bv-border:      #dde3ea;
  --bv-radius:      16px;
  --bv-sidebar:     230px;
}

#bv-directory-root * { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }
#bv-directory-root {
  font-family: 'Karla', Helvetica, Arial, Lucida, sans-serif;
  color: var(--bv-text); font-size: 15px; line-height: 1.55;
}

/* ── App layout ── */
#bv-directory-root .bv-app { display: flex; gap: 28px; align-items: flex-start; }

/* ── Sidebar ── */
#bv-directory-root .bv-sidebar { width: var(--bv-sidebar); flex-shrink: 0; position: sticky; top: 20px; }
#bv-directory-root .bv-sidebar-title { font-size: 15px; font-weight: 700; color: var(--bv-text); margin-bottom: 16px; }
#bv-directory-root .bv-sidebar-group { margin-bottom: 16px; }
#bv-directory-root .bv-sidebar-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--bv-muted); margin-bottom: 7px; }
#bv-directory-root .bv-sidebar-items { display: flex; flex-direction: column; gap: 2px; }
#bv-directory-root .bv-cb-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--bv-text); cursor: pointer; padding: 3px 6px; border-radius: 6px; user-select: none; transition: background .12s; }
#bv-directory-root .bv-cb-label:hover { background: var(--bv-primary-lt); color: var(--bv-primary); }
#bv-directory-root .bv-cb-label input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--bv-primary); cursor: pointer; flex-shrink: 0; }
#bv-directory-root .bv-show-more { background: none; border: none; padding: 4px 6px; font-size: 12px; color: var(--bv-primary); cursor: pointer; text-decoration: underline; margin-top: 2px; }

/* ── Main ── */
#bv-directory-root .bv-main { flex: 1; min-width: 0; }

/* ── Topbar ── */
#bv-directory-root .bv-topbar { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; }

/* Search — fix Divi interference with position:relative + z-index */
#bv-directory-root .bv-search-wrap {
  position: relative !important;
  flex: 1;
  display: flex;
  align-items: center;
}
#bv-directory-root .bv-search-icon {
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 2 !important;
  pointer-events: none !important;
  display: flex !important;
  align-items: center !important;
  color: var(--bv-muted) !important;
  line-height: 1 !important;
}
#bv-directory-root .bv-search-icon svg { display: block; }
#bv-directory-root .bv-search {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 10px 14px 10px 40px !important;
  border: 1.5px solid var(--bv-border) !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  background: var(--bv-card) !important;
  color: var(--bv-text) !important;
  transition: border-color .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  outline: none !important;
}
#bv-directory-root .bv-search:focus { border-color: var(--bv-primary) !important; }

/* Lang toggle */
#bv-directory-root .bv-lang-toggle { display: flex; gap: 6px; }
#bv-directory-root .bv-lang-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 14px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  cursor: pointer; border: 1.5px solid var(--bv-border) !important;
  border-radius: 10px !important; background: var(--bv-card) !important; color: var(--bv-muted);
  transition: border-color .15s, color .15s, background .15s;
}
#bv-directory-root .bv-lang-btn:hover { border-color: var(--bv-primary) !important; color: var(--bv-primary); }
#bv-directory-root .bv-lang-btn.active { background: var(--bv-primary) !important; border-color: var(--bv-primary) !important; color: #fff !important; }
#bv-directory-root .bv-flag { font-size: 16px; line-height: 1; }

/* Results info */
#bv-directory-root .bv-results-info { font-size: 13px; color: var(--bv-accent); font-weight: 500; }

/* ── Grid ── */
#bv-directory-root .bv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }

/* ══════════════════════════════════════
   CARD
══════════════════════════════════════ */
#bv-directory-root .bv-card {
  background: var(--bv-card); border: 1.5px solid var(--bv-border);
  border-radius: var(--bv-radius); overflow: visible; cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  display: flex; flex-direction: column;
  border-bottom: 3px solid var(--bv-border);
}
#bv-directory-root .bv-card:hover {
  transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,65,106,.13);
  border-color: var(--bv-primary); border-bottom-color: var(--bv-primary);
}

#bv-directory-root .bv-card-logo-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 16px 14px;
  height: 172px;
  background: var(--bv-bg); border-bottom: 1px solid var(--bv-border);
  border-radius: var(--bv-radius) var(--bv-radius) 0 0;
  overflow: hidden;
}
#bv-directory-root .bv-card-logo-circle {
  width: 88px; height: 64px; border-radius: 10px;
  background: #fff; border: 1.5px solid var(--bv-border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,.07);
  margin-bottom: 10px; flex-shrink: 0;
}
#bv-directory-root .bv-card-logo-circle img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
#bv-directory-root .bv-card-logo-circle svg { color: #aac4da; }
#bv-directory-root .bv-card-name {
  font-size: 14px; font-weight: 700; color: var(--bv-text); text-align: center;
  line-height: 1.3; margin-bottom: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  width: 100%;
}
#bv-directory-root .bv-card-branch-text {
  font-size: 12px; color: var(--bv-muted); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}

#bv-directory-root .bv-card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 10px; }

#bv-directory-root .bv-card-infobox { background: var(--bv-bg); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
#bv-directory-root .bv-card-info-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--bv-text); overflow: hidden; }
#bv-directory-root .bv-card-info-row svg { flex-shrink: 0; color: var(--bv-primary); opacity: .7; }
#bv-directory-root .bv-card-info-row span,
#bv-directory-root .bv-card-info-row a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--bv-primary); text-decoration: none !important; }
#bv-directory-root .bv-card-info-row a:hover { text-decoration: underline !important; }

/* Social icons row on card */
#bv-directory-root .bv-card-socials { display: flex; gap: 8px; align-items: center; }
#bv-directory-root .bv-social-link {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--bv-primary-lt); color: var(--bv-primary) !important;
  text-decoration: none !important; transition: background .15s, color .15s;
}
#bv-directory-root .bv-social-link:hover { background: var(--bv-primary) !important; color: #fff !important; }
#bv-directory-root .bv-social-link:hover svg,
#bv-directory-root .bv-social-link:hover svg * { color: #fff !important; stroke: #fff !important; fill: currentColor; }
#bv-directory-root .bv-social-link svg { display: block; pointer-events: none; }

#bv-directory-root .bv-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
#bv-directory-root .bv-tag { font-size: 11px; font-weight: 600; background: var(--bv-tag-bg); color: var(--bv-tag-text); padding: 3px 9px; border-radius: 5px; }

#bv-directory-root .bv-card-footer { padding: 10px 16px 14px; display: flex; justify-content: flex-end; border-top: 1px solid var(--bv-border); }
#bv-directory-root .bv-card-view-link { font-size: 13px; font-weight: 700; color: var(--bv-primary); display: flex; align-items: center; gap: 4px; text-decoration: none !important; transition: gap .15s; }
#bv-directory-root .bv-card:hover .bv-card-view-link { gap: 8px; }

/* ══════════════════════════════════════
   DETAIL VIEW
══════════════════════════════════════ */
#bv-directory-root .bv-detail { background: var(--bv-card) !important; border: 1.5px solid var(--bv-border); border-radius: var(--bv-radius); overflow: visible; box-shadow: 0 2px 12px rgba(0,0,0,.06); width: calc(100% - 192px); box-sizing: border-box; }

#bv-directory-root .bv-detail-header { background: #f7f9fb; border-bottom: 1px solid var(--bv-border); padding: 30px 32px 24px; display: flex; align-items: center; gap: 24px; border-radius: var(--bv-radius) var(--bv-radius) 0 0; overflow: visible; position: relative; z-index: 1; }
#bv-directory-root .bv-detail-logo-circle { width: 160px; height: 110px; border-radius: 12px; background: #fff; border: 1.5px solid var(--bv-border); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
#bv-directory-root .bv-detail-logo-circle img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
#bv-directory-root .bv-detail-logo-circle svg { color: #aac4da; }
#bv-directory-root .bv-detail-header-text { flex: 1; min-width: 0; }
#bv-directory-root .bv-detail-name { font-size: 27px; font-weight: 800; color: var(--bv-text); margin-bottom: 4px; }
#bv-directory-root .bv-detail-branch { font-size: 16px; color: var(--bv-muted); margin-bottom: 10px; }
#bv-directory-root .bv-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
#bv-directory-root .bv-detail-tags .bv-tag { font-size: 12px; padding: 4px 10px; }

/* Social icons in detail header */
#bv-directory-root .bv-detail-socials { display: flex; gap: 8px; align-items: center; padding: 2px 0; }
#bv-directory-root .bv-detail-socials .bv-social-link { width: 32px; height: 32px; border-radius: 8px; }

#bv-directory-root .bv-detail-body { padding: 24px 32px; display: flex; flex-direction: column; gap: 20px; }
#bv-directory-root .bv-detail-actions-left {
  display: flex; align-items: center; gap: 6px;
  position: absolute; top: 12px; left: 16px;
  z-index: 10;
}
#bv-directory-root .bv-detail-action-btn.bv-detail-action-btn--back {
  background: rgba(255,255,255,.7); color: #1a3347;
  backdrop-filter: blur(4px);
  width: auto; min-width: 0; height: 32px; padding: 0 12px 0 9px; gap: 5px;
  font-size: 12px; font-weight: 600; font-family: inherit; white-space: nowrap;
}
#bv-directory-root .bv-detail-action-btn--back:hover {
  background: rgba(11,66,95,.1); color: var(--bv-primary);
}
#bv-directory-root .bv-detail-section-title { font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--bv-primary); margin-bottom: 8px; }
#bv-directory-root .bv-detail-desc { font-size: 17px; font-weight: 400; color: var(--bv-text); line-height: 1.5; }
#bv-directory-root .bv-detail-desc p { margin: 0 0 10px 0; }
#bv-directory-root .bv-detail-desc p:last-child { margin-bottom: 0; }
#bv-directory-root .bv-detail-infobox { background: var(--bv-bg); border-radius: 10px; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
#bv-directory-root .bv-detail-info-row { display: flex; align-items: center; gap: 10px; font-size: 16px; }
#bv-directory-root .bv-detail-info-row svg { flex-shrink: 0; color: var(--bv-primary); }
#bv-directory-root .bv-detail-info-row strong { min-width: 80px; color: var(--bv-muted); font-weight: 600; }
#bv-directory-root .bv-detail-info-row a { color: var(--bv-primary); text-decoration: none !important; }
#bv-directory-root .bv-detail-info-row a:hover { text-decoration: underline !important; }

/* ── Pagination ── */
#bv-directory-root .bv-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
#bv-directory-root .bv-page-btn {
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1.5px solid var(--bv-border) !important; border-radius: 8px !important;
  background: var(--bv-card); color: var(--bv-text); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
#bv-directory-root .bv-page-btn:hover { border-color: var(--bv-primary) !important; color: var(--bv-primary); }
#bv-directory-root .bv-page-btn.active { background: var(--bv-primary) !important; border-color: var(--bv-primary) !important; color: #fff !important; }

/* ── Empty / Loading ── */
#bv-directory-root .bv-empty { text-align: center; padding: 60px 20px; color: var(--bv-muted); }
#bv-directory-root .bv-loading { text-align: center; padding: 60px; color: var(--bv-muted); }
#bv-directory-root .bv-spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid var(--bv-border); border-top-color: var(--bv-primary); border-radius: 50%; animation: bv-spin .7s linear infinite; margin-bottom: 10px; }
@keyframes bv-spin { to { transform: rotate(360deg); } }

/* ── Mobile filter toggle button ── */
#bv-directory-root .bv-filter-toggle {
  display: none;
  width: 100%;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: var(--bv-card);
  border: 1.5px solid var(--bv-border) !important;
  border-radius: 10px !important;
  font-size: 14px;
  font-weight: 600;
  color: var(--bv-text);
  cursor: pointer;
  text-align: left;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color .15s;
}
#bv-directory-root .bv-filter-toggle:hover { border-color: var(--bv-primary) !important; }
#bv-directory-root .bv-filter-toggle-label { display: flex; align-items: center; gap: 8px; }
#bv-directory-root .bv-filter-toggle-count {
  background: var(--bv-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  display: none;
}
#bv-directory-root .bv-filter-toggle-count.visible { display: inline-block; }
#bv-directory-root .bv-filter-toggle-arrow {
  font-size: 11px;
  color: var(--bv-muted);
  transition: transform .2s;
}
#bv-directory-root .bv-filter-toggle.open .bv-filter-toggle-arrow { transform: rotate(180deg); }

/* ── Responsive ── */
@media (max-width: 760px) {
  #bv-directory-root .bv-app { flex-direction: column; gap: 0; }

  /* Hide desktop sidebar, show toggle button */
  #bv-directory-root .bv-sidebar {
    width: 100%;
    position: static;
    order: -1;
  }
  #bv-directory-root .bv-filter-toggle { display: flex; }

  /* Collapsible panel */
  #bv-directory-root .bv-sidebar-inner {
    display: none;
    background: var(--bv-card);
    border: 1.5px solid var(--bv-border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    /* Two-column layout for branch groups */
    column-count: 2;
    column-gap: 20px;
  }
  #bv-directory-root .bv-sidebar-inner.open { display: block; }
  #bv-directory-root .bv-sidebar-title { display: none; }
  #bv-directory-root .bv-sidebar-group { break-inside: avoid; margin-bottom: 14px; }

  #bv-directory-root .bv-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  #bv-directory-root .bv-detail-header { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px 16px; overflow: hidden; }
  #bv-directory-root .bv-detail-header-text { width: 100%; min-width: 0; overflow: hidden; }
  #bv-directory-root .bv-detail-branch { overflow-wrap: break-word; word-break: break-word; }
  #bv-directory-root .bv-detail-expertise { overflow-wrap: break-word; }
  #bv-directory-root .bv-detail-body { padding: 18px 16px; }
  #bv-directory-root .bv-detail-name { font-size: 23px; }

  /* Stack cards to single column on very small screens */
  @media (max-width: 440px) {
    #bv-directory-root .bv-grid { grid-template-columns: 1fr; }
    #bv-directory-root .bv-sidebar-inner { column-count: 1; }
  }
}

/* ══════════════════════════════════════
   DESIGN B
══════════════════════════════════════ */

/* ── B: Wrapper ── */
#bv-directory-root.layout-b {
  font-family: 'Karla', Helvetica, Arial, Lucida, sans-serif;
  font-size: 15px;
}
#bv-directory-root.layout-b .bv-app { display: block; }

/* ── B: Outer wrapper ── */
#bv-directory-root.layout-b .bvb-outer {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 100%;
}
/* ── B: Two-column layout ── */
#bv-directory-root.layout-b .bvb-layout {
  display: flex !important;
  gap: 28px;
  align-items: flex-start;
  padding-top: 5px;
  width: 100%;
}
#bv-directory-root.layout-b .bvb-main {
  flex: 1;
  min-width: 0;
}

/* ── B: Topbar — results left, search center, lang right ── */
#bv-directory-root.layout-b .bv-topbar {
  display: flex; gap: 12px; align-items: center; margin-bottom: 24px;
  position: relative; z-index: 20; width: 100%;
}
#bv-directory-root.layout-b .bvb-results-left {
  font-size: 13px; color: var(--bv-muted); font-weight: 500;
  white-space: nowrap; flex-shrink: 0;
  width: 190px; min-width: 190px; text-align: center;
}
#bv-directory-root.layout-b .bv-search-wrap { flex: 1; position: relative !important; display: flex; align-items: center; }
#bv-directory-root.layout-b .bv-search-icon {
  position: absolute !important; left: 30px !important; top: 50% !important;
  transform: translateY(-50%) !important; z-index: 2 !important;
  pointer-events: none !important; color: #1a3347 !important;
  display: flex !important; align-items: center !important;
}
#bv-directory-root.layout-b .bv-search {
  width: 100%; padding: 11px 16px 11px 42px !important;
  margin-left: 15px;
  border: 2px solid #1a3347 !important;
  border-radius: 12px !important;
  font-family: 'Karla', Helvetica, Arial, Lucida, sans-serif !important;
  font-size: 15px !important; font-weight: 500 !important;
  background: transparent !important; color: var(--bv-text) !important;
  transition: border-color .18s, box-shadow .18s;
  box-shadow: none !important;
}
#bv-directory-root.layout-b .bv-search:focus {
  border-color: var(--bv-primary) !important;
  box-shadow: 0 0 0 3px rgba(11,66,95,.1) !important;
}
#bv-directory-root.layout-b .bv-search::placeholder { color: #8099ad; }
#bv-directory-root.layout-b .bv-lang-toggle { display: flex; gap: 8px; }
#bv-directory-root.layout-b .bv-lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border: 2px solid #1a3347 !important;
  border-radius: 12px !important;
  background: transparent !important; color: #1a3347 !important;
  font-family: 'Karla', Helvetica, Arial, Lucida, sans-serif;
  font-size: 13px !important; font-weight: 800 !important;
  cursor: pointer; letter-spacing: .03em;
  transition: background .18s, border-color .18s, color .18s;
}
#bv-directory-root.layout-b .bv-lang-btn:hover {
  border-color: var(--bv-primary) !important;
  color: var(--bv-primary) !important;
  background: rgba(11,66,95,.06) !important;
}
#bv-directory-root.layout-b .bv-lang-btn.active {
  background: var(--bv-primary) !important;
  border-color: var(--bv-primary) !important;
  color: #fff !important;
}
#bv-directory-root.layout-b .bv-flag { font-size: 16px; line-height: 1; }

/* Mobile-only alle button hidden on desktop */
#bv-directory-root.layout-b .bvb-alle-mobile { display: none; }

/* ── B: cats-grid: desktop flex column, mobile grid ── */
#bv-directory-root.layout-b .bvb-cats-grid {
  display: flex; flex-direction: column; gap: 8px;
}
/* ── B: Sidebar — vertical category list ── */
#bv-directory-root.layout-b .bvb-cats-wrap {
  width: 190px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 20px;
}


/* ── B: Category buttons — vertical style ── */
#bv-directory-root.layout-b .bvb-cat-item {
  display: flex;
  flex-direction: column;
}
#bv-directory-root.layout-b .bvb-cat-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; aspect-ratio: 16 / 9; padding: 10px 8px; position: relative;
  cursor: pointer;
  border: 2px solid #1a3347 !important;
  border-radius: 16px !important;
  background: transparent;
  color: #1a3347;
  font-family: 'Karla', Helvetica, Arial, Lucida, sans-serif;
  font-size: 12px; font-weight: 800; letter-spacing: .01em; text-align: center;
  line-height: 1.25; width: 100%;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .15s;
}
#bv-directory-root.layout-b .bvb-cat-btn:hover {
  background: rgba(11,66,95,.06);
  border-color: var(--bv-primary) !important;
  color: var(--bv-primary);
  transform: translateY(-1px);
}
#bv-directory-root.layout-b .bvb-cat-btn.active {
  background: var(--bv-primary) !important;
  border-color: var(--bv-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(11,66,95,.25);
}
#bv-directory-root.layout-b .bvb-cat-icon {
  font-family: 'Material Symbols Outlined' !important;
  font-size: 32px; line-height: 1;
  font-style: normal; font-weight: normal;
  font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 40;
  letter-spacing: normal; text-transform: none; white-space: nowrap;
  word-wrap: normal; direction: ltr; display: block;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: font-variation-settings .18s;
}
#bv-directory-root.layout-b .bvb-cat-btn.active .bvb-cat-icon {
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 40;
}
#bv-directory-root.layout-b .bvb-cat-label {
  font-size: 11px; font-weight: 800;
  width: 100%; line-height: 1.3;
}
#bv-directory-root.layout-b .bvb-cat-count {
  font-size: 11px; font-weight: 600;
  color: var(--bv-primary);
  width: 100%; display: block;
}
#bv-directory-root.layout-b .bvb-cat-btn.active .bvb-cat-count {
  color: rgba(255,255,255,.75);
}
#bv-directory-root.layout-b .bvb-cat-chevron {
  position: absolute; bottom: 7px; right: 9px;
  font-size: 9px; font-style: normal; line-height: 1;
  color: #1a3347; opacity: 0.5;
  transform: rotate(90deg);
  transition: transform .25s ease, opacity .2s;
  pointer-events: none;
}
#bv-directory-root.layout-b .bvb-cat-chevron.open {
  transform: rotate(270deg); opacity: 1;
}
#bv-directory-root.layout-b .bvb-cat-btn.active .bvb-cat-chevron {
  color: #fff; opacity: 0.85;
}

/* ── B: Subs ── */
/* Desktop: inline subs inside cat-items visible, sibling subs hidden */
#bv-directory-root.layout-b .bvb-subs-sibling { display: none; }
#bv-directory-root.layout-b .bvb-subs-inline {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height .4s cubic-bezier(.4,0,.2,1), opacity .28s ease, margin .3s;
  margin-top: 0;
}
#bv-directory-root.layout-b .bvb-subs-inline.open {
  max-height: 600px; opacity: 1; margin-top: 8px; margin-bottom: 8px;
}
/* Generic fallback for any .bvb-subs-wrap */
#bv-directory-root.layout-b .bvb-subs-wrap {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height .4s cubic-bezier(.4,0,.2,1), opacity .28s ease, margin .3s;
}
#bv-directory-root.layout-b .bvb-subs-wrap.open {
  max-height: 600px; opacity: 1;
}
#bv-directory-root.layout-b .bvb-subs {
  display: flex; flex-direction: column; gap: 6px;
}
#bv-directory-root.layout-b .bvb-sub-btn {
  padding: 7px 12px; border-radius: 8px !important;
  border: 1.5px solid #1a3347 !important;
  background: transparent; color: #1a3347;
  font-family: 'Karla', Helvetica, Arial, Lucida, sans-serif;
  font-size: 12px; font-weight: 700; cursor: pointer; text-align: left;
  transition: border-color .15s, background .15s, color .15s;
  white-space: normal; width: 100%;
}
#bv-directory-root.layout-b .bvb-sub-btn:hover {
  border-color: var(--bv-primary) !important;
  color: var(--bv-primary);
  background: rgba(11,66,95,.06);
}
#bv-directory-root.layout-b .bvb-sub-btn.active {
  background: var(--bv-primary) !important;
  border-color: var(--bv-primary) !important;
  color: #fff !important;
}

/* ── B: Grid — 3 columns ── */
#bv-directory-root.layout-b .bv-grid {
  grid-template-columns: repeat(3, 1fr); gap: 20px;
}

/* ── B: Cards ── */
#bv-directory-root.layout-b .bvb-card {
  background: var(--bv-card);
  border: none;
  border-radius: 18px;
  display: flex; flex-direction: column;
  box-shadow: 0 2px 12px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.05);
  transition: transform .2s, box-shadow .22s;
  overflow: hidden;
}
#bv-directory-root.layout-b .bvb-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(11,66,95,.14), 0 0 0 1px rgba(11,66,95,.08);
}
#bv-directory-root.layout-b .bvb-card-header {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #f0f0f0;
}
#bv-directory-root.layout-b .bvb-logo {
  width: 80px; height: 50px; border-radius: 8px; flex-shrink: 0;
  background: #f4f6f8; border: 1px solid var(--bv-border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
#bv-directory-root.layout-b .bvb-logo img { width:100%;height:100%;object-fit:contain;padding:6px; }
#bv-directory-root.layout-b .bvb-logo svg { color: #b0c4d0; }
#bv-directory-root.layout-b .bvb-header-text { flex: 1; min-width: 0; }
#bv-directory-root.layout-b .bvb-name {
  font-size: 15px; font-weight: 800; color: var(--bv-text);
  line-height: 1.25; margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#bv-directory-root.layout-b .bvb-branch-tag {
  display: inline-block;
  padding: 2px 9px; border-radius: 20px;
  background: var(--bv-primary-lt); color: var(--bv-primary);
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#bv-directory-root.layout-b .bvb-card-body {
  padding: 16px 20px; flex: 1; display: flex; flex-direction: column; gap: 12px;
}
/* Detail green text */
#bv-directory-root .bv-detail .bvb-green-text { font-size: 17px; font-weight: 400; -webkit-line-clamp: unset !important; height: auto !important; overflow: visible !important; display: block !important; }
#bv-directory-root .bv-detail .bvb-green-label { font-size: 13px; }

/* Expertise — card */
#bv-directory-root.layout-b .bvb-expertise {
  font-size: 12px; color: var(--bv-muted); line-height: 1.5;
  margin-top: -4px;
}
#bv-directory-root.layout-b .bvb-expertise-label {
  font-weight: 700; color: var(--bv-text);
}
/* Expertise — detail */
#bv-directory-root .bv-detail-expertise {
  margin-bottom: 4px;
  line-height: 1.7;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}
#bv-directory-root .bv-detail-expertise span {
  font-size: 13px; color: var(--bv-primary);
  font-weight: 600; display: inline; white-space: nowrap;
}
#bv-directory-root .bv-detail-expertise .bv-expertise-sep {
  color: var(--bv-border); padding: 0 3px;
  white-space: normal;
}

#bv-directory-root.layout-b .bvb-desc {
  font-size: 13.5px; color: #4a5568; line-height: 1.6;
  height: calc(1.6em * 3); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
#bv-directory-root.layout-b .bvb-green {
  background: #f0faf4; border: 1px solid #c3e6ce;
  border-radius: 10px; padding: 9px 13px;
}
#bv-directory-root.layout-b .bvb-green-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: #2d8a52; margin-bottom: 3px;
}
#bv-directory-root.layout-b .bvb-green-text {
  font-size: 13px; color: #2d5a3d; line-height: 1.5;
  height: calc(1.5em * 2); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
#bv-directory-root.layout-b .bvb-card-footer {
  padding: 0 20px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
#bv-directory-root.layout-b .bvb-contact-info {
  display: flex; flex-direction: column; gap: 5px;
}
#bv-directory-root.layout-b .bvb-ci-row {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--bv-text); overflow: hidden;
}
#bv-directory-root.layout-b .bvb-ci-row svg { flex-shrink: 0; color: var(--bv-primary); opacity: .7; }
#bv-directory-root.layout-b .bvb-ci-row span,
#bv-directory-root.layout-b .bvb-ci-row a {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--bv-muted); text-decoration: none !important;
}
#bv-directory-root.layout-b .bvb-ci-row a:hover { color: var(--bv-primary); text-decoration: underline !important; }
#bv-directory-root.layout-b .bvb-contact-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px 0;
  background: var(--bv-primary) !important; color: #fff !important;
  border: none !important; border-radius: 10px !important;
  font-family: 'Karla', Helvetica, Arial, Lucida, sans-serif;
  font-size: 14px; font-weight: 700; cursor: pointer; letter-spacing: .01em;
  transition: background .15s, transform .12s, box-shadow .15s;
  text-decoration: none !important;
}
#bv-directory-root.layout-b .bvb-contact-btn::after { content: '→'; font-size: 15px; }
#bv-directory-root.layout-b .bvb-contact-btn:hover {
  background: var(--bv-primary-dk) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(11,66,95,.3);
}

/* ── B: Divider (hidden) ── */
#bv-directory-root.layout-b .bvb-divider { display: none; }

/* ── B: Responsive ── */
@media (min-width: 760px) {
  #bv-directory-root.layout-b .bvb-sub-btn {
    width: 90%;
    margin: 0 auto;
    display: block;
  }
}
@media (max-width: 1200px) {
  #bv-directory-root .bv-detail { width: 100%; }
}
@media (max-width: 960px) {
  #bv-directory-root.layout-b .bv-grid { grid-template-columns: repeat(2, 1fr); }
  #bv-directory-root.layout-b .bvb-cats-wrap { width: 160px; }
  #bv-directory-root.layout-b .bvb-results-left { width: 160px; min-width: 160px; }
  #bv-directory-root.layout-b .bvb-layout { width: 100%; }
}
@media (max-width: 760px) {
  /* Mobile: back to single column, cats on top as horizontal grid */
  #bv-directory-root.layout-b .bvb-layout { flex-direction: column; gap: 0; }
  /* Mobile nav reorder: lang → search → cats → alle */
  #bv-directory-root.layout-b .bvb-outer { display: flex; flex-direction: column; }
  #bv-directory-root.layout-b .bv-topbar { order: 1; flex-wrap: wrap; gap: 8px; margin-bottom: 0; }
  #bv-directory-root.layout-b .bvb-results-left { display: none; }
  #bv-directory-root.layout-b .bv-search { margin-left: 0 !important; }
  #bv-directory-root.layout-b .bv-lang-toggle { order: -1; width: 100%; justify-content: center; }
  #bv-directory-root.layout-b .bv-search-wrap { order: 0; flex: 1 1 100%; }
  #bv-directory-root.layout-b .bvb-layout { order: 2; }

  /* Hide "Alle brancher" from the grid on mobile */
  #bv-directory-root.layout-b .bvb-cats-grid .bvb-cat-item:first-child { display: none; }

  /* Full-width "Alle kategorier" button at bottom of cats-wrap */
  #bv-directory-root.layout-b .bvb-alle-mobile {
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 12px 16px; margin-top: 10px;
    border: 2px solid #1a3347 !important; border-radius: 12px !important;
    background: transparent; color: #1a3347;
    font-family: 'Karla', Helvetica, Arial, Lucida, sans-serif;
    font-size: 13px; font-weight: 800; cursor: pointer;
    transition: background .18s, color .18s, border-color .18s;
  }
  #bv-directory-root.layout-b .bvb-alle-mobile.active {
    background: var(--bv-primary) !important;
    border-color: var(--bv-primary) !important;
    color: #fff !important;
  }
  #bv-directory-root.layout-b .bvb-alle-mobile:hover {
    border-color: var(--bv-primary) !important; color: var(--bv-primary);
    background: rgba(11,66,95,.06);
  }
  /* Mobile cats: horizontal 3-col grid */
  #bv-directory-root.layout-b .bvb-cats-wrap {
    width: 100%;
    position: static;
    margin: 5px 0 15px;
    display: flex !important;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
  }
  #bv-directory-root.layout-b .bvb-cats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    min-width: 0; overflow: hidden; width: 100%; box-sizing: border-box;
  }
  #bv-directory-root.layout-b .bvb-cat-item { min-width: 0; overflow: hidden; width: 100%; }
  #bv-directory-root.layout-b .bvb-cat-btn { min-width: 0; }
  #bv-directory-root.layout-b .bvb-cat-btn {
    aspect-ratio: 1 / 1; height: auto; width: 100%;
    font-size: 11px; padding: 8px 6px;
  }
  #bv-directory-root.layout-b .bvb-cat-icon { font-size: 26px; }
  #bv-directory-root.layout-b .bvb-cat-label { font-size: 10px; }
  /* Mobile subs: centered wrap */
  /* Mobile: hide inline (inside grid cells), show sibling panels */
  #bv-directory-root.layout-b .bvb-subs-inline { display: none !important; }
  #bv-directory-root.layout-b .bvb-subs-sibling {
    display: block;
    overflow: hidden; max-height: 0; opacity: 0;
    transition: max-height .4s cubic-bezier(.4,0,.2,1), opacity .28s ease, margin .3s;
    width: 100%; box-sizing: border-box;
  }
  #bv-directory-root.layout-b .bvb-subs-sibling.open {
    max-height: 600px; opacity: 1; margin-top: 8px; margin-bottom: 8px;
  }
  #bv-directory-root.layout-b .bvb-subs {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px; padding: 8px 0 0;
  }
  #bv-directory-root.layout-b .bvb-sub-btn {
    width: 100%; text-align: center;
    font-size: clamp(9px, 2.5vw, 12px);
    padding: 6px 4px;
    white-space: normal;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  #bv-directory-root.layout-b .bv-grid { grid-template-columns: repeat(2, 1fr); }
  #bv-directory-root.layout-b .bvb-main { width: 100%; }
  /* Topbar: hide results count on mobile, stack less */
  #bv-directory-root.layout-b .bvb-results-left { display: none; }
  #bv-directory-root.layout-b .bv-search { margin-left: 0 !important; }
}
@media (max-width: 480px) {
  #bv-directory-root.layout-b .bv-grid { grid-template-columns: 1fr; }
  #bv-directory-root.layout-b .bvb-cat-btn { font-size: 9px; padding: 6px 4px; }
  #bv-directory-root.layout-b .bvb-cat-icon { font-size: 35px; }
  #bv-directory-root.layout-b .bvb-cat-label { font-size: 9px; -webkit-line-clamp: 2; }
}


/* ── Print action bar ── */
#bv-directory-root .bv-detail-actions {
  display: flex; align-items: center; gap: 6px;
  position: absolute; top: 12px; right: 16px;
  z-index: 10;
}
#bv-directory-root .bv-detail-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px !important;
  cursor: pointer; transition: background .15s, color .15s;
  text-decoration: none !important; border: none !important;
}
#bv-directory-root .bv-detail-action-btn--print {
  background: rgba(255,255,255,.7); color: #1a3347;
  backdrop-filter: blur(4px);
}
#bv-directory-root .bv-detail-action-btn--print:hover {
  background: rgba(11,66,95,.1); color: var(--bv-primary);
}
#bv-directory-root .bv-detail-action-btn--pdf {
  background: rgba(255,255,255,.7); color: var(--bv-primary);
  backdrop-filter: blur(4px);
}
#bv-directory-root .bv-detail-action-btn--pdf:hover {
  background: rgba(11,66,95,.1);
}

}
