/* ==========================================================================
   MSV Wangs – modern theme
   Loaded automatically by Astroid from
   media/templates/site/astroid_template_one/css/custom.css
   Delete this file to return to the old look.
   ========================================================================== */

/* Montserrat, self-hosted (SIL Open Font License) – no request to Google */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/montserrat-latin.woff2") format("woff2");
}

:root {
  --msv-ink: #17191e;
  --msv-text: #2b2e35;
  --msv-muted: #626772;
  --msv-paper: #f5f4f0;
  --msv-surface: #ffffff;
  --msv-line: #e3e1da;
  --msv-red: #c8102e;
  --msv-red-dark: #9e0c24;
  --msv-yellow: #ffd200;
  --msv-radius: 14px;
  --msv-shadow: 0 1px 2px rgba(23, 25, 30, .04), 0 8px 24px rgba(23, 25, 30, .06);
  --msv-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --msv-head: "Montserrat", var(--msv-font);
  --msv-dark: #17191e;               /* footer, CTA – dark in both modes */
  --msv-header-bg: rgba(255, 255, 255, .92);
  --msv-sticky-bg: rgba(255, 255, 255, .96);
  --msv-pill: #17191e;               /* active menu item */
  --msv-pill-text: #ffffff;
  --msv-note-bg: #fffbea;
  --msv-hover-bg: #ecebe5;
  --msv-logo-plate: transparent;
  color-scheme: light;
}

/* ---------- Base ---------- */
html body.site {
  background: var(--msv-paper) !important;
  color: var(--msv-text);
  font-family: var(--msv-font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.site .astroid-layout,
body.site .astroid-wrapper,
body.site .astroid-section,
body.site .astroid-component-section { background: transparent !important; }

body.site h1, body.site h2, body.site h3, body.site h4 {
  font-family: var(--msv-head) !important;
  color: var(--msv-ink) !important;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
}
body.site a { color: var(--msv-red); text-decoration: none; transition: color .15s; }
body.site a:hover { color: var(--msv-red-dark); text-decoration: underline; text-underline-offset: 3px; }
body.site ::selection { background: var(--msv-yellow); color: var(--msv-ink); }

/* ---------- Header ---------- */
body.site .astroid-header-section {
  background: var(--msv-header-bg) !important;
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--msv-line);
  position: relative;
  z-index: 50;
}
body.site .astroid-header-section::before {           /* thin flag-red / star-yellow band */
  content: ""; display: block; height: 4px;
  background: linear-gradient(90deg, var(--msv-red) 0 70%, var(--msv-yellow) 70% 100%);
}
body.site #astroid-header,
body.site #astroid-sticky-header { padding: 12px 0 !important; background: transparent !important; }
body.site #astroid-sticky-header { background: var(--msv-sticky-bg) !important; box-shadow: 0 4px 20px rgba(0,0,0,.06); }
body.site .astroid-logo img { max-height: 58px !important; width: auto; }

body.site .astroid-nav { gap: 2px; flex-wrap: nowrap; }
body.site .astroid-nav > li > a.nav-link,
body.site .astroid-nav > li > a.as-menu-item {
  color: var(--msv-text) !important;
  font-family: var(--msv-head);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  padding: 9px 12px !important;
  border-radius: 999px;
  transition: background .15s, color .15s;
}
body.site .astroid-nav > li > a:hover { background: var(--msv-paper); color: var(--msv-ink) !important; text-decoration: none; }
body.site .astroid-nav > li.nav-item-active > a,
body.site .astroid-nav > li > a.active { background: var(--msv-pill); color: var(--msv-pill-text) !important; }
body.site .astroid-nav .nav-item-caret { font-size: 10px; margin-left: 6px; opacity: .6; }

/* dropdown (Geschichte) */
body.site .megamenu-container,
body.site .nav-submenu-container {
  background: var(--msv-surface) !important;
  border: 1px solid var(--msv-line);
  border-radius: 12px;
  box-shadow: var(--msv-shadow);
  padding: 8px !important;
}
body.site .nav-submenu a,
body.site .nav-submenu .nav-link {
  color: var(--msv-text) !important;
  border-radius: 8px;
  padding: 8px 12px !important;
  font-size: 15px;
}
body.site .nav-submenu,
body.site .nav-submenu li { background: transparent !important; }  /* template paints the list blue */
body.site .nav-submenu a { display: block; }
body.site .nav-submenu a:hover { background: var(--msv-paper) !important; color: var(--msv-ink) !important; text-decoration: none; }

/* mobile burger + off-canvas */
body.site .burger-menu-button .inner,
body.site .burger-menu-button .inner::before,
body.site .burger-menu-button .inner::after { background-color: var(--msv-ink) !important; }
body.site .astroid-mobilemenu { background: var(--msv-surface) !important; }
body.site .astroid-mobile-menu a { color: var(--msv-text) !important; font-family: var(--msv-head); font-weight: 600; }
/* mobile sub-menus (Über uns, Geschichte, …) – template paints them blue */
body.site #astroid-mobilemenu .nav-child,
body.site .astroid-mobile-menu ul,
body.site .astroid-mobile-menu li { background: var(--msv-surface) !important; }
body.site .astroid-mobile-menu .nav-title-text { color: var(--msv-text) !important; }
body.site .astroid-mobile-menu > li { border-bottom: 1px solid var(--msv-line); }
body.site .astroid-mobile-menu .nav-child a { padding-left: 18px; font-weight: 500 !important; }
body.site .astroid-mobile-menu .nav-item-active > a .nav-title-text { color: var(--msv-red) !important; }
body.site .astroid-mobile-menu .menu-indicator,
body.site .astroid-mobile-menu .menu-go-back { color: var(--msv-muted) !important; }

/* ---------- Layout ---------- */
body.site .astroid-component-section { padding: 40px 0 64px !important; }
body.site .astroid-component-section > .container { max-width: 1180px; }

/* main content card */
body.site .astroid-component-area > div,
body.site .astroid-component-area > .com-content-category,
body.site .astroid-component-area > .search {
  background: var(--msv-surface);
  border: 1px solid var(--msv-line);
  border-radius: var(--msv-radius);
  box-shadow: var(--msv-shadow);
  padding: clamp(22px, 4vw, 44px);
}

/* page title with target-ring accent */
body.site .item-title h1,
body.site .item-title h2,
body.site .page-header h2,
body.site .page-header h1 {
  font-size: clamp(28px, 4vw, 40px) !important;
  margin: 0 0 24px !important;
  padding-top: 26px;
  position: relative;
}
body.site .item-title h1::before,
body.site .item-title h2::before,
body.site .page-header h2::before,
body.site .page-header h1::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle, var(--msv-ink) 0 3px, #fff 3px 5px, var(--msv-red) 5px 100%);
}

/* ---------- Article body: tame old inline formatting ---------- */
body.site [itemprop="articleBody"] { font-size: 17px; }
body.site [itemprop="articleBody"] h3 { font-size: 1.35rem !important; margin: 1.6em 0 .6em !important; }
body.site [itemprop="articleBody"] span[style*="font-family"] { font-family: inherit !important; }
body.site [itemprop="articleBody"] span[style*="font-size: 14pt"],
body.site [itemprop="articleBody"] span[style*="font-size: 12pt"] { font-size: inherit !important; }
body.site [itemprop="articleBody"] span[style*="font-size: 18pt"],
body.site [itemprop="articleBody"] span[style*="font-size: 24pt"] {
  font-size: 1.2rem !important; font-family: var(--msv-head); color: var(--msv-ink);
}
body.site [itemprop="articleBody"] span[style*="color: #0000ff"],
body.site [itemprop="articleBody"] joomla-hidden-mail { color: var(--msv-red) !important; }
body.site [itemprop="articleBody"] p:empty,
body.site [itemprop="articleBody"] h3:empty { display: none; }
body.site [itemprop="articleBody"] [style*="text-align: justify"] { text-align: left !important; }
body.site [itemprop="articleBody"] img { max-width: 100%; height: auto; border-radius: 10px; }
body.site [itemprop="articleBody"] iframe { width: 100% !important; border: 0; border-radius: 12px; min-height: 340px; }

/* PDF / document links as tidy rows with an icon */
body.site [itemprop="articleBody"] ul { list-style: none; padding-left: 0; margin: 0 0 18px; }
body.site [itemprop="articleBody"] ul li { margin: 0; border-bottom: 1px solid var(--msv-line); }
body.site [itemprop="articleBody"] ul li:last-child { border-bottom: 0; }
body.site [itemprop="articleBody"] ul li strong { font-weight: 600; }
body.site [itemprop="articleBody"] ul li span[style*="font-size"] { font-size: 1rem !important; font-family: var(--msv-font) !important; }
body.site [itemprop="articleBody"] a[href$=".pdf"],
body.site [itemprop="articleBody"] a[href$=".PDF"] {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 0; color: var(--msv-ink); font-weight: 600;
}
body.site [itemprop="articleBody"] a[href$=".pdf"]::before,
body.site [itemprop="articleBody"] a[href$=".PDF"]::before {
  content: "PDF";
  font: 700 11px/1 var(--msv-font);
  letter-spacing: .04em;
  color: #fff; background: var(--msv-red);
  padding: 6px 7px; border-radius: 6px; flex: none;
}
body.site [itemprop="articleBody"] a[href$=".pdf"]:hover { color: var(--msv-red); }

/* ---------- Year archives (Content Spoiler plugin) as accordion ---------- */
body.site .contentspoiler {
  border: 1px solid var(--msv-line);
  border-radius: 12px;
  margin: 0;
  overflow: hidden;
  background: var(--msv-surface);
  box-shadow: none !important;
}
body.site .contentspoiler * { box-shadow: none !important; }
body.site .contentspoiler .spoiler_label {
  background: var(--msv-paper) !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 14px 18px !important;
  cursor: pointer;
  position: relative;
}
body.site .contentspoiler .spoiler_label p {
  margin: 0 !important; padding: 0 !important;
  background-image: none !important;
  color: var(--msv-ink) !important;
  font: 600 16px/1.3 var(--msv-head) !important;
}
body.site .contentspoiler .spoiler_label::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font: 400 22px/1 var(--msv-font); color: var(--msv-muted);
}
body.site .contentspoiler .spoiler_label:hover { background: var(--msv-hover-bg) !important; }
body.site .contentspoiler .spoiler_inner {
  background: var(--msv-surface) !important;
  border: 0 !important;
  padding: 4px 18px 8px !important;
}

/* ---------- Category list (Geschichte) ---------- */
body.site .com-content-category__table { border: 0 !important; margin-top: 12px; }
body.site .com-content-category__table thead { display: none; }
body.site .com-content-category__table tr,
body.site .com-content-category__table td,
body.site .com-content-category__table th {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
}
body.site .com-content-category__table tbody tr { border-bottom: 1px solid var(--msv-line) !important; }
body.site .com-content-category__table tbody tr:last-child { border-bottom: 0 !important; }
body.site .com-content-category__table td, body.site .com-content-category__table th { padding: 0 !important; }
body.site .com-content-category__table td a,
body.site .com-content-category__table th a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 4px; color: var(--msv-ink) !important; font-weight: 600; font-size: 17px;
}
body.site .com-content-category__table td a::after,
body.site .com-content-category__table th a::after { content: "→"; color: var(--msv-red); transition: transform .15s; }
body.site .com-content-category__table a:hover { text-decoration: none; }
body.site .com-content-category__table a:hover::after { transform: translateX(4px); }
body.site .com-content-category__pagination { display: none; }  /* only 8 entries – no pager needed */

/* ---------- Article prev/next ---------- */
body.site .pagenavigation, body.site .pager { margin-top: 32px; }
body.site .pagenavigation .btn, body.site .pager a, body.site .pagination .page-link {
  background: var(--msv-surface) !important;
  color: var(--msv-ink) !important;
  border: 1px solid var(--msv-line) !important;
  border-radius: 999px !important;
  padding: 10px 18px !important;
  font-weight: 600;
}
body.site .pagenavigation .btn:hover { border-color: var(--msv-ink) !important; }

/* ---------- Sidebar ---------- */
body.site .astroid-module-position .moduletable {
  background: var(--msv-surface);
  border: 1px solid var(--msv-line);
  border-radius: var(--msv-radius);
  box-shadow: var(--msv-shadow);
  padding: 22px 24px;
  margin-bottom: 20px;
}
body.site .moduletable .module-title {
  font-size: 13px !important;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--msv-muted) !important;
  margin: 0 0 14px !important;
}
body.site .moduletable ul { list-style: none; padding: 0; margin: 0; }
body.site .moduletable ul li { border-bottom: 1px solid var(--msv-line); }
body.site .moduletable ul li:last-child { border-bottom: 0; }
body.site .moduletable ul li a { display: block; padding: 10px 0; color: var(--msv-ink); font-weight: 600; }
body.site .moduletable ul li a::after { content: " →"; color: var(--msv-red); }
body.site .form-control, body.site .inputbox, body.site .form-select {
  border: 1px solid var(--msv-line) !important;
  border-radius: 10px !important;
  padding: 11px 14px !important;
  background: var(--msv-paper) !important;
  color: var(--msv-ink) !important;
  box-shadow: none !important;
}
body.site .form-control:focus { border-color: var(--msv-ink) !important; background: var(--msv-surface) !important; outline: 3px solid rgba(200,16,46,.15); }

/* ---------- Home page: group photo as hero, welcome text on top ---------- */
body.site.homepage-alias .astroid-component-area > div { padding: 0; overflow: hidden; }
body.site.homepage-alias [itemprop="articleBody"] {
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: 1fr auto auto;
}
body.site.homepage-alias [itemprop="articleBody"] > p:nth-child(3) {
  grid-row: 1 / 4; grid-column: 1; margin: 0; position: relative;
}
body.site.homepage-alias [itemprop="articleBody"] > p:nth-child(3)::after {  /* darken bottom for legible text */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.72) 100%);
}
body.site.homepage-alias [itemprop="articleBody"] > p:nth-child(3) img {
  display: block; width: 100%; height: 100%;
  min-height: clamp(320px, 52vw, 540px); object-fit: cover;
  margin: 0 !important; border-radius: 0 !important;
}
body.site.homepage-alias [itemprop="articleBody"] > h3:nth-child(1),
body.site.homepage-alias [itemprop="articleBody"] > :is(h1,h3):nth-child(2) {
  grid-column: 1; z-index: 1; margin: 0 !important;
  padding: 0 clamp(22px, 4vw, 44px);
  text-align: left !important; color: #fff !important;
}
body.site.homepage-alias [itemprop="articleBody"] > h3:nth-child(1) {
  grid-row: 2; font-size: 14px !important; text-transform: uppercase; letter-spacing: .16em;
  color: var(--msv-yellow) !important;
}
body.site.homepage-alias [itemprop="articleBody"] > :is(h1,h3):nth-child(2) {
  grid-row: 3; padding-bottom: clamp(22px, 4vw, 40px);
  font-size: clamp(36px, 6vw, 64px) !important; line-height: 1.05; font-weight: 800;
}
body.site.homepage-alias [itemprop="articleBody"] > :is(h1,h3):nth-child(-n+2) * {
  font: inherit !important; color: inherit !important;
}
body.site.homepage-alias [itemprop="articleBody"] > h3:nth-child(4):last-child { display: none; } /* empty spacer line in the article */
body.site.homepage-alias [itemprop="articleBody"] > :nth-child(n+4) {
  padding: 0 clamp(22px, 4vw, 44px);
}


/* News: "weitere Beiträge" list below the blog items */
body.site .blog .items-more { margin-top: 8px; }
body.site .blog .items-more .list-group {
  background: var(--msv-surface); border: 1px solid var(--msv-line); border-radius: var(--msv-radius); overflow: hidden; padding: 0;
}
body.site .blog .items-more .list-group-item {
  background: transparent !important; border: 0; border-bottom: 1px solid var(--msv-line); padding: 0;
}
body.site .blog .items-more .list-group-item:last-child { border-bottom: 0; }
body.site .blog .items-more .list-group-item a {
  display: block; padding: 14px 20px; color: var(--msv-ink) !important; font-weight: 600;
}
body.site .blog .items-more .list-group-item a:hover { background: var(--msv-hover-bg); color: var(--msv-red) !important; text-decoration: none; }

/* ---------- Content building blocks (used in article HTML) ---------- */
body.site .msv-lead { font-size: 1.15rem; color: var(--msv-ink); line-height: 1.6; margin-bottom: 1.4em; }
body.site .msv-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
  margin: 24px 0; padding: 0; list-style: none;
}
body.site [itemprop="articleBody"] ul.msv-facts li,
body.site .msv-facts li {
  background: var(--msv-paper); border: 1px solid var(--msv-line) !important; border-radius: 12px;
  padding: 16px 18px; margin: 0;
}
body.site .msv-facts strong {
  display: block; font: 800 1.6rem/1.1 var(--msv-head); color: var(--msv-red); margin-bottom: 4px;
}
body.site .msv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 24px 0; }
body.site .msv-card {
  border: 1px solid var(--msv-line); border-radius: 14px; padding: 20px 22px; background: var(--msv-surface);
  border-top: 4px solid var(--msv-red);
}
body.site .msv-card h3 { font-size: 1.1rem !important; margin: 0 0 8px !important; }
body.site .msv-card p { margin: 0 0 10px; }
body.site .msv-card p:last-child { margin-bottom: 0; }
body.site .msv-cta {
  background: var(--msv-dark); color: #fff; border-radius: 14px; padding: 24px 26px; margin: 28px 0;
}
body.site .msv-cta h3 { color: #fff !important; margin: 0 0 8px !important; font-size: 1.25rem !important; }
body.site .msv-cta p { margin: 0; }
body.site.homepage-alias [itemprop="articleBody"] > .msv-cta { margin: 28px clamp(22px, 4vw, 44px) clamp(22px, 4vw, 44px); padding: 24px 26px; }

/* ---------- News (category blog) ---------- */
body.site .blog .system-unpublished,
body.site .article-wraper-inner { background: transparent !important; box-shadow: none !important; padding: 0 !important; }   /* old blue + Astroid flags items without end date */
body.site .blog .article-wraper { margin-bottom: 20px; }
body.site .blog .items-leading > .article-wraper,
body.site .blog .items-row .article-wraper {
  background: var(--msv-surface); border: 1px solid var(--msv-line); border-radius: var(--msv-radius);
  box-shadow: var(--msv-shadow); padding: clamp(20px, 3vw, 32px);
}
body.site .astroid-component-area > .blog { background: transparent; border: 0; box-shadow: none; padding: 0; }
body.site .blog .card-body { padding: 0; }
body.site .blog .article-info { font-size: 13px; color: var(--msv-muted); margin: 0 0 6px; }
body.site .blog .item-title h2 { font-size: clamp(22px, 2.6vw, 28px) !important; padding-top: 0; margin: 0 0 12px !important; }
body.site .blog .item-title h2::before { content: none; }
body.site .blog .item-title h2 a { color: var(--msv-ink) !important; }
body.site .blog .item-title h2 a:hover { color: var(--msv-red) !important; text-decoration: none; }
body.site .blog .article-intro-text p { color: var(--msv-text); }
body.site .msv-cta a { color: var(--msv-yellow); font-weight: 700; }
body.site .msv-note {
  border-left: 4px solid var(--msv-yellow); background: var(--msv-note-bg); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 20px 0;
}
body.site table.msv-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .97rem; }
body.site table.msv-table th {
  text-align: left; font: 700 12px/1.2 var(--msv-font); text-transform: uppercase; letter-spacing: .06em;
  color: var(--msv-muted); border-bottom: 2px solid var(--msv-ink); padding: 10px 12px 10px 0;
}
body.site table.msv-table td { border-bottom: 1px solid var(--msv-line); padding: 12px 12px 12px 0; vertical-align: top; }
body.site table.msv-table tr.msv-past td { color: var(--msv-muted); }
body.site table.msv-table td:first-child { white-space: nowrap; font-weight: 600; color: var(--msv-ink); }
@media (max-width: 600px) {
  body.site table.msv-table, body.site table.msv-table tbody, body.site table.msv-table tr, body.site table.msv-table td { display: block; width: 100%; }
  body.site table.msv-table thead { display: none; }
  body.site table.msv-table tr { border-bottom: 1px solid var(--msv-line); padding: 10px 0; }
  body.site table.msv-table td { border: 0; padding: 2px 0; }
}
body.site .msv-meta { color: var(--msv-muted); font-size: .9rem; margin-bottom: 1em; }
body.site object.msv-pdf {
  display: block; width: 100%; height: min(85vh, 1100px); margin: 16px 0;
  border: 1px solid var(--msv-line); border-radius: 12px; background: var(--msv-paper);
}
@media (max-width: 700px) { body.site object.msv-pdf { height: 70vh; } }
body.site .msv-map { margin: 8px 0 20px; }

/* Photo gallery */
body.site .msv-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 14px 0 32px; }
body.site .msv-gallery a { display: block; border-radius: 10px; overflow: hidden; background: var(--msv-paper); }
body.site [itemprop="articleBody"] .msv-gallery img {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; margin: 0;
  transition: transform .25s ease;
}
body.site .msv-gallery a:hover img { transform: scale(1.04); }
body.site .msv-album-meta { color: var(--msv-muted); font-size: .95rem; margin: -4px 0 0; }
body.site figure.msv-figure { margin: 24px 0; }
body.site figure.msv-figure figcaption { color: var(--msv-muted); font-size: .9rem; margin-top: 8px; }

/* ---------- Footer ---------- */
body.site .astroid-footer-section {
  background: var(--msv-dark) !important; color: #b9bcc4; padding: 44px 0 36px !important; font-size: 15px;
  border-top: 4px solid var(--msv-red);
}
body.site .astroid-footer-section .moduletable {
  background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 0 20px;
}
body.site .astroid-footer-section p { margin: 0 0 12px; }
body.site .astroid-footer-section strong { color: #fff; font-family: var(--msv-head); font-size: 17px; }
body.site .astroid-footer-section a { color: #fff !important; }
body.site .astroid-footer-section a:hover { color: var(--msv-yellow) !important; }
body.site .astroid-footer-section ul.msv-footer-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
body.site .astroid-footer-section ul.msv-footer-links li { border: 0 !important; padding: 0 0 10px; break-inside: avoid; }
body.site .astroid-footer-section ul.msv-footer-links li a::after { content: none; }
body.site .astroid-footer-section ul.msv-footer-links li a { display: inline; padding: 0; font-weight: 500; }
@media (max-width: 991.98px) { body.site .astroid-footer-section ul.msv-footer-links { columns: 1; } }

/* ---------- Back to top ---------- */
body.site #astroid-backtotop {
  background: var(--msv-pill) !important; border-radius: 50% !important;
  width: 46px; height: 46px; box-shadow: var(--msv-shadow);
}

/* ---------- Small screens ---------- */
@media (max-width: 991.98px) {
  body.site .astroid-component-section { padding: 20px 0 40px !important; }
  body.site .astroid-module-position { margin-top: 20px; }
  body.site .astroid-logo img { max-height: 46px !important; }
}

/* ==========================================================================
   Dark mode
   – html[data-msv-theme="dark"] is set by the small script in Astroid
     "Custom Code → Before </head>" (remembers the choice in localStorage)
   – without JavaScript the system setting (prefers-color-scheme) is used
   ========================================================================== */
html[data-msv-theme="dark"] {
  --msv-ink: #f2f3f5;
  --msv-text: #d4d7dd;
  --msv-muted: #9aa1ac;
  --msv-paper: #111317;
  --msv-surface: #1a1d23;
  --msv-line: #2d3139;
  --msv-red: #ff5468;
  --msv-red-dark: #ff8090;
  --msv-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --msv-dark: #0a0b0e;
  --msv-header-bg: rgba(17, 19, 23, .94);
  --msv-sticky-bg: rgba(17, 19, 23, .97);
  --msv-pill: #c8102e;
  --msv-pill-text: #ffffff;
  --msv-note-bg: #2a2512;
  --msv-hover-bg: #23272e;
  --msv-logo-plate: #ffffff;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not([data-msv-theme]) {
    --msv-ink: #f2f3f5; --msv-text: #d4d7dd; --msv-muted: #9aa1ac; --msv-paper: #111317;
    --msv-surface: #1a1d23; --msv-line: #2d3139; --msv-red: #ff5468; --msv-red-dark: #ff8090;
    --msv-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); --msv-dark: #0a0b0e;
    --msv-header-bg: rgba(17,19,23,.94); --msv-sticky-bg: rgba(17,19,23,.97); --msv-pill: #c8102e;
    --msv-pill-text: #fff; --msv-note-bg: #2a2512; --msv-hover-bg: #23272e; --msv-logo-plate: #fff;
    color-scheme: dark;
  }
}

/* the logo has black lettering – give it a light plate on dark backgrounds */
body.site .astroid-logo img { background: var(--msv-logo-plate); border-radius: 8px; transition: background .2s; }
html[data-msv-theme="dark"] body.site .astroid-logo img { padding: 3px 8px; }

/* old article content with hard-coded colours stays readable in dark mode */
html[data-msv-theme="dark"] body.site [itemprop="articleBody"] [style*="color"]:not(a) { color: inherit !important; }
html[data-msv-theme="dark"] body.site [itemprop="articleBody"] [style*="background"] { background: transparent !important; }
html[data-msv-theme="dark"] body.site [itemprop="articleBody"] img[src$=".png"] { background: #fff; border-radius: 6px; } /* logos in "Links" */
html[data-msv-theme="dark"] body.site .form-control::placeholder { color: var(--msv-muted); }
html[data-msv-theme="dark"] body.site .page-link,
html[data-msv-theme="dark"] body.site .pagination .page-item .page-link { background: var(--msv-surface) !important; color: var(--msv-text) !important; border-color: var(--msv-line) !important; }
html[data-msv-theme="dark"] body.site table, html[data-msv-theme="dark"] body.site th, html[data-msv-theme="dark"] body.site td { color: var(--msv-text); }

/* ---------- Theme switch button ---------- */
.msv-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none; margin-left: 8px; padding: 0;
  border: 1px solid var(--msv-line); border-radius: 50%;
  background: var(--msv-surface); color: var(--msv-ink); cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.msv-theme-toggle:hover { border-color: var(--msv-red); transform: rotate(-12deg); }
.msv-theme-toggle:focus-visible { outline: 3px solid var(--msv-yellow); outline-offset: 2px; }
.msv-theme-toggle svg { width: 20px; height: 20px; }
.msv-theme-toggle .msv-icon-sun { display: none; }
html[data-msv-theme="dark"] .msv-theme-toggle .msv-icon-sun { display: block; }
html[data-msv-theme="dark"] .msv-theme-toggle .msv-icon-moon { display: none; }
body.site #astroid-header .min-w-30.d-lg-none { display: flex; justify-content: flex-end; align-items: center; }

/* narrow desktops (992–1199 px): keep menu + theme switch on one line */
@media (min-width: 992px) and (max-width: 1199.98px) {
  body.site .astroid-nav > li > a.nav-link,
  body.site .astroid-nav > li > a.as-menu-item { padding: 8px 8px !important; font-size: 13.5px; }
  body.site .astroid-nav .nav-item-caret { margin-left: 3px; }
  body.site .astroid-logo img { max-height: 46px !important; }
  body.site #astroid-header .astroid-logo { margin-right: 8px !important; }
  .msv-theme-toggle { width: 36px; height: 36px; margin-left: 4px; }
}
