/* PT Sans - regular */
@font-face {
  font-family: 'PT Sans', sans-serif !important;
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/pt-sans-v12-latin-regular.eot'); /* IE9 Compat Modes */
  src: local(''),
       url('../fonts/pt-sans-v12-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('../fonts/pt-sans-v12-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
       url('../fonts/pt-sans-v12-latin-regular.woff') format('woff'), /* Modern Browsers */
       url('../fonts/pt-sans-v12-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
       url('../fonts/pt-sans-v12-latin-regular.svg#PTSans') format('svg'); /* Legacy iOS */
}

/* PT Sans - bold */
@font-face {
  font-family: 'PT Sans', sans-serif !important;
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/pt-sans-v12-latin-700.eot'); /* IE9 Compat Modes */
  src: local(''),
       url('../fonts/pt-sans-v12-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('../fonts/pt-sans-v12-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
       url('../fonts/pt-sans-v12-latin-700.woff') format('woff'), /* Modern Browsers */
       url('../fonts/pt-sans-v12-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
       url('../fonts/pt-sans-v12-latin-700.svg#PTSans') format('svg'); /* Legacy iOS */
}

/* CSS-Variablen für einheitliches Grid-System und Typography */
:root {
  --grid-gap: 48px;
  --grid-item-width: calc((100% - 2 * var(--grid-gap)) / 3);
  --highlight-color: #ffff00; /* Textmarker Gelb */
  --highlight-bg: rgba(255, 255, 0, 0.3); /* Transparenter Hintergrund */
  --primary-color: #032133; /* Haupt-Themenfarbe */
  --primary-color-light: #065165; /* Hellere Variante */
  --font-family: 'PT Sans', sans-serif; /* Haupt-Schriftart */
  --text-color: #032133; /* Haupt-Textfarbe */
  --text-gray: #737067; /* Grauer Text */
  --link-color: #032133; /* Link-Farbe */
  --link-hover-color: #032133; /* Link-Hover-Farbe */
  --active-element: #4CAEE9; /* Aktiv-Element (Menü) */
  --menu-hover-bg: #F8F6F3; /* Menu Hover Hintergrund */
  --menu-hover-border: #032133; /* Menu Hover Border */
  --submenu-bg: #ffffff; /* Submenu Hintergrund */
  --submenu-border: #032133; /* Submenu Border */
  --submenu-hover-bg: #F8F6F3; /* Submenu Hover Hintergrund */
  --post-image-aspect-ratio: 4 / 3; /* Post-Bild Seitenverhältnis (via Template-Config änderbar) */
  --course-cover-aspect-ratio: 3 / 4; /* Kurs-Cover Seitenverhältnis (via Template-Config änderbar) */

  /* Font-Size Variablen */
  --font-size-h1: 2.6em;
  --font-size-h2: 2.0em;
  --font-size-h3: 1.8em;
  --font-size-text: 1.6em;
  --font-size-small: 1.4em;
  --font-size-tiny: 1.2em;
  
  /* Responsive Font-Size Variablen */
  --font-size-h1-mobile: 1.8em;
  --font-size-h2-mobile: 1.6em;
  --font-size-h3-mobile: 1.4em;
  --font-size-text-mobile: 1.4em;
  
  --font-size-h1-small: 1.6em;
  --font-size-h2-small: 1.4em;
  --font-size-h3-small: 1.2em;
  --font-size-text-small: 1.2em;
  
  /* Button Farben (via Template-Config änderbar) */
  --button-bg-color: #888888;
  --button-text-color: #ffffff;
  --button-hover-bg-color: #032133;
  --button-hover-text-color: #ffffff;
  
  /* Logo & Header (via Template-Config änderbar) */
  --margin-logocontainer: 24px 0px 32px 0px;
  --padding-logo-right-column: 0px 0px 12px 0px;
  --margin-logo-left-area: 0px 0px 0px 0px;
  --max-width-logo-img: 410px;
  --padding-logo-img: 4px 0px 2px 0px;
  --width-footer-logo-img: 240px;
  --margin-logo-infoarea: 0px 0px 20px 0px;
  --font-size-logo-info-h2: 1.8em;
  --font-weight-logo-info-h2: bold;
  --padding-logo-search-input: 10px 15px;
  --font-size-logo-search-input: 1em;
  --font-size-logo-search-button: 1em;
  
  /* Content (via Template-Config änderbar) */
  --margin-top-content-inner: 36px;
  
  /* Menü & Navigation (via Template-Config änderbar) */
  --font-size-menucontainer: 1.6em;
  --margin-menucontainer: 24px 0px 42px 0px;
  --font-size-topcontainer: 1.2em;
  
  /* Dynamisch erweiterte Variablen */
  --border-dark: #065165;
  --border-light: #ddd;
  --flyout-border-color: #FF003E;
  --flyout-background-color: #ffffff;
  --flyout-flag-background-color: transparent;
}

/*
========================================================================================
    STYLES.CSS  // design: DATENGESTALTER Jan Rodorf (www.datengestalter.de)
========================================================================================
*/

@viewport {
   width: device-width;
}

/* Basiseinstellungen */
body {
    font-family: 'PT Sans', sans-serif;
    width: 100%;
    height: 101%;
    background-color: #fefffe;
    color: var(--text-color);
    font-size: 12px;
    letter-spacing: 0.6px;
    word-spacing: 0px;
    margin: 0;
    padding: 0;
}

/* Seitenanfang-Anker unsichtbar machen */
#Seitenanfang {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

div, p, a, li{
    -webkit-text-size-adjust: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

img.pictures{
    width: 100%;
    max-width: 100%;
    height: auto;
    padding-top: 6px;
}

.raspberry{
    color: #FF003E;
}

.ocean{
    color: #032133;
}

/*
=========================================================================
    ACCESSIBILITY ENHANCEMENTS
=========================================================================
*/

/* Skip Links */
.skip-links {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10000;
    width: 100%;
    height: 0; /* Kein Layout-Platz */
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--text-color);
    color: white !important;
    padding: 8px 16px;
    z-index: 10001;
    text-decoration: none !important;
    border: none !important;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.skip-link:focus {
    top: 6px;
    outline: 2px solid white;
    outline-offset: 2px;
}

.skip-link:hover {
    background: #0F4682;
    color: white !important;
    border: none !important;
}

/* Visually Hidden - für Screen Reader sichtbar, visuell versteckt */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus Styles - WCAG 2.4.7 */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(3, 33, 51, 0.2);
}

/* Modern browsers: nur bei Tastatur-Navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(3, 33, 51, 0.2);
}

/* Maus-Clicks: kein Focus-Ring in modernen Browsern */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* Enhanced Focus for Interactive Elements */
#menucontainer ul li a:focus {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(3, 33, 51, 0.2);
    background-color: #F8F6F3;
}

/* Flyout Button Focus */
#flyout-toggle:focus {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(3, 33, 51, 0.2);
}

.flyout-close:focus {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(3, 33, 51, 0.2);
    background-color: #F8F6F3;
}

/* Search Button Enhanced Focus */
#logocontainer .search-area button:focus {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px white, 0 0 0 5px var(--text-color);
}

/* Tag Cloud Focus */
a.tagcloud:focus {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(3, 33, 51, 0.2);
    background-color: rgba(88, 87, 92, 0.1);
}

/* Picture Links Focus */
.three-column .picture a:focus,
.tags-left .blog-pic a:focus,
.grid-item .picture a:focus {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(3, 33, 51, 0.2);
    border-radius: 4px;
}

/*
=========================================================================
    FLEXIBLE ADVERTISING GRID SYSTEM
=========================================================================
*/

/* Content Grid Container */
.content-grid {
    width: 100%;
    position: relative;
}

/* AdBlocker-safe margin bottom class */
.mb-12 {
    margin-bottom: 12px;
}

/* Partner Content Styling */
.partner-content {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.partner-content:hover {
    background-color: #e9ecef;
    border-color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(6, 80, 101, 0.1);
}

.partner-content h3 {
    font-size: 1.1em;
    color: var(--text-color);
    margin: 0 0 12px 0;
    font-weight: bold;
}

.partner-content .pic {
    margin-bottom: 12px;
}

.partner-content p {
    font-size: 0.9em;
    line-height: 1.4;
    margin: 0;
}

.partner-content a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--text-color);
}

.partner-content a:hover {
    color: var(--text-color);
    border-bottom: 1px solid var(--text-color);
}

/* Flexbox Container for flexible grid layout */
.content-grid-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 20px 0;
}

.grid-item {
    text-align: left;
    width: 31%;
    margin-bottom: 4%;
}

.grid-item .picture {
    margin-bottom: 12px;
    overflow: hidden;
}

.grid-item .picture a {
    border: none;
    text-decoration: none;
    display: block;
    padding: 0;
}

.grid-item p {
    font-size: 1.5em;
    line-height: 1.6;
    margin: 0;
}

.grid-item p a {
    color: var(--text-color);
    text-decoration: none;
    border: none;
}

.grid-item p a:hover {
    color: var(--text-color);
    border: none;
}

/* Partner content in grid gets special styling */
.grid-item.partner-content {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.grid-item.partner-content:hover {
    background-color: #e9ecef;
    border-color: #FF003E;
    box-shadow: 0 4px 12px rgba(255, 0, 62, 0.2);
}

/*
=========================================================================
    WEBSITE MASTER
=========================================================================
*/

.website{
    position: relative; 
    margin: 0 auto; 
    text-align: center; 
    background-color: #ffffff;
    width: 100%;
    min-width: 438px;
    color: #000;
    height: 101%;
}

/* Topcontainer */
#topcontainer {
    background-color: #f0f0f0;
    color: #032133333;
    font-size: 1em;
    padding: 0px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    font-size: var(--font-size-topcontainer, 1.1em);
    line-height: 1.6;
}

#topcontainer .left {
    text-align: left;
}

#topcontainer .right ul {
    list-style-type: none;
    padding: 0;
    display: flex;
}

#topcontainer .right ul li {
    margin-left: 20px;
    font-size: inherit;
}

/* Flyout / Fähnchen (Checkbox-basiert) */
.flyout-toggle {
    display: none;
}

.flyout-toggle:checked ~ #flag {
    opacity: 0;
    pointer-events: none;
}

#flag {
    position: fixed;
    margin-top: 36px;
    right: 0px;
    width: 42px;
    height: 116px;
    background-color: var(--flyout-flag-background-color);
    z-index: 1000;
    cursor: pointer;
}

#flag img {
    width: 100%;
    height: auto;
    display: block;
}

.flyout-toggle:checked ~ #flyout-content {
    right: 0;
}

#flyout-content {
    position: fixed;
    margin-top: 36px;
    top: 36px;
    padding: 48px 24px 24px 24px;
    right: -360px;
    min-width: 240px;
    max-width: 280px;
    height: auto;
    background-color: var(--flyout-background-color);
    border: 4px solid var(--flyout-border-color);
    z-index: 999;
    transition: right 0.3s ease;
    text-align: center;
}

#flyout-content a.noborder {
    border: none;
    padding: 0px;
}

#flyout-content img {
    max-width: 100%;
    height: auto;
}

.flyout-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-weight: bold;
}

/* Flyout Responsive */
@media (max-width: 768px) {
    #flag {
        right: 0;
        width: 32px;
        height: 90px;
        margin-top: 20px;
    }

    #flyout-content {
        right: -340px;
        min-width: 220px;
        max-width: 260px;
        margin-top: 20px;
        top: 20px;
        padding: 36px 18px;
    }
}

/* Contentcontainer */
#contentcontainer {
    padding: 0 5%;
    position: relative;
}

/* Pagecontainer */
#pagecontainer {
    background-color: #ffffff;
    min-width: 438px;
    max-width: 1080px;
    margin: 0 auto;
    font-size: 1.2em;
    position: relative;
}

/* ========================================
   Logocontainer - 4 Layout-Varianten
   1. Logo LEFT + Suche RIGHT (Standard)
   2. Logo RIGHT + Suche LEFT
   3. Logo CENTER + Suche ABOVE
   4. Logo CENTER + Suche BELOW
   ======================================== */

/* === BASIS (alle Varianten) === */
#logocontainer {
    display: flex;
    margin: var(--margin-logocontainer, 36px 0px 30px 0px);
    font-size: 1em;
}

#logocontainer p {
    font-size: 1em;
}

/* Logo-Bereich (gemeinsam) */
#logocontainer .logo-area {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}

#logocontainer .logo-area img {
    max-width: var(--max-width-logo-img, 410px);
    width: auto;
    height: auto;
}

#logocontainer .logo-area a,
#logocontainer .logo-area img {
    border: none;
    padding: var(--padding-logo-img, 4px 0px 2px 0px);
}

/* Info-Area (gemeinsam) */
#logocontainer .info-area {
    margin: var(--margin-logo-infoarea, 0px 0px 20px 0px);
}

#logocontainer .info-area p {
    margin: 0;
}

#logocontainer .info-area h2 {
    margin: 0;
    font-size: var(--font-size-logo-info-h2, 1.8em);
    font-weight: var(--font-weight-logo-info-h2, bold);
}

/* Search-Area (gemeinsam) */
#logocontainer .search-area {
    width: 100%;
    max-width: 400px;
}

#logocontainer .search-area form {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #888;
}

#logocontainer .search-area input[type="text"] {
    flex-grow: 1;
    padding: var(--padding-logo-search-input, 10px 15px);
    border: none;
    font-size: var(--font-size-logo-search-input, 1em);
    background-color: transparent;
    min-height: 44px; /* WCAG AA Touch target */
}

#logocontainer .search-area input[type="text"]:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--text-color);
}

#logocontainer .search-area button {
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    padding: 10px 20px;
    font-size: var(--font-size-logo-search-button, 1em);
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid var(--button-bg-color);
    min-height: 44px; /* WCAG AA Touch target */
    min-width: 44px;
}

#logocontainer .search-area button:hover {
    background-color: var(--button-hover-bg-color);
    color: var(--button-hover-text-color);
    border: 1px solid var(--button-hover-bg-color);
}

/* === VARIANTE 1: Logo LEFT + Suche RIGHT (Standard) === */
#logocontainer.logo-left.search-right {
    justify-content: space-between;
    align-items: stretch;
}

#logocontainer.logo-left.search-right .logo-area {
    margin: var(--margin-logo-left-area, 0px 20px 0px 0px);
    width: 50%;
    justify-content: flex-end;
    text-align: left;
}

#logocontainer.logo-left.search-right .right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: var(--padding-logo-right-column, 0px 0px 8px 0px);
    justify-content: flex-end;
}

#logocontainer.logo-left.search-right .info-area {
    text-align: right;
}

/* === VARIANTE 2: Logo RIGHT + Suche LEFT === */
#logocontainer.logo-right.search-left {
    justify-content: space-between;
    align-items: stretch;
}

#logocontainer.logo-right.search-left .left-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 8px;
    justify-content: flex-end;
    margin: 0px 20px 0px 0px;
}

#logocontainer.logo-right.search-left .info-area {
    text-align: left;
}

#logocontainer.logo-right.search-left .logo-area {
    width: 50%;
    justify-content: flex-end;
    text-align: right;
    margin: 0;
}

/* === VARIANTE 3 + 4: Logo CENTER + Suche ABOVE/BELOW === */
#logocontainer.logo-center {
    flex-direction: column;
    align-items: center;
}

#logocontainer.logo-center .logo-area {
    width: auto;
    justify-content: center;
    text-align: center;
}

#logocontainer.logo-center .info-area {
    text-align: center;
}

/* ABOVE: Info-Area UNTER Logo → margin-top */
#logocontainer.logo-center.search-above_logo .info-area {
    margin-top: 20px;
    margin-bottom: 0;
}

/* BELOW: Info-Area ÜBER Logo → margin-bottom */
#logocontainer.logo-center.search-below_logo .info-area {
    margin-bottom: 20px;
    margin-top: 0;
}

#logocontainer.logo-center .search-area {
    margin: 20px 0;
    max-width: 480px;
}

/* Footerlogo */
.footer-logo, .footer-inner{
    color: var(--text-color);
    text-align: center;
    padding: 8px 0px 18px 0px;
}

.footer-logo a{
    text-decoration: none;
    border: none;
}

.footer-logo a:hover{
    text-decoration: none;
    border: none;
}

.footer-logo img{
    width: var(--width-footer-logo-img, 240px);
}

/* Menucontainer with enhanced accessibility */
#menucontainer {
    margin: var(--margin-menucontainer, 24px 0px 42px 0px);
    border-top: 1px dotted var(--text-color);
    border-bottom: 1px dotted var(--text-color);
}

/* Trennlinie für leeres Menu (z.B. Onepager ohne Navigation) */
.trennlinie {
    margin: 24px 0px 42px 0px;
    border-top: 1px dotted var(--text-color);
}

#menucontainer ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 8px 0px 9px 0px;
}

#menucontainer ul li {
    margin: 8px 6px 4px 6px;
    position: relative;
    font-size: inherit; /* Unterbindet Übernahme von globaler li-Regel */
}

#menucontainer ul li a {
    font-size: var(--font-size-menucontainer, 1.6em) !important;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px dotted #fff;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: block;
    padding: 4px 8px; /* Better touch targets */
    border-radius: 4px;
}

#menucontainer ul li a:hover {
    border-bottom: 1px solid var(--menu-hover-border);
    background-color: var(--menu-hover-bg);
}

#menucontainer ul li a.aktiv {
    font-weight: bold;
    color: var(--active-element);
}

/* Submenu / Dropdown Navigation */

#menucontainer ul li .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--submenu-bg);
    border: 1px solid var(--submenu-border);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(3, 33, 51, 0.15);
    margin: 0;
    padding: 8px 0;
    z-index: 1000;
    flex-direction: column;
    flex-wrap: nowrap;
}

#menucontainer ul li:hover > .submenu,
#menucontainer ul li:focus-within > .submenu {
    display: flex;
}

#menucontainer ul li .submenu li {
    margin: 0;
    width: 100%;
    font-size: inherit; /* Unterbindet Übernahme von globaler li-Regel */
}

#menucontainer ul li .submenu li a {
    padding: 8px 16px;
    font-size: 1.5em;
    white-space: nowrap;
    border-radius: 0;
    border-bottom: none;
}

#menucontainer ul li .submenu li a:hover {
    background-color: var(--submenu-hover-bg);
    border-bottom: none;
}

/* Submenu 2. Ebene (falls vorhanden) */
#menucontainer ul li .submenu li.has-submenu > .submenu {
    left: 100%;
    top: 0;
}

/* Maincontainer */
#maincontainer section {
    margin-bottom: 20px;
}

.content{
    position: relative;
    margin: 0 auto; 
    text-align: left;
    color: #615B4C; 
    max-width: 1080px;
}

.content-inner{
    position: relative;
    margin: var(--margin-top-content-inner, 36px) 5% 12px 5%;
}

.content-left{
    position: relative;
    float:left;
    text-align: left;
    width: 30%;
    margin: 12px 0px 4px 0px;
}

.content-right{
    position: relative;
    float:left;
    text-align: left;
    width: 60%;
    margin: 12px 0px 4px 10%;
}

.blog{
    position: relative;
    margin: 0 auto; 
    text-align: left;
    color: #615B4C; 
    max-width: 760px;
}

.two-column, .three-column, .four-column {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 28px;
}

.two-column > div {
    width: 48%;
}

.three-column {
    gap: var(--grid-gap);
    flex-wrap: wrap; 
}

.three-column > div {
    width: var(--grid-item-width);
    flex: 0 1 var(--grid-item-width);
    margin-bottom: 36px;
}

.four-column,
.four-column-bordered {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.four-column > div,
.four-column-bordered > div {
    width: 23%;
    margin-bottom: 20px;
}

.four-column-bordered > div {
    border: 1px solid #ccc;
    padding: 10px;
    box-sizing: border-box;
}

.four-column-bordered img {
    max-width: 100%;
    height: auto;
}

.one-third-two-thirds,
.two-thirds-one-third,
.one-third-two-thirds-flex,
.two-thirds-one-third-flex {
    display: flex;
    justify-content: space-between;
    gap: var(--grid-gap);
}

.one-third-two-thirds .one-third,
.two-thirds-one-third .one-third,
.one-third-two-thirds-flex .one-third-flex,
.two-thirds-one-third-flex .one-third-flex {
    width: var(--grid-item-width);
    flex-shrink: 0;
}

.one-third-two-thirds .two-thirds,
.two-thirds-one-third .two-thirds,
.one-third-two-thirds-flex .two-thirds-flex,
.two-thirds-one-third-flex .two-thirds-flex  {
    width: calc(100% - var(--grid-item-width) - var(--grid-gap));
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Bilder */
.responsive-image.add-margin{
    margin: 12px 0px;
}

.three-column .picture{
    margin-bottom: 12px;
    overflow: hidden;
    aspect-ratio: var(--post-image-aspect-ratio, 4 / 3);
}

.three-column .picture a{
    border: none;
    text-decoration: none;
    display: block; /* Better for focus styles */
    padding: 0 !important;
}

.three-column .picture a:hover{
    border: none !important;
    border-bottom: none !important;
    text-decoration: none !important;
}

/* One-third-two-thirds Picture Links - Same rules as three-column */
.one-third-two-thirds .picture a,
.two-thirds-one-third .picture a {
    border: none;
    text-decoration: none;
    display: block;
    padding: 0 !important;
}

.one-third-two-thirds .picture a:hover,
.two-thirds-one-third .picture a:hover {
    border: none !important;
    border-bottom: none !important;
    text-decoration: none !important;
}

/* download-preview-image — width:100% sichert volle 1/3-Breite; display:block entfernt Inline-Descender-Lücke */
.download-preview-image {
    width: 100%;
}
.download-preview-image img {
    display: block;
}

.one-fourth-three-fourths {
    display: flex;
    justify-content: space-between;
    gap: var(--grid-gap);
}

.one-fourth-three-fourths .one-fourth {
    width: calc((100% - var(--grid-gap)) * 0.25);
    flex-shrink: 0;
}

.one-fourth-three-fourths .three-fourths {
    width: calc((100% - var(--grid-gap)) * 0.75);
    flex-shrink: 0;
    box-sizing: border-box;
}

.one-fourth-three-fourths .picture a {
    border: none;
    text-decoration: none;
    display: block;
    padding: 0 !important;
}

.one-fourth-three-fourths .picture a:hover {
    border: none !important;
    border-bottom: none !important;
    text-decoration: none !important;
}

#breadcrump{
    color: var(--text-color);
}

#breadcrump a{
    color: var(--text-color);
    border: none;
    text-decoration: none;
    margin: 24px 0px;
}

#content-info{
    color: var(--text-color);
    text-align: right;
    margin-right: 0px;
}

#content-info a{
    color: var(--text-color);
    text-decoration: none;
    border: none;
}

/* Infocontainer */
#infocontainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.info-button {
    display: inline-block;
    padding: 5px 10px;
    margin: 5px;
    background-color: #f0f0f0;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-height: 44px; /* Touch target */
    min-width: 44px;
}

.info-button:hover {
    border-color: var(--text-color);
}

/* Copyrightcontainer */
#copyrightcontainer {
    text-align: center;
    margin-top: 20px;
}

#copyrightcontainer img {
    max-width: 40px;
    height: auto;
}

/* Back to top */
#back-to-top {
    text-align: center;
    margin-top: 20px;
}

.pic{
    position: relative;
}

/* Bildrechte Copyright*/
.copyright {
    position: absolute;
    bottom: 10px;
    left: 5px;
    background-color: white;
    color: rgba(0, 0, 0, 0.5);
    padding: 2px 4px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
}

.copyright:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.tooltip {
    position: absolute;
    bottom: 30px;
    left: 5px;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 220px;
}

/* Allgemeine Stile */
a {
    color: var(--link-color);
    border-bottom: 1px dotted var(--link-color);
    padding: 8px 0px 2px 0px; /* Touch targets through padding */
    text-decoration: none;
    line-height: 1.4;
}

a:hover{
    color: var(--link-hover-color);
    border-bottom: 1px solid var(--link-hover-color);
}

p.p_10{
    color: var(--text-gray);
    font-size: 1.2em;
    line-height: 1.6em;
    margin: 0px 0px 18px 0px;
    padding: 0px;
}

p.p_10 a{
    color: #737067;
    text-decoration: none;
    border-bottom: 1px dotted #737067;
    padding: 0px 0px 2px 0px;
}

h1, h2, h3 {
    color: var(--text-color);
}

h1 {
    font-size: var(--font-size-h1);
    color: var(--text-color);
    line-height: 1.6em;
    margin: 8px 0px 12px 0px;
    font-weight: bold;
}

h2 {
    font-size: var(--font-size-h2);
    color: var(--text-color);
    line-height: 1.6em;
    margin: 0px 0px 10px 0px;
    /*margin: 8px 0px 12px 0px;*/
    font-weight: bold;
}

h2.likeh1 {
    font-size: var(--font-size-h3);
    color: var(--text-color);
    line-height: 1.6em;
    margin: 8px 0px 12px 0px;
    font-weight: bold;
}

h2.gray{
    font-size: var(--font-size-text);
    font-weight: 500;
    color: #737067;
    padding: 0px;
    margin: 0px;
}

h3 {
    font-size: var(--font-size-h3);
    color: var(--text-color);
    line-height: 1.6em;
    margin: 0px 0px 16px 0px;
    font-weight: bold;
    font-family: 'PT Sans', serif;
    text-align: left;
}

p {
    color: var(--text-color);
    font-size: var(--font-size-text);
    line-height: 1.6em;
    margin: 0px 0px 13px 0px;
    padding: 0px;
}

ol, ul {
    /*font-size: var(--font-size-text);*/
    line-height: 1.6em;
}

li {
    font-size: var(--font-size-text);
    line-height: 1.6em;
}

span.label{
    display:inline-block;
    background-color: #FBF368;
    padding: 0px 6px;
}

div.label{
    display:inline-block;
    background-color: #FBF368;
    padding: 0px 3px;
}

.topliner{
    border-top: 1px dotted var(--text-color);
}

.tags-box{
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -ms-flex-align: top;
    -webkit-align-items: top;
    -webkit-box-align: top;
    align-items: top;
    padding: 18px 0px;
}

.tags-left{
    float: left;
    width: 30%;
}

.tags-right{
    float: left;
    width: 64%;
    padding-left: 6%;
}

.blog-pic{
    position: relative;
    text-align: left;
    margin: 6px 0px 6px 0px;
}

.blog-pic a{
    border: none;
    display: block;
    border-radius: 4px;
}

.blog-pic img{
    width: 100%;
    border: none;
}

.datenschutz{
    color: var(--text-color);
    font-size: 1.1em;
}

.datenschutz p{
    color: var(--text-color);
    font-size: 1.2em;
}

.datenschutz p.small{
    color: var(--text-color);
    font-size: 0.9em;
    font-style: italic;
}

.datenschutz a{
    color: var(--text-color);
    border-bottom: 1px dotted var(--text-color);
    text-decoration: none;
}

.datenschutz li{
    color: var(--text-color);
    font-size: 1.2em;
}

.datenschutz h1{
    font-size: 2.4em;
    color: var(--text-color);
    line-height: 2em;
    margin: 8px 0px 12px 0px;
    font-weight: normal;
    font-family: 'PT Sans', serif;
}

.datenschutz h2{
    font-size: 1.6em;
    color: var(--text-color);
    line-height: 2em;
    margin: 8px 0px 12px 0px;
    font-weight: normal;
    font-family: 'PT Sans', serif;
}

.datenschutz h3{
    font-size: 1.5em;
    color: var(--text-color);
    line-height: 1.8em;
    margin: 8px 0px 12px 0px;
    font-weight: normal;
    font-family: 'PT Sans', serif;
}

.tiny{
    font-size: 0.8em;
    padding-bottom: 5px;
}

.small{
    font-size: 1.3em;
    padding-bottom: 3px;
}

ul.small {
    line-height: 1.4;
}

ul.small li {
    margin-bottom: 8px;
    line-height: 1.8;
    list-style-position: outside;
}

ul.small li a {
    padding: 2px 0;
    display: inline;
    min-height: 32px;
    line-height: 32px;
    vertical-align: middle;
}

.large{
    font-size: 2em;
}

.lh-1{
    line-height: 1em;
}

.b-top{
    border-top: 1px dotted var(--text-color); /*#737067;*/
    padding-top: 8px;
}

/* Subcategory Cards - Equal Height Layout */
.card.subcategory-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card.subcategory-card .p-top-xl {
    margin-top: auto;
}

.m-top{
    margin-top: 12px;
}

.p-top{
    padding-top: 24px;
}

.m-top-l{
    margin-top: 24px !important;
}

.m-top-xl{
    margin-top: 36px !important;
}

.p-top-xl{
    padding-top: 36px;
}

.p-left-xl{
    padding-left: 36px;
}

.t-right{
    text-align: right;
}

.t-left{
    text-align: left;
}

.t-center{
    text-align: center;
}

.bolder{
    font-weight: bolder;
}

.no-over{
    overflow: hidden;
}

.no-border{
    border: none;
    padding: 0px;
}

.no-border:hover{
    border: none;
    padding: 0px;
}

.max-270{
    max-height: 270px;
    overflow: hidden;
}

.max-240{
    max-height: 240px;
    overflow: hidden;
}


/* AdBlocker-safe utility classes */
.mb-8 {
    margin-bottom: 8px;
}


.info-0{
    padding: 0px;
    width: 100%;
    font-size: var(--font-size-text);
}

.info-color{
    background-color: #F2F0ED;
    font-size: var(--font-size-text);
}

.info-border{
    background-color: #F8F6F3;
    padding: 16px;
    border-left: 6px solid #615B4C;
}

.info-border h2 {
    font-weight: bold;
    font-size: var(--font-size-h2);
    line-height: 1.6em;
    margin: 8px 0px 12px 0px;
    color: var(--text-color);
}

.info-border h3 {
    font-weight: bold;
    font-size: var(--font-size-h3);
    line-height: 1.6em;
    margin: 8px 0px 12px 0px;
    color: var(--text-color);
}

.info-border p,
.info-border ul,
.info-border li {
    color: var(--text-color);
    font-size: var(--font-size-text);
}

.three-column p {
    margin: 16px 0px 0px 0px;
}

.three-column p a{
    border:none;
}

/* ====================================================================================
   UNIFIED FLEXIBLE GRID SYSTEM FOR CMS
   ====================================================================================*/

/* Unified Flexible Grid System */
.flexible-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 20px 0;
}

/* Grid item base styling */
.flexible-grid .grid-item {
    text-align: left;
}

.flexible-grid .grid-item p {
    margin: 16px 0px 0px 0px;
}

/* Dynamic grid sizes based on data attribute */
.flexible-grid[data-grid-size="3"] .grid-item {
    width: 31%;
}

.flexible-grid[data-grid-size="6"] .grid-item {
    width: 31%;
}

.flexible-grid[data-grid-size="9"] .grid-item {
    width: 31%;
}

.flexible-grid[data-grid-size="12"] .grid-item {
    width: 23%;
    margin-bottom: 3%;
}

.flexible-grid[data-grid-size="15"] .grid-item {
    width: 18%;
    margin-bottom: 2.5%;
}

.flexible-grid[data-grid-size="18"] .grid-item {
    width: 15%;
    margin-bottom: 2%;
}

/* Picture styling for all grid items */
.flexible-grid .grid-item .picture {
    overflow: hidden;
    margin-bottom: 8px;
    aspect-ratio: var(--post-image-aspect-ratio, 4 / 3);
}

.flexible-grid .grid-item .picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flexible-grid .grid-item .picture a {
    padding: 0;
}

/* Advertising position styling */
.flexible-grid .grid-item[data-ad-position] .t-right,
.flexible-grid .grid-item[data-ad-position] .t-left {
    font-size: 1.3em;
    padding-bottom: 3px;
}

/* Barrierefreiheit */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Suchformular Button */
.search-submit-btn {
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--button-bg-color);
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-submit-btn:hover {
    background-color: var(--button-hover-bg-color);
    color: var(--button-hover-text-color);
    border: 1px solid var(--button-hover-bg-color);
}

a.tagcloud{
    color: var(--text-color);
    border-bottom: 1px dotted var(--text-color);
    display: inline-block;
    font-size: 0.9em;
    margin: 0px 12px 6px 0px;
    min-height: 32px;
    line-height: 32px;
    vertical-align: middle;
}

a.tagcloud:hover{
    border-bottom: 1px solid var(--text-color);
    color: var(--text-color);
}

/*
=========================================================================
    CONTENT BLOCKS AUS MASTERVORLAGE.CSS - SAUBERE ERWEITERUNG
=========================================================================
*/

/* Half-Half Layout */
.half-half {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
}

.half-half > div.half {
    width: 48%;
}

/* Four-quarters Layout */
.four-quarters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.four-quarters .quarter {
    background: transparent;
}

/* Three-thirds Layout */
.three-thirds {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
    margin-bottom: 30px;
}

.three-thirds .third {
    background: transparent;
}

/* Wortumbruch in Layout-Spalten */
.one-third-two-thirds .one-third,
.two-thirds-one-third .one-third,
.one-third-two-thirds .two-thirds,
.two-thirds-one-third .two-thirds,
.half-half > div.half,
.four-quarters .quarter,
.three-thirds .third {
    overflow-wrap: break-word;
}

/* Quarter/Third Content Styling */
.quarter-text-content div,
.third-text-content div{
    line-height: 1.6;
    font-size: var(--font-size-text);
}
/*,
.content-block-fullwidth div*/

.quarter-text-content h1,
.quarter-text-content h2,
.quarter-text-content h3,
.third-text-content h1,
.third-text-content h2,
.third-text-content h3 {
    margin: 0 0 10px 0;
}

.quarter-text-content,
.third-text-content{
    color: var(--text-color);
    /*font-size: var(--font-size-text);*/
}

.quarter-text-content a,
.third-text-content a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--text-color);
}

.quarter-text-content a:hover,
.third-text-content a:hover {
    border-bottom: 1px solid var(--text-color);
}

/* Gallery-Grid Layout */
h2.grid-heading {
    padding-bottom: 4px !important;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--grid-gap);
    margin-bottom: 36px;
    margin-top: 24px;
}

.gallery-extension-text {
    margin-top: -24px;
    margin-bottom: 36px;
    text-align: right;
}

.gallery-extension-text p {
    /*font-size: var(--font-size-h2, 1.5em);*/
    line-height: 1.3;
    margin: 0;
}

.gallery-grid[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-grid[data-count="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-grid[data-count="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-grid[data-count="6"] {
    grid-template-columns: repeat(3, 1fr);
}

.lm-cols-grid[data-count="6"] {
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.lm-cols-grid[data-count="6"] .gallery-item-title {
    font-size: 1.4em;
}

.gallery-grid-item {
    background: transparent;
    border: none;
    margin-bottom: 20px;
    position: relative;
    min-width: 0;
}

.gallery-item-title {
    background: transparent;
    color: var(--primary-color);
    padding: 0;
    margin: 12px 0 12px 0;
    font-size: var(--font-size-text);
    font-weight: normal;
    line-height: 1.8em;
    width: 100%;
    text-align: left;
    overflow-wrap: break-word;
}

.gallery-grid-item .gallery-item-title a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--primary-color);
}

.gallery-grid-item .gallery-item-title a:hover {
    border-bottom: 1px solid var(--primary-color);
}

/* Bild-Links ohne Border (Kurse & Bibliothek) */
.folder-link,
.course-link {
    border-bottom: none !important;
    padding: 0;
}

/* Kurs-Cover: Konfigurierbares Seitenverhältnis */
.course-cover-image {
    aspect-ratio: var(--course-cover-aspect-ratio, 3 / 4);
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 8px;
}

.course-cover-image img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

/* Library/Bibliothek Cover: 8px Abstand */
.gallery-folder-image {
    margin-bottom: 8px;
}

.post-excerpt {
    color: var(--secondary-color);
    font-size: 1.4em;
    line-height: 1.6;
    margin: 12px 0 10px 0;
    padding: 0;
}

.gallery-content-label {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dotted var(--text-gray);
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-gray);    
}

/* Gallery-Grid Bild-Links ohne Padding und Hover-Underline */
.gallery-grid-item .picture a,
.gallery-grid .picture a {
    border: none;
    text-decoration: none;
    display: block;
    padding: 0 !important;
}

.gallery-grid-item .picture a:hover,
.gallery-grid .picture a:hover {
    border: none !important;
    border-bottom: none !important;
    text-decoration: none !important;
}

/* Gallery-Post spezifische Regeln */
.gallery-grid-item.gallery-post {
    background: transparent;
    border: none;
    margin-bottom: 20px;
}

.gallery-grid-item.gallery-post .picture a {
    border: none;
    text-decoration: none;
    display: block;
    padding: 0 !important;
}

.gallery-grid-item.gallery-post .picture a:hover {
    border: none !important;
    border-bottom: none !important;
    text-decoration: none !important;
}

/* Gallery-Link spezifische Regeln */
.gallery-grid-item.gallery-link {
    background: transparent;
    border: none;
    margin-bottom: 20px;
}

.gallery-grid-item.gallery-link .picture a,
.gallery-grid-item.gallery-link a {
    border: none;
    text-decoration: none;
    display: block;
    padding: 0 !important;
}

.gallery-grid-item.gallery-link .picture a:hover,
.gallery-grid-item.gallery-link a:hover {
    border: none !important;
    border-bottom: none !important;
    text-decoration: none !important;
}

/* Flexible Spalten Grid */
.fs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 42px;
    margin-top: 24px;
}

.fs-grid-item {
    flex: 0 1 var(--fs-max-width, 225px);
    min-width: var(--fs-min-width, 150px);
}

.fs-grid-item img {
    max-width: 100%;
    height: auto;
    display: block;
}

.fs-item-title {
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.fs-item-text {
    margin-top: 8px;
}

.fs-item-text p {
    margin: 0 0 6px 0;
}

.fs-item-text h2,
.fs-item-text h3 {
    margin: 8px 0 4px 0;
}

.gallery-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #737067;
    background: #F2F0ED;
    border-radius: 4px;
}

/* Gallery-Grid Platzhalter für fehlende Items */
.gallery-grid-item.placeholder {
    background: #F2F0ED;
    min-height: 280px;
    display: block;
}

.gallery-grid-item.placeholder .post-image-link {
    display: block;
    height: 200px;
    background: #F2F0ED;
    border-radius: 4px;
}

.gallery-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 4px;
}

/* Lernmaterialien Typ-Badge */
.lm-type-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    background: var(--primary-color);
    color: var(--primary-color-text, #fff);
    padding: 3px 10px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.gallery-grid-item:hover .lm-type-badge {
    opacity: 1;
}

/* Extern-Link Styling */
.extern-link {
    text-decoration: none;
    border: none;
    display: block;
    position: relative;
    padding: 0 !important;
}

.extern-link img {
    border: none;
    outline: none;
    text-decoration: none;
}

.extern-link:hover {
    text-decoration: none;
    border: none;
    padding: 0 !important;
}

.extern-link:focus {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(3, 33, 51, 0.2);
    text-decoration: none;
    padding: 0 !important;
}

/* Post Image Link */
.post-image-link {
    display: block;
    text-decoration: none;
    border: none;
    width: 100%;
    padding: 0 !important;
    aspect-ratio: var(--post-image-aspect-ratio, 4 / 3);
}

.post-image-link:hover {
    border: none !important;
    border-bottom: none !important;
    text-decoration: none !important;
    padding: 0 !important;
}

.post-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
    text-decoration: none;
}

/* Download Link (für Library-Grid Dokumente) */
.download-link {
    display: block;
    text-decoration: none;
    border: none;
    width: 100%;
    padding: 0 !important;
}

.download-link:hover {
    border: none !important;
    border-bottom: none !important;
    text-decoration: none !important;
    padding: 0 !important;
}

.download-link img {
    width: 100%;
    height: auto;
    display: block;
    border: none;
    text-decoration: none;
}

/* Gallery Content Label Varianten */
.gallery-content-label {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dotted #737067;
    font-size: 11px;
    font-weight: bold;
    color: #737067;
    font-size: 1.2em;
}

.gallery-content-label-left {
    text-align: left;
}

.gallery-content-label-center {
    text-align: center;
}

.gallery-content-label-right {
    text-align: right;
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    a:focus, 
    button:focus, 
    input:focus, 
    textarea:focus,
    select:focus {
        box-shadow: 0 0 0 3px #000000;
        outline: 2px solid #ffffff;
    }
    
    .skip-link:focus {
        outline: 3px solid #ffffff;
        box-shadow: 0 0 0 6px #000000;
    }
    
    a {
        border-bottom: 2px solid var(--text-color);
    }
    
    a:hover {
        border-bottom: 2px solid var(--text-color);
        background-color: #F8F6F3;
    }
    
    .partner-content {
        border-width: 2px;
    }
    
    .grid-item.partner-content {
        border-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    #flyout-content {
        transition: none;
    }
    
    .partner-content,
    .grid-item {
        transition: none;
    }
}

/* Responsive Design */
@media (min-width: 1140px) {
}

@media (max-width: 1140px) {
    #topcontainer {
        flex-direction: column;
        align-items: center;
        padding: 10px 20px;
    }

    #topcontainer .left {
        text-align: center;
    }

    #topcontainer .left p {
        line-height: normal;
        margin: 6px 0px;
    }

    #topcontainer .right ul {
        justify-content: center;
        margin: 6px 0px;
    }

    #topcontainer .right ul li {
        margin: 0 10px;
    }

    #menucontainer ul li a {
        font-size: 1.3em;
        margin: 4px 4px;
    }
}

@media (max-width: 960px) {
    /* === RESPONSIVE: Alle Varianten werden zu Mobile-Layout === */
    /* Reihenfolge: Info-Area → Logo → Suche */

    #logocontainer {
        flex-direction: column !important;
        align-items: center !important;
        margin: 12px 0px;
    }

    /* Info-Area immer oben */
    #logocontainer .info-area {
        order: -2;
        width: 100%;
        text-align: center;
        margin: 20px 0 20px 0;
        max-width: 600px;
    }

    /* Logo in der Mitte */
    #logocontainer .logo-area {
        order: -1;
        margin: 0 40px !important;
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }

    #logocontainer .logo-area img {
        max-width: 410px;
        width: 100%;
        height: auto;
    }

    /* Suche immer unten */
    #logocontainer .search-area {
        order: 1;
        width: 100%;
        max-width: 480px;
        margin: 8px 0 6px 0;
    }

    /* Container (left-column/right-column) anpassen */
    #logocontainer .right-column,
    #logocontainer .left-column {
        width: 100%;
        align-items: center !important;
        padding-bottom: 0px;
    }

    #menucontainer ul li a {
        font-size: 1.2em;
        margin: 8px 4px;
    }

    #flyout-toggle {
        position: fixed;
        padding-top: 36px;
        right: 0px;
        width: 42px;
        height: 116px;
        z-index: 1000;
        cursor: pointer;
    }

    .max-270{
        max-height: 100%;
        overflow: visible;
    }

    .max-240{
        max-height: 100%;
        overflow: visible;
    }

    h1 {
        font-size: var(--font-size-h1-mobile);
        color: var(--text-color);
        line-height: 1.6em;
        margin: 8px 0px 12px 0px;
        font-weight: bold;
        font-family: 'PT Sans', serif;
    }

    h2 {
        font-size: var(--font-size-h2-mobile);
        color: var(--text-color);
        line-height: 1.6em;
        margin: 8px 0px 12px 0px;
        font-weight: bold;
        font-family: 'PT Sans', serif;
    }

    h2.likeh1 {
        font-size: var(--font-size-h3-mobile);
        color: var(--text-color);
        line-height: 1.6em;
        margin: 8px 0px 12px 0px;
        font-weight: bold;
    }

    h2.gray{
        font-size: var(--font-size-text-mobile);
        font-weight: 500;
        color: #737067;
        padding: 0px;
        margin: 0px;
    }

    h3 {
        font-size: var(--font-size-h3-mobile);
        color: var(--text-color);
        line-height: 1.8em;
        margin: -6px 0px 24px 0px;
        font-weight: normal;
        font-family: 'PT Sans', serif;
        text-align: left;
    }

    p {
        color: var(--text-color);
        font-size: var(--font-size-text-mobile);
        line-height: 1.6em;
        margin: 0px 0px 13px 0px;
        padding: 0px;
    }

    ol, ul {
        /*font-size: var(--font-size-text-mobile);*/
        line-height: 1.6em;
    }

    li {
        font-size: var(--font-size-text-mobile);
        line-height: 1.6em;
    }

    /* Responsive Content Blocks */
    .four-quarters {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .three-thirds {
        grid-template-columns: 1fr;
        gap: var(--grid-gap);
    }
    
    .gallery-grid[data-count="3"],
    .gallery-grid[data-count="4"],
    .gallery-grid[data-count="6"] {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--grid-gap);
    }

    .lm-cols-grid[data-count="6"] {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Responsive Grid */
    .content-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    /* === RESPONSIVE 768px: Kleinere Anpassungen für Tablets === */

    #logocontainer {
        flex-direction: column !important;
        align-items: center !important;
    }

    #logocontainer .logo-area {
        order: -1;
        width: 100% !important;
        max-width: 100%;
        margin: 0 60px !important;
        text-align: center !important;
    }

    #logocontainer .info-area {
        order: -2;
        width: 100%;
        text-align: center;
        margin: 20px 0 10px 0;
        max-width: 600px;
    }

    #logocontainer .search-area {
        order: 1;
        width: 100%;
        margin: 18px 0 6px 0;
        max-width: 480px;
    }

    #logocontainer .right-column,
    #logocontainer .left-column {
        width: 100%;
        align-items: center !important;
    }

    #menucontainer ul li a {
        font-size: 1.1em;
        margin: 8px 4px;
    }

    .four-column,
    .four-column-bordered {
        flex-wrap: wrap;
    }

    .four-column > div,
    .four-column-bordered > div {
        width: 48%;
        margin-bottom: 10px;
    }

    .one-third-two-thirds-flex,
    .two-thirds-one-third-flex {
        display: block;
    }

    .one-third-two-thirds-flex .one-third-flex,
    .two-thirds-one-third-flex .one-third-flex {
        width: 100%;
        margin-bottom: 24px;
    }

    .one-third-two-thirds-flex .two-thirds-flex,
    .two-thirds-one-third-flex .two-thirds-flex {
        width: 100%;
        margin-bottom: 24px;
    }
    
    /* Mobile: Stack two-thirds/one-third layouts */
    .two-thirds-one-third {
        display: block;
    }

    .two-thirds-one-third .two-thirds,
    .two-thirds-one-third .one-third {
        width: 100%;
        margin-bottom: 24px;
    }

    /* Mobile: Stack one-fourth/three-fourths layout */
    .one-fourth-three-fourths {
        display: block;
    }

    .one-fourth-three-fourths .one-fourth,
    .one-fourth-three-fourths .three-fourths {
        width: 100%;
        margin-bottom: 24px;
    }

    .half-half {
        display: block;
    }

    .half-half > div.half {
        width: 100%;
        margin-bottom: 1rem;
    }

    .four-quarters {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .three-thirds {
        grid-template-columns: 1fr;
        gap: var(--grid-gap);
    }

    .gallery-grid,
    .gallery-grid[data-count="2"],
    .gallery-grid[data-count="3"],
    .gallery-grid[data-count="4"],
    .gallery-grid[data-count="6"] {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .lm-cols-grid[data-count="6"] {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: var(--font-size-h1-small);
        color: var(--text-color);
        line-height: 1.6em;
        margin: 8px 0px 12px 0px;
        font-weight: bold;
        font-family: 'PT Sans', serif;
    }

    h2 {
        font-size: var(--font-size-h2-small);
        color: var(--text-color);
        line-height: 1.6em;
        margin: 8px 0px 12px 0px;
        font-weight: bold;
        font-family: 'PT Sans', serif;
    }

    h2.likeh1 {
        font-size: var(--font-size-h3-small);
        color: var(--text-color);
        line-height: 1.6em;
        margin: 8px 0px 12px 0px;
        font-weight: bold;
    }

    h2.gray{
        font-size: var(--font-size-text-small);
        font-weight: 500;
        color: #737067;
        padding: 0px;
        margin: 0px;
    }

    h3 {
        font-size: var(--font-size-h3-mobile);
        color: var(--text-color);
        line-height: 1.8em;
        margin: -6px 0px 24px 0px;
        font-weight: normal;
        font-family: 'PT Sans', serif;
        text-align: left;
    }

    p {
        color: var(--text-color);
        font-size: var(--font-size-text-small);
        line-height: 1.6em;
        margin: 0px 0px 13px 0px;
        padding: 0px;
    }

    ol, ul {
        /*font-size: var(--font-size-text-small);*/
        line-height: 1.6em;
    }

    li {
        font-size: var(--font-size-text-small);
        line-height: 1.6em;
    }

    /* Mobile Grid */
    .content-grid-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 640px) {
    #flyout-toggle {
        position: absolute;
        padding-top: 0px;
        right: 0px;
        width: 42px;
        height: 116px;
        z-index: 1000;
        cursor: pointer;
    }

    .four-quarters {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/*
=========================================================================
    AUFRAEUMEN
=========================================================================
*/

/* Materialliste: 2-spaltig (tableft ~1/3 + tabright ~2/3) */
.tabfull {
    overflow: hidden;
}
.tableft {
    float: left;
    width: 30%;
}
.tabright {
    float: left;
    width: 70%;
}
.tableft p, .tabright p {
    margin: 0 0 4px 0;
}
.tabright sup {
    line-height: 0;
}

.endleftitem{
    clear: left;
}

.endrightitem{
    clear: right;
}

.enditem{
    clear: both;
}

/*
=========================================================================
    FOOTER SECTIONS (Erweiterte Footer-Struktur)
=========================================================================
*/

/* Footer Sections */
.footer-logo-section {
    background: #F8F6F3;
    padding: 1rem 0;
    margin-top: 2rem;
    border-top: 1px solid #dee2e6;
}

.footer-logo-section .footer-logo {
    text-align: center;
}

.footer-logo-section .footer-logo-img {
    max-width: 200px;
    width: auto;
    height: auto;
}

.footer-logo-section .footer-brand {
    text-align: center;
    font-size: 1.4rem;
    color: var(--text-color);
}

.footer-content-section {
    background: #fefffe;
    padding: 1rem 0;
    border-top: 1px solid #dee2e6;
}

.footer-content-section .footer-content {
    text-align: center;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-content-section .footer-content p {
    margin: 0.5rem 0;
}

.footer-navigation-section {
    background: #F8F6F3;
    padding: 1rem 0;
    border-top: 1px solid #dee2e6;
}

.footer-navigation {
    text-align: center;
}

.footer-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-navigation ul li {
    margin: 0;
}

.footer-navigation ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted var(--text-color);
}

.footer-navigation ul li a:hover {
    color: #FF003E;
    border-bottom: 1px solid #FF003E;
}

#site-footer {
    background: #615B4C;
    color: white;
    padding: 1rem 0;
}

.final-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-size: 0.85rem;
}

.footer-mascot {
    text-align: right;
}

.mascot-img {
    width: 50px;
    height: auto;
}

#site-footer a {
    color: white;
}

/* Footer Responsive Design */
@media (max-width: 768px) {
    .footer-navigation ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .final-footer {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-mascot {
        text-align: center;
    }
}

/* ========================================
   HIGHLIGHTING - Textmarker-Stil
   ======================================== */
.tag-highlight {
    background: var(--highlight-bg);
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(255, 255, 0, 0.2);
}

/* Automatisches Highlighting für {{TAG}} Vorkommen */
/* Wird via JavaScript oder PHP ersetzt */

/* ========================================
   TAG-BUTTONS - Button-Stil für Tag-Links
   ======================================== */
a.tagbutton, a.librarybutton {
  color: var(--primary-color);
  font-size: 1.2rem; /* Feste Größe unabhängig vom Parent-Container */
  margin: 18px 18px 18px 0px;
  border: none;
  text-decoration: none;
  display: inline-block;
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  padding: 24px;
  background-color: rgba(6, 81, 101, 0.03); /* --primary-color-light mit 3% Transparenz */
}

a.tagbutton:hover, a.librarybutton:hover {
  color: #ffffff;
  border-bottom-color: var(--primary-color-light);
  text-decoration: none;
  background-color: var(--primary-color-light);
  border: 2px solid var(--primary-color);
}

.lernmaterial-meta-block a.tagbutton {
  margin-top: 0;
}

/* Inaktiver Tag-Button - ungültiger URL-Wert, nicht verlinkt */
span.tagbutton-inactive {
  color: #555;
  font-size: 1.2rem;
  margin: 18px 18px 18px 0px;
  border: 2px solid #999;
  border-radius: 12px;
  padding: 24px;
  background-color: #e8e8e8;
  display: inline-block;
  cursor: default;
}

.lernmaterial-meta-block span.tagbutton-inactive {
  margin-top: 0;
}

/* Login-Required Button - zart rötlich mit roter Umrandung */
a.librarybutton.login-required-button {
  color: #dc3545;
  border-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.05);
  cursor: help;
}

a.librarybutton.login-required-button:hover {
  color: #ffffff;
  border-color: #c82333;
  background-color: #dc3545;
}

/* Limit-Reached Button - orangefarbig */
a.librarybutton.limit-reached-button {
  color: #ff9800;
  border-color: #ff9800;
  background-color: rgba(255, 152, 0, 0.05);
  cursor: help;
}

a.librarybutton.limit-reached-button:hover {
  color: #ffffff;
  border-color: #f57c00;
  background-color: #ff9800;
}

/* ========================================
   ABSTÄNDE - Content-Blocks und Posts
   ======================================== */
.content {
    margin-bottom: 36px; /* Einheitlicher Abstand zwischen allen Content-Bereichen */
}

.one-third-two-thirds{ /*:not(:last-child)*/
    margin-bottom: 36px; /* Nur zwischen Posts, nicht nach dem letzten */
    margin-top: 24px;
}

.two-thirds-one-third{ /*:not(:last-child)*/
    margin-bottom: 36px; /* Nur zwischen Posts, nicht nach dem letzten */
    margin-top: 24px;
}

.one-fourth-three-fourths{ /*:not(:last-child)*/
    margin-bottom: 36px;
    margin-top: 24px;
}

.content-block-fullwidth{
    margin-bottom: 36px;
    margin-top: 24px;
}

.fullwidth{
    margin-bottom: 36px;
}

/* Content Block Font-Size */
.content-block {
    /*font-size: var(--font-size-text);*/
}

/* Hero Content Font-Size */  
.hero-content {
    font-size: var(--font-size-text);
}

.breadcrumb{
    color: var(--text-color);
    font-size: var(--font-size-tiny);
    line-height: 1.6em;
    margin: 0px 0px 13px 0px;
    padding: 0px;
}

/*.infobox-content{
    color: var(--text-color);
    font-size: var(--font-size-text);
    line-height: 1.6em;
}*/

/* Lernmaterialfinder-Baustein */
.content-block-lernmaterial-finder {
    margin-bottom: 36px;
    margin-top: 24px;
}

.finder-form input[type="text"],
.finder-form input[type="number"],
.finder-form select {
    box-sizing: border-box;
}

/* ============================================================
   Hero-Banner Baustein
   ============================================================ */

.content-block-hero-banner {
    margin-bottom: 36px;
    overflow: hidden;
    position: relative;
}

/* Overlay-Div — background via Inline-Style aus PHP */
.hero-banner-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.content-block-hero-banner .hero-banner-inner {
    position: relative;
    z-index: 1;
}

/* Overflow-Variante: Bild ragt unten heraus */
.content-block-hero-banner.hero-banner--overflow {
    overflow: visible;
    margin-bottom: 80px;
}

/* Ecken */
.content-block-hero-banner.hero-banner--radius-slight { border-radius: 12px; }
.content-block-hero-banner.hero-banner--radius-strong { border-radius: 24px; }

/* Flex-Container */
.hero-banner-inner {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 48px;
    min-height: inherit;
    box-sizing: border-box;
}

.hero-banner--valign-top .hero-banner-inner { align-items: flex-start; }
.hero-banner--image-left .hero-banner-inner { flex-direction: row-reverse; }

/* Randloses Bild (image-flush): kein Padding auf der Bildseite */
.hero-banner--image-flush .hero-banner-inner            { padding-right: 0; }
.hero-banner--image-left.hero-banner--image-flush .hero-banner-inner { padding-right: 48px; padding-left: 0; }

/* Randloser Text (text-flush): kein Padding auf der Textseite */
.hero-banner--text-flush .hero-banner-inner             { padding-left: 0; }
.hero-banner--image-left.hero-banner--text-flush .hero-banner-inner  { padding-left: 48px; padding-right: 0; }

/* Textspalte */
.hero-banner-text {
    flex-shrink: 0;
}

/* Badge — font-size + text-transform kommen als Inline-Style aus PHP */
.hero-banner-badge {
    display: inline-block;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-bottom: 12px;
}

/* Textfarbe-Vererbung für alle Elemente in der Textspalte */
.hero-banner-text h1,
.hero-banner-text h2,
.hero-banner-text p,
.hero-banner-text span,
.hero-banner-text li { color: inherit !important; }

/* Überschrift — font-size kommt von globalem h1/h2 */
.hero-banner-heading {
    margin: 0 0 16px 0;
}

/* Fließtext — font-size kommt von globalem p */
.hero-banner-body {
    line-height: 1.6;
    margin-bottom: 24px;
    opacity: 0.9;
}

.hero-banner-body p { margin: 0 0 12px; }
.hero-banner-body p:last-child { margin-bottom: 0; }

/* Button — background, color, font-size kommen als Inline-Style aus PHP */
.hero-banner-btn {
    display: inline-block;
    margin-top: 8px;
    text-decoration: none;
    outline: none;
    line-height: normal;
    transition: transform 0.2s, background-color 0.2s, color 0.2s, border-color 0.2s;
}

.hero-banner-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

/* Outline-Stil */
.hero-banner-btn--outline {
    background: transparent !important;
}

/* Farbentausch-Hover: Gefüllt — Hintergrund und Text tauschen */
.hero-banner-btn--swap:not(.hero-banner-btn--outline):hover {
    background-color: var(--btn-color) !important;
    color: var(--btn-bg) !important;
    border-color: var(--btn-color) !important;
}

/* Farbentausch-Hover: Outline — füllt sich mit Button-Farbe */
.hero-banner-btn--outline.hero-banner-btn--swap:hover {
    background-color: var(--btn-bg) !important;
    color: var(--btn-swap-color, #ffffff) !important;
    border-color: var(--btn-bg) !important;
}

/* Rahmen stehen lassen: Border bleibt beim Hover unverändert */
.hero-banner-btn--swap.hero-banner-btn--keep-border:hover {
    border-color: var(--btn-bg) !important;
}

/* Anheben ausschalten */
.hero-banner-btn--no-lift:hover {
    transform: none !important;
}

/* Bildspalte */
.hero-banner-image {
    flex-shrink: 0;
}

.hero-banner-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Overflow: Bild ragt unten aus dem Container heraus */
.hero-banner--overflow .hero-banner-inner {
    align-items: flex-end;
}

.hero-banner--overflow .hero-banner-image img {
    margin-bottom: -60px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-banner-inner {
        flex-direction: column !important;
        padding: 32px 24px;
        gap: 24px;
    }

    .hero-banner-text,
    .hero-banner-image {
        flex-basis: 100% !important;
        max-width: 100% !important;
        width: 100%;
    }

    .hero-banner--overflow .hero-banner-image img {
        margin-bottom: 0;
    }
}

/* Lernmaterialfinder-Teaser-Baustein (Editor-Preview) */
.finder-teaser-form {
    margin-top: 15px;
}

.finder-teaser-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.finder-teaser-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    font-size: var(--font-size-text);
    border: 2px solid var(--border-color, #ccc);
    border-radius: 4px;
}

.finder-teaser-btn {
    padding: 10px 24px;
    font-size: var(--font-size-text);
    background: var(--primary-color, #007bff);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.finder-teaser-btn:hover {
    opacity: 0.9;
}

