/* =========================
   Bereichs-Umschalter "3 Meister. 1 Betrieb." (scripts/generate-meisterbereiche.mjs)
   Same white cards on every homepage; the title is a red chip, the card of
   the site you are on carries "Aktuelle Seite" with a pulsing dot, the others
   say clearly that they switch to another site.
   ========================= */
.mb-section { padding: 40px 0 8px; }
.mb-grid {
  display: grid; gap: 22px; margin-top: 26px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.mb-card {
  position: relative;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: #fff;
  border: 1px solid rgba(24, 25, 27, 0.1);
  border-radius: 16px;
  padding: 24px 24px 22px;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s ease, border-color .25s ease;
}
a.mb-card:hover {
  transform: translateY(-4px);
  border-color: rgba(207, 31, 40, .35);
  box-shadow: 0 18px 40px rgba(20, 21, 23, .12);
}
a.mb-card:focus-visible { outline: 3px solid var(--brand, #cf1f28); outline-offset: 3px; }
.mb-card.is-current {
  border: 2px solid var(--brand, #cf1f28);
  padding: 23px 23px 21px; /* same outer size as the 1px cards */
  box-shadow: 0 10px 28px rgba(207, 31, 40, .10);
}

.mb-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.mb-card__icon {
  width: 52px; height: 52px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: #f4f4f5; color: var(--brand, #cf1f28);
  transition: background .25s ease, color .25s ease;
}
.mb-card__icon svg { width: 28px; height: 28px; }
a.mb-card:hover .mb-card__icon,
.mb-card.is-current .mb-card__icon { background: var(--brand, #cf1f28); color: #fff; }

/* "Aktuelle Seite" with a pulsing red dot */
.mb-card__here {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand, #cf1f28);
}
.mb-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--brand, #cf1f28); flex: none; }
.mb-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--brand, #cf1f28);
  animation: mb-pulse 1.6s cubic-bezier(.2, .6, .35, 1) infinite;
}
@keyframes mb-pulse {
  0% { transform: scale(1); opacity: .65; }
  100% { transform: scale(3); opacity: 0; }
}

/* title as a red chip, like the "Angebot anfordern" button */
.mb-card__title {
  align-self: flex-start;
  margin: 0 0 14px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--brand, #cf1f28); color: #fff;
  font-size: 15px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; line-height: 1.2;
  box-shadow: 0 6px 16px rgba(207, 31, 40, .22);
  transition: background .2s ease;
}
a.mb-card:hover .mb-card__title { background: var(--brand-2, #a8181f); }

.mb-card p { margin: 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.6; }

.mb-card__cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand, #cf1f28);
}
.mb-card__cta .mb-arrow {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid currentColor;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), background .2s ease, color .2s ease;
}
.mb-card__cta .mb-arrow svg { width: 15px; height: 15px; }
a.mb-card:hover .mb-arrow { transform: translateX(4px); background: var(--brand, #cf1f28); color: #fff; border-color: var(--brand, #cf1f28); }
.mb-card.is-current .mb-card__cta { color: var(--muted); }

/* ---- Social media under the cards: one account for all three trades,
   long rounded buttons in the networks' own colours, gently animated */
.mb-social {
  display: grid; gap: 16px; margin-top: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.mb-social__btn {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  min-height: 76px;
  padding: 14px 22px;
  border-radius: 16px;
  color: #fff; text-decoration: none;
  overflow: hidden;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s ease;
}
.mb-social__btn:hover { transform: translateY(-3px); }
.mb-social__btn:focus-visible { outline: 3px solid var(--brand, #cf1f28); outline-offset: 3px; }

.mb-social__icon {
  width: 46px; height: 46px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
}
.mb-social__icon svg { width: 26px; height: 26px; }
.mb-social__text { display: flex; flex-direction: column; line-height: 1.25; }
.mb-social__text strong { font-size: 18px; font-weight: 800; letter-spacing: .01em; }
.mb-social__text small { font-size: 13.5px; font-weight: 600; opacity: .92; }
.mb-social__go {
  margin-left: auto; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, .75);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), background .2s ease, color .2s ease;
}
.mb-social__go svg { width: 16px; height: 16px; }
.mb-social__btn:hover .mb-social__go { transform: translateX(4px); background: #fff; }

/* TikTok: black, cyan/pink border running round, the logo's offset glitch */
.mb-social__btn--tiktok {
  border: 2px solid transparent;
  background:
    linear-gradient(#0d0d0f, #0d0d0f) padding-box,
    linear-gradient(90deg, #25f4ee, #fe2c55, #25f4ee) border-box;
  background-size: 100% 100%, 200% 100%;
  animation: mb-tt-border 4s linear infinite;
  box-shadow: 0 10px 26px rgba(13, 13, 15, .22);
}
.mb-social__btn--tiktok:hover { box-shadow: -4px 10px 26px rgba(37, 244, 238, .25), 4px 12px 30px rgba(254, 44, 85, .28); }
.mb-social__btn--tiktok .mb-social__icon { background: #1b1b1f; }
.mb-social__btn--tiktok .mb-social__icon svg {
  filter: drop-shadow(-2px -1px 0 #25f4ee) drop-shadow(2px 1px 0 #fe2c55);
  animation: mb-tt-glitch 3.2s steps(1, end) infinite;
}
.mb-social__btn--tiktok:hover .mb-social__go { color: #0d0d0f; }
@keyframes mb-tt-border { to { background-position: 0 0, 200% 0; } }
@keyframes mb-tt-glitch {
  0%, 86%, 100% { transform: none; }
  88% { transform: translate(1.5px, -1px); }
  91% { transform: translate(-1.5px, 1px); }
  94% { transform: translate(1px, 1px); }
}

/* Instagram: the brand gradient, slowly flowing */
.mb-social__btn--instagram {
  background: linear-gradient(115deg, #833ab4 0%, #c13584 28%, #e1306c 50%, #fd1d1d 72%, #f77737 88%, #fcaf45 100%);
  background-size: 220% 100%;
  animation: mb-ig-flow 7s ease-in-out infinite alternate;
  box-shadow: 0 10px 26px rgba(193, 53, 132, .28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.mb-social__btn--instagram:hover { box-shadow: 0 14px 34px rgba(225, 48, 108, .4); }
.mb-social__btn--instagram .mb-social__icon { background: rgba(255, 255, 255, .18); }
.mb-social__btn--instagram:hover .mb-social__go { color: #c13584; }
@keyframes mb-ig-flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* Half size, stacked under the "Direktkontakt" text of the configurator */
.mb-social--compact {
  grid-template-columns: 1fr;
  gap: 8px; margin-top: 16px;
  max-width: 300px;
}
.mb-social--compact .mb-social__btn { min-height: 38px; padding: 6px 12px 6px 7px; gap: 10px; border-radius: 10px; }
.mb-social--compact .mb-social__btn:hover { transform: translateY(-2px); }
.mb-social--compact .mb-social__icon { width: 26px; height: 26px; border-radius: 7px; }
.mb-social--compact .mb-social__icon svg { width: 15px; height: 15px; }
.mb-social--compact .mb-social__text { flex-direction: row; align-items: baseline; gap: 6px; line-height: 1.2; }
.mb-social--compact .mb-social__text strong { font-size: 13.5px; }
.mb-social--compact .mb-social__text small { font-size: 11.5px; }
.mb-social--compact .mb-social__cta { display: none; }
.mb-social--compact .mb-social__go { width: 22px; height: 22px; border-width: 1px; }
.mb-social--compact .mb-social__go svg { width: 11px; height: 11px; }
.mb-social--compact .mb-social__btn--tiktok .mb-social__icon svg { filter: drop-shadow(-1px -.5px 0 #25f4ee) drop-shadow(1px .5px 0 #fe2c55); }

@media (max-width: 420px) {
  .mb-social__cta { display: none; }
  .mb-social__btn { padding: 12px 16px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .mb-dot::after { animation: none; }
  .mb-card, .mb-card__cta .mb-arrow { transition: none; }
  .mb-social__btn, .mb-social__btn--tiktok .mb-social__icon svg { animation: none; transition: none; }
}
