/* RBSV – Einzelansicht Beitrag.
   Nutzt dieselben Kit-Variablen wie rbsv-widgets.css. Auf Beitragsseiten lädt
   Elementor sein Kit-CSS nicht, deshalb steht hinter jeder Variable der
   Kit-Wert als Fallback – die Farben sind damit identisch zu den
   Elementor-Seiten. */

/* ---------- Artikelfläche ----------
   Durchgehend weiss. Astras Boxed-Container ist von Haus aus brand-getönt –
   das würde die Kategorie-Pills (gleicher Ton) verschlucken. Rahmen und
   Schatten entfallen: ein weisser Kasten auf weissem Grund wäre nur eine
   sinnlose Kontur. */
body.rbsv-article{background-color:var(--e-global-color-paper,#fff);}
.rbsv-article .site-main .ast-article-single{
  background-color:var(--e-global-color-paper,#fff);
  border:0;
  border-radius:0;
  padding:clamp(24px,4vw,48px);
  box-shadow:none;
}

/* ---------- Zurück-Link ---------- */
.rbsv-article__back{
  display:inline-flex;align-items:center;gap:8px;
  margin:0 0 20px;
  color:var(--e-global-color-primary,#00529B);
  text-decoration:none;
}
.rbsv-article__back:hover,.rbsv-article__back:focus-visible{color:var(--e-global-color-secondary,#002C5F);}
.rbsv-article__back-arrow{display:inline-block;transition:transform .15s ease;}
.rbsv-article__back:hover .rbsv-article__back-arrow{transform:translateX(-3px);}

/* ---------- Kopf: Titel, Datum, Kategorien ---------- */
.rbsv-article .entry-header{margin-bottom:30px;text-align:left;}
.rbsv-article .entry-title{
  margin:0 0 16px;
  font-family:var(--e-global-typography-rbsvh1-font-family,"Libre Franklin"),sans-serif;
  font-size:clamp(28px,4.2vw,40px);
  font-weight:800;
  line-height:1.15;
  color:var(--e-global-color-secondary,#002C5F);
}
/* Metazeile – gleich in Artikel und Archiv, nur die Trennlinie ist
   dem Artikelkopf vorbehalten. */
.rbsv-article__meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:0;
}
.rbsv-article__date{
  color:var(--e-global-color-muted,#475569);
  letter-spacing:.2px;
}
.rbsv-article .rbsv-article__meta{
  padding:0 0 20px;
  border-bottom:1px solid var(--e-global-color-line,#E2E8F0);
}
.rbsv-article__cats{display:flex;flex-wrap:wrap;gap:8px;}
.rbsv-article__cats .rbsv-badge{text-decoration:none;transition:background-color .15s ease;}
.rbsv-article__cats .rbsv-badge:hover,.rbsv-article__cats .rbsv-badge:focus-visible{
  background:var(--e-global-color-brand100,#D6E3F1);
}

/* Beitragsbild unter der Metazeile.
   Die Bildbestände sind grösstenteils nur ~282px breit – deshalb nie
   hochskalieren, sondern in natürlicher Grösse zentrieren. */
.rbsv-article .entry-header .post-thumb{margin:26px 0 0;text-align:center;}
.rbsv-article .entry-header .post-thumb img{
  display:inline-block;width:auto;max-width:100%;height:auto;max-height:460px;
  border-radius:16px;
}

/* ---------- Fließtext ---------- */
.rbsv-article .entry-content{
  font-family:var(--e-global-typography-rbsvbodylg-font-family,"Public Sans"),sans-serif;
  font-size:var(--e-global-typography-rbsvbodylg-font-size,18px);
  line-height:1.75;
  color:var(--e-global-color-text,#15181F);
}
.rbsv-article .entry-content p{margin:0 0 1.15em;}
.rbsv-article .entry-content > :last-child{margin-bottom:0;}
.rbsv-article .entry-content strong{font-weight:700;color:var(--e-global-color-secondary,#002C5F);}
.rbsv-article .entry-content a{
  color:var(--e-global-color-primary,#00529B);
  text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;
}
.rbsv-article .entry-content a:hover,.rbsv-article .entry-content a:focus-visible{
  color:var(--e-global-color-accent,#C8102E);
}
.rbsv-article .entry-content h2,
.rbsv-article .entry-content h3,
.rbsv-article .entry-content h4{
  font-family:var(--e-global-typography-rbsvh2-font-family,"Libre Franklin"),sans-serif;
  font-weight:800;line-height:1.25;
  color:var(--e-global-color-secondary,#002C5F);
  margin:1.9em 0 .5em;
}
.rbsv-article .entry-content h2{font-size:clamp(22px,3vw,29px);}
.rbsv-article .entry-content h3{font-size:clamp(19px,2.4vw,23px);}
.rbsv-article .entry-content h4{font-size:19px;}
.rbsv-article .entry-content ul,
.rbsv-article .entry-content ol{margin:0 0 1.15em;padding-left:1.35em;}
.rbsv-article .entry-content li{margin-bottom:.4em;}
.rbsv-article .entry-content li::marker{color:var(--e-global-color-primary,#00529B);}
.rbsv-article .entry-content blockquote{
  margin:1.8em 0;padding:18px 22px;
  border-left:4px solid var(--e-global-color-primary,#00529B);
  border-radius:0 14px 14px 0;
  background:var(--e-global-color-mist,#F4F6F9);
  color:var(--e-global-color-secondary,#002C5F);
  font-style:normal;
}
.rbsv-article .entry-content blockquote p:last-child{margin-bottom:0;}
.rbsv-article .entry-content figure{margin:1.8em 0;text-align:center;}
.rbsv-article .entry-content img{
  display:inline-block;width:auto;max-width:100%;height:auto;border-radius:16px;
}

/* Mehrere aufeinanderfolgende Bilder werden zur Strecke gruppiert
   (siehe rbsv_article_group_images) und als Raster gezeigt. */
.rbsv-article .entry-content .rbsv-article__gallery{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));
  gap:14px;margin:1.8em 0;align-items:start;
}
.rbsv-article .entry-content .rbsv-article__gallery figure{margin:0;}
.rbsv-article .entry-content .rbsv-article__gallery img{
  display:block;width:100%;height:160px;object-fit:cover;border-radius:12px;
}
.rbsv-article .entry-content figcaption{
  margin-top:10px;
  font-family:var(--e-global-typography-rbsvbody-font-family,"Public Sans"),sans-serif;
  font-size:14px;line-height:1.5;
  color:var(--e-global-color-muted,#475569);
}
.rbsv-article .entry-content hr{
  border:0;border-top:1px solid var(--e-global-color-line,#E2E8F0);margin:2.2em 0;
}
.rbsv-article .entry-content table{
  width:100%;border-collapse:collapse;font-size:16px;margin:0 0 1.4em;
}
.rbsv-article .entry-content th,
.rbsv-article .entry-content td{
  padding:10px 12px;text-align:left;
  border-bottom:1px solid var(--e-global-color-line,#E2E8F0);
}
.rbsv-article .entry-content th{color:var(--e-global-color-secondary,#002C5F);font-weight:700;}

/* ---------- Ähnliche Beiträge: drei Boxen nebeneinander ---------- */
.rbsv-related{margin:40px 0 0;}
.rbsv-related__head{margin-bottom:20px;}

.rbsv-news--grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.rbsv-news--grid .rbsv-news__item{
  flex-direction:column;align-items:stretch;gap:0;padding:0;overflow:hidden;
}
/* Fotos formatfüllend, kleine Vereinslogos eingepasst – siehe
   rbsv_thumb_fit_class(). */
.rbsv-news--grid .rbsv-news__media{
  width:100%;background:var(--e-global-color-mist,#F4F6F9);
}
.rbsv-news--grid .rbsv-news__media img{height:170px;border-radius:0;}
.rbsv-news--grid .rbsv-news__media img.is-cover{object-fit:cover;padding:0;}
.rbsv-news--grid .rbsv-news__media img.is-contain{object-fit:contain;padding:14px;}
/* Platzhalter, damit die drei Boxen ohne Beitragsbild nicht verspringen */
.rbsv-news--grid .rbsv-news__media--empty{
  display:block;height:170px;
  background:
    linear-gradient(to right,var(--e-global-color-primary,#00529B) 0 38%,#cbd5e1 38% 62%,var(--e-global-color-accent,#C8102E) 62% 100%)
    center/56px 4px no-repeat,
    var(--e-global-color-mist,#F4F6F9);
}
.rbsv-news--grid .rbsv-news__body{gap:8px;padding:20px;}

@media (max-width:1024px){
  .rbsv-news--grid{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:700px){
  .rbsv-news--grid{grid-template-columns:1fr;}
}



/* ================================================== Kategorie-/Tag-Archive
   Die Kategorie-Pills im Artikel führen hierher – gleiche Kartenoptik wie
   die News-Liste, damit der Sprung nicht aus dem Design fällt. */
body.rbsv-postlist{background-color:var(--e-global-color-paper,#fff);}

.rbsv-postlist .ast-archive-description{
  padding:0 clamp(20px,3vw,30px);background:none;
}
.rbsv-postlist .ast-archive-title{
  font-family:var(--e-global-typography-rbsvh1-font-family,"Libre Franklin"),sans-serif;
  font-size:clamp(28px,4vw,38px);font-weight:800;line-height:1.15;
  color:var(--e-global-color-secondary,#002C5F);
  margin:0;
}
/* Brand-Strich wie in .rbsv-head__rule, rein dekorativ */
.rbsv-postlist .ast-archive-title::after{
  content:"";display:block;height:4px;width:56px;border-radius:2px;margin-top:14px;
  background:linear-gradient(to right,var(--e-global-color-primary,#00529B) 0 38%,#cbd5e1 38% 62%,var(--e-global-color-accent,#C8102E) 62% 100%);
}
.rbsv-postlist .site-main .ast-row{display:flex;flex-direction:column;gap:16px;}
.rbsv-postlist .site-main .ast-article-post{
  background:var(--e-global-color-paper,#fff);
  border:1px solid var(--e-global-color-line,#E2E8F0);
  border-radius:20px;
  padding:clamp(20px,3vw,30px);
  margin:0;
  box-shadow:0 1px 2px rgba(2,23,56,.04),0 8px 24px -12px rgba(2,23,56,.18);
  transition:border-color .15s ease;
}
.rbsv-postlist .site-main .ast-article-post:hover{border-color:var(--e-global-color-brand200,#AEC7E3);}
.rbsv-postlist .ast-blog-featured-section:empty{display:none;}
/* Flacher Eintrag: Bild links, rechts Titel / Metazeile / Kurztext /
   Weiterlesen – alles sauber in einer zweiten Spalte. Das Grid greift nur,
   wenn wirklich ein Bild da ist; Astra gibt sonst einen leeren Container aus. */
.rbsv-postlist .post-content > *{clear:none;}
.rbsv-postlist .ast-blog-featured-section{margin:0;}
.rbsv-postlist .ast-blog-featured-section:empty{display:none;}

.rbsv-postlist .post-content:has(.ast-blog-featured-section:not(:empty)){
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  column-gap:24px;
  align-items:start;
}
.rbsv-postlist .post-content:has(.ast-blog-featured-section:not(:empty)) > .ast-blog-featured-section{
  grid-column:1;grid-row:1 / span 20;
}
.rbsv-postlist .post-content:has(.ast-blog-featured-section:not(:empty)) > *:not(.ast-blog-featured-section){
  grid-column:2;
}
.rbsv-postlist .ast-blog-featured-section img{
  display:block;width:100%;height:150px;border-radius:14px;
}
.rbsv-postlist .ast-blog-featured-section img.is-cover{object-fit:cover;}
.rbsv-postlist .ast-blog-featured-section img.is-contain{
  object-fit:contain;padding:10px;background:var(--e-global-color-mist,#F4F6F9);
}

@media (max-width:600px){
  .rbsv-postlist .post-content:has(.ast-blog-featured-section:not(:empty)){
    grid-template-columns:1fr;
  }
  .rbsv-postlist .post-content:has(.ast-blog-featured-section:not(:empty)) > *{grid-column:1;}
  .rbsv-postlist .post-content:has(.ast-blog-featured-section:not(:empty)) > .ast-blog-featured-section{
    grid-row:1;margin:0 0 14px;
  }
  .rbsv-postlist .ast-blog-featured-section img{height:180px;}
}

.rbsv-postlist .entry-title{
  font-family:var(--e-global-typography-rbsvh3-font-family,"Libre Franklin"),sans-serif;
  font-size:clamp(20px,2.6vw,24px);font-weight:800;line-height:1.25;
  margin:0 0 10px;
}
.rbsv-postlist .entry-title a{color:var(--e-global-color-secondary,#002C5F);text-decoration:none;}
.rbsv-postlist .entry-title a:hover{color:var(--e-global-color-primary,#00529B);}
.rbsv-postlist .entry-header{margin:0 0 12px;}
.rbsv-postlist .ast-excerpt-container p{
  margin:0;
  font-family:var(--e-global-typography-rbsvbody-font-family,"Public Sans"),sans-serif;
  font-size:16px;line-height:1.6;
  color:var(--e-global-color-muted,#475569);
}
.rbsv-postlist .ast-read-more-container{margin:14px 0 0;}
.rbsv-postlist .ast-read-more-container a{
  font-family:var(--e-global-typography-rbsvlink-font-family,"Public Sans"),sans-serif;
  font-weight:700;
  color:var(--e-global-color-primary,#00529B);
  text-decoration:none;
}
.rbsv-postlist .ast-read-more-container a:hover{color:var(--e-global-color-accent,#C8102E);}
.rbsv-postlist .entry-content:empty{display:none;}

/* ============================================================== Lightbox */
.rbsv-zoomable{cursor:zoom-in;}
.rbsv-zoomable:focus-visible{outline:3px solid var(--e-global-color-primary,#00529B);outline-offset:3px;}

/* Astra setzt overflow-x separat – overflow-y muss explizit nachgezogen werden. */
body.rbsv-lb-open{overflow:hidden;overflow-y:hidden;}

.rbsv-lb{
  position:fixed;inset:0;z-index:9999;
  display:none;align-items:center;justify-content:center;
  gap:12px;padding:clamp(16px,4vw,48px);
  background:rgba(2,23,56,.94);
}
.rbsv-lb.is-open{display:flex;}

.rbsv-lb__frame{
  margin:0;display:flex;flex-direction:column;align-items:center;gap:14px;
  max-width:100%;max-height:100%;
}
.rbsv-lb__img{
  display:block;width:auto;height:auto;
  max-width:min(90vw,1200px);max-height:82vh;
  border-radius:12px;background:var(--e-global-color-paper,#fff);
}
.rbsv-lb__caption{
  margin:0;max-width:60ch;text-align:center;
  font-family:var(--e-global-typography-rbsvbody-font-family,"Public Sans"),sans-serif;
  font-size:15px;line-height:1.5;color:#D6E3F1;
}
.rbsv-lb__caption[hidden]{display:none;}

.rbsv-lb__close,.rbsv-lb__nav{
  flex:0 0 auto;
  display:flex;align-items:center;justify-content:center;
  width:48px;height:48px;padding:0;
  border:1px solid rgba(255,255,255,.25);border-radius:999px;
  background:rgba(255,255,255,.08);color:#fff;
  font-size:30px;line-height:1;cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease;
}
.rbsv-lb__close:hover,.rbsv-lb__nav:hover,
.rbsv-lb__close:focus-visible,.rbsv-lb__nav:focus-visible{
  background:rgba(255,255,255,.2);border-color:rgba(255,255,255,.6);
}
.rbsv-lb__close{position:absolute;top:16px;right:16px;font-size:26px;}
.rbsv-lb__nav[hidden]{display:none;}

.rbsv-lb__count{
  position:absolute;bottom:18px;left:0;right:0;margin:0;text-align:center;
  font-family:var(--e-global-typography-rbsvsmall-font-family,"Public Sans"),sans-serif;
  font-size:13px;font-weight:600;letter-spacing:.4px;color:#AEC7E3;
}

@media (max-width:600px){
  .rbsv-lb{gap:6px;padding:12px;}
  .rbsv-lb__nav{position:absolute;bottom:52px;width:44px;height:44px;}
  .rbsv-lb__nav--prev{left:16px;}
  .rbsv-lb__nav--next{right:16px;}
  .rbsv-lb__img{max-height:70vh;}
}
