/* =====================================================================
   vibal.de – Stylesheet
   Orientiert am bisherigen Flatsome-Design (Boxed-Layout, Petrol #067f7b),
   ohne externe Schriften oder Bibliotheken.
   ===================================================================== */

:root {
    --primaer: #067f7b;
    --primaer-dunkel: #05605d;
    --sekundaer: #09b2ac;
    --text: #777;
    --text-dunkel: #555;
    --ueberschrift: #555;
    --linie: #ececec;
    --hintergrund: #646464;
    --fuss: #777;
    --fuss-unten: #5b5b5b;
    --breite: 1170px;
    --schrift: "Lato", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--hintergrund);
    color: var(--text);
    font: 400 16px/1.6 var(--schrift);
}

img, video { max-width: 100%; height: auto; }

a { color: var(--primaer); text-decoration: none; }
a:hover, a:focus { color: var(--primaer-dunkel); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--sekundaer); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 { color: var(--ueberschrift); font-weight: 700; line-height: 1.3; margin: 1.6em 0 .6em; }
h1 { font-size: 1.7em; }
h2 { font-size: 1.45em; }
h3 { font-size: 1.2em; }
h4 { font-size: 1.05em; }
p, ul, ol, blockquote, figure { margin: 0 0 1.3em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: .35em; }
hr { border: 0; border-top: 1px solid var(--linie); margin: 2em 0; }

blockquote {
    border-left: 3px solid var(--primaer);
    margin-left: 0;
    padding: .3em 0 .3em 1.2em;
    font-size: 1.1em;
    font-style: italic;
    color: var(--text-dunkel);
}
blockquote p:last-child { margin-bottom: 0; }

.unsichtbar {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.sprunglink { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #fff; padding: .6em 1em; }
.sprunglink:focus { left: 1em; }

.symbol { display: inline-block; vertical-align: -.15em; flex: none; }

.trenner { width: 30px; height: 3px; background: rgba(0, 0, 0, .1); margin: .9em auto; }
.trenner.klein { margin: .6em 0 1em; }

.klein { font-size: .85em; }

/* ---------------------------------------------------------------- Rahmen */

#seite {
    max-width: var(--breite);
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 6px rgba(0, 0, 0, .25);
}
.container { max-width: var(--breite); margin: 0 auto; padding: 0 60px; }

/* ---------------------------------------------------------------- Kopf */

.topbar { background: var(--primaer); color: #fff; font-size: .74rem; }
.topbar-innen { display: flex; align-items: center; justify-content: space-between; min-height: 30px; gap: 1em; }
.topbar-themen { text-transform: uppercase; letter-spacing: .02em; }
.rund { display: inline-flex !important; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; }

.kopf-innen {
    display: flex; align-items: center; gap: 30px; min-height: 90px;
    border-bottom: 1px solid var(--linie);
}
.logo { flex: none; line-height: 0; }
.logo img { width: 200px; height: auto; max-height: 90px; }
.menue-knopf { display: none; }

/* Hauptnavigation (Desktop) */
#navigation { display: flex; align-items: center; flex: 1; }
.nav-kopf { display: none; }

.nav-suche { position: relative; margin-right: 6px; }
.suche-knopf {
    background: none; border: 0; color: #666; padding: 8px; cursor: pointer; line-height: 0;
}
.suche-knopf:hover { color: var(--primaer); }
.nav-suche .suchformular {
    display: none; position: absolute; left: -10px; top: 100%; z-index: 30; width: 280px;
    background: #fff; padding: 12px; box-shadow: 0 2px 12px rgba(0, 0, 0, .15); border: 1px solid #ddd;
}
.nav-suche.offen .suchformular { display: flex; }

.hauptmenue { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.hauptmenue > li { position: relative; margin: 0; display: flex; align-items: center; }
.hauptmenue > li > a {
    display: block; padding: 10px; color: rgba(74, 74, 74, .85);
    font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
}
.hauptmenue > li > a:hover, .hauptmenue > li.aktiv > a { color: #111; text-decoration: none; }
.untermenue-knopf {
    background: none; border: 0; padding: 0 4px 0 0; margin-left: -8px; color: #999; cursor: pointer; line-height: 0;
}
.untermenue-knopf .symbol { width: 12px; height: 12px; }

.untermenue {
    position: absolute; top: 100%; left: 0; z-index: 40; min-width: 260px;
    list-style: none; margin: 0; padding: 10px 0;
    background: #fff; border: 2px solid #ddd; box-shadow: 1px 1px 15px rgba(0, 0, 0, .15);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .2s, transform .2s, visibility .2s;
}
.untermenue::before {
    content: ""; position: absolute; left: 20px; top: -9px;
    border: 8px solid transparent; border-bottom-color: #ddd; border-top: 0;
}
.hat-untermenue:hover > .untermenue,
.hat-untermenue:focus-within > .untermenue,
.hat-untermenue.offen > .untermenue { opacity: 1; visibility: visible; transform: none; }
.untermenue li { margin: 0; }
.untermenue a {
    display: block; padding: 9px 20px; color: #666; font-size: .9rem; line-height: 1.35;
    border-bottom: 1px solid var(--linie);
}
.untermenue li:last-child a { border-bottom: 0; }
.untermenue a:hover, .untermenue .aktiv a { color: var(--primaer); background: #f7f7f7; text-decoration: none; }

.nav-abdunkler { display: none; }

/* ---------------------------------------------------------------- Suchformular */

.suchformular { display: flex; width: 100%; }
.suchformular input {
    flex: 1; min-width: 0; height: 2.4em; padding: 0 .75em; font: inherit; font-size: .95rem;
    border: 1px solid #ddd; border-right: 0; border-radius: 0; color: #333;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); background: #fff;
}
.suchformular input:focus { border-color: var(--sekundaer); outline: 0; }
.suchformular button {
    flex: none; width: 2.6em; border: 0; background: var(--sekundaer); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.suchformular button:hover { background: var(--primaer); }
.suchformular.gross { max-width: 520px; margin: 0 0 1.5em; }

/* ---------------------------------------------------------------- Inhalt + Seitenleiste */

#inhalt { padding-top: 30px; padding-bottom: 50px; }
.raster.mit-seitenleiste {
    display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); grid-template-areas: "haupt leiste";
    gap: 0;
}
.raster.mit-seitenleiste .hauptspalte { grid-area: haupt; padding-right: 30px; border-right: 1px solid var(--linie); min-width: 0; }
.raster.mit-seitenleiste .seitenleiste { grid-area: leiste; padding-left: 30px; }
.raster.seitenleiste-links { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); grid-template-areas: "leiste haupt"; }
.raster.seitenleiste-links .hauptspalte { padding: 0 0 0 30px; border-right: 0; border-left: 1px solid var(--linie); }
.raster.seitenleiste-links .seitenleiste { padding: 0 30px 0 0; }
.raster.ohne-seitenleiste .hauptspalte { max-width: 860px; margin: 0 auto; }

.widget { margin-bottom: 2em; }
.widget-titel {
    font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; margin: 0; color: #777;
}
.linkliste { list-style: none; padding: 0; margin: 0; }
.linkliste li { margin: 0; padding: .45em 0; border-top: 1px solid var(--linie); line-height: 1.45; }
.linkliste li:first-child { border-top: 0; padding-top: 0; }
.seitenleiste .linkliste a[aria-current] { color: var(--text-dunkel); font-weight: 700; }

/* ---------------------------------------------------------------- Beitragslisten (Teaser) */

.listen-kopf { text-align: center; margin-bottom: 2em; }
.listen-kopf h1 { margin: .2em 0 0; }
.listen-text { max-width: 640px; margin: 0 auto; }

.teaser { margin-bottom: 30px; }
.teaser-link { display: flex; align-items: center; gap: 20px; color: inherit; }
.teaser-link:hover { text-decoration: none; color: inherit; }
.teaser-bild { flex: 0 0 40%; position: relative; padding-top: 22.4%; overflow: hidden; background: #f4f4f4; }
.teaser-bild img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s, filter .4s;
}
.teaser-link:hover .teaser-bild img { transform: scale(1.05); filter: brightness(1.05); }
.teaser-text { flex: 1; text-align: center; padding: 10px; }
.teaser-titel { font-size: 1.05rem; margin: 0; color: var(--ueberschrift); }
.teaser-link:hover .teaser-titel { color: var(--primaer); }
.teaser-auszug { font-size: .9rem; margin: 0; }

.blaettern { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5em; margin-top: 2em; }
.seitenzahlen { display: flex; gap: .3em; }
.seitenzahlen a, .seitenzahlen span {
    display: inline-block; min-width: 2.2em; padding: .25em .5em; text-align: center;
    border: 2px solid #ddd; border-radius: 99px; color: #777; font-weight: 700;
}
.seitenzahlen [aria-current] { background: var(--primaer); border-color: var(--primaer); color: #fff; }

.treffer-anzahl { font-weight: 700; }
.themen-uebersicht { columns: 2 220px; list-style: none; padding: 0; }

/* ---------------------------------------------------------------- Einzelbeitrag */

.beitrag-kopf { text-align: center; }
.beitrag-kategorie {
    margin: 0; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.beitrag-kategorie a { color: var(--primaer); }
.beitrag-kopf h1 { margin: .3em 0 0; font-size: 1.6em; }
.beitrag-meta { font-size: .8rem; color: #999; margin: -.3em 0 1.5em; }
.beitrag-bild { margin: 0 0 1.8em; text-align: center; }
.beitrag-bild img { display: block; margin: 0 auto; }

.beitrag-inhalt { overflow-wrap: break-word; }
.beitrag-inhalt > :first-child { margin-top: 0; }
.beitrag-inhalt h2 { font-size: 1.4em; }
.beitrag-inhalt a { text-decoration: underline; text-decoration-color: rgba(6, 127, 123, .3); text-underline-offset: 2px; }
.beitrag-inhalt a:hover { text-decoration-color: currentColor; }
.beitrag-inhalt h2 a, .beitrag-inhalt h3 a { text-decoration: none; }

.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.beitrag-inhalt h2, .beitrag-inhalt h3 { clear: none; }
.beitrag-inhalt::after { content: ""; display: table; clear: both; }

.wp-caption { max-width: 100%; }
.wp-caption.aligncenter { text-align: center; }
.wp-caption img { display: block; margin: 0 auto; }
figcaption { font-size: .85em; font-style: italic; color: #999; padding-top: .4em; text-align: center; }

.video { margin: 0 auto 1.5em; max-width: 480px; }
.video video { display: block; width: 100%; background: #000; }

.anzeige-hinweis { text-align: center; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #999; margin-bottom: .6em; }

.beitrag-fuss { clear: both; border-top: 1px solid var(--linie); margin-top: 2em; padding-top: 1.2em; text-align: center; }
.schlagwoerter { font-size: .85rem; }
.schlagwoerter span, .teilen span { font-weight: 700; margin-right: .3em; }
.schlagwoerter a {
    display: inline-block; margin: 0 .15em .4em; padding: .15em .7em; border: 1px solid #ddd; border-radius: 99px;
    color: #777; font-size: .8rem;
}
.schlagwoerter a:hover { border-color: var(--primaer); background: var(--primaer); color: #fff; text-decoration: none; }
.teilen { display: flex; justify-content: center; align-items: center; gap: .4em; font-size: .85rem; }
.teilen .rund { width: 32px; height: 32px; border: 2px solid #ccc; color: #999; }
.teilen .rund:hover { border-color: var(--primaer); background: var(--primaer); color: #fff; }

.beitrag-nachbarn {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1em; margin: 2em 0;
    border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); padding: 1em 0;
    font-size: .9rem; line-height: 1.4;
}
.beitrag-nachbarn span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #999; margin-bottom: .2em; }
.beitrag-nachbarn .nachher { text-align: right; }

.verwandte h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .05em; text-align: center; margin-top: 1em; }
.verwandte-raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.verwandt { display: block; color: var(--ueberschrift); font-weight: 700; font-size: .9rem; line-height: 1.35; text-align: center; }
.verwandt img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: .6em; }
.verwandt:hover { color: var(--primaer); text-decoration: none; }

/* ---------------------------------------------------------------- Fuß */

#fuss { color: rgba(255, 255, 255, .85); }
.fuss-widgets { background: var(--fuss); padding: 30px 0 10px; }
.fuss-raster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
#fuss .widget-titel { color: #fff; }
#fuss .trenner { background: rgba(255, 255, 255, .3); }
#fuss a { color: rgba(255, 255, 255, .9); }
#fuss a:hover { color: #fff; }
#fuss .linkliste li { border-top-color: rgba(255, 255, 255, .12); }
.themenwolke { line-height: 1.5; }
.themenwolke a { display: inline-block; margin: 0 .4em .2em 0; font-size: .72rem; }
.themenwolke a.stufe-1 { font-size: 1rem; }
.themenwolke a.stufe-2 { font-size: 1.35rem; }
.fuss-unten { background: var(--fuss-unten); padding: 1.2em 0; font-size: .85em; color: rgba(255, 255, 255, .6); }

.nach-oben {
    position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, .2); background: rgba(255, 255, 255, .9); color: #777;
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.nach-oben.sichtbar { opacity: 1; visibility: visible; }
.nach-oben:hover { border-color: var(--primaer); color: var(--primaer); }
.nach-oben .symbol { width: 20px; height: 20px; }

/* =====================================================================
   Tablet & Handy
   ===================================================================== */

@media (max-width: 1100px) {
    .container { padding: 0 30px; }
    .hauptmenue > li > a { padding: 10px 7px; }
}

@media (max-width: 849px) {
    body { background: #fff; }
    #seite { box-shadow: none; }
    .container { padding: 0 15px; }

    .topbar { display: none; }

    .kopf-innen { min-height: 70px; justify-content: center; position: relative; gap: 0; }
    .logo img { max-height: 64px; width: auto; }
    .menue-knopf {
        display: flex; position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
        background: none; border: 0; padding: 10px; color: #555; cursor: pointer;
    }
    .menue-knopf .symbol { width: 26px; height: 26px; }

    /* Navigation als Schublade */
    #navigation {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 200; width: 300px; max-width: 85vw;
        flex-direction: column; align-items: stretch; overflow-y: auto; overscroll-behavior: contain;
        background: #fff; box-shadow: 2px 0 15px rgba(0, 0, 0, .3);
        transform: translateX(-105%); transition: transform .3s ease; visibility: hidden;
    }
    .menue-offen #navigation { transform: none; visibility: visible; }
    .menue-offen { overflow: hidden; }
    .nav-abdunkler { display: block; position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, .55); }
    .nav-abdunkler[hidden] { display: none; }

    .nav-kopf {
        display: flex; justify-content: space-between; align-items: center;
        background: var(--primaer); color: #fff; padding: .6em 1em; font-weight: 700; text-transform: uppercase;
    }
    .nav-schliessen { background: none; border: 0; color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 .2em; }

    .nav-suche { margin: 0; padding: 15px; border-bottom: 1px solid var(--linie); }
    .suche-knopf { display: none; }
    .nav-suche .suchformular { display: flex; position: static; width: auto; padding: 0; box-shadow: none; border: 0; }

    .hauptmenue { flex-direction: column; flex-wrap: nowrap; }
    .hauptmenue > li { flex-wrap: wrap; border-bottom: 1px solid var(--linie); }
    .hauptmenue > li > a { flex: 1; padding: 14px 20px; font-size: .85rem; }
    .untermenue-knopf { margin: 0; padding: 14px 18px; border-left: 1px solid var(--linie); }
    .untermenue-knopf .symbol { width: 16px; height: 16px; transition: transform .2s; }
    .hat-untermenue.offen .untermenue-knopf .symbol { transform: rotate(180deg); }
    .untermenue, .hat-untermenue:hover > .untermenue, .hat-untermenue:focus-within > .untermenue {
        position: static; display: none; flex-basis: 100%; min-width: 0; opacity: 1; visibility: visible; transform: none;
        border: 0; box-shadow: none; padding: 0 0 8px; background: #fafafa;
    }
    .untermenue::before { display: none; }
    .hat-untermenue.offen > .untermenue { display: block; }
    .untermenue a { padding: 9px 20px 9px 32px; border: 0; font-size: .88rem; }


    /* einspaltig */
    .raster.mit-seitenleiste, .raster.seitenleiste-links { display: block; }
    .raster.mit-seitenleiste .hauptspalte, .raster.seitenleiste-links .hauptspalte { padding: 0; border: 0; }
    .raster.mit-seitenleiste .seitenleiste, .raster.seitenleiste-links .seitenleiste {
        padding: 30px 0 0; margin-top: 30px; border-top: 1px solid var(--linie);
    }
    .seitenleiste .widget:first-child { display: none; } /* Suche steckt im Menü */

    .fuss-raster { grid-template-columns: 1fr 1fr; }
    .verwandte-raster { gap: 12px; }
}

@media (max-width: 549px) {
    body { font-size: 15.5px; }
    #inhalt { padding-top: 20px; }
    h1, .beitrag-kopf h1 { font-size: 1.4em; }
    .beitrag-inhalt h2 { font-size: 1.25em; }

    .teaser-link { flex-direction: column; gap: 0; align-items: stretch; }
    .teaser-bild { flex: none; padding-top: 0; background: none; }
    .teaser-bild img { position: static; display: block; height: auto; margin: 0 auto; }
    .teaser-text { padding: 12px 5px 0; }

    .alignleft, .alignright { float: none; display: block; margin: 0 auto 1.2em; }

    .beitrag-nachbarn { grid-template-columns: 1fr; }
    .beitrag-nachbarn .nachher { text-align: left; }
    .verwandte-raster { grid-template-columns: 1fr 1fr; }
    .fuss-raster { grid-template-columns: 1fr; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
    .topbar, #navigation, .menue-knopf, .seitenleiste, #fuss .fuss-widgets, .teilen, .beitrag-nachbarn, .verwandte, .nach-oben { display: none !important; }
    body, #seite { background: #fff; box-shadow: none; }
    .raster.mit-seitenleiste { display: block; }
    .raster.mit-seitenleiste .hauptspalte { border: 0; padding: 0; }
}
