body,form,figure{margin:0;padding:0}img{border:0}header,footer,nav,section,aside,article,figure,figcaption{display:block}body{font-size:100.01%}select,input,textarea{font-size:99%}#container,.inside{position:relative}#main,#left,#right{float:left;position:relative}#main{width:100%}#left{margin-left:-100%}#right{margin-right:-100%}#footer{clear:both}#main .inside{min-height:1px}.ce_gallery>ul,.content-gallery>ul{margin:0;padding:0;overflow:hidden;list-style:none}.ce_gallery>ul li,.content-gallery>ul li{float:left}.ce_gallery>ul li.col_first,.content-gallery>ul li.col_first{clear:left}.float_left,.media--left>figure{float:left}.float_right,.media--right>figure{float:right}.block{overflow:hidden}.media{display:flow-root}.clear,#clear{height:.1px;font-size:.1px;line-height:.1px;clear:both}.invisible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.custom{display:block}#container:after,.custom:after{content:"";display:table;clear:both}
@media (max-width:767px){#wrapper{margin:0;width:auto}#container{padding-left:0;padding-right:0}#main,#left,#right{float:none;width:auto}#left{right:0;margin-left:0}#right{margin-right:0}}img{max-width:100%;height:auto}.audio_container audio{max-width:100%}.video_container video{max-width:100%;height:auto}.aspect,.responsive{position:relative;height:0}.aspect iframe,.responsive iframe{position:absolute;top:0;left:0;width:100%;height:100%}.aspect--16\:9,.responsive.ratio-169{padding-bottom:56.25%}.aspect--16\:10,.responsive.ratio-1610{padding-bottom:62.5%}.aspect--21\:9,.responsive.ratio-219{padding-bottom:42.8571%}.aspect--4\:3,.responsive.ratio-43{padding-bottom:75%}.aspect--3\:2,.responsive.ratio-32{padding-bottom:66.6666%}
header,footer,nav,section,aside,main,article,figure,figcaption{display:block}body,div,h1,h2,h3,h4,h5,h6,p,blockquote,pre,code,ol,ul,li,dl,dt,dd,figure,table,th,td,form,fieldset,legend,input,textarea{margin:0;padding:0}table{border-spacing:0;border-collapse:collapse}caption,th,td{text-align:left;text-align:start;vertical-align:top}abbr,acronym{font-variant:normal;border-bottom:1px dotted #666;cursor:help}blockquote,q{quotes:none}fieldset,img,iframe{border:0}ul{list-style-type:none}sup{vertical-align:text-top}sub{vertical-align:text-bottom}del{text-decoration:line-through}ins{text-decoration:none}body{font:12px/1 "Lucida Grande","Lucida Sans Unicode",Verdana,sans-serif;color:#000}input,button,textarea,select{font-family:inherit;font-size:99%;font-weight:inherit}pre,code{font-family:Monaco,monospace}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}h1{font-size:1.8333em}h2{font-size:1.6667em}h3{font-size:1.5em}h4{font-size:1.3333em}table{font-size:inherit}caption,th{font-weight:700}a{color:#00f}h1,h2,h3,h4,h5,h6{margin-top:1em}h1,h2,h3,h4,h5,h6,p,pre,blockquote,table,ol,ul,form{margin-bottom:12px}
#colorbox,#cboxOverlay,#cboxWrapper{position:absolute;top:0;left:0;z-index:9999;overflow:hidden;-webkit-transform:translate3d(0,0,0)}#cboxWrapper{max-width:none}#cboxOverlay{position:fixed;width:100%;height:100%}#cboxMiddleLeft,#cboxBottomLeft{clear:left}#cboxContent{position:relative}#cboxLoadedContent{overflow:auto;-webkit-overflow-scrolling:touch}#cboxTitle{margin:0}#cboxLoadingOverlay,#cboxLoadingGraphic{position:absolute;top:0;left:0;width:100%;height:100%}#cboxPrevious,#cboxNext,#cboxClose,#cboxSlideshow{cursor:pointer}.cboxPhoto{float:left;margin:auto;border:0;display:block;max-width:none;-ms-interpolation-mode:bicubic}.cboxIframe{width:100%;height:100%;display:block;border:0;padding:0;margin:0}#colorbox,#cboxContent,#cboxLoadedContent{box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box}#cboxOverlay{background:#000;opacity:.9;filter:alpha(opacity = 90)}#colorbox{outline:0}#cboxContent{margin-top:20px;background:#000}.cboxIframe{background:#fff}#cboxError{padding:50px;border:1px solid #ccc}#cboxLoadedContent{border:5px solid #000;background:#fff}#cboxTitle{position:absolute;top:-20px;left:0;color:#ccc}#cboxCurrent{position:absolute;top:-20px;right:0;color:#ccc}#cboxLoadingGraphic{background:url(../../assets/colorbox/images/loading.gif) no-repeat center center}#cboxPrevious,#cboxNext,#cboxSlideshow,#cboxClose{border:0;padding:0;margin:0;overflow:visible;width:auto;background:0 0}#cboxPrevious:active,#cboxNext:active,#cboxSlideshow:active,#cboxClose:active{outline:0}#cboxSlideshow{position:absolute;top:-20px;right:90px;color:#fff}#cboxPrevious{position:absolute;top:50%;left:5px;margin-top:-32px;background:url(../../assets/colorbox/images/controls.png) no-repeat top left;width:28px;height:65px;text-indent:-9999px}#cboxPrevious:hover{background-position:bottom left}#cboxNext{position:absolute;top:50%;right:5px;margin-top:-32px;background:url(../../assets/colorbox/images/controls.png) no-repeat top right;width:28px;height:65px;text-indent:-9999px}#cboxNext:hover{background-position:bottom right}#cboxClose{position:absolute;top:5px;right:5px;display:block;background:url(../../assets/colorbox/images/controls.png) no-repeat top center;width:38px;height:19px;text-indent:-9999px}#cboxClose:hover{background-position:bottom center}
/* layout.css - STRUKTUR, HEADER, FOOTER & NAVIGATION */

/* =========================================
   1. GLOBAL & RESET
   ========================================= */
* { box-sizing: border-box; }

html, body {
    margin: 0; 
    padding: 0;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
}

body {
    background-color: #f4f4f4; 
    font-family: 'Oswald', sans-serif; 
    min-height: 100vh;
    padding-top: 120px; 
}

@media (-webkit-min-device-pixel-ratio: 2) and (min-width: 1024px) and (hover: hover) {
    body {
        zoom: 120%;
    }
}

/* Container öffnen für Full-Width Breakout */
#wrapper, #container, #main, .inside, .mod_article, .ce_text, .block {
    overflow: visible !important;
}

.resize-animation-stopper * {
    animation: none !important;
    transition: none !important;
}

/* =========================================
   2. HAUPT-CONTAINER STRUKTUR
   ========================================= */
#container {
    width: 100%;
    background-color: transparent; 
    padding-bottom: 0px; /* Abstand zum Footer */
}

/* Zentraler Inhaltsbereich (Grid) */
#main .inside {
    max-width: 1200px;
    margin: 0 auto;      
    padding: 0px 40px;   
    box-sizing: border-box;
}

/* Mobile Anpassung des Grids */
@media (max-width: 900px) {
    #main .inside {
        padding: 0px 20px;
    }
}

/* =========================================
   3. HEADER STYLES
   ========================================= */
#header {
    background-color: #ffffff;
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 120px;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: height 0.4s ease, box-shadow 0.4s ease;
    overflow: visible !important;
}

#header.scrolled {
    height: 70px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 40px; 
    display: flex; justify-content: space-between; align-items: center;
    height: 100%; position: relative; 
}

/* Logo */
.header-logo {
    display: flex; align-items: center; text-decoration: none;
    z-index: 1100; position: relative; padding: 10px 0 20px 0; 
    transition: padding 0.4s ease;
}
.header-logo img {
    height: 80px; width: auto; object-fit: contain; transition: height 0.4s ease;
}
#header.scrolled .header-logo { padding: 4px 0; }
#header.scrolled .header-logo img { height: 55px; }

/* =========================================
   4. NAVIGATION (DESKTOP)
   ========================================= */
.mod_navigation {
    display: block; position: relative; z-index: 2000; overflow: visible !important;
}

.mod_navigation ul.level_1 {
    list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; 
    align-items: center; position: relative; z-index: 2001; 
}

/* Links Level 1 */
.mod_navigation ul.level_1 > li > a,
.mod_navigation ul.level_1 > li > span.active,
.mod_navigation ul.level_1 > li > strong.active,
.mod_navigation ul.level_1 > li > span.trail,
.mod_navigation ul.level_1 > li > strong.trail {
    font-family: 'Oswald', sans-serif !important; color: #333333;
    text-decoration: none; text-transform: uppercase !important;
    font-weight: 400 !important; font-size: 16px; letter-spacing: 1px;
    position: relative; transition: color 0.3s ease; display: block; cursor: pointer;
    padding-top: 15px; padding-bottom: 10px; 
}

/* Orange Linie (Desktop Level 1) */
.mod_navigation ul.level_1 > li > a::after,
.mod_navigation ul.level_1 > li > span.active::after,
.mod_navigation ul.level_1 > li > strong.active::after,
.mod_navigation ul.level_1 > li > span.trail::after,
.mod_navigation ul.level_1 > li > strong.trail::after {
    content: ''; position: absolute; height: 2px; bottom: 3px; 
    left: 0; background-color: #f3912d; transition: width 0.3s ease; width: 0;
}
.mod_navigation ul.level_1 > li:hover > a { color: #f3912d; }
.mod_navigation ul.level_1 > li:hover > a::after { width: 100%; }
.mod_navigation ul.level_1 > li > span.active::after,
.mod_navigation ul.level_1 > li > strong.active::after,
.mod_navigation ul.level_1 > li > span.trail::after,
.mod_navigation ul.level_1 > li > strong.trail::after { width: 100%; }

/* Submenu Desktop (Level 2) */
.mod_navigation li { position: relative; }
.mod_navigation ul.level_2 {
    position: absolute; top: calc(100% + 10px); left: 0; min-width: 220px; 
    background-color: #ffffff; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 0; margin: 0; list-style: none; display: flex !important;
    flex-direction: column; text-align: left; opacity: 0; visibility: hidden;
    transform: translateY(10px); transition: all 0.3s ease-in-out; z-index: 99999 !important; 
}
.mod_navigation ul.level_2::before {
    content: ''; position: absolute; top: -12px; left: 0; width: 100%; height: 12px; background: transparent;
}
.mod_navigation li.is-hovered > ul.level_2,
.mod_navigation li:hover > ul.level_2 {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.mod_navigation ul.level_2 li { width: 100%; margin: 0; display: block; }
.mod_navigation ul.level_2 li a,
.mod_navigation ul.level_2 li span.active,
.mod_navigation ul.level_2 li strong.active {
    display: block; padding: 12px 20px; color: #333333; text-decoration: none;
    font-family: 'Oswald', sans-serif !important; font-size: 15px !important;
    text-transform: uppercase !important; font-weight: 400 !important; white-space: nowrap; 
    border-bottom: 1px solid #eeeeee; transition: all 0.2s ease;
}
.mod_navigation ul.level_2 li:last-child a { border-bottom: none; }
.mod_navigation ul.level_2 li a:hover { background-color: #f9f9f9; color: #f3912d; padding-left: 25px; }


/* =========================================
   5. MOBILE NAVIGATION (< 1100px)
   ========================================= */
.hamburger-btn {
    display: none; background: none; border: none; color: #333333;
    font-size: 24px; cursor: pointer; padding: 10px; z-index: 1200; position: relative; margin-right: -10px; 
}

@media (max-width: 1100px) {
    body { padding-top: 60px; }
    #header { height: 60px !important; }
    .header-container { padding: 0 20px; }
    .header-logo { padding: 5px 0 !important; }
    .header-logo img { height: 40px !important; }
    .hamburger-btn { display: block; }

    /* Mobile Menu Container */
    .mod_navigation {
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background-color: #8a8a8a; 
        display: flex !important; 
        flex-direction: column; 
        z-index: 1150;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px); 
        pointer-events: none; 
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    }

    /* FIX: Scrollen bei Überlänge */
    .mod_navigation.nav-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0); 
        pointer-events: all; 
        overflow-y: auto !important; 
        padding-bottom: 250px;
    }

    /* Level 1 Mobile */
    .mod_navigation ul.level_1 {
        flex-direction: column; 
        width: 100%; 
        gap: 35px;
        margin: auto;        
        padding: 70px 0; /* Padding für Abstand zum X oben */
        align-items: center !important; /* Zentrierung */
    }
    
    .mod_navigation ul.level_1 > li > a,
    .mod_navigation ul.level_1 > li > span.active,
    .mod_navigation ul.level_1 > li > strong.active,
    .mod_navigation ul.level_1 > li > span.trail,
    .mod_navigation ul.level_1 > li > strong.trail {
        color: #ffffff !important; font-size: 28px; text-align: center; border-bottom: none !important;
        padding: 10px 5px 0 5px;
        position: relative;
    }

    .mod_navigation ul.level_1 > li > a:hover,
    .mod_navigation ul.level_1 > li > span.active,
    .mod_navigation ul.level_1 > li > strong.active,
    .mod_navigation ul.level_1 > li > span.trail,
    .mod_navigation ul.level_1 > li > strong.trail { 
        color: #f3912d !important; 
    }

    .mod_navigation ul.level_1 > li > a::after,
    .mod_navigation ul.level_1 > li > span.active::after,
    .mod_navigation ul.level_1 > li > strong.active::after,
    .mod_navigation ul.level_1 > li > span.trail::after,
    .mod_navigation ul.level_1 > li > strong.trail::after {
        display: none !important; content: none !important; width: 0 !important;
    }

    /* Level 2 Mobile - Zentrierung fixiert */
    .mod_navigation ul.level_2 {
        position: static !important; background: transparent; box-shadow: none;
        display: flex !important; flex-direction: column; align-items: center !important;
        opacity: 1 !important; visibility: visible !important;
        transform: none !important; min-width: auto; gap: 5px; margin-top: 8px; transition: none !important;
    }
    .mod_navigation ul.level_2::before { display: none; }

    .mod_navigation ul.level_2 li a,
    .mod_navigation ul.level_2 li span.active,
    .mod_navigation ul.level_2 li strong.active {
        color: rgba(255, 255, 255, 0.7) !important; 
        font-size: 20px !important;
        background: transparent !important; 
        text-align: center; 
        padding: 10px 0 0 0;
        border-bottom: none !important; 
        text-decoration: none !important;
    }

    .mod_navigation ul.level_2 li a:hover {
        color: #f3912d !important;
        padding-left: 0 !important; 
        transform: none !important;
    }

    .mod_navigation ul.level_2 li span.active,
    .mod_navigation ul.level_2 li strong.active {
        color: #f3912d !important; 
        border-bottom: none !important;
    }

    .hamburger-btn.is-active { color: #ffffff; }
}

@media (min-width: 1101px) {
    .mod_navigation { display: block !important; opacity: 1 !important; visibility: visible !important; }
}

/* =========================================
   7. INHALT LISTEN (BÜNDIG LINKS & KORRIGIERT)
   ========================================= */

#main ul, 
.ce_text ul, 
.mod_article ul {
    list-style: none !important; 
    margin: 0 !important;           
    padding: 0 !important;           
}

#main ul li, 
.ce_text ul li, 
.mod_article ul li {
    position: relative;
    margin-bottom: 6px; 
    padding-left: 20px; 
    line-height: 1.5;
}

/* Das Quadrat */
#main ul li::before, 
.ce_text ul li::before, 
.mod_article ul li::before {
    content: '';
    position: absolute;
    left: 0;            
    top: 12px;          
    width: 5px;          
    height: 5px;       
    background-color: #f3912d; 
}
/* content.css - TYPOGRAFIE & INHALTS-DESIGN */

/* =========================================
   1. BASISTYPOGRAFIE
   ========================================= */

/* Grundtext im Hauptbereich */
#main {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;     /* Leichter Schnitt (Light) für Fließtext */
    font-size: 18px;      /* Gut lesbare Größe */
    line-height: 1.6;     /* Angenehmer Zeilenabstand */
    color: #333333;       /* Dunkles Grau statt hartem Schwarz */
}

/* Abstände für Absätze */
#main p {
    margin-bottom: 25px;
}

/* Listen (ul/ol) Anpassung */
#main ul, #main ol {
    margin-bottom: 25px;
    padding-left: 20px;
}
#main li {
    margin-bottom: 10px;
}

/* =========================================
   2. ÜBERSCHRIFTEN (H1 - H6)
   ========================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase; /* Alles GROSSBUCHSTABEN */
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    line-height: 1.2;
}

/* H1 - Hauptüberschrift (IMPRESSUM, HOME, etc.) */
h1 {
    color: rgba(237, 137, 54, 1);       /* Dunkelrot */
    font-size: 90px;      /* Groß */
    font-weight: 500;     /* Medium */
    margin-top: 0;        /* Ganz oben kein Abstand */
    padding-bottom: 10px;
    margin-bottom: 40px;
}

/* H2 - Zwischenüberschrift */
h2 {
    color: var(--til-hl-color);       /* Dunkelrot */
    font-size: 46px;
    font-weight: 400;     /* Normal */
}

/* H3 - Kleine Überschrift (Orange) */
h3 {
    color: #f3912d;       /* Orange */
    font-size: 24px;
    font-weight: 400;     /* Normal */
    margin-top: 50px;     /* Mehr Abstand nach oben zur Trennung */
    margin-bottom: 15px;
}

/* =========================================
   3. LINKS IM TEXT
   ========================================= */
#main a {
    color: #333333;
    text-decoration: underline;
    transition: color 0.3s ease;
}

#main a:hover {
    color: #f3912d; /* Orange beim Drüberfahren */
    text-decoration: none;
}

/* =========================================
   4. MOBILE TYPOGRAFIE ANPASSUNG
   ========================================= */
@media (max-width: 900px) {
    /* Schriftgrößen mobil etwas kleiner */
    #main {
        font-size: 17px;
    }
    
    h1 { font-size: 64px; margin-bottom: 30px; }
    h2 { font-size: 38px; }
    h3 { font-size: 22px; margin-top: 40px; }
}


/* =========================================
   ACCORDION STYLES (FINAL V11 - FIXED SCROLLING)
   ========================================= */

/* 1. BUTTON BASIC STYLE (Geschlossen) */
.handorgel__header__button {
  padding: 6px 15px 8px 15px;
  margin-bottom: 15px; 
  border-radius: 3px;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  
  /* Button Design: Weiss & Schatten */
  background-color: #fff; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); 
  color: #000;
  
  /* Definiert den "Bremsweg" beim Scrollen (Sticky Header Support) */
  scroll-margin-top: 120px; 
}

/* 2. BUTTON HOVER (Geschlossen -> GRAU #dddddd) */
.handorgel__header__button:hover {
  background-color: #dddddd; 
  color: #000;
  transform: translateX(5px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15); 
}

/* 3. BUTTON OFFEN (Aktiv -> Sattes Orange) */
.handorgel__header--opened .handorgel__header__button {
  background-color: #ed8936;
  color: #fff; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); 
}

/* 4. BUTTON OFFEN HOVER (KEINE VERDUNKELUNG) */
.handorgel__header--opened .handorgel__header__button:hover {
  background-color: #ff9d00; 
  opacity: 1;
  transform: translateX(5px);
}

/* --- CONTAINER STRUKTUR --- */
.content-accordion {
  margin-top: 25px;
  width: 100%;
}

/* Der Wrapper (Äußerer Container) */
.handorgel__content {
  background-color: transparent;
  width: 100%;
  
  /* ÄNDERUNG: Scrollen hier deaktiviert, damit der Wrapper nicht schiebt */
  overflow-x: visible; 
  
  /* Kleiner Puffer, damit der Schatten der inneren Card nicht abgeschnitten wird */
  padding-bottom: 10px; 
}

/* --- DIE CARD (DER INHALT - WEISSE BOX) --- */
.handorgel__content__inner {
  padding: 0;
  
  /* Margin unten für Abstand zum nächsten Element */
  margin-bottom: 50px !important; 
  
  width: 100%;
  display: block;

  /* ÄNDERUNG: Scrollen findet jetzt HIER statt -> Hintergrund bleibt stehen */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Weiches Scrollen für iOS */

  /* Card Optik */
  background-color: #fff; 
  box-shadow: 0 5px 15px rgba(0,0,0,0.08); 
  border-radius: 3px; 
  margin-top: 5px; 
}

/* Headings Reset */
.handorgel__content__inner .content-table h1,
.handorgel__content__inner .content-table h2,
.handorgel__content__inner .content-table  h3,
.handorgel__content__inner .content-table  h4,
.handorgel__content__inner .content-table  h5,
.handorgel__content__inner .content-table  h6 {
  margin-top: 0px;
  padding: 12px 15px;
}

/* --- TABELLE (100% BREITE FIX) --- */
.handorgel__content__inner table,
.handorgel__content__inner .content-table {
  width: 100% !important;       
  max-width: none !important;
  border-collapse: collapse;
  margin: 0;
  /* Stellt sicher, dass die Tabelle breit genug ist, um Scrolling auszulösen */
  min-width: 100%; 
}

/* --- ZELLEN STYLING (KEIN HOVER) --- */
.handorgel__content__inner table td,
.handorgel__content__inner table th,
.handorgel__content__inner .content-table td,
.handorgel__content__inner .content-table th {
  padding: 12px 15px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #eee;
  box-sizing: border-box;
  
  /* Verhindert Umbrüche in Zellen, falls gewünscht (optional) */
  /* white-space: nowrap; */ 
}

/* --- TABELLENKOPF --- */
.handorgel__content__inner table th,
.handorgel__content__inner .content-table th {
  font-weight: bold;
  border-bottom: 2px solid #ccc;
  background-color: #fff; 
  color: #000; 
}

.handorgel__content__inner .til-outer-wrapper {
  margin-bottom: 0px !important;
}

/* =========================================
   GALLERY
   ========================================= */

/* Container */
/* Die Liste als Grid */
.modern-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 0;
    list-style: none; /* Punkte entfernen */
}

/* Die einzelne Karte */
.modern-gallery-grid .gallery-card {
    margin: 0 !important; /* Contao Standard überschreiben */
    width: 100% !important;
    max-width: none !important;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
}

/* Das Bild */
.modern-gallery-grid .gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* Hover Zoom */
.modern-gallery-grid .gallery-card:hover img {
    transform: scale(1.05);
}
/* ============================================================
   ROCKSOLID CUSTOM ELEMENT STYLES (Final Fixes)
   ============================================================ */

/* ------------------------------------------------------------
   1. GLOBAL FIXES
   ------------------------------------------------------------ */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100%;
}

/* Alle Wrapper öffnen */
#wrapper, #container, #main, .inside, .mod_article, .ce_text, .block {
    overflow: visible !important;
}

/* ------------------------------------------------------------
   2. BASIS BOX STYLE
   ------------------------------------------------------------ */
.rsce-custom-box {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
    display: block;
}

/* ------------------------------------------------------------
   3. BREITEN-LOGIK (Box selbst)
   ------------------------------------------------------------ */

/* -> FULL WIDTH BOX */
.rsce-custom-box.width-full {
    width: 100vw !important;
    max-width: 100vw !important;
    
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    
    float: none;
    padding-left: 0;
    padding-right: 0;
}

/* -> SPALTEN */
.rsce-custom-box.width-1-2, .rsce-custom-box.width-1-3, 
.rsce-custom-box.width-1-4, .rsce-custom-box.width-1-5 {
    display: inline-block;
    vertical-align: top;
    margin-right: -4px;
    padding-right: 20px;
    
    width: auto; margin-left: 0; margin-right: 0; left: auto; /* Reset */
}
.rsce-custom-box.width-1-2 { width: 50%; }
.rsce-custom-box.width-1-3 { width: 33.333%; }
.rsce-custom-box.width-1-4 { width: 25%; }
.rsce-custom-box.width-1-5 { width: 20%; }

@media (max-width: 768px) {
    .rsce-custom-box[class*="width-1-"] { width: 100% !important; display: block; padding-right: 0; }
}

/* ------------------------------------------------------------
   4. BILDER (Contain Fix inklusive)
   ------------------------------------------------------------ */
.box-image-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    flex-direction: column; 
}
.box-img { display: block; width: 100%; height: auto; }

/* COVER */
.box-image-wrapper.img-cover { height: 100%; }
.box-image-wrapper.img-cover .box-img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* CONTAIN (FIXED) */
.box-image-wrapper.img-contain { height: auto; align-items: center; justify-content: center; }
.box-image-wrapper.img-contain .box-img {
    width: auto; 
    height: auto; 
    max-width: 100%; 
    max-height: inherit; /* Erbt die max-height vom Wrapper style="" Attribut */
    object-fit: contain;
}

/* SCALE */
.box-image-wrapper.img-scale { height: auto !important; }

/* ------------------------------------------------------------
   5. LINIEN (Der Positioning Fix)
   ------------------------------------------------------------ */
.custom-line {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: 0; margin-bottom: 0;
}

.custom-line .line-inner {
    display: block;
    width: 100%;
    height: 1px;
    background-color: #f3912d; 
}

/* --- FALL A: Linie Full-Width, aber Box ist Content-Width --- */
/* Das war das Problemkind. Wir nutzen left: 50% vom Elternteil (Mitte) und gehen -50vw nach links. */
.rsce-custom-box:not(.width-full) .custom-line.line-full {
    width: 100vw;
    max-width: 100vw;
    
    position: relative;
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* --- FALL B: Box ist eh schon Full-Width --- */
/* Hier muss die Linie einfach nur mitgehen */
.rsce-custom-box.width-full .custom-line.line-full {
    width: 100%;
    left: auto;
    margin-left: 0;
    margin-right: 0;
}

.rsce-custom-box {
    position: relative; width: 100%; margin-bottom: 20px;
}
/* =========================================
   RSCE HERO SLIDER
   ========================================= */

/* 1. BASIS SETUP */
.rsce-hero-slider {
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* 1.1 VARIANTE: FULL WIDTH */
.rsce-hero-slider.width-full {
    width: calc(100vw - var(--scrollbar-width, 0px));
    margin-left: calc(50% - 50vw + var(--scrollbar-width, 0px) / 2);
    margin-right: calc(50% - 50vw + var(--scrollbar-width, 0px) / 2);
}

/* 1.2 VARIANTE: WRAPPER */
.rsce-hero-slider.width-wrapper { width: 100%; }
.rsce-hero-slider.width-1-2 { width: 50%; }
.rsce-hero-slider.width-1-3 { width: 33.333%; }
.rsce-hero-slider.width-1-4 { width: 25%; }
.rsce-hero-slider.width-1-5 { width: 20%; }

/* 2. BILD LOGIK (Standard = Absolute) */
.slide-image-wrapper { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; 
}
.fit-cover .slide-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.fit-contain .slide-image-wrapper img { width: 100%; height: 100%; object-fit: contain; }

/* Sticky Fix */
.rsce-hero-slider.is-sticky-parallax .slide-image-wrapper {
    position: absolute; top: 0; left: 0; width: 100%; height: 100vh !important;
    z-index: 1; overflow: hidden; pointer-events: none;
}
.rsce-hero-slider.is-sticky-parallax .slide-image-wrapper img {
    width: 100% !important; height: 100vh !important;
    object-fit: cover; object-position: center top;
}

/* 3. SWIPER */
.swiper-wrapper { display: flex; width: 100%; height: 100%; z-index: 2; position: relative; }
.swiper-slide { 
    flex-shrink: 0; width: 100%; height: 100%; position: relative; 
    display: flex; align-items: center; justify-content: center;
}

/* 4. OVERLAY & CONTENT */
.slide-content-wrapper {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10; pointer-events: none;
    display: flex; align-items: center; justify-content: center;
}
.slide-content {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.content-limit {
    width: 100%; max-width: 1200px; padding: 0 40px; margin: 0 auto;
    pointer-events: auto; box-sizing: border-box;
    display: flex; flex-direction: column;
}
.content-limit.align-text-left { align-items: flex-start; text-align: left; }
.content-limit.align-text-center { align-items: center; text-align: center; }
.content-limit.align-text-right { align-items: flex-end; text-align: right; }

/* 5. TYPOGRAFIE & BUTTONS */
.slide-title {
    color: var(--slide-text-color, #ffffff);
    font-weight: 400; line-height: 1.2; margin: 0 0 1rem 0;
    text-transform: uppercase; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.has-dark-text .slide-title { text-shadow: none !important; }
.slide-text {
    color: var(--slide-text-color, #ffffff);
    max-width: 800px; font-size: 1.3rem; line-height: 1.6; margin-bottom: 2rem;
}
.btn-wrapper { width: 100%; display: flex; margin-top: 10px; }
.btn-wrapper.align-btn-left { justify-content: flex-start; }
.btn-wrapper.align-btn-center { justify-content: center; }
.btn-wrapper.align-btn-right { justify-content: flex-end; }
.slide-button {
    display: inline-block !important; padding: 14px 32px; font-size: 1rem;
    background-color: var(--btn-bg, #fff); 
    color: var(--btn-text, #000) !important; 
    border: 2px solid var(--btn-bg, #fff);
    font-weight: 400; text-transform: uppercase; letter-spacing: 1px;
    text-decoration: none !important; line-height: 1.2; cursor: pointer;
    transition: all 0.2s ease-in-out !important; transform: scale(1);
}
.slide-button:hover, .slide-button:focus {
    background-color: var(--btn-bg, #fff);
    color: var(--btn-text, #000) !important; 
    transform: scale(1.1);
}

/* 6. NAVIGATION */
.full-slide-link { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 20; }
.swiper-button-prev, .swiper-button-next { 
    color: #fff; text-shadow: 0 0 5px rgba(0,0,0,0.5); width: 44px; height: 44px;
    opacity: 0; visibility: hidden; transition: opacity 0.4s ease;
}
.rsce-hero-slider:hover .swiper-button-prev, 
.rsce-hero-slider:hover .swiper-button-next { opacity: 1; visibility: visible; }
.swiper-pagination { bottom: 30px !important; z-index: 20; width: 100%; text-align: center; }
.swiper-pagination-bullet { width: 40px; height: 6px; border-radius: 4px; background: #ffffff; opacity: 1; margin: 0 6px !important; box-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.swiper-pagination-bullet-active { background: #ff9d00; }

@media (max-width: 900px) {
    .content-limit { padding: 0 20px; }
    .slide-text { font-size: 1.1rem; }
    .swiper-button-prev, .swiper-button-next { display: none; }
}

/* =================================================================
   9. FIXES FÜR AUTO-HEIGHT (WENN KEINE HÖHE GESETZT IST)
   ================================================================= */

/* Globaler Reset für Auto-Height Situationen */
.rsce-hero-slider.is-content-height .swiper-wrapper,
.rsce-hero-slider.is-content-height .swiper-slide,
.rsce-hero-slider.is-natural-height .swiper-wrapper,
.rsce-hero-slider.is-natural-height .swiper-slide {
    height: auto;
    min-height: 0;
}

/* FALL A: Bild bestimmt die Höhe (Natural) */
/* WICHTIG: Relative Positionierung zwingt den Slider auf Bildhöhe */
.rsce-hero-slider.is-natural-height .slide-image-wrapper {
    position: relative !important; 
    height: auto !important;
    width: 100%;
}
.rsce-hero-slider.is-natural-height .slide-image-wrapper img {
    position: relative !important;
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain; /* oder einfach normal img verhalten */
}
/* Text muss jetzt absolut darüber liegen */
.rsce-hero-slider.is-natural-height .slide-content-wrapper {
    position: absolute; 
    top: 0; left: 0; 
    height: 100%; 
    width: 100%;
}


/* FALL B: Content bestimmt die Höhe (z.B. bei Cover ohne fixe Höhe) */
.rsce-hero-slider.is-content-height .slide-content-wrapper {
    position: relative; /* Content drückt auf */
    padding: 80px 0;
}
.rsce-hero-slider.is-content-height .slide-image-wrapper {
    position: absolute; /* Bild füllt Hintergrund */
    top: 0; left: 0; height: 100%; width: 100%;
}
.rsce-hero-slider.is-content-height .slide-image-wrapper img {
    object-position: center top;
}
/* Styling für RSCE Services */
.rsce-service-wrapper {
    margin-bottom: 50px;
}

.rsce-service-main-headline {
    text-align: center;
    text-transform: uppercase;
    color: rgba(237, 137, 54, 1);
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 40px;
    font-size: 2rem;
}

/* Grid System */
.rsce-service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Tablet & Desktop: 3 Spalten */
@media (min-width: 768px) {
    .rsce-service-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Die einzelne Box --- */
.rsce-service-item {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Link-Reset */
a.rsce-service-link {
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border: none;
}

.rsce-service-card {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
}

/* Hover Effekt */
.rsce-service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* --- Bild Bereich --- */
.rsce-service-image {
    position: relative;
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.rsce-service-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- Icon & Text Bereich --- */
.rsce-service-content {
    padding: 0 15px 30px 15px;
    background-color: #fff;
    flex-grow: 1;
    text-align: center;
    position: relative;
}

/* Der schwarze Kasten */
.rsce-service-icon-wrapper {
    background-color: #1a1a1a;
    width: 60px;
    height: 60px;
    margin: -30px auto 20px auto;
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rsce-service-icon-wrapper img {
    width: 32px;
    height: auto;
    display: block;
    filter: invert(1) brightness(2);
}

/* --- Titel (angepasst) --- */
.rsce-service-title {
    text-transform: uppercase;
    color: rgba(237, 137, 54, 1);
    font-size: 1.6rem;
    font-weight: 400; /* Nicht fett */
    margin: 0;
    line-height: 1.2;
    padding-top: 5px;
}

/* =========================================
   Mobile Anpassungen für RSCE Services
   (Greift nur auf Bildschirmen bis 767px Breite)
   ========================================= */
@media (max-width: 767px) {

    /* 1. Dem Bild-Container eine feste, niedrige Höhe geben */
    .rsce-service-image {
        /* HIER DEN WERT ANPASSEN: */
        height: 180px; /* Versuchen Sie z.B. 150px für noch flacher oder 220px für etwas höher */
    }

    /* 2. Das Bild zwingen, diesen Container komplett auszufüllen */
    .rsce-service-image img {
        /* !important ist hier nötig, um die im HTML-Tag festgelegten 
           Höhenattribute vom Backend zu überschreiben */
        height: 100% !important;
        width: 100%;
        
        /* 'cover' sorgt dafür, dass das Bild den Bereich füllt 
           und überstehende Ränder abgeschnitten werden (keine Verzerrung) */
        object-fit: cover; 
        /* Optional: Fokus auf die Mitte des Bildes */
        object-position: center center;
    }
}
.rsce-text-image-list {
    width: 100%;
    box-sizing: border-box;

    --til-hl-color: inherit;
    --til-txt-color: inherit;
    
    /* Defaults */
    --til-gap: 40px; 
    --til-mt: 40px;
    --til-mb: 40px;
    --item-min-h: auto; 

    /* --- OUTER WRAPPER --- */
    .til-outer-wrapper {
        width: 100%;
        margin-top: var(--til-mt);
        margin-bottom: var(--til-mb);
    }

    /* --- WRAPPER --- */
    .til-wrapper {
        display: flex;
        flex-direction: column;
        gap: var(--til-gap);
        width: 100%;
    }

    /* --- ITEM --- */
    .til-item {
        display: grid;
        width: 100%;
        margin-bottom: 0 !important; 
        grid-template-columns: 100%;
        gap: 0; 
        
        min-height: var(--item-min-h);
        position: relative; 
        align-items: stretch;
    }

    /* Farbig (.has-bg) auf Item-Ebene */
    .til-item.has-bg {
        box-shadow: 0 5px 25px rgba(0,0,0, 0.06);
    }

    /* --- MEDIEN CONTAINER --- */
    .til-media {
        position: relative;
        width: 100%;
        min-height: var(--item-min-h); 
        aspect-ratio: 16 / 9; 
        overflow: hidden;
        box-sizing: border-box; 
    }

    .til-media img,
    .til-media iframe {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    .til-media iframe {
        position: absolute;
        top: 0;
        left: 0;
    }

    /* --- TEXT CONTENT --- */
    .til-content {
        position: relative;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        box-sizing: border-box;
        
        padding: 30px 0; 
        
        .til-item.has-bg & {
            padding: 30px 20px; 
        }

        @media (min-width: 768px) {
            padding: 0 40px; 
            
            .til-item.has-bg & {
                padding: 40px; 
            }
        }
    }

    /* --- PIXEL-PERFEKTION TEXT --- */
    .til-content > *:first-child:not(.til-headline),
    .til-text > *:first-child { margin-top: 0 !important; padding-top: 0 !important; }
    
    .til-headline {
        margin-top: -6px !important; 
        margin-bottom: 1.8rem;
        line-height: 1.1;
        color: var(--til-hl-color);
        display: block; 
    }
    
    .til-content > *:last-child,
    .til-text > *:last-child { margin-bottom: 0 !important; padding-bottom: 0 !important; }
    .til-text { color: var(--til-txt-color); }


    /* --- BUTTON --- */
    .til-btn-wrapper { margin-top: 2rem; }
    
    /* Grundzustand */
    .til-btn {
        /* Layout erzwingen */
        display: inline-block !important; 
        position: relative;
        
        /* Styling */
        padding: 0.8em 1.5em;
        background-color: #333; 
        color: #fff; 
        line-height: 1.2;
        border: 1px solid transparent;
        
        /* Reset Theme Styles */
        text-decoration: none !important;
        border-bottom: 0 !important;
        
        /* Animation Setup */
        transition: all 0.3s ease !important;
        transform: translateY(0);
        box-shadow: 0 0 0 rgba(0,0,0,0);
        filter: brightness(100%);
        
        /* Glatteres Rendering */
        backface-visibility: hidden;
        -webkit-font-smoothing: antialiased;
    }
    
    /* Hover Zustand */
    .til-btn:hover,
    .til-btn:focus { 
        /* Bewegung nach oben */
        transform: translateY(-5px) !important; 
        
        /* Schattenwurf */
        box-shadow: 0 10px 20px -5px rgba(0,0,0, 0.3) !important;
        
        /* Aufhellen (funktioniert auch mit Inline-Farben) */
        filter: brightness(115%) !important;
        
        /* Sicherstellen, dass Text sauber bleibt */
        text-decoration: none !important;
        border-bottom: 0 !important;
        opacity: 1 !important;
    }


    /* --- FARBEN --- */
    .bg-gray { background-color: #f5f5f5; }
    .bg-white { background-color: #ffffff; }
    .bg-primary { 
        background-color: #b00; 
        color: #ffffff;
        .til-headline, .til-text, .til-text * { color: #ffffff !important; }
    }

    /* ============================================================
       DESKTOP GRID LOGIK (ab 768px)
       ============================================================ */
    @media screen and (min-width: 768px) {
        
        .til-item.has-image {
            grid-template-columns: 1fr 1fr;
        }

        .til-item.no-image {
            grid-template-columns: 100% !important; 
            display: block; 
        }
        .til-item.no-image .til-content { padding: 0 !important; }
        .til-item.no-image.has-bg .til-content { padding: 40px !important; }


        /* --- MEDIA LOGIK RESET --- */
        .til-item.has-image .til-media {
            aspect-ratio: auto; 
            height: auto; 
            min-height: auto; 
        }
        
        /* BILDER: Bleiben Absolut um Fläche zu füllen */
        .til-item.has-image:not(.has-video) .til-media img {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
        }


        /* =========================================
           VIDEO SPEZIAL LOGIK
           ========================================= */
        
        /* 1. STANDARD VIDEO (Kein BG) */
        .til-item.has-video:not(.has-bg) .til-media {
            aspect-ratio: 16/9 !important;
            align-self: start; 
        }

        /* 2. VIDEO MIT HINTERGRUND (.has-bg) */
        .til-item.has-bg.has-video .til-media {
            padding: 40px; 
            display: block; 
            height: auto !important;
            aspect-ratio: auto !important; 
            align-self: start;
        }

        .til-item.has-bg.has-video .til-media iframe {
            position: relative; 
            width: 100%;
            height: auto;
            aspect-ratio: 16/9; 
            box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
        }
        
        /* --- PADDING RESET TEXT --- */
        .til-item.has-image:not(.has-bg).pos-left .til-content { padding: 0 0 0 40px; }
        .til-item.has-image:not(.has-bg).pos-right .til-content { padding: 0 40px 0 0; }
        
        /* Ratios */
        .til-item.has-image.ratio-1-1 { grid-template-columns: 1fr 1fr; }
        .til-item.has-image.ratio-2-1.pos-left  { grid-template-columns: 2fr 1fr; }
        .til-item.has-image.ratio-2-1.pos-right { grid-template-columns: 1fr 2fr; }
        .til-item.has-image.ratio-1-2.pos-left  { grid-template-columns: 1fr 2fr; }
        .til-item.has-image.ratio-1-2.pos-right { grid-template-columns: 2fr 1fr; }

        /* Reihenfolge */
        .til-item.has-image.pos-right .til-media { order: 2; }
        .til-item.has-image.pos-right .til-content { order: 1; }
        
        .til-item.has-image.pos-left .til-media { order: 1; }
        .til-item.has-image.pos-left .til-content { order: 2; }
    }
}
/* Container Layout */
.rsce-grid-cards .grid-cards-container {
    display: grid;
    /* Mobile First: Nutze die Mobile-Variable */
    grid-template-columns: repeat(var(--cols-mobile, 1), 1fr);
    gap: var(--gap-size, 2rem);
}

/* Desktop Switch */
@media (min-width: 768px) {
    .rsce-grid-cards .grid-cards-container {
        /* Desktop: Nutze die Desktop-Variable */
        grid-template-columns: repeat(var(--cols-desktop, 3), 1fr);
    }
}

/* Bild-Reset (Damit Bilder nicht explodieren) */
.rsce-grid-cards .card-image-wrapper img,
.rsce-grid-cards .card-image-wrapper figure,
.rsce-grid-cards .card-image-wrapper .image_container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
    display: block !important;
}
/* =========================================
   RSCE SUPER GALLERY - FINAL CLEAN (NO BOUNCE)
   ========================================= */

/* --- 1. Container Basis --- */
.super-gallery-wrapper {
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

/* =========================================
   MOBILE ONLY (bis 767px)
   ========================================= */
@media (max-width: 767px) {
    .gallery-item {
        display: block;
        opacity: 1 !important;
        transform: none !important; 
        animation: none !important;
    }

    .gallery-item .item-inner {
        position: relative;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); 
        z-index: 1;
    }

    .gallery-item img {
        display: block;
        width: 100%;
        height: auto;
    }
    
    .gallery-item figcaption {
        display: none; 
    }
}

/* =========================================
   DESKTOP & TABLET (ab 768px)
   ========================================= */
@media (min-width: 768px) {

    /* 1. STARTZUSTAND */
    .gallery-item {
        opacity: 0; 
        perspective: 1000px;
        transform-style: preserve-3d;
        transform: translateZ(0); 
        backface-visibility: hidden;
        will-change: transform, opacity;
        
        /* Fallback */
        animation: galleryFallback 0.5s ease 1.0s forwards;
    }

    /* 2. STYLE (Schatten) */
    .gallery-item .item-inner {
        position: relative;
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
        
        /* Dezent und edel */
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06), 
                    0 2px 5px rgba(0, 0, 0, 0.04);
                    
        transition: transform 0.1s ease-out, box-shadow 0.3s ease;
        transform-style: preserve-3d;
    }

    .gallery-item img {
        display: block;
        width: 100%;
        height: auto;
    }

    /* 3. CAPTION */
    .gallery-item figcaption {
        position: absolute;
        bottom: 0; left: 0; width: 100%;
        background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
        padding: 20px 10px 10px;
        color: white;
        font-size: 0.85rem;
        pointer-events: none;
        opacity: 0; 
        transition: all 0.3s ease;
    }

    /* --------------------------------------
       ANIMATIONEN (Keyframes - CLEAN)
       -------------------------------------- */

    /* A) Standard Zoom Reveal (Ohne Overshoot) */
    @keyframes galleryZoomReveal {
        0% { 
            opacity: 0; 
            transform: scale(0.8) translateY(20px); 
        }
        100% { 
            opacity: 1; 
            transform: scale(1) translateY(0); 
        }
    }

    /* B) CHAOS 3D INTRO (Ohne Overshoot) */
    @keyframes galleryChaos3D {
        0% {
            opacity: 0;
            transform: 
                perspective(1000px) 
                translate3d(0, 50px, -200px) 
                rotateX(var(--rnd-x, 20deg)) 
                rotateY(var(--rnd-y, -20deg)) 
                rotateZ(var(--rnd-z, 5deg)) 
                scale(0.6);
        }
        100% {
            opacity: 1;
            /* Landet direkt auf 0, ohne vorher zu weit zu gehen */
            transform: 
                perspective(1000px) 
                translate3d(0, 0, 0) 
                rotateX(0) rotateY(0) rotateZ(0) 
                scale(1);
        }
    }

    @keyframes galleryFallback { to { opacity: 1; transform: none; } }


    /* --------------------------------------
       ANIMATION ZUWEISUNG (Timing)
       -------------------------------------- */

    /* 1. Standard */
    .gallery-item.animate-in {
        animation-name: galleryZoomReveal;
        animation-duration: 0.8s;
        /* "Ease Out Quint" - Startet schnell, bremst sehr sanft ab, federt nicht */
        animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
        animation-fill-mode: forwards;
    }

    /* 2. 3D MODUS */
    .super-gallery-wrapper.hover-3d .gallery-item.animate-in {
        animation-name: galleryChaos3D !important;
        animation-duration: 1.0s;
        /* Gleiche sanfte Bremskurve */
        animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    }
}


/* =========================================
   HOVER EFFEKTE (Nur Desktop mit Maus)
   ========================================= */
@media (min-width: 768px) and (hover: hover) {
    
    /* 3D Hover Shadow */
    .super-gallery-wrapper.hover-3d .gallery-item:hover .item-inner {
        box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.12), 
                    0 10px 20px -5px rgba(0, 0, 0, 0.05);
        z-index: 10;
    }

    /* Zoom Hover */
    .super-gallery-wrapper.hover-zoom .gallery-item:hover img {
        transform: scale(1.08);
        transition: transform 0.5s ease;
    }

    /* B/W Hover */
    .super-gallery-wrapper.hover-bw .gallery-item img {
        filter: grayscale(100%);
        transition: filter 0.4s ease;
    }
    .super-gallery-wrapper.hover-bw .gallery-item:hover img {
        filter: grayscale(0%);
    }

    /* Caption Hover */
    .gallery-item:hover figcaption {
        opacity: 1;
        transform: translateY(0);
    }

    /* Glare (Licht) */
    .glare-effect {
        position: absolute; top: 0; left: 0; width: 100%; height: 100%;
        border-radius: 8px; pointer-events: none; mix-blend-mode: overlay;
        opacity: 0; transition: opacity 0.5s ease; z-index: 5;
        background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    }
}


/* =========================================
   LAYOUT STRUKTUR (Grid/Masonry)
   ========================================= */

/* GRID */
.super-gallery-wrapper.mode-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    width: 100%;
}
.super-gallery-wrapper.mode-grid.cols-m-1 { grid-template-columns: repeat(1, 1fr); }
.super-gallery-wrapper.mode-grid.cols-m-2 { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 768px) {
    .super-gallery-wrapper.mode-grid.cols-t-1 { grid-template-columns: repeat(1, 1fr); }
    .super-gallery-wrapper.mode-grid.cols-t-2 { grid-template-columns: repeat(2, 1fr); }
    .super-gallery-wrapper.mode-grid.cols-t-3 { grid-template-columns: repeat(3, 1fr); }
    .super-gallery-wrapper.mode-grid.cols-t-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
    .super-gallery-wrapper.mode-grid.cols-d-1 { grid-template-columns: repeat(1, 1fr); }
    .super-gallery-wrapper.mode-grid.cols-d-2 { grid-template-columns: repeat(2, 1fr); }
    .super-gallery-wrapper.mode-grid.cols-d-3 { grid-template-columns: repeat(3, 1fr); }
    .super-gallery-wrapper.mode-grid.cols-d-4 { grid-template-columns: repeat(4, 1fr); }
    .super-gallery-wrapper.mode-grid.cols-d-5 { grid-template-columns: repeat(5, 1fr); }
    .super-gallery-wrapper.mode-grid.cols-d-6 { grid-template-columns: repeat(6, 1fr); }
}

.super-gallery-wrapper.mode-grid.gap-0  { gap: 0; }
.super-gallery-wrapper.mode-grid.gap-sm { gap: 10px; }
.super-gallery-wrapper.mode-grid.gap-md { gap: 24px; }
.super-gallery-wrapper.mode-grid.gap-lg { gap: 40px; }

/* Ratios */
.super-gallery-wrapper.mode-grid[class*="ratio-"] .image-wrapper { position: relative; width: 100%; overflow: hidden; }
.super-gallery-wrapper.mode-grid[class*="ratio-"] .image-wrapper img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.super-gallery-wrapper.ratio-1-1 .image-wrapper  { aspect-ratio: 1 / 1; }
.super-gallery-wrapper.ratio-16-9 .image-wrapper { aspect-ratio: 16 / 9; }
.super-gallery-wrapper.ratio-4-3 .image-wrapper  { aspect-ratio: 4 / 3; }
.super-gallery-wrapper.ratio-3-2 .image-wrapper  { aspect-ratio: 3 / 2; }
.super-gallery-wrapper.ratio-3-4 .image-wrapper  { aspect-ratio: 3 / 4; }

/* MASONRY */
.super-gallery-wrapper.mode-masonry { display: block; }
.super-gallery-wrapper.mode-masonry .gallery-item {
    break-inside: avoid;
    display: inline-block; 
    width: 100%;
    margin-bottom: 0; 
}

.super-gallery-wrapper.mode-masonry.cols-m-1 { column-count: 1; }
.super-gallery-wrapper.mode-masonry.cols-m-2 { column-count: 2; }

@media (min-width: 768px) {
    .super-gallery-wrapper.mode-masonry.cols-t-1 { column-count: 1; }
    .super-gallery-wrapper.mode-masonry.cols-t-2 { column-count: 2; }
    .super-gallery-wrapper.mode-masonry.cols-t-3 { column-count: 3; }
    .super-gallery-wrapper.mode-masonry.cols-t-4 { column-count: 4; }
}
@media (min-width: 1024px) {
    .super-gallery-wrapper.mode-masonry.cols-d-1 { column-count: 1; }
    .super-gallery-wrapper.mode-masonry.cols-d-2 { column-count: 2; }
    .super-gallery-wrapper.mode-masonry.cols-d-3 { column-count: 3; }
    .super-gallery-wrapper.mode-masonry.cols-d-4 { column-count: 4; }
    .super-gallery-wrapper.mode-masonry.cols-d-5 { column-count: 5; }
    .super-gallery-wrapper.mode-masonry.cols-d-6 { column-count: 6; }
}

.super-gallery-wrapper.mode-masonry.gap-sm { column-gap: 10px; }
.super-gallery-wrapper.mode-masonry.gap-sm .gallery-item { margin-bottom: 10px; }
.super-gallery-wrapper.mode-masonry.gap-md { column-gap: 24px; }
.super-gallery-wrapper.mode-masonry.gap-md .gallery-item { margin-bottom: 24px; }
.super-gallery-wrapper.mode-masonry.gap-lg { column-gap: 40px; }
.super-gallery-wrapper.mode-masonry.gap-lg .gallery-item { margin-bottom: 40px; }
