/*
 * König-Schmiede 2026
 * Modernisierungsschicht
 */

:root {
    --ks-max-width: 1180px;
    --ks-gutter: 28px;
    --ks-text: #d9d9d9;
    --ks-muted: #9d9d9d;
    --ks-dark: #191919;
}

/* ---------------------------------------------------------
   Basis
   --------------------------------------------------------- */

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

html {
    width: 100%;
    max-width: 100%;
}

body {
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 16px;
    line-height: 1.65;
}

/* Bilder grundsätzlich responsiv */
img {
    max-width: 100%;
    height: auto;
}

/* ---------------------------------------------------------
   Typografie
   --------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-weight: 600;
    letter-spacing: -0.015em;
}

/* alte 2012er Liniengrafiken unter den Überschriften raus */
h1,
h2 {
    background: none;
}

h1 {
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.15;
    padding-bottom: 0;
    margin-bottom: 24px;
}

h2 {
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.25;
    padding-bottom: 0;
    margin-bottom: 16px;
}

h3 {
    font-size: 20px;
    line-height: 1.35;
}

h4 {
    font-size: 18px;
}

/* alte 940px Begrenzung der direkten Überschriften entfernen */
.cols > h1,
.cols > h2,
.cols > h3,
.cols > h4,
.cols > h5,
.cols > h6 {
    max-width: none;
    margin-left: var(--ks-gutter);
    margin-right: var(--ks-gutter);
}

/* ---------------------------------------------------------
   Hauptbreite
   --------------------------------------------------------- */

#header,
.section,
#breadcrumbs,
#bottom > div {
    width: min(
        calc(100% - (var(--ks-gutter) * 2)),
        var(--ks-max-width)
    );
    max-width: var(--ks-max-width);
    margin-left: auto;
    margin-right: auto;
}

.section {
    padding-top: 48px;
    padding-bottom: 40px;
}

/* alte 960px-Hauptspalte */
.cols {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 32px;
}

.cols > p {
    padding-left: var(--ks-gutter);
    padding-right: var(--ks-gutter);
    padding-bottom: 16px;
}

/* ---------------------------------------------------------
   Header vorerst fluid machen
   --------------------------------------------------------- */

#header {
    max-width: var(--ks-max-width);
}

/* ---------------------------------------------------------
   Slider
   --------------------------------------------------------- */

#slider,
.slider,
.aw-showcase,
.aw-showcase-content,
.aw-showcase-content-item {
    width: 100% !important;
    max-width: 100% !important;
}

#slider img,
.slider img,
.aw-showcase img {
    max-width: 100% !important;
    height: auto !important;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

#footer .cols {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
}

/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 900px) {

    :root {
        --ks-gutter: 20px;
    }

    .section {
        padding-top: 36px;
        padding-bottom: 30px;
    }
}

/* ---------------------------------------------------------
   Smartphone
   --------------------------------------------------------- */

@media (max-width: 600px) {

    :root {
        --ks-gutter: 16px;
    }

    body {
        font-size: 15px;
    }

    .section {
        padding-top: 28px;
        padding-bottom: 24px;
    }

    .cols > h1,
    .cols > h2,
    .cols > h3,
    .cols > h4,
    .cols > h5,
    .cols > h6,
    .cols > p {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

/* =========================================================
   KÖNIG-SCHMIEDE 2026 – HEADER
   ========================================================= */

#header_bg {
    height: auto;
    min-height: 132px;

    background:
        linear-gradient(
            to bottom,
            rgba(255,255,255,0.025),
            rgba(0,0,0,0.12)
        ),
        #151515;

    border-top: 3px solid #a95f1f;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

#header {
    width: min(
        calc(100% - (var(--ks-gutter) * 2)),
        var(--ks-max-width)
    );

    min-height: 129px;
    margin: 0 auto;
    position: relative;
}


/* ---------------------------------------------------------
   Logo
   --------------------------------------------------------- */

#logo {
    position: absolute;
    left: 0;
    top: 14px;

    margin: 0;
    padding: 0;

    max-width: 360px;

    background: none;
}

#logo div {
    padding: 0;
    display: block;
    background: none;
}

#logo div a {
    display: flex;

    width: auto;
    max-width: 360px;
    height: 92px;

    padding: 0;

    align-items: center;
    justify-content: flex-start;

    text-align: left;
}

#logo img {
    display: block;

    width: auto;
    max-width: 320px;
    max-height: 92px;

    height: auto;

    margin: 0;
}


/* ---------------------------------------------------------
   Kontaktdaten oben rechts
   --------------------------------------------------------- */

#topicons {
    position: absolute;
    right: 0;
    top: 18px;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;

    margin: 0;
    padding: 0;

    list-style: none;
}

#topicons li {
    float: none;

    margin: 0;
    padding: 0;

    background: none;
}

#topicons li span,
#topicons li a {
    font-size: 12px;
    line-height: 1.4;

    color: #929292;

    text-decoration: none;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

#topicons li a:hover {
    color: #d8d8d8;
    text-decoration: none;
}


/* ---------------------------------------------------------
   Hauptnavigation
   --------------------------------------------------------- */

#mainmenu {
    position: absolute;

    right: 0;
    top: 72px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    margin: 0;
    padding: 0;

    list-style: none;

    z-index: 1000;
}

#mainmenu > li {
    float: none;

    margin: 0;
    padding: 0;

    background: none;

    position: relative;
}

#mainmenu > li > a {
    display: block;

    padding: 9px 12px 11px;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 14px;
    font-weight: 500;
    line-height: 1;

    letter-spacing: 0.01em;

    color: #d3d3d3;

    text-decoration: none;

    border-radius: 3px;

    transition:
        color 0.18s ease,
        background-color 0.18s ease;
}

#mainmenu > li > a:hover,
#mainmenu > li.act > a,
#mainmenu > li.current-menu-item > a,
#mainmenu > li.current_page_item > a {
    color: #ffffff;

    background: rgba(255,255,255,0.06);

    text-decoration: none;
}


/* kleine Akzentlinie beim Hover */

#mainmenu > li:not(.home) > a::after {
    content: "";

    position: absolute;

    left: 12px;
    right: 12px;
    bottom: 3px;

    height: 2px;

    background: #a95f1f;

    transform: scaleX(0);
    transform-origin: center;

    transition: transform 0.18s ease;
}

#mainmenu > li:not(.home) > a:hover::after,
#mainmenu > li.current-menu-item > a::after,
#mainmenu > li.current_page_item > a::after {
    transform: scaleX(1);
}


/* ---------------------------------------------------------
   Dropdown modernisieren
   --------------------------------------------------------- */

#mainmenu li div {
    top: 37px;

    width: 230px;

    background: none;

    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;

    box-shadow:
        0 12px 30px rgba(0,0,0,0.45);

    overflow: visible;
}

#mainmenu li div i {
    display: none;
}

#mainmenu li div ul {
    padding: 10px 0;

    background: #202020;

    border-radius: 4px;

    list-style: none;
}

#mainmenu li div ul li {
    margin: 0;
    padding: 0;

    float: none;

    background: none;
}

#mainmenu li div ul li a {
    display: block;

    margin: 0;
    padding: 9px 16px;

    font-size: 13px;
    line-height: 1.3;

    color: #ababab;

    background: none;

    text-decoration: none;
}

#mainmenu li div ul li a:hover {
    color: #ffffff;

    background: rgba(255,255,255,0.055);

    text-decoration: none;
}


/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 980px) {

    #header_bg {
        min-height: 170px;
    }

    #header {
        min-height: 167px;
    }

    #logo {
        top: 14px;
    }

    #topicons {
        top: 20px;
    }

    #mainmenu {
        left: 0;
        right: auto;
        top: 120px;

        width: 100%;

        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


/* ---------------------------------------------------------
   Smartphone
   --------------------------------------------------------- */

@media (max-width: 700px) {

    #header_bg {
        min-height: 230px;
    }

    #header {
        min-height: 227px;
    }

    #logo {
        position: relative;

        top: auto;
        left: auto;

        max-width: 100%;

        padding-top: 12px;
    }

    #logo div a {
        height: auto;
        min-height: 72px;
    }

    #logo img {
        max-width: 260px;
        max-height: 78px;
    }

    #topicons {
        position: relative;

        top: auto;
        right: auto;

        margin-top: 12px;

        justify-content: flex-start;
        flex-wrap: wrap;

        gap: 7px 18px;
    }

    #mainmenu {
        position: relative;

        top: auto;
        left: auto;
        right: auto;

        margin-top: 18px;

        justify-content: flex-start;

        gap: 3px;
    }

    #mainmenu > li > a {
        padding: 8px 9px;

        font-size: 13px;
    }
}


/* =========================================================
   KÖNIG-SCHMIEDE 2026 – SLIDER
   ========================================================= */

.pxs_container {
    height: 520px;
    background: #141414;
    overflow: hidden;
}

.pxs_bg {
    height: 520px;
    background: none;
}

.pxs_bg div {
    height: 520px;
    background: none;
}

ul.pxs_slider {
    height: 520px;
}

ul.pxs_slider li {
    height: 520px;
}

/* Hauptbildbereich */
ul.pxs_slider li div.holder {
    width: min(calc(100% - 40px), 1180px);
    height: 450px;

    margin: 28px auto 0;
    padding: 0;

    border-radius: 8px;

    overflow: hidden;

    background: #111;

    box-shadow:
        0 18px 50px rgba(0,0,0,0.35);
}

/* alten Bilderrahmen komplett entfernen */
ul.pxs_slider li div.holder div.mask {
    display: none;
}

/* Sliderbilder groß und sauber */
ul.pxs_slider li div.holder > img {
    width: 100% !important;
    height: 100% !important;

    object-fit: cover;

    display: block;
}

/* Beschreibung moderner */
ul.pxs_slider li div.holder div.desc {
    position: absolute;

    left: 32px;
    bottom: 32px;

    width: min(440px, calc(100% - 64px));

    margin: 0;

    z-index: 5;
}

/* alte Papier-/Panelgrafik entfernen */
ul.pxs_slider li div.holder div.desc_bg {
    float: none;

    height: auto;

    padding: 22px 26px;

    background: rgba(18,18,18,0.84);

    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;

    backdrop-filter: blur(6px);

    box-shadow:
        0 10px 30px rgba(0,0,0,0.28);
}

ul.pxs_slider li div.holder div.desc h4 {
    max-width: none;

    margin: 0 0 8px;

    color: #fff;

    font-size: 24px;
    line-height: 1.2;
    font-weight: 600;

    text-shadow: none;
}

ul.pxs_slider li div.holder div.desc div.desc_text {
    max-width: none;
    max-height: none;

    margin: 0;

    color: #d0d0d0;

    font-size: 15px;
    line-height: 1.5;

    overflow: visible;
}

/* Details-Link */
ul.pxs_slider li div.holder div.desc a.desc_details {
    margin-top: 14px;

    color: #d9873b;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;
}

ul.pxs_slider li div.holder div.desc a.desc_details:hover {
    color: #f2a45e;
}

/* Navigation weiter unten */
.pxs_thumbnails_holder {
    top: auto;
    bottom: 16px;
}

/* alte Hover-Vorschaubilder abschalten */
ul.pxs_thumbnails li div {
    display: none !important;
}

/* Punkte etwas moderner */
ul.pxs_thumbnails li {
    width: 9px;
    height: 9px;

    margin: 0 5px;

    border-radius: 50%;

    background: rgba(255,255,255,0.28) !important;

    box-shadow: none;
}

ul.pxs_thumbnails li:hover {
    background: rgba(255,255,255,0.55) !important;
}

ul.pxs_thumbnails li.selected {
    background: #c8742c !important;
}

/* Pfeile etwas größer */
span.pxs_prev,
span.pxs_next {
    width: 24px;
    height: 24px;

    opacity: 0.75;
}

span.pxs_prev:hover,
span.pxs_next:hover {
    opacity: 1;
}

/* Ladeanzeige ruhiger */
.pxs_loading {
    top: 50%;
    transform: translateY(-50%);
}

/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .pxs_container,
    .pxs_bg,
    .pxs_bg div,
    ul.pxs_slider,
    ul.pxs_slider li {
        height: 460px;
    }

    ul.pxs_slider li div.holder {
        width: calc(100% - 30px);
        height: 390px;
    }

    ul.pxs_slider li div.holder div.desc {
        left: 22px;
        bottom: 22px;

        width: min(400px, calc(100% - 44px));
    }
}

/* ---------------------------------------------------------
   Smartphone
   --------------------------------------------------------- */

@media (max-width: 600px) {

    .pxs_container,
    .pxs_bg,
    .pxs_bg div,
    ul.pxs_slider,
    ul.pxs_slider li {
        height: 400px;
    }

    ul.pxs_slider li div.holder {
        width: calc(100% - 20px);
        height: 335px;

        margin-top: 16px;

        border-radius: 5px;
    }

    ul.pxs_slider li div.holder div.desc {
        left: 12px;
        bottom: 12px;

        width: calc(100% - 24px);
    }

    ul.pxs_slider li div.holder div.desc_bg {
        padding: 14px 16px;
    }

    ul.pxs_slider li div.holder div.desc h4 {
        font-size: 19px;
    }

    ul.pxs_slider li div.holder div.desc div.desc_text {
        font-size: 13px;
        line-height: 1.4;
    }
}

/* =========================================================
   KÖNIG-SCHMIEDE 2026 – GALERIE THUMBNAILS
   ========================================================= */

/* Vorschaubilder nicht verzerren */
#content ul.gallery li img,
.gallery img {
    width: 100% !important;
    height: 100% !important;

    object-fit: cover;
    object-position: center;

    display: block;
}

/* vorhandene Thumbnail-Fläche sauber begrenzen */
#content ul.gallery li a,
.gallery li a {
    display: block;
    overflow: hidden;
}

/* keine Bildverzerrung durch alte Inline-Maße */
#content ul.gallery li img {
    max-width: none;
}

/* =========================================================
   KÖNIG-SCHMIEDE 2026 – GALERIE / ALBUM COVER
   ========================================================= */

.dt_album_cover .loading-image {
    width: 100%;
    aspect-ratio: 29 / 15;

    overflow: hidden;

    position: relative;
}

.dt_album_cover .loading-image img {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;

    object-fit: cover;
    object-position: center;
}

/* Alte feste Bildmaße dürfen die Vorschau nicht mehr verzerren */
.dt_album_cover img {
    width: 100% !important;
    height: 100% !important;
}


/* =========================================================
   FIX: alte Galerie-Bildverzerrung endgültig überschreiben
   ========================================================= */

.cols.benefits .col_1-3.dt_album_cover .loading-image {
    width: 290px !important;
    height: 150px !important;
    overflow: hidden !important;
    position: relative;
}

.cols.benefits .col_1-3.dt_album_cover .loading-image img {
    display: block !important;

    width: 290px !important;
    height: 150px !important;

    max-width: none !important;

    object-fit: cover !important;
    object-position: center center !important;
}


/* =========================================================
   FIX: Foto-Galerie ohne verzerrte Thumbnails
   ========================================================= */

.cols.benefits .col_1-3.highslide .loading-image {
    width: 290px !important;
    height: 150px !important;

    overflow: hidden !important;
    position: relative;
}

.cols.benefits .col_1-3.highslide .loading-image img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;

    object-fit: cover !important;
    object-position: center center !important;
}

/* alte direkte Bildregel nicht mehr verzerren lassen */
.cols.benefits .col_1-3.highslide img {
    width: 100% !important;
    height: 100% !important;
}


/* =========================================================
   König-Schmiede 2026 – Typografie
   ========================================================= */

@font-face {
    font-family: "KS Roboto Slab";
    src: url("../fonts/RobotoSlab-Variable.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

/* Ruhige, gut lesbare Grundschrift */
body {
    font-family:
        "Segoe UI",
        "Helvetica Neue",
        Arial,
        sans-serif;
}

/* Gediegene, handwerkliche Akzentschrift */
h1,
h2,
h3,
h4,
h5,
h6,
#mainmenu,
#mainmenu a {
    font-family:
        "KS Roboto Slab",
        Rockwell,
        Georgia,
        serif !important;
}

/* Navigation */
#mainmenu > li > a {
    font-weight: 600 !important;
    letter-spacing: 0.015em !important;
}

/* Hauptüberschriften */
h1,
h2 {
    font-weight: 600;
    letter-spacing: 0.005em;
}

/* Kleinere Überschriften etwas ruhiger */
h3,
h4,
h5,
h6 {
    font-weight: 500;
}


/* =========================================================
   König-Schmiede 2026 – Finetuning & Responsive
   ========================================================= */

/* ---------- Grundtypografie ---------- */

body {
    font-size: 16px;
    line-height: 1.7;
}

p,
li {
    line-height: 1.7;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.22;
    margin-top: 0;
}

h1 {
    margin-bottom: 22px;
}

h2 {
    margin-bottom: 18px;
}

h3 {
    margin-bottom: 14px;
}

/* Fließtext etwas ruhiger */
#content,
#content p,
.section p {
    color: rgba(255,255,255,0.86);
}

/* Links im Inhalt gezielter hervorheben */
#content a:not(.highslide):not(.button),
.section a:not(.highslide):not(.button) {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}


/* ---------- Header / Navigation ---------- */

#header_bg {
    min-height: 126px;
}

#header {
    min-height: 126px;
}

#mainmenu {
    gap: 22px;
}

#mainmenu > li > a {
    font-size: 16px;
    line-height: 1.3;
    padding: 8px 0 10px;
}

#topicons {
    font-size: 13px;
    opacity: 0.88;
}


/* ---------- Seitenbreite / Luft ---------- */

.section {
    padding-top: 52px;
    padding-bottom: 56px;
}

#content {
    min-width: 0;
}

.cols {
    max-width: 100%;
}


/* ---------- Slider ---------- */

.pxs_container {
    margin-top: 8px;
    margin-bottom: 34px;
}

.pxs_slider_wrapper {
    overflow: hidden;
}

.pxs_slider img {
    display: block;
    max-width: 100%;
    height: auto;
}


/* ---------- Galerie ---------- */

.cols.benefits {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.cols.benefits .col_1-3 {
    float: none;
}

.cols.benefits .col_1-3.highslide {
    flex: 0 0 290px;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 900px) {

    :root {
        --ks-gutter: 22px;
    }

    #header_bg,
    #header {
        min-height: 150px;
    }

    #header {
        padding-left: var(--ks-gutter);
        padding-right: var(--ks-gutter);
    }

    #logo {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        padding-top: 18px;
    }

    #logo img {
        max-width: 280px;
        height: auto;
    }

    #topicons {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        margin-top: 8px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    #mainmenu {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        margin-top: 14px;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px 18px;
    }

    #mainmenu > li > a {
        font-size: 15px;
    }

    .section {
        padding-top: 38px;
        padding-bottom: 42px;
    }

    .cols.benefits {
        gap: 16px;
        justify-content: center;
    }
}


/* =========================================================
   Smartphone
   ========================================================= */

@media (max-width: 640px) {

    body {
        font-size: 15px;
        line-height: 1.65;
    }

    :root {
        --ks-gutter: 16px;
    }

    #header_bg {
        min-height: 0;
    }

    #header {
        min-height: 0;
        padding-top: 0;
        padding-bottom: 16px;
    }

    #logo {
        text-align: center;
        padding-top: 16px;
    }

    #logo img {
        max-width: min(280px, 82vw);
    }

    #topicons {
        justify-content: center;
        text-align: center;
        font-size: 12px;
        line-height: 1.45;
        margin-top: 10px;
    }

    #mainmenu {
        width: 100%;
        justify-content: center;
        gap: 6px 14px;
        margin-top: 14px;
    }

    #mainmenu > li {
        float: none;
    }

    #mainmenu > li > a {
        font-size: 14px;
        padding: 7px 0;
    }

    #mainmenu ul {
        position: absolute;
        min-width: 190px;
    }

    h1 {
        font-size: clamp(26px, 8vw, 34px);
        margin-bottom: 18px;
    }

    h2 {
        font-size: clamp(22px, 7vw, 29px);
    }

    h3 {
        font-size: 20px;
    }

    .section {
        width: 100%;
        padding: 28px var(--ks-gutter) 34px;
    }

    #breadcrumbs {
        width: 100%;
        padding-left: var(--ks-gutter);
        padding-right: var(--ks-gutter);
        font-size: 12px;
    }

    .pxs_container {
        width: 100% !important;
        height: auto !important;
        margin-bottom: 26px;
    }

    .pxs_slider_wrapper {
        width: 100% !important;
        height: 330px !important;
    }

    .pxs_slider li {
        height: 330px !important;
    }

    .pxs_slider li > img,
    .pxs_slider img {
        width: 100% !important;
        height: 330px !important;
        object-fit: cover !important;
    }

    .desc_outer {
        max-width: calc(100% - 32px) !important;
    }

    .desc {
        font-size: 13px !important;
        line-height: 1.45 !important;
    }

    .cols.benefits {
        display: block;
    }

    .cols.benefits .col_1-3,
    .cols.benefits .col_1-3.highslide {
        width: 100% !important;
        max-width: 420px;
        height: auto !important;
        margin: 0 auto 18px !important;
        padding: 0 !important;
        display: block;
    }

    .cols.benefits .col_1-3.highslide .loading-image {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 29 / 15;
    }

    .cols.benefits .col_1-3.highslide .loading-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .cols.benefits .mask {
        display: none !important;
    }

    img,
    iframe {
        max-width: 100%;
    }
}


/* =========================================================
   Sehr kleine Smartphones
   ========================================================= */

@media (max-width: 420px) {

    #mainmenu {
        gap: 4px 10px;
    }

    #mainmenu > li > a {
        font-size: 13px;
    }

    .pxs_slider_wrapper,
    .pxs_slider li,
    .pxs_slider li > img,
    .pxs_slider img {
        height: 280px !important;
    }

    .section {
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* =========================================================
   MOBILE FIX – Header + Parallax Slider
   ========================================================= */

@media (max-width: 640px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    #header_bg,
    #header,
    #content,
    .section,
    .cols,
    #breadcrumbs {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* ---------- Header ---------- */

    #header {
        box-sizing: border-box;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    #logo {
        width: 100% !important;
        text-align: center;
    }

    #logo img {
        max-width: 240px !important;
        width: auto !important;
        height: auto !important;
    }

    #topicons {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden;
        justify-content: center !important;
    }

    #topicons li,
    #topicons span {
        max-width: 100% !important;
        white-space: normal !important;
    }

    #mainmenu {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden;
    }


    /* ---------- Slider Container ---------- */

    #pxs_container,
    .pxs_container {
        width: 100% !important;
        max-width: 100% !important;
        height: 280px !important;
        overflow: hidden !important;
        position: relative !important;
    }

    .pxs_slider_wrapper {
        width: 100% !important;
        max-width: 100% !important;
        height: 280px !important;
        overflow: hidden !important;
        position: relative !important;
    }

    /*
     * Das alte JS setzt Desktopbreiten auf UL und LI.
     * Auf Mobile zwingen wir jede Slide auf Viewportbreite.
     */
    .pxs_slider {
        height: 280px !important;
    }

    .pxs_slider > li {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 280px !important;
        overflow: hidden !important;
    }

    .pxs_slider > li > img {
        width: 100% !important;
        height: 280px !important;
        max-width: none !important;
        object-fit: cover !important;
        object-position: center center !important;
        display: block !important;
    }

    /* Hintergrundebenen nicht über den Viewport hinausschieben */
    .pxs_bg1,
    .pxs_bg2,
    .pxs_bg3 {
        height: 280px !important;
    }

    /* Beschreibung auf Mobile klein halten */
    .desc_outer {
        width: auto !important;
        max-width: calc(100vw - 32px) !important;
        left: 16px !important;
        right: 16px !important;
    }

    .desc {
        max-width: 100% !important;
    }

    .pxs_thumbnails_holder {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }

    .pxs_thumbnails {
        max-width: 100% !important;
    }
}

@media (max-width: 420px) {

    #pxs_container,
    .pxs_container,
    .pxs_slider_wrapper,
    .pxs_slider,
    .pxs_slider > li,
    .pxs_slider > li > img,
    .pxs_bg1,
    .pxs_bg2,
    .pxs_bg3 {
        height: 250px !important;
    }
}


/* =========================================================
   König-Schmiede 2026
   MOBILE LAYOUT – echte responsive Breiten
   ========================================================= */

@media (max-width: 640px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /*
     * Alte 940/960px-Themebreiten endgültig neutralisieren
     */
    #header,
    #content,
    #breadcrumbs,
    .section,
    .cols,
    .cont_holder,
    .content,
    #bottom > div {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /*
     * Alte Float-Spalten auf Mobile zu echten Blöcken machen
     */
    .col_1-2,
    .col_1-3,
    .col_2-3,
    .col_1-4,
    .col_3-4,
    .col_1-5,
    .col_2-5,
    .col_3-5,
    .col_4-5 {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* ---------- Inhalt ---------- */

    .section {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    #content,
    #content p,
    #content li,
    .section p,
    .section li {
        max-width: 100% !important;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    #content p {
        font-size: 15px;
        line-height: 1.7;
    }

    /*
     * Bilder im normalen Seiteninhalt
     */
    #content img,
    .section img {
        max-width: 100% !important;
        height: auto !important;
    }

    /*
     * Alte Inline-Breiten von Bildern/Frames nicht mehr
     * den Viewport sprengen lassen
     */
    .frame,
    .frame-img,
    .wp-caption {
        width: auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ---------- Breadcrumb ---------- */

    #breadcrumbs {
        padding-left: 18px !important;
        padding-right: 18px !important;
        overflow: hidden;
        white-space: normal !important;
    }

    /* ---------- Header ---------- */

    #header_bg {
        min-height: 0 !important;
    }

    #header {
        min-height: 0 !important;
        padding: 16px 18px 18px !important;
        overflow: hidden;
    }

    #logo {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;

        width: 100% !important;
        text-align: center !important;
        margin: 0 0 12px !important;
        padding: 0 !important;
    }

    #logo img {
        width: auto !important;
        max-width: 230px !important;
        height: auto !important;
    }

    #topicons {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;

        width: 100% !important;
        max-width: 100% !important;

        margin: 0 0 12px !important;

        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 5px 12px !important;

        font-size: 12px !important;
        line-height: 1.4 !important;
        text-align: center;
    }

    #topicons li,
    #topicons span {
        float: none !important;
        white-space: normal !important;
        max-width: 100% !important;
    }

    /*
     * Vorläufige Mobile-Navigation.
     * Danach ersetzen wir das durch Hamburger.
     */
    #mainmenu {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;

        width: 100% !important;
        max-width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 4px 14px !important;

        overflow: visible !important;
    }

    #mainmenu > li {
        float: none !important;
        width: auto !important;
        margin: 0 !important;
    }

    #mainmenu > li > a {
        font-size: 14px !important;
        padding: 7px 0 !important;
        white-space: nowrap;
    }

    /* ---------- Slider ---------- */

    #pxs_container,
    .pxs_container,
    .pxs_slider_wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /*
     * Bilder werden nicht gestreckt.
     * Crop statt Gummigesicht.
     */
    .pxs_slider li > img,
    .pxs_slider img {
        max-width: 100% !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    /* ---------- Firmengeschichte / normale Seiten ---------- */

    #content h1,
    #content h2,
    #content h3,
    .section h1,
    .section h2,
    .section h3 {
        max-width: 100% !important;
        overflow-wrap: break-word;
    }

    #content h1 {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }

    #content h2 {
        font-size: 23px !important;
    }
}

@media (max-width: 420px) {

    .section {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    #header {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    #logo img {
        max-width: 210px !important;
    }

    #mainmenu {
        gap: 3px 11px !important;
    }

    #mainmenu > li > a {
        font-size: 13px !important;
    }
}


/* =========================================================
   MOBILE ROOT FIX – altes 998px min-width entfernen
   ========================================================= */

@media (max-width: 640px) {

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

    #header_bg,
    #header,
    #breadcrumbs_bg,
    #breadcrumbs_m,
    #breadcrumbs,
    #content_t,
    #content_spot_t,
    #content_spot_b,
    #content,
    #bottom,
    #bottom > div {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}


/* =========================================================
   MOBILE FINETUNING – Header, Navigation, Firmengeschichte
   ========================================================= */

@media (max-width: 640px) {

    /* ---------- Header ---------- */

    #header {
        padding-top: 18px !important;
        padding-bottom: 14px !important;
    }

    #logo {
        margin-bottom: 14px !important;
    }

    #logo img {
        max-width: 220px !important;
    }

    #topicons {
        font-size: 11px !important;
        gap: 4px 10px !important;
        margin-bottom: 10px !important;
    }

    /* ---------- Mobile Navigation ---------- */

    #mainmenu {
        gap: 2px 10px !important;
        justify-content: center !important;
    }

    #mainmenu > li > a {
        font-size: 13px !important;
        padding: 6px 0 7px !important;
        letter-spacing: 0.005em !important;
    }

    /* ---------- Seitenüberschrift ---------- */

    #breadcrumbs h1,
    #content h1,
    .section h1 {
        font-size: 30px !important;
        line-height: 1.15 !important;
    }

    /* ---------- Firmengeschichte / Textseiten ---------- */

    #content h3,
    .section h3 {
        font-size: 22px !important;
        line-height: 1.28 !important;
        margin-bottom: 22px !important;
    }

    #content p,
    .section p {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 18px !important;
    }

    #content strong,
    .section strong {
        font-weight: 600 !important;
    }

    /* ---------- Bilder / Frames ---------- */

    .frame.position-center,
    .frame {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    .frame img,
    .frame-img,
    #content img {
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* verhindert unnötige große Leerflächen durch alte feste Höhen */
    .frame,
    .frame.position-center {
        height: auto !important;
        min-height: 0 !important;
    }

    /* ---------- Startseitentext ---------- */

    body.home #content p,
    body.home .section p {
        text-align: center;
        max-width: 34em;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 420px) {

    #mainmenu {
        gap: 2px 8px !important;
    }

    #mainmenu > li > a {
        font-size: 12px !important;
    }

    #breadcrumbs h1,
    #content h1,
    .section h1 {
        font-size: 27px !important;
    }

    #content h3,
    .section h3 {
        font-size: 20px !important;
    }

    #content p,
    .section p {
        font-size: 14px !important;
    }
}


/* =========================================================
   MOBILE FIX 2 – Vordergrundbilder im Startseiten-Slider
   ========================================================= */

@media (max-width: 640px) {

    /* Slider-Grundfläche */
    #pxs_container,
    .pxs_container,
    .pxs_slider_wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .pxs_slider {
        overflow: hidden !important;
    }

    #pxs_container,
    .pxs_container,
    .pxs_slider_wrapper,
    .pxs_slider,
    .pxs_slider > li {
        height: 260px !important;
    }

    .pxs_slider {
        position: relative !important;
    }

    .pxs_slider > li {
        position: relative !important;
        overflow: hidden !important;
    }

    /* WICHTIG:
       Das alte Theme benutzt nicht nur li > img,
       sondern holder + holder img + mask.
    */
    .pxs_slider > li .holder,
    .pxs_slider > li .mask {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 260px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .pxs_slider > li .holder {
        z-index: 2 !important;
    }

    .pxs_slider > li .mask {
        z-index: 3 !important;
        background-size: 100% 100% !important;
    }

    .pxs_slider > li .holder img,
    .pxs_slider > li > img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 260px !important;
        object-fit: cover !important;
        object-position: center center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Textlayer im Slider */
    .pxs_slider > li .desc_outer,
    .pxs_slider > li .desc {
        z-index: 4 !important;
        max-width: calc(100% - 24px) !important;
    }

    .pxs_slider > li .desc_outer {
        left: 12px !important;
        right: 12px !important;
    }

    /* Thumbnail-Leiste */
    .pxs_thumbnails_holder {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 6px !important;
    }

    .pxs_thumbnails {
        max-width: 100% !important;
    }

    /* Parallax-Hintergründe ebenfalls passend halten */
    .pxs_bg1,
    .pxs_bg2,
    .pxs_bg3 {
        height: 260px !important;
    }
}

@media (max-width: 420px) {
    #pxs_container,
    .pxs_container,
    .pxs_slider_wrapper,
    .pxs_slider,
    .pxs_slider > li,
    .pxs_slider > li .holder,
    .pxs_slider > li .mask,
    .pxs_slider > li .holder img,
    .pxs_slider > li > img,
    .pxs_bg1,
    .pxs_bg2,
    .pxs_bg3 {
        height: 230px !important;
    }
}


/* =========================================================
   MOBILE FIX 3 – Parallax-Hintergrund aus dem Layoutfluss
   ========================================================= */

@media (max-width: 640px) {

    #pxs_container,
    .pxs_container {
        position: relative !important;
        overflow: hidden !important;
    }

    .pxs_bg {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;

        width: 100% !important;
        height: 100% !important;

        overflow: hidden !important;
        z-index: 1 !important;
    }

    .pxs_slider_wrapper {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;

        width: 100% !important;
        height: 100% !important;

        z-index: 2 !important;
    }

    .pxs_thumbnails_holder {
        z-index: 5 !important;
    }
}


/* =========================================================
   MOBILE NAVIGATION – Hamburger
   ========================================================= */

#mobile-menu-toggle {
    display: none;
}

@media (max-width: 640px) {

    #mobile-menu-toggle {
        display: flex !important;
        width: 44px;
        height: 40px;
        padding: 8px 9px;
        margin: 8px auto 6px;
        flex-direction: column;
        justify-content: space-between;
        align-items: stretch;
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: 4px;
        cursor: pointer;
        box-sizing: border-box;
    }

    #mobile-menu-toggle > span:not(.screen-reader-text) {
        display: block;
        width: 100%;
        height: 2px;
        background: #f2f2f2;
        border-radius: 2px;
        transition: transform .25s ease, opacity .25s ease;
    }

    #mobile-menu-toggle[aria-expanded="true"] > span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    #mobile-menu-toggle[aria-expanded="true"] > span:nth-child(2) {
        opacity: 0;
    }

    #mobile-menu-toggle[aria-expanded="true"] > span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    .screen-reader-text {
        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;
    }

    #mainmenu {
        display: none !important;
        width: 100% !important;
        margin: 8px 0 0 !important;
        padding: 0 !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        background: rgba(20,20,20,0.96);
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    #mainmenu.mobile-open {
        display: flex !important;
    }

    #mainmenu > li {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    #mainmenu > li > a {
        display: block !important;
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 15px !important;
        line-height: 1.3 !important;
        text-align: left !important;
        box-sizing: border-box;
    }

    #mainmenu > li > div {
        position: static !important;
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: rgba(255,255,255,0.03) !important;
        box-shadow: none !important;
    }

    #mainmenu > li > div > ul {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 0 6px !important;
    }

    #mainmenu > li > div > ul > li > a {
        display: block !important;
        padding: 9px 16px 9px 30px !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
    }

    #mainmenu > li > div > i {
        display: none !important;
    }
}


/* =========================================================
   MOBILE NAVIGATION – Dropdowns sauber stapeln
   ========================================================= */

@media (max-width: 640px) {

    #mainmenu,
    #mainmenu li,
    #mainmenu ul,
    #mainmenu div {
        box-sizing: border-box !important;
    }

    #mainmenu > li {
        position: relative !important;
        float: none !important;
        clear: both !important;
        height: auto !important;
        min-height: 0 !important;
    }

    #mainmenu > li > a {
        position: relative !important;
        float: none !important;
        height: auto !important;
        min-height: 0 !important;
    }

    #mainmenu > li > div {
        position: static !important;
        float: none !important;
        clear: both !important;

        display: block !important;
        visibility: visible !important;

        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;

        top: auto !important;
        left: auto !important;
        right: auto !important;

        margin: 0 !important;
        padding: 0 !important;

        opacity: 1 !important;
        transform: none !important;

        background: rgba(255,255,255,0.035) !important;
    }

    #mainmenu > li > div > ul {
        position: static !important;
        float: none !important;

        display: block !important;

        width: 100% !important;
        height: auto !important;

        margin: 0 !important;
        padding: 4px 0 8px !important;
    }

    #mainmenu > li > div > ul > li {
        position: static !important;
        float: none !important;
        clear: both !important;

        display: block !important;

        width: 100% !important;
        height: auto !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    #mainmenu > li > div > ul > li > a {
        position: static !important;
        float: none !important;

        display: block !important;

        width: 100% !important;
        height: auto !important;

        margin: 0 !important;
        padding: 8px 16px 8px 32px !important;

        font-size: 13px !important;
        line-height: 1.35 !important;
        text-align: left !important;

        opacity: .8;
    }

    #mainmenu > li > div > i {
        display: none !important;
    }
}


/* =========================================================
   MOBILE NAVIGATION – Untermenüs aufklappbar
   ========================================================= */

@media (max-width: 640px) {

    #mainmenu > li.menu-item-has-children {
        position: relative !important;
    }

    #mainmenu > li.menu-item-has-children > a {
        padding-right: 58px !important;
    }

    .mobile-submenu-toggle {
        position: absolute !important;
        top: 5px !important;
        right: 8px !important;

        width: 40px !important;
        height: 38px !important;

        margin: 0 !important;
        padding: 0 !important;

        border: 0 !important;
        background: transparent !important;
        color: #eee !important;

        font-size: 22px !important;
        line-height: 38px !important;
        text-align: center !important;

        cursor: pointer !important;
        z-index: 10 !important;
    }

    .mobile-submenu-toggle::before {
        content: "›";
        display: block;
        transform: rotate(90deg);
        transition: transform .2s ease;
    }

    .mobile-submenu-toggle[aria-expanded="true"]::before {
        transform: rotate(-90deg);
    }

    #mainmenu > li.menu-item-has-children > div {
        display: none !important;
    }

    #mainmenu > li.menu-item-has-children.submenu-open > div {
        display: block !important;
    }
}


/* Alten separaten Home-Icon-Menüpunkt entfernen */
#mainmenu > li.home {
    display: none !important;
}


/* Untermenü-Schalter dürfen niemals auf Desktop erscheinen */
.mobile-submenu-toggle {
    display: none;
}

@media (max-width: 640px) {
    .mobile-submenu-toggle {
        display: block !important;
    }
}


/* =========================================================
   BREADCRUMBS / GRAUE NAVIGATION AUFRÄUMEN
   ========================================================= */

/* Desktop: deutlich dezenter */
#breadcrumbs_bg,
#breadcrumbs_m {
    background: #e9e9e9 !important;
}

#breadcrumbs {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

#breadcrumbs,
#breadcrumbs a {
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #555 !important;
}

#breadcrumbs h1 {
    margin: 0 !important;
}

/* Mobil: Breadcrumbs komplett weg */
@media (max-width: 640px) {
    #breadcrumbs_bg,
    #breadcrumbs_m,
    #breadcrumbs {
        display: none !important;
    }
}


/* =========================================================
   DESKTOP HEADER – Hauptmenü wieder sauber im schwarzen Bereich
   ========================================================= */

@media (min-width: 641px) {

    #header_bg {
        position: relative !important;
        background: linear-gradient(
            180deg,
            #222 0%,
            #181818 100%
        ) !important;
    }

    #header {
        position: relative !important;
        min-height: 205px !important;
        padding-bottom: 58px !important;
        box-sizing: border-box !important;
    }

    #mainmenu {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;

        width: 100% !important;
        margin: 0 !important;
        padding: 0 15px 12px !important;

        box-sizing: border-box !important;
        background: transparent !important;
    }

    #mainmenu > li > a {
        color: #f2f2f2 !important;
    }

    /* Breadcrumb-Leiste beginnt wirklich erst unter dem Header */
    #breadcrumbs_bg {
        position: relative !important;
        clear: both !important;
        z-index: 1 !important;
    }
}


/* =========================================================
   MOBILE GALERIE – kompaktere Vorschaubilder
   ========================================================= */

@media (max-width: 640px) {

    .highslide-gallery {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 14px !important;
        box-sizing: border-box !important;
    }

    .highslide-gallery > a.col_1-3 {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        float: none !important;
        display: block !important;
        overflow: hidden !important;
    }

    .highslide-gallery .loading-image {
        width: 100% !important;
        height: 220px !important;
        overflow: hidden !important;
    }

    .highslide-gallery .loading-image img {
        display: block !important;
        width: 100% !important;
        height: 220px !important;
        object-fit: cover !important;
        object-position: center center !important;
    }
}

@media (max-width: 420px) {

    .highslide-gallery .loading-image,
    .highslide-gallery .loading-image img {
        height: 190px !important;
    }
}


/* =========================================================
   DESKTOP GALERIE – saubere 3-Spalten-Vorschau
   ========================================================= */

@media (min-width: 641px) {

    .highslide-gallery {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 18px !important;
        padding: 18px 0 !important;
        box-sizing: border-box !important;
    }

    .highslide-gallery > a.col_1-3 {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        float: none !important;
        display: block !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .highslide-gallery .loading-image {
        width: 100% !important;
        height: 210px !important;
        overflow: hidden !important;
    }

    .highslide-gallery .loading-image img {
        display: block !important;
        width: 100% !important;
        height: 210px !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    .highslide-gallery .mask {
        width: 100% !important;
        height: 100% !important;
    }
}


/* Galerie-Bilder auch dann korrekt begrenzen,
   falls ein Bild direkt im Link landet */

@media (min-width: 641px) {
    .highslide-gallery > a.col_1-3 > img {
        display: block !important;
        width: 100% !important;
        height: 210px !important;
        object-fit: cover !important;
        object-position: center center !important;
    }
}

@media (max-width: 640px) {
    .highslide-gallery > a.col_1-3 > img {
        display: block !important;
        width: 100% !important;
        height: 220px !important;
        object-fit: cover !important;
        object-position: center center !important;
    }
}

@media (max-width: 420px) {
    .highslide-gallery > a.col_1-3 > img {
        height: 190px !important;
    }
}


/* =========================================================
   DESKTOP GALERIE – echte Bildproportionen erhalten
   ========================================================= */

@media (min-width: 641px) {

    .highslide-gallery {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 18px !important;
        align-items: start !important;
    }

    .highslide-gallery > a.col_1-3 {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        float: none !important;
        display: block !important;
        overflow: hidden !important;
    }

    .highslide-gallery .loading-image {
        width: 100% !important;
        height: auto !important;
        overflow: hidden !important;
    }

    .highslide-gallery .loading-image img,
    .highslide-gallery > a.col_1-3 > img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }
}


/* =========================================================
   MOBILE HIGHSLIDE – responsive Bildansicht
   ========================================================= */

@media (max-width: 640px) {

    /* Highslide-Inhalt immer innerhalb des Displays halten */
    .highslide-wrapper,
    .highslide-html,
    .highslide-image,
    .highslide-container img {
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 120px) !important;
    }

    .highslide-image {
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }

    /* Rahmen etwas kompakter */
    .highslide-wrapper,
    .highslide-outline {
        max-width: calc(100vw - 16px) !important;
    }

    /* 1:1 / Full Expand auf Mobil abschalten */
    .highslide-full-expand {
        display: none !important;
    }

    /* Steuerleiste kompakter und zentriert */
    .highslide-controls {
        max-width: calc(100vw - 24px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .highslide-controls ul {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
    }

    /* Close-Button gut erreichbar */
    .highslide-close {
        z-index: 10010 !important;
    }
}

/* =========================================================
   HIGHSLIDE – Größenberechnung wieder dem Plugin überlassen
   ========================================================= */

@media (max-width: 640px) {

    .highslide-image {
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: initial !important;
    }

    .highslide-wrapper,
    .highslide-outline {
        max-width: none !important;
        max-height: none !important;
    }

    .highslide-full-expand {
        display: none !important;
    }
}


/* Highslide 1:1 auf Touch-Geräten immer aus */
@media (hover: none) and (pointer: coarse) {
    .highslide-full-expand {
        display: none !important;
    }
}


/* Highslide 1:1 grundsätzlich entfernen */
.highslide-full-expand {
    display: none !important;
}


/* Galeriebilder nicht markieren oder herausziehen */
.highslide-gallery img,
.highslide-image {
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

