/* =====================================================================
   Fachanwaltskanzlei Kaiserplatz – RA Joachim Bremer — Marken-Theme (edvGO Design System)
   Look der Live-Website: Kanzleirot #820000, Grau #d9d9d9, Oswald (Überschriften), Open Sans (Text)
   - [data-theme="bremer"]      weiße Flächen
   - [data-theme="bremer-red"]  rote Flächen (Kopf, Hero-Box, Profil-Band, Kacheln)
   - [data-theme="bremer-grey"] graue Fläche (Rechtsgebiete)
   - [data-theme="bremer-dark"] Footer
   ===================================================================== */

[data-theme^="bremer"] {
  --bb-red: #820000;
  --bb-red-d: #5e0000;
  --bb-accent: #ec813a;
  --bb-grey: #d9d9d9;
  --bb-white: #ffffff;
  --bb-ink: #1f1f1f;
  --bb-mist: #f4f4f4;
  --bb-rose: #f2d9d9;
  --font-heading: "Oswald", "Open Sans", sans-serif;
  --font-sans: "Open Sans", system-ui, sans-serif;
  --tracking-display: 0;
  --radius-md: 0.25rem;
  --radius-lg: 0.25rem;
}
[data-theme="bremer"], [data-theme="bremer-grey"] {
  --color-primary: #820000;
  --color-primary-hover: #5e0000;
  --color-on-primary: #ffffff;
  --color-surface: #ffffff;
  --color-surface-muted: #f4f4f4;
  --color-text: #1f1f1f;
  --color-text-muted: #4a4a4a;
  --color-border: #d6d6d6;
  --bb-link: #12407a;
}
[data-theme="bremer-grey"] { --color-surface: #d9d9d9; --color-surface-muted: #d9d9d9; --color-text-muted: #333333; --color-border: #c4c4c4; }
[data-theme="bremer-red"] {
  --color-primary: #ffffff;
  --color-primary-hover: #f2d9d9;
  --color-on-primary: #820000;
  --color-surface: #820000;
  --color-surface-muted: #820000;
  --color-text: #ffffff;
  --color-text-muted: #f2d9d9;
  --color-border: rgb(255 255 255 / 0.25);
  --material-bg: color-mix(in srgb, #820000 94%, transparent);
  --bb-link: #ffffff;
}
[data-theme="bremer-dark"] {
  --color-primary: #ffffff;
  --color-primary-hover: #ec813a;
  --color-on-primary: #333333;
  --color-surface: #333333;
  --color-surface-muted: #333333;
  --color-text: #ffffff;
  --color-text-muted: #d9d9d9;
  --color-border: #4a4a4a;
  --bb-link: #ffffff;
}

/* ---------- Grundbausteine ---------- */
[class~="bb-wrap"] { max-width: 71.25rem; margin-inline: auto; padding-inline: 1rem; }
[class~="bb-pad"] { padding-block: clamp(3.5rem, 2rem + 4vw, 5.5rem); }
[class~="bb-display"] { font-weight: 400; letter-spacing: 0; line-height: 1.15; }
[class~="bb-h2"] { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.1rem); }
[class~="bb-center"] { text-align: center; margin-inline: auto; }
[class~="bb-narrow"] { max-width: 42rem; }
[class~="bb-mt"] { margin-top: var(--space-6); } [class~="bb-mt-lg"] { margin-top: 3rem; }
[class~="bb-text"] p { margin: 0 0 1.1em; line-height: 1.7; }
[class~="bb-text"] a { color: var(--bb-link); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Kopf ---------- */
/* Kopf bleibt beim Scrollen oben; in den eRecht24-Vorlagen ist #ds-header der äußere Container */
/* nur bei ausreichender Fensterhöhe: in sehr niedrigen Fenstern (starker Zoom) scrollt der Kopf samt offenem Menü mit */
@media (min-height: 30rem) {
  [class~="bb-sticky"], [id="ds-header"] { position: sticky; top: 0; z-index: var(--z-sticky); }
  /* Sprungziele und Tastaturfokus landen unter dem klebenden Kopf, nicht dahinter */
  html { scroll-padding-top: 6.5rem; }
}
[class~="bb-nav"] { border-bottom: 0; }
[class~="bb-nav"] nav { padding-block: 0.9rem; }
[class~="bb-logo"] img { height: auto; width: min(26rem, 62vw); }
/* Sobald die Menüpunkte neben dem Logo stehen (ab 48rem), gibt das Logo ihnen Platz — kein Umbruch im Tablet-Bereich */
/* 768px = Breakpoint der Navbar-Komponente (px, nicht rem, damit beide bei größerer Standardschrift gemeinsam schalten) */
[class~="bb-logo"], [class~="bb-nav"] :has(> [class~="bb-logo"]) { flex-shrink: 0; }
@media (min-width: 768px) { [class~="bb-logo"] img { width: clamp(15rem, 100vw - 32rem, 26rem); } }
@media (min-width: 768px) and (max-width: 1023px) { [class~="bb-nav"] ul { gap: 1rem; } }
/* bei stark vergrößerter Schrift brechen die Menüpunkte in eine zweite Zeile, statt das Logo zu überdecken */
[class~="bb-nav"] ul { flex-wrap: wrap; justify-content: flex-end; row-gap: 0.25rem; min-width: 0; }
[class~="bb-nav"] ul a { font-size: 0.875rem; }
[class~="bb-nav"] a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.45em; }

/* ---------- Schaltflächen-Links ---------- */
[class~="bb-btn"] {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.4rem; border-radius: 0.25rem;
  background: var(--bb-red); color: var(--bb-white); text-decoration: none; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  transition: background-color var(--motion-fast) var(--ease-standard);
}
[class~="bb-btn"]:hover { background: var(--bb-red-d); }
[class~="bb-btn"]:focus-visible { outline: 3px solid var(--bb-ink); outline-offset: 3px; }
[class~="bb-btns"] { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- Hero ---------- */
[class~="bb-hero"] { position: relative; background: var(--bb-grey); }
[class~="bb-hero-img"] { display: block; width: 100%; height: clamp(16rem, 38vw, 42rem); object-fit: cover; }
[class~="bb-hero-box"] {
  position: relative; width: min(31.6rem, calc(100% - 2rem)); margin: -8rem 1rem 0 auto; padding: 2rem; min-height: 16rem;
  display: flex; align-items: center; background: var(--bb-red); color: var(--bb-white);
}
@media (min-width: 72rem) { [class~="bb-hero-box"] { margin: -19rem max(1rem, calc((100% - 71.25rem) / 2)) 0 auto; min-height: 26.9rem; } }
[class~="bb-hero-box"] h1 { color: var(--bb-white); font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem); line-height: 1.12; }

/* ---------- Rechtsgebiete ---------- */
[class~="bb-tiles"] { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.25rem; margin-top: 2rem; }
[class~="bb-tile"] {
  position: relative; display: flex; flex-direction: column; gap: 1.6rem; min-height: 21rem; padding: 2.5rem 1.8rem; border: 0; text-align: left;
  color: var(--bb-white); text-decoration: none; cursor: pointer; font: inherit; background-size: cover; background-position: center;
  transition: transform var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard);
}
[class~="bb-tile"]::before { content: ""; position: absolute; inset: 0; background: rgb(130 0 0 / 0.8); }
[class~="bb-tile"] > * { position: relative; }
[class~="bb-tile"]:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -12px rgb(0 0 0 / 0.45); }
[class~="bb-tile"]:focus-visible { outline: 3px solid var(--bb-ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { [class~="bb-tile"]:hover { transform: none; } }
[class~="bb-tile-icon"] { width: 7.4rem; height: 7.4rem; border-radius: 50%; background: rgb(255 255 255 / 0.82); display: grid; place-items: center; }
[class~="bb-tile-icon"] img { width: 4.6rem; height: 4.6rem; }
[class~="bb-tile-title"] { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.3; hyphens: manual; overflow-wrap: break-word; min-width: 0; }
[class~="bb-tile-more"] { margin-top: auto; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bb-rose); }
[class~="bb-tile-dftg"] { background-image: url("dftg.webp?v=4055e00c"); } [class~="bb-tile-steuer-bg"] { background-image: url("steuer-bg.webp?v=af3fa592"); }
[class~="bb-tile-derr-min"] { background-image: url("derr-min.webp?v=679d8eab"); background-position: 100% 50%; } [class~="bb-tile-handshake"] { background-image: url("handshake.webp?v=28e5448c"); }
[class~="bb-tile-btm-bg"] { background-image: url("btm-bg.webp?v=2336800d"); } [class~="bb-tile-cvxcx-min"] { background-image: url("cvxcx-min.webp?v=4a285543"); }
[class~="bb-tile-vbbv-min"] { background-image: url("vbbv-min.webp?v=2c916fc3"); } [class~="bb-tile-neben-bg"] { background-image: url("neben-bg.webp?v=b545b80b"); }
/* Text im Rechtsgebiet-Dialog: lange Texte scrollen im Dialog statt aus dem Fenster zu laufen */
/* Platz für die Scrollleiste bleibt reserviert, damit die Seite beim Öffnen des Dialogs nicht springt */
html { scrollbar-gutter: stable; }
/* der reservierte Scrollleisten-Streifen bekommt die Farbe der abgedunkelten Seite */
html[class~="bb-dialog-open"] { overflow: hidden; background: color-mix(in srgb, var(--gray-900) 55%, var(--gray-0)); } /* :root-Tokens des Design Systems – die Marken-Tokens gelten erst innerhalb von [data-theme] */
/* lange Titel (ein Wort) dürfen im Dialog umbrechen, damit „Schließen“ im Fenster bleibt */
[class~="bb-modal"] h2 { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
[class~="bb-modal-text"] { max-height: max(6rem, calc(100vh - 11.5rem)); max-height: max(6rem, calc(100dvh - 11.5rem)); overflow-y: auto; padding-right: 0.5rem; color: var(--color-text); text-align: left; }
[class~="bb-modal-text"]:focus-visible { outline: 2px solid var(--bb-red); outline-offset: 2px; }

/* ---------- Profil-Teaser ---------- */
[class~="bb-profile"] { position: relative; background: linear-gradient(var(--bb-grey) 0 35%, var(--bb-red) 35% 100%); padding-bottom: 4rem; }
[class~="bb-profile-grid"] { position: relative; }
[class~="bb-profile-img"] { display: block; width: min(100%, 64rem); height: auto; margin-left: auto; }
[class~="bb-profile-card"] { position: relative; width: min(32rem, 100%); margin-top: -6rem; padding: 2rem; background: var(--bb-white); color: var(--bb-ink); }
@media (min-width: 56rem) { [class~="bb-profile-card"] { position: absolute; left: 0; bottom: -2.5rem; margin: 0; } }
[class~="bb-profile-card"] h2 { color: var(--bb-ink); font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); }
[class~="bb-house"] { background: var(--bb-red); padding: 4rem 1rem; }
[class~="bb-house"] img { display: block; width: min(100%, 45rem); height: auto; margin-inline: auto; }

/* ---------- Kontakt ---------- */
[class~="bb-contact"] { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 45rem; margin-inline: auto; }
@media (min-width: 48rem) { [class~="bb-contact"] { grid-template-columns: 1fr 1fr; } }
[class~="bb-contact"] address { font-style: normal; line-height: 1.7; }
[class~="bb-contact"] a { color: var(--bb-link); overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 3px; }
[class~="bb-contact"] a[class~="bb-btn"] { text-decoration: none; color: var(--bb-white); }

/* ---------- Unterseiten ---------- */
[class~="bb-profile-page"] { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
@media (min-width: 52rem) { [class~="bb-profile-page"] { grid-template-columns: 1fr 1.1fr; } }
[class~="bb-profile-page"] img { width: 100%; height: auto; aspect-ratio: 3 / 4.5; object-fit: cover; object-position: 60% 50%; }
[class~="bb-quote"] { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--bb-red); background: var(--bb-mist); font-style: italic; line-height: 1.7; }
[class~="bb-areas"] h2 { font-size: 1.75rem; margin-top: 2.6rem; }
[class~="bb-press"] h2 { font-size: 1.75rem; margin-top: 2.2rem; }
/* nur die Artikellisten (section), nicht die Breadcrumb im selben Container */
[class~="bb-press"] section ul { margin: 0.6rem 0 0; padding: 0; list-style: none; }
[class~="bb-press"] section li { padding: 0.3rem 0; }
[class~="bb-press"] section a { color: var(--bb-link); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
[class~="bb-footer"] a:hover { color: var(--bb-accent); }

/* ---------- eRecht24-Rechtstexte ---------- */
[class~="ds-legal"] { max-width: 48rem; margin: 0 auto; padding: 3.5rem var(--space-4) 5rem; color: var(--color-text); line-height: 1.7; }
[class~="ds-legal"] h1 { font-family: var(--font-heading); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1.15; margin: 0 0 var(--space-6); }
[class~="ds-legal"] h2 { font-family: var(--font-heading); font-weight: 400; font-size: 1.6rem; margin: 2.2rem 0 var(--space-3); }
[class~="ds-legal"] h3, [class~="ds-legal"] h4 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 var(--space-2); }
[class~="ds-legal"] p, [class~="ds-legal"] ul, [class~="ds-legal"] ol { margin: 0 0 var(--space-4); color: var(--color-text-muted); }
[class~="ds-legal"] ul, [class~="ds-legal"] ol { padding-left: var(--space-6); }
[class~="ds-legal"] ul { list-style: disc; } [class~="ds-legal"] ol { list-style: decimal; }
[class~="ds-legal"] a { color: var(--bb-link); text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
