.kommunen-certificates-grid-wrap-v2 {
    position: relative;
}

.kommunen-certificates-slider-v2 {
    overflow: hidden;
    touch-action: pan-y;
    /* !important noetig: Elementor's swiper.min.css setzt .swiper{padding:0}
     * mit identischer Spezifitaet, laedt aber NACH certificate-grid.css und
     * gewinnt sonst (live verifiziert) - ohne diesen Puffer wird der rote
     * Hover-Rand der Zertifikatskarten oben/unten vom overflow:hidden
     * abgeschnitten (Admin-Meldung 2026-08-20). */
    padding: 8px 0 !important;
}

.kommunen-certificates-slider-header-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.kommunen-certificates-slider-intro-v2 {
    max-width: 620px;
}

.kommunen-certificates-slider-kicker-v2 {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(176, 4, 0, 0.08);
    color: #b00400;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.kommunen-certificates-slider-intro-v2 p {
    margin: 0.7rem 0 0;
    color: #5f6b7d;
    font-size: 0.96rem;
    line-height: 1.55;
}

.kommunen-certificates-slider-meta-v2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.kommunen-certificates-slider-progresscopy-v2 {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.kommunen-certificates-slider-hint-v2 {
    color: #5f6b7d;
    font-size: 0.82rem;
    font-weight: 600;
}

.kommunen-certificates-slider-count-v2 {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    color: #1a2332;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
}

.kommunen-certificates-slider-count-v2 strong {
    color: #b00400;
    font-size: 1.2rem;
    min-width: 4.6ch;
    text-align: right;
}

.kommunen-certificates-slider-arrows-v2 {
    display: inline-flex;
    gap: 0.65rem;
}

.kommunen-certificates-slider-arrows-v2 button,
.kommunen-certificates-slider-arrows-v2 button[type="button"],
.kommunen-certificates-slider-arrows-v2 button[type="submit"] {
    color: #b00400 !important;
    border-color: #b00400 !important;
    background-color: transparent !important;
}

.kommunen-certificates-slider-arrows-v2 button:focus,
.kommunen-certificates-slider-arrows-v2 button[type="button"]:focus,
.kommunen-certificates-slider-arrows-v2 button[type="submit"]:focus {
    color: #b00400 !important;
    border-color: #b00400 !important;
    background-color: transparent !important;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
}

@media (hover: hover) and (pointer: fine) {
    .kommunen-certificates-slider-arrows-v2 button:hover,
    .kommunen-certificates-slider-arrows-v2 button[type="button"]:hover,
    .kommunen-certificates-slider-arrows-v2 button[type="submit"]:hover {
        color: #b00400 !important;
        border-color: #b00400 !important;
        background-color: transparent !important;
        text-decoration: none !important;
        box-shadow: none !important;
        outline: none !important;
    }
}

.kommunen-certificates-nav-v2 {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(176, 4, 0, 0.14);
    border-radius: 999px;
    background: #ffffff;
    color: #b00400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(17, 23, 43, 0.08);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.kommunen-certificates-nav-v2:focus-visible {
    background: #b00400;
    border-color: #b00400;
    color: #ffffff;
    transform: translateY(-2px);
}

@media (hover: hover) and (pointer: fine) {
    .kommunen-certificates-nav-v2:hover {
        background: #b00400;
        border-color: #b00400;
        color: #ffffff;
        transform: translateY(-2px);
    }
}

.kommunen-certificates-nav-v2.swiper-button-disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.kommunen-certificates-slider-progressbar-v2 {
    position: relative;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(17, 23, 43, 0.08);
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.kommunen-certificates-slider-progressfill-v2 {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #b00400 0%, #d00500 100%);
    transition: width 0.35s ease;
}

.kommunen-certificates-grid-v2 {
    align-items: stretch;
    margin-top: 0;
}

.kommunen-certificate-item-v2 {
    display: flex;
    height: 100%;
}

/* Gleiche Kartenhoehe je Reihe: height:100% auf einem Flex-Item mit
 * auto-hohem Parent bewirkt kein Stretch (Prozent-Hoehe ohne definierte
 * Elternhoehe), dadurch skalierte jede Karte nur auf ihre eigene
 * Texthoehe. height:auto laesst align-items:stretch des Wrapper
 * (.kommunen-certificates-grid-v2) greifen, sodass sich alle sichtbaren
 * Karten an der hoechsten Karte der Reihe orientieren (Admin-
 * Anforderung 2026-08-20, erweitert 2026-08-25). !important noetig:
 * Swiper's eigenes Bundle-CSS setzt .swiper-slide{height:100%} mit
 * identischer Spezifitaet (einzelne Klasse) - ohne !important gewinnt
 * das je nach Ladereihenfolge nur fuer einen Teil der Slides (live
 * verifiziert).
 * Admin-Fund 2026-08-25: urspruenglich nur ab min-width:1025px aktiv -
 * das Karussell zeigt aber laut certificate-grid.js Swiper-Breakpoints
 * bereits ab 640px 2 und ab 1024px 3 Karten pro Reihe (slidesPerView),
 * betrifft also auch <1025px. Einschraenkung entfernt, Regel gilt jetzt
 * fuer alle Breiten (bei slidesPerView:1 unterhalb 640px wirkungslos,
 * da dort ohnehin nur eine Karte je Reihe sichtbar ist). */
.kommunen-certificate-item-v2 {
    height: auto !important;
}

.kommunen-certificate-card-v2 {
    width: 100%;
    text-decoration: none !important;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1a2332 !important;
    isolation: isolate;
    min-height: clamp(250px, 28vw, 330px);
}

.kommunen-certificate-card-v2::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.7) 0%, transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(15, 23, 42, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.kommunen-certificate-card-v2:focus-visible {
    border-color: rgba(176, 4, 0, 0.5);
    color: #1a2332 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.kommunen-certificate-card-v2:focus-visible::before {
    opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
    .kommunen-certificate-card-v2:hover {
        border-color: rgba(176, 4, 0, 0.5);
        color: #1a2332 !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    }

    .kommunen-certificate-card-v2:hover::before {
        opacity: 1;
    }
}

.kommunen-certificate-icon-v2 {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(176, 4, 0, 0.08) 0%, rgba(176, 4, 0, 0.03) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: #b00400;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.kommunen-certificate-card-v2:focus-visible .kommunen-certificate-icon-v2 {
    background: linear-gradient(135deg, rgba(176, 4, 0, 0.18) 0%, rgba(176, 4, 0, 0.08) 100%);
    transform: scale(1.05) rotate(8deg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

@media (hover: hover) and (pointer: fine) {
    .kommunen-certificate-card-v2:hover .kommunen-certificate-icon-v2 {
        background: linear-gradient(135deg, rgba(176, 4, 0, 0.18) 0%, rgba(176, 4, 0, 0.08) 100%);
        transform: scale(1.05) rotate(8deg);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.1);
    }
}

/* Root-Cause-Fund 2026-08-26 (Admin-Frage "Titeltexte korrekt
   gesetzt?"): zielte bisher auf "h4" - die Karte nutzt tatsaechlich
   ein <h3> (s. certificate-shortcodes.php/inc-certificate-
   shortcodes.php), diese Basis-Regel griff dadurch auf JEDER Breite
   nie (nur der bereits am 2026-08-25 korrigierte Mobil-Block bei
   max-width:1024px zielte schon richtig auf h3). Auf h3 korrigiert. */
.kommunen-certificate-card-v2 h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a2332 !important;
    margin: 0 0 0.75rem;
    line-height: 1.3;
    width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    position: relative;
    z-index: 1;
}

.kommunen-certificate-card-v2 p {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
    overflow: visible;
    text-wrap: pretty;
    position: relative;
    z-index: 1;
}

.kommunen-certificate-modal[hidden] {
    display: none !important;
}

.kommunen-certificate-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    isolation: isolate;
}

.kommunen-certificate-modal__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(176, 4, 0, 0.18) 0%, rgba(176, 4, 0, 0) 34%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.88) 100%);
    backdrop-filter: blur(10px);
}

.dialog-widget-content.kommunen-certificate-modal__dialog,
.kommunen-certificate-modal__dialog {
    position: relative;
    z-index: 1;
    /* !important: Elementor-Pro-Popup-Basis-CSS (.dialog-widget-content)
       setzt eine eigene, breitere Standardbreite mit gleicher Spezifitaet -
       ohne !important gewinnt sie durch spaetere Ladeposition. */
    width: min(850px, calc(100vw - 1rem)) !important;
    height: min(970px, calc(100vh - 1rem));
    max-height: min(970px, calc(100vh - 1rem));
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.32);
}

/* button.-Praefix + !important auf background/border/color noetig:
   Elementor-Kit setzt eine eigene globale Button-Grundregel mit gleicher
   Selektor-Spezifitaet (0,1,1) wie eine reine Klassen-Regel (0,1,0) sonst
   verloren haette - button.klasse gleicht das aus.
   Farbschema = Button-Style 2, dunkle Variante (sc-btn-2.sc-btn-2-dark
   aus button-styles.css) - Admin-Wunsch: das X soll wie ein regulaerer
   Button-2 aussehen/sich verhalten statt ein eigenstaendiges Design zu
   haben. Form/Groesse (rund, 46px) bleiben eigenstaendig, da Button 2
   als Pille (min-height 56px, Padding 28px) fuer ein reines Icon-Kreuz
   nicht passt - nur Farben/Hover/Fokus/Active 1:1 uebernommen. */
button.kommunen-certificate-modal__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 2px solid rgba(176, 4, 0, 0.4) !important;
    background: rgba(176, 4, 0, 0.08) !important;
    background-image: none !important;
    color: #475569 !important;
    font-size: 1.85rem !important;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

button.kommunen-certificate-modal__close span {
    display: inline-block;
    transform: translateY(-1px);
}

button.kommunen-certificate-modal__close:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(176, 4, 0, 0.35);
}

button.kommunen-certificate-modal__close:active {
    transform: scale(0.98);
    background: rgba(176, 4, 0, 0.18) !important;
    border-color: rgba(176, 4, 0, 0.55) !important;
    box-shadow: none;
    transition: transform 0.1s ease, background-color 0.1s ease;
}

@media (hover: hover) and (pointer: fine) {
    button.kommunen-certificate-modal__close:hover {
        background: linear-gradient(135deg, #B00400, #D00500) !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
    }
}

.kommunen-certificate-modal__header {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem 1.75rem 1.25rem;
    padding-right: 5.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.kommunen-certificate-modal__icon {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(176, 4, 0, 0.12) 0%, rgba(176, 4, 0, 0.05) 100%);
    color: #b00400;
    font-size: 1.8rem;
}

.kommunen-certificate-modal__meta h3 {
    margin: 0 0 0.5rem;
    font-size: 1.65rem;
    line-height: 1.2;
    color: #0f172a;
}

.kommunen-certificate-modal__description {
    margin: 0;
    color: #475569;
    line-height: 1.6;
    font-size: 0.98rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kommunen-certificate-modal__body {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 0;
    flex: 1;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.kommunen-certificate-modal__sidebar {
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0.95rem;
    overflow: auto;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 10px 24px rgba(15, 23, 42, 0.04);
}

/* Root-Cause-Fund 2026-08-26: zielte bisher auf "h4" - das Markup
   nutzt aber tatsaechlich ein <h3> ("Zertifikate & Dokumente"), die
   Regel griff dadurch NIE, auf keiner Breite (Admin-Frage "Titeltexte
   hier korrekt in Mobil?" - Antwort: nein, war generell unstyled,
   nicht nur auf Mobil). Auf h3 korrigiert. */
.kommunen-certificate-modal__sidebar h3 {
    margin: 0 0 0.7rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
}

.kommunen-certificate-modal__files {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.kommunen-certificate-modal__file,
.elementor-kit-7 button.kommunen-certificate-modal__file,
.elementor-kit-7 button.kommunen-certificate-modal__file:focus-visible,
.elementor-kit-7 button.kommunen-certificate-modal__file.is-active {
    width: 100%;
    display: flex;
    align-items: center;
    text-align: left;
    min-height: 72px;
    padding: 0.72rem 0.75rem 0.72rem 3.1rem !important;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    background: #ffffff !important;
    background-image: none !important;
    color: #1e293b !important;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    position: relative;
    white-space: normal !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    font-family: "Inter", ui-sans-serif, system-ui, sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
    -webkit-text-fill-color: currentColor;
    appearance: none;
    -webkit-appearance: none;
}

@media (hover: hover) and (pointer: fine) {
    .elementor-kit-7 button.kommunen-certificate-modal__file:hover {
        width: 100%;
        display: flex;
        align-items: center;
        text-align: left;
        min-height: 72px;
        padding: 0.72rem 0.75rem 0.72rem 3.1rem !important;
        border-radius: 8px;
        border: 1px solid rgba(15, 23, 42, 0.08) !important;
        background: #ffffff !important;
        background-image: none !important;
        color: #1e293b !important;
        cursor: pointer;
        transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
        position: relative;
        white-space: normal !important;
        line-height: 1.3 !important;
        font-weight: 600 !important;
        font-size: 12px !important;
        font-family: "Inter", ui-sans-serif, system-ui, sans-serif !important;
        text-transform: none !important;
        letter-spacing: normal !important;
        text-decoration: none !important;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
        -webkit-text-fill-color: currentColor;
        appearance: none;
        -webkit-appearance: none;
    }
}

.kommunen-certificate-modal__file-label {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    text-wrap: pretty;
}

.kommunen-certificate-modal__file::before {
    content: 'PDF';
    position: absolute;
    top: 50%;
    left: 0.72rem;
    transform: translateY(-50%);
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(176, 4, 0, 0.14) 0%, rgba(176, 4, 0, 0.08) 100%);
    color: #b00400;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.kommunen-certificate-modal__file:focus-visible,
.kommunen-certificate-modal__file.is-active,
.elementor-kit-7 button.kommunen-certificate-modal__file:focus-visible,
.elementor-kit-7 button.kommunen-certificate-modal__file.is-active {
    transform: translateY(-2px);
    border-color: rgba(176, 4, 0, 0.28) !important;
    background: #fff4f4 !important;
    background-image: none !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    font-size: 12px !important;
    line-height: 1.3 !important;
}

@media (hover: hover) and (pointer: fine) {
    .kommunen-certificate-modal__file:hover,
    .elementor-kit-7 button.kommunen-certificate-modal__file:hover {
        transform: translateY(-2px);
        border-color: rgba(176, 4, 0, 0.28) !important;
        background: #fff4f4 !important;
        background-image: none !important;
        color: #0f172a !important;
        -webkit-text-fill-color: #0f172a;
        box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
        font-size: 12px !important;
        line-height: 1.3 !important;
    }
}

.kommunen-certificate-modal__file,
.kommunen-certificate-modal__file:focus-visible,
.kommunen-certificate-modal__file.is-active,
.elementor-kit-7 button.kommunen-certificate-modal__file,
.elementor-kit-7 button.kommunen-certificate-modal__file:focus-visible,
.elementor-kit-7 button.kommunen-certificate-modal__file.is-active {
    color: #0f172a !important;
}

@media (hover: hover) and (pointer: fine) {
    .kommunen-certificate-modal__file:hover,
    .elementor-kit-7 button.kommunen-certificate-modal__file:hover {
        color: #0f172a !important;
    }
}

.kommunen-certificate-modal__file.is-active {
    font-size: 12px;
}

.kommunen-certificate-modal__file:focus-visible {
    outline: 2px solid rgba(176, 4, 0, 0.22);
    outline-offset: 2px;
}

.kommunen-certificate-modal__viewer-area {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.kommunen-certificate-modal__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    min-height: 72px;
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
}

.kommunen-certificate-modal__preview-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.kommunen-certificate-modal__preview-label::before {
    content: '';
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #b00400 0%, #d00500 100%);
    box-shadow: 0 0 0 5px rgba(176, 4, 0, 0.08);
}

.kommunen-certificate-modal__empty {
    display: none;
    margin: 1.25rem;
    padding: 1.5rem;
    color: #64748b;
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kommunen-certificate-modal__empty.is-visible {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.kommunen-certificate-modal__viewer-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 360px;
    padding: 1.25rem;
    background: #f8fafc;
    gap: 1rem;
}

.kommunen-certificate-modal__viewer-canvas {
    position: relative;
    width: 100%;
    min-height: 0;
    height: 100%;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Ladeanzeige waehrend das Bild vom Server kommt (Admin-Feedback:
   Oeffnen wirkte ohne Rueckmeldung wie haengengeblieben, v.a. beim
   allerersten - noch nicht gecachten - Rendern einer Seite). */
.kommunen-certificate-modal__viewer-canvas.is-loading::after {
    content: '';
    position: absolute;
    width: 34px;
    height: 34px;
    border: 3px solid rgba(176, 4, 0, 0.15);
    border-top-color: #b00400;
    border-radius: 50%;
    animation: sc-cert-viewer-spin 0.7s linear infinite;
}

@keyframes sc-cert-viewer-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Zertifikat-Seiten werden serverseitig aus dem PDF gerendert und als Bild
   ausgeliefert (nie das Original-PDF - Admin-Anfrage: nur betrachten, nicht
   herunterladen). user-select/user-drag erschweren das versehentliche
   Herausziehen des Bildes zusaetzlich (kein vollstaendiger Schutz, aber
   mehr Reibung als ein nativer PDF-Viewer mit eigenen Download-Icons).
   Der weisse Rahmen (background/box-shadow) sitzt direkt auf dem Bild
   statt auf einer separat breiten Huelle - dadurch keine grosse leere
   Flaeche links/rechts bei schmaleren (Hochformat-)Zertifikaten mehr.
   width/height:100% (statt auto) + object-fit:contain sorgen dafuer,
   dass das Bild die verfuegbare Flaeche aktiv ausfuellt (auch VERGROESSERT
   wird, nicht nur bei Bedarf verkleinert) - Admin-Feedback: Zertifikat
   wurde zu klein angezeigt. */
.kommunen-certificate-modal__viewer {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
}

.kommunen-certificate-modal__pager {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 0 0 auto;
}

.kommunen-certificate-modal__pager[hidden] {
    display: none;
}

.kommunen-certificate-modal__pager-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(176, 4, 0, 0.14);
    background: #ffffff;
    color: #b00400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(17, 23, 43, 0.08);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.kommunen-certificate-modal__pager-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

@media (hover: hover) and (pointer: fine) {
    .kommunen-certificate-modal__pager-btn:not(:disabled):hover {
        background: #b00400;
        border-color: #b00400;
        color: #ffffff;
        transform: translateY(-2px);
    }
}

.kommunen-certificate-modal__pager-label {
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 6.5ch;
    text-align: center;
}

.kommunen-certificate-modal__viewer-frame.is-hidden,
.kommunen-certificate-modal__viewer.is-hidden {
    display: none;
}

.footer-cert-subtitle {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0 0 0.75rem;
    font-weight: 400;
}

.footer-certificates-compact {
    --footer-cert-columns: 3;
    display: grid;
    grid-template-columns: repeat(var(--footer-cert-columns), minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.footer-cert-item,
.elementor-kit-7 a.footer-cert-item,
.elementor-kit-7 a.footer-cert-item:focus-visible,
.elementor-kit-7 button.footer-cert-item,
.elementor-kit-7 button.footer-cert-item:focus-visible {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 0.55rem 0.7rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    background-image: none !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px;
    text-decoration: none !important;
    color: #cbd5e1 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    font-family: "Inter", ui-sans-serif, system-ui, sans-serif !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    box-shadow: none !important;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
}

@media (hover: hover) and (pointer: fine) {
    .elementor-kit-7 a.footer-cert-item:hover,
    .elementor-kit-7 button.footer-cert-item:hover {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        min-width: 0;
        min-height: 52px;
        padding: 0.55rem 0.7rem !important;
        background: rgba(255, 255, 255, 0.03) !important;
        background-image: none !important;
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 10px;
        text-decoration: none !important;
        color: #cbd5e1 !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        font-family: "Inter", ui-sans-serif, system-ui, sans-serif !important;
        letter-spacing: normal !important;
        text-transform: none !important;
        box-shadow: none !important;
        position: relative;
        overflow: hidden;
        isolation: isolate;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        appearance: none;
        -webkit-appearance: none;
    }
}

.footer-cert-item::before {
    content: '';
    position: absolute;
    inset: 0;
    left: -100%;
    background: linear-gradient(90deg, transparent, rgba(176, 4, 0, 0.08), transparent);
    transition: left 0.4s ease;
    z-index: 0;
}

.footer-cert-item:focus-visible::before {
    left: 100%;
}

@media (hover: hover) and (pointer: fine) {
    .footer-cert-item:hover::before {
        left: 100%;
    }
}

.footer-cert-item:focus-visible,
.elementor-kit-7 a.footer-cert-item:focus-visible,
.elementor-kit-7 button.footer-cert-item:focus-visible {
    background: rgba(176, 4, 0, 0.08) !important;
    border-color: rgba(176, 4, 0, 0.4) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24) !important;
}

@media (hover: hover) and (pointer: fine) {
    .footer-cert-item:hover,
    .elementor-kit-7 a.footer-cert-item:hover,
    .elementor-kit-7 button.footer-cert-item:hover {
        background: rgba(176, 4, 0, 0.08) !important;
        border-color: rgba(176, 4, 0, 0.4) !important;
        color: #ffffff !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24) !important;
    }
}

.footer-cert-item:focus-visible {
    outline: 2px solid rgba(176, 4, 0, 0.28);
    outline-offset: 2px;
}

.footer-cert-item i,
.footer-cert-item span {
    position: relative;
    z-index: 1;
}

.footer-cert-item i {
    flex: 0 0 auto;
    font-size: 1rem;
    color: #b00400;
    transition: transform 0.3s ease;
}

.footer-cert-item:focus-visible i {
    transform: scale(1.08);
}

@media (hover: hover) and (pointer: fine) {
    .footer-cert-item:hover i {
        transform: scale(1.08);
    }
}

.footer-cert-item span,
.elementor-kit-7 a.footer-cert-item span,
.elementor-kit-7 button.footer-cert-item span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    min-width: 0;
    color: #cbd5e1 !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.footer-cert-item:focus-visible span,
.elementor-kit-7 a.footer-cert-item:focus-visible span,
.elementor-kit-7 button.footer-cert-item:focus-visible span {
    color: #ffffff !important;
}

@media (hover: hover) and (pointer: fine) {
    .footer-cert-item:hover span,
    .elementor-kit-7 a.footer-cert-item:hover span,
    .elementor-kit-7 button.footer-cert-item:hover span {
        color: #ffffff !important;
    }
}

.footer-cert-more-item,
.elementor-kit-7 button.footer-cert-more-item,
.elementor-kit-7 button.footer-cert-more-item:focus-visible {
    justify-content: center;
    border-style: dashed !important;
    background: rgba(176, 4, 0, 0.05) !important;
}

@media (hover: hover) and (pointer: fine) {
    .elementor-kit-7 button.footer-cert-more-item:hover {
        justify-content: center;
        border-style: dashed !important;
        background: rgba(176, 4, 0, 0.05) !important;
    }
}

.footer-cert-more-item span,
.elementor-kit-7 button.footer-cert-more-item span {
    color: #ffb4b4 !important;
    text-align: center;
}

.footer-cert-item--overflow {
    min-height: 60px;
}

.footer-certificates-overflow-modal[hidden] {
    display: none !important;
}

.footer-certificates-overflow-modal {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    isolation: isolate;
}

.footer-certificates-overflow-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
}

.footer-certificates-overflow-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(860px, calc(100vw - 1.5rem));
    max-height: min(760px, calc(100vh - 1.5rem));
    overflow: hidden !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.5);
}

button.footer-certificates-overflow-modal__close,
.footer-certificates-overflow-modal button.footer-certificates-overflow-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: #EEEEEE0F !important;
    background-image: none !important;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

button.footer-certificates-overflow-modal__close:focus,
button.footer-certificates-overflow-modal__close:focus-visible {
    background: rgba(176, 4, 0, 0.08) !important;
    background-image: none !important;
    border-color: rgba(176, 4, 0, 0.4) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

@media (hover: hover) and (pointer: fine) {
    button.footer-certificates-overflow-modal__close:hover {
        background: rgba(176, 4, 0, 0.08) !important;
        background-image: none !important;
        border-color: rgba(176, 4, 0, 0.4) !important;
        color: #ffffff !important;
    }
}

.footer-certificates-overflow-modal__header {
    padding: 1.5rem 1.5rem 1rem;
    padding-right: 4.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-certificates-overflow-modal__header h3 {
    margin: 0 0 0.35rem;
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1.2;
}

.footer-certificates-overflow-modal__header p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.92rem;
    line-height: 1.55;
}

.footer-certificates-overflow-modal__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 1.25rem;
    max-height: calc(100vh - 12rem);
    overflow: auto;
}

#kommunen .is-kommunen-partner-hidden {
    display: none !important;
}

#kommunen .kommunen-partner-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    /* Admin-Wunsch 2026-08-31: Abstand vereinheitlicht auf denselben Wert
       (30px) wie zwischen den Badges "27+ Kommunen & Partner"/"500+
       Oeffentliche Projekte" darueber (.elementor-element-9930838,
       nativer Elementor-Abstand). Ersetzt den bisherigen responsiven
       clamp(0.85rem,1.4vw,1.25rem) durch einen festen Wert. */
    gap: 30px !important;
    align-items: stretch;
}

/* 5 statt 6 Spalten im 1215-1366px-Bereich (Admin-Wunsch 2026-08-20):
 * das "+X weitere"-Overflow-JS (certificate-grid.js updatePartners())
 * liest die Spaltenzahl per getComputedStyle aus und berechnet die
 * sichtbaren Kacheln automatisch neu - reine CSS-Anpassung genuegt,
 * keine JS-Aenderung noetig (live verifiziert: 5 Spalten x 3 Reihen =
 * 15 Slots, 14 Kacheln + "+13 weitere"). */
@media (min-width: 1215px) and (max-width: 1366px) {
    #kommunen .kommunen-partner-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

/* Weiterer Umbruch auf 4 Spalten im 1025-1214px-Bereich (Admin-Wunsch
 * 2026-08-20) - zwischen der 5-Spalten-Stufe oben und der bestehenden
 * <=1024px-Stufe (ebenfalls 4 Spalten, s.u.) eingefuegt. */
@media (min-width: 1025px) and (max-width: 1214px) {
    #kommunen .kommunen-partner-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

#kommunen .elementor-widget-image-box {
    min-width: 0;
}

#kommunen .elementor-image-box-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100%;
}

#kommunen .elementor-image-box-img img {
    display: block;
    max-width: min(100%, 120px);
    height: 132px;
    margin: 0 auto;
    object-fit: contain;
}

#kommunen .elementor-image-box-title,
#kommunen .elementor-image-box-title a {
    color: #11172b !important;
    font-weight: 700 !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

#kommunen .elementor-image-box-title {
    font-size: clamp(0.9rem, 1vw, 1.05rem) !important;
    line-height: 1.25 !important;
}

/* Admin-Wunsch 2026-08-26: Kommunen-Wappen-Kartentitel (Baumholder/
   Idar-Oberstein/Birkenfeld usw.) bei <=1024px verkleinern - der
   clamp()-Mindestwert oben (0.9rem) verhindert das Schrumpfen unter
   14.4px, da clamp() nicht auf Elementors _mobile-Feld reagiert. */
@media (max-width: 1024px) {
    #kommunen .elementor-image-box-title {
        font-size: 0.875rem !important;
    }
}

#kommunen .elementor-image-box-title a:focus-visible {
    color: #b00400 !important;
}

@media (hover: hover) and (pointer: fine) {
    #kommunen .elementor-image-box-title a:hover {
        color: #b00400 !important;
    }
}

.kommunen-partner-more,
.elementor-kit-7 button.kommunen-partner-more,
.elementor-kit-7 button.kommunen-partner-more:focus-visible {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
    min-height: 100%;
    margin: 0;
    padding: 1.25rem 0.9rem !important;
    border: 1px dashed rgba(176, 4, 0, 0.42) !important;
    border-radius: 8px;
    background-color: rgba(176, 4, 0, 0.05) !important;
    color: #11172b !important;
    font-family: "Inter", ui-sans-serif, system-ui, sans-serif !important;
    font-size: 0.96rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 12px 28px rgba(17, 23, 43, 0.08) !important;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

@media (hover: hover) and (pointer: fine) {
    .elementor-kit-7 button.kommunen-partner-more:hover {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        width: 100%;
        min-width: 0;
        min-height: 100%;
        margin: 0;
        padding: 1.25rem 0.9rem !important;
        border: 1px dashed rgba(176, 4, 0, 0.42) !important;
        border-radius: 8px;
        background-color: rgba(176, 4, 0, 0.05) !important;
        color: #11172b !important;
        font-family: "Inter", ui-sans-serif, system-ui, sans-serif !important;
        font-size: 0.96rem !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        cursor: pointer;
        text-align: center;
        box-shadow: 0 12px 28px rgba(17, 23, 43, 0.08) !important;
        transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
        appearance: none;
        -webkit-appearance: none;
    }
}

.kommunen-partner-more::before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: #b00400;
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;

}

#kommunen .kommunen-partner-more[hidden] {
    display: none !important;
}

.kommunen-partner-more:focus-visible,
.elementor-kit-7 button.kommunen-partner-more:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(176, 4, 0, 0.62) !important;
    background-color: rgba(176, 4, 0, 0.08) !important;
    color: #8b0300 !important;
    box-shadow: 0 16px 34px rgba(17, 23, 43, 0.12) !important;
}

@media (hover: hover) and (pointer: fine) {
    .kommunen-partner-more:hover,
    .elementor-kit-7 button.kommunen-partner-more:hover {
        transform: translateY(-1px);
        border-color: rgba(176, 4, 0, 0.62) !important;
        background-color: rgba(176, 4, 0, 0.08) !important;
        color: #8b0300 !important;
        box-shadow: 0 16px 34px rgba(17, 23, 43, 0.12) !important;
    }
}

.kommunen-partner-more[hidden],
.kommunen-partner-modal[hidden] {
    display: none !important;
}

.kommunen-partner-modal {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    isolation: isolate;
}

.kommunen-partner-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
}

.kommunen-partner-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(1080px, calc(100vw - 1.5rem));
    max-height: min(820px, calc(100vh - 1.5rem));
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.38);
}

/* button.-Praefix + !important: Elementor-Kit setzt eine eigene
   Button-Grundregel (button:not(:disabled) u.ae., Spezifitaet 0,1,1)
   mit gleicher/hoeherer Spezifitaet als eine reine Klassen-Regel
   (0,1,0) - sonst gehen border-radius/Hintergrund/Rand verloren
   (identisches Prinzip wie button.desktop-phone-modal__close in
   style.css bzw. button.kommunen-certificate-modal__close). */
button.kommunen-partner-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 999px !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    background: #ffffff !important;
    color: #11172b !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    transition: background-color 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

button.kommunen-partner-modal__close:focus-visible {
    background: rgba(176, 4, 0, 0.08) !important;
    border-color: rgba(176, 4, 0, 0.4) !important;
    color: #11172b !important;
    transform: translateY(-1px);
}

@media (hover: hover) and (pointer: fine) {
    button.kommunen-partner-modal__close:hover {
        background: rgba(176, 4, 0, 0.08) !important;
        border-color: rgba(176, 4, 0, 0.4) !important;
        color: #11172b !important;
        transform: translateY(-1px);
    }
}

.kommunen-partner-modal__header {
    padding: 1.4rem 1.5rem 1rem;
    padding-right: 4.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

.kommunen-partner-modal__header h3,
.elementor-kit-7 .kommunen-partner-modal__header h3 {
    margin: 0 0 0.35rem;
    color: #11172b !important;
    font-size: 1.45rem !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
}

.kommunen-partner-modal__header p {
    margin: 0;
    color: #5f6b7d;
    font-size: 0.92rem;
    line-height: 1.55;
}

.kommunen-partner-modal__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 1.25rem;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.kommunen-partner-modal__grid .elementor-widget-image-box {
    margin: 0 !important;
    padding: 1rem !important;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.kommunen-partner-modal__grid .elementor-image-box-img {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 104px;
    margin: 0 0 0.75rem !important;
    text-align: center;
}

#kommunen .elementor-image-box-img,
#kommunen .elementor-image-box-img a,
#kommunen .elementor-image-box-img picture,
.kommunen-partner-modal__grid .elementor-image-box-img a,
.kommunen-partner-modal__grid .elementor-image-box-img picture {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.kommunen-partner-modal__grid img {
    display: block;
    width: 100%;
    max-width: 96px;
    height: 96px;
    margin: 0 auto;
    object-fit: contain;
}

.kommunen-partner-modal__grid .elementor-image-box-title {
    margin: 0 !important;
    color: #11172b !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-align: center;
}

.kommunen-partner-modal__grid .elementor-image-box-title a {
    color: #11172b !important;
    font-weight: 700 !important;
}

body.kommunen-certificate-modal-open {
    overflow: hidden;
    overscroll-behavior: contain;
}

@media (max-width: 1024px) {
    .kommunen-certificates-slider-header-v2 {
        margin-bottom: 0.85rem;
    }

    .kommunen-certificates-slider-meta-v2 {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }

    .kommunen-certificate-card-v2 {
        padding: 2rem 1.35rem;
        min-height: 270px;
    }

    .kommunen-certificate-icon-v2 {
        width: 76px;
        height: 76px;
        margin-bottom: 1.15rem;
        font-size: 2.1rem;
    }

    /* Admin-Wunsch 2026-08-25: Titel/Beschreibung der Zertifikat-Karten
       hatten bisher keine Mobil-Groesse (<=1024px) und blieben auf jeder
       Breite bei Desktop-Groesse (1.25rem/1rem) stehen. Root-Cause-Fund:
       eine fruehere Fassung dieser Regel zielte auf "h4" - die Karte
       nutzt aber tatsaechlich ein <h3> (s. certificate-shortcodes.php/
       inc-certificate-shortcodes.php), der Selektor griff dadurch nie. */
    .kommunen-certificate-card-v2 h3 {
        font-size: 1.05rem;
    }

    .kommunen-certificate-card-v2 p {
        font-size: 0.875rem;
    }

    .dialog-widget-content.kommunen-certificate-modal__dialog,
    .kommunen-certificate-modal__dialog {
        width: min(600px, calc(100vw - 1rem)) !important;
        height: auto;
        max-height: calc(100vh - 1rem);
    }

    /* Admin-Wunsch 2026-08-26: Zertifikate-Popup bei <1025px vollstaendig
       auf Mobil-Groessen - Icon/Titel/Beschreibung hatten in diesem
       Breakpoint bisher KEINE eigene Schriftgroesse und blieben bei der
       vollen Desktop-Groesse (1.8rem/1.65rem/0.98rem) stehen, obwohl der
       767px-Breakpoint darunter bereits Icon/Titel reduziert. */
    .kommunen-certificate-modal__icon {
        width: 68px;
        height: 68px;
        flex-basis: 68px;
        font-size: 1.6rem;
    }

    .kommunen-certificate-modal__meta h3 {
        font-size: 1.45rem;
    }

    .kommunen-certificate-modal__description {
        font-size: 0.92rem;
    }

    .kommunen-certificate-modal__body {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 1rem;
        padding: 1rem;
    }

    .footer-certificates-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Einspaltig durchgehend bis 1024px statt erst ab 767px (Admin-
     * Meldung 2026-07-05): vorher zwei separate Breakpoints (1024px/
     * 767px) fuer dieselbe Komponente - dadurch sprang das Popup
     * zwischen 768-1024px auf zwei Spalten, obwohl es bei kleineren
     * Breiten (z.B. 400px) schon einspaltig war. */
    .footer-certificates-overflow-modal__grid {
        grid-template-columns: 1fr;
    }

    /* Popup-Fensterbreite auf Mobil: width:50% (vorherige Fassung)
     * skalierte bei schmalen Breiten schlecht - der Seitenabstand
     * wuchs proportional mit, wodurch die Box bei z.B. 360px viel zu
     * schmal wurde und Titel/Listeneintraege haesslich umbrachen
     * (Admin-Meldung 2026-07-05, Screenshot). Stattdessen fester
     * Mindestabstand von 16px pro Seite bei schmalen Breiten - waechst
     * die Box durch den Abstand ueber die Maximalbreite hinaus, greift
     * stattdessen das Limit, damit das Fenster nicht bis zur vollen
     * 1024px-Breite mitskaliert (Admin-Praezisierung 2026-07-05).
     * Maximalbreite auf Admin-Wunsch von 860px auf 500px reduziert
     * (2026-07-05). */
    .footer-certificates-overflow-modal__dialog {
        width: min(500px, calc(100% - 32px));
        max-height: calc(100vh - 1rem);
        border-radius: 8px;
    }

    #kommunen .kommunen-partner-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    /* Admin-Fund 2026-08-26: Wappen-Bilder im Hauptraster hatten bisher
       erst ab max-width:767px eine reduzierte Groesse (104px statt
       132px) - im 768-1024px-Bereich blieben sie bei voller Desktop-
       Groesse. Tablet=Mobil-Konvention: Wert aus dem 767px-Block
       uebernommen. */
    #kommunen .elementor-image-box-img img {
        height: 104px;
    }

    .kommunen-partner-modal__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* Admin-Wunsch 2026-08-26: die Wappen-Bilder im "Weitere kommunale
       Partner"-Popup waren auf JEDER Breite fix bei 96px (kein
       natives/eigenes Mobil-Feld vorhanden) - bei <1025px verkleinert. */
    .kommunen-partner-modal__grid img {
        max-width: 76px;
        height: 76px;
    }

    .kommunen-partner-modal__grid .elementor-image-box-img {
        min-height: 84px;
    }

    /* Admin-Fund 2026-08-26: Kartentitel im Popup ("Schweich"/"Landstuhl"
       usw.) blieben bei 0.9rem/14.4px stehen, waehrend das Hauptraster
       ausserhalb des Popups fuer dieselben Titel bereits auf 0.875rem/
       14px reduziert war (s. vorheriger Fix) - sichtbar unterschiedliche
       Schriftgroesse zwischen Hauptraster und Popup auf derselben
       Mobilbreite. Angeglichen (Admin-Feedback: 0.75rem/12px empfunden
       als zu klein - 0.875rem ist der in dieser Session etablierte
       Standard-Mobil-Fliesstext, 0.75rem bleibt reinen Labels
       vorbehalten). */
    .kommunen-partner-modal__grid .elementor-image-box-title {
        font-size: 0.875rem !important;
    }

    /* Admin-Wunsch 2026-08-26: "+ 20 weitere"-Kachel und das dazugehoerige
       Popup (Gemeinde-Uebersicht) hatten bei <1025px keine eigene
       Schriftgroesse und blieben bei Desktop-Groesse stehen. */
    .kommunen-partner-more,
    .elementor-kit-7 button.kommunen-partner-more,
    .elementor-kit-7 button.kommunen-partner-more:focus-visible {
        font-size: 0.85rem !important;
    }

    .kommunen-partner-more::before {
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
    }

    .kommunen-partner-modal__header h3,
    .elementor-kit-7 .kommunen-partner-modal__header h3 {
        font-size: 1.15rem !important;
    }

    .kommunen-partner-modal__header p {
        font-size: 0.85rem;
    }
}

@media (max-width: 767px) {
    .kommunen-certificates-slider-header-v2 {
        align-items: stretch;
    }

    .kommunen-certificates-slider-meta-v2 {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .kommunen-certificates-slider-progresscopy-v2 {
        align-items: flex-start;
        min-width: 0;
    }

    .kommunen-certificates-nav-v2 {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
    }

    .kommunen-certificates-slider-arrows-v2 {
        justify-content: flex-start;
    }

    .kommunen-certificate-card-v2 {
        padding: 1.65rem 1.1rem;
        min-height: 235px;
    }

    .kommunen-certificate-icon-v2 {
        width: 68px;
        height: 68px;
        margin-bottom: 1rem;
        font-size: 1.85rem;
    }

    /* Root-Cause-Fund 2026-08-25: zielte bisher auf "h4" (Karte nutzt
       <h3>, s. Kommentar bei der 1024px-Regel oben) - Selektor griff nie,
       Wert zusaetzlich auf < 1.05rem/0.875rem (1024px-Stufe) korrigiert,
       damit die Groesse Richtung schmalere Breiten konsequent weiter
       abnimmt statt wieder zu waechst. */
    .kommunen-certificate-card-v2 h3 {
        font-size: 0.95rem;
    }

    .kommunen-certificate-card-v2 p {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .kommunen-certificates-slider-progressbar-v2 {
        margin-bottom: 1.4rem;
    }

    .kommunen-certificate-modal {
        padding: 0.75rem;
    }

    .footer-certificates-overflow-modal {
        padding: 0.75rem;
    }

    .dialog-widget-content.kommunen-certificate-modal__dialog,
    .kommunen-certificate-modal__dialog {
        width: 100%;
        height: auto;
        max-height: calc(100vh - 1rem);
        border-radius: 8px;
    }

    .kommunen-certificate-modal__header {
        padding: 1.15rem 1.15rem 1rem;
        padding-right: 4.25rem;
        align-items: flex-start;
    }

    button.kommunen-certificate-modal__close {
        top: 1rem;
        right: 1rem;
    }

    .kommunen-certificate-modal__icon {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
        font-size: 1.5rem;
    }

    .kommunen-certificate-modal__meta h3 {
        font-size: 1.35rem;
        padding-right: 2.5rem;
    }

    /* Admin-Wunsch 2026-08-26: fehlte bisher in diesem Breakpoint (nur
       Icon/Titel waren gesetzt), blieb bei Desktop-Groesse 0.98rem. */
    .kommunen-certificate-modal__description {
        font-size: 0.88rem;
    }

    .kommunen-certificate-modal__body {
        grid-template-columns: 1fr;
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .kommunen-certificate-modal__sidebar {
        max-height: 28vh;
        padding: 0.8rem;
    }

    .kommunen-certificate-modal__viewer {
        max-height: 42vh;
    }

    .kommunen-certificate-modal__viewer-frame {
        min-height: 42vh;
        padding: 0.75rem;
    }

    .kommunen-certificate-modal__viewer-canvas {
        min-height: 42vh;
    }

    .kommunen-certificate-modal__actions {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1rem 0.75rem;
    }

    .kommunen-certificate-modal__preview-label {
        width: 100%;
    }

    .kommunen-certificate-modal__file {
        padding: 0.72rem 0.75rem 0.72rem 3rem;
        font-size: 0.76rem;
        line-height: 1.24;
    }

    .footer-certificates-compact {
        grid-template-columns: 1fr;
    }

    #kommunen .elementor-image-box-img img {
        height: 104px;
    }

    #kommunen .kommunen-partner-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        /* Admin-Wunsch 2026-08-31: derselbe einheitliche 30px-Abstand
           wie oben (Angleichung an den Badge-Abstand), auch bei <=767px. */
        gap: 30px !important;
    }

    .kommunen-partner-more,
    .elementor-kit-7 button.kommunen-partner-more {
        width: 100%;
        min-height: 156px;
    }

    .kommunen-partner-modal {
        padding: 0.75rem;
    }

    .kommunen-partner-modal__dialog {
        width: 100%;
        max-height: calc(100vh - 1rem);
    }

    .kommunen-partner-modal__header {
        padding: 1.15rem 1.15rem 0.9rem;
        padding-right: 4rem;
    }

    .kommunen-partner-modal__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
        padding: 0.9rem;
    }

    button.footer-certificates-overflow-modal__close {
        width: 30px;
        height: 30px;
        font-size: 1.05rem;
    }

    .footer-certificates-overflow-modal__header {
        padding: 1.15rem 1.15rem 0.9rem;
        padding-right: 4rem;
    }

    /* Titel/Text auf Mobil verkleinert (Admin-Auftrag 2026-07-08),
     * gleiche Werte wie .kommunen-certificate-modal__meta h3 /
     * __description zur Konsistenz mit dem Schwester-Popup. */
    .footer-certificates-overflow-modal__header h3 {
        font-size: 1.1rem;
    }

    .footer-certificates-overflow-modal__header p {
        font-size: 0.84rem;
    }

    .footer-cert-item,
    .elementor-kit-7 a.footer-cert-item,
    .elementor-kit-7 button.footer-cert-item {
        min-height: 50px;
    }
}

@media (max-width: 520px) {
    .kommunen-certificates-slider-intro-v2 p {
        font-size: 0.9rem;
    }

    .kommunen-certificates-slider-meta-v2 {
        gap: 0.5rem;
    }

    .kommunen-certificates-slider-hint-v2 {
        font-size: 0.75rem;
    }

    .kommunen-certificates-slider-count-v2 {
        font-size: 0.85rem;
    }

    .kommunen-certificates-slider-count-v2 strong {
        font-size: 1.05rem;
        min-width: 4.2ch;
    }

    .kommunen-certificates-slider-arrows-v2 {
        gap: 0.45rem;
    }

    .kommunen-certificate-modal {
        padding: 0.4rem;
        align-items: stretch;
    }

    .dialog-widget-content.kommunen-certificate-modal__dialog,
    .kommunen-certificate-modal__dialog {
        max-height: calc(100dvh - 0.8rem);
        height: calc(100dvh - 0.8rem);
    }

    .kommunen-certificate-modal__header {
        gap: 0.75rem;
        padding: 0.9rem 3.75rem 0.85rem 0.9rem;
    }

    .kommunen-certificate-modal__icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        font-size: 1.25rem;
    }

    .kommunen-certificate-modal__meta h3 {
        padding-right: 0;
        font-size: 1.1rem;
    }

    .kommunen-certificate-modal__description {
        font-size: 0.84rem;
        line-height: 1.4;
    }

    button.kommunen-certificate-modal__close {
        top: 0.75rem;
        right: 0.75rem;
        width: 44px;
        height: 44px;
    }

    .kommunen-certificate-modal__body {
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .kommunen-certificate-modal__sidebar {
        max-height: 22vh;
    }

    .kommunen-certificate-modal__viewer {
        max-height: 34vh;
    }

    .kommunen-certificate-modal__viewer-frame,
    .kommunen-certificate-modal__viewer-canvas {
        min-height: 34vh;
        height: 34vh;
    }

    .kommunen-certificate-modal__actions {
        min-height: 0;
        gap: 0.65rem;
        padding: 0.75rem;
    }
}

@media (max-height: 700px) and (max-width: 767px) {
    .kommunen-certificate-modal__header {
        padding-block: 0.7rem;
    }

    .kommunen-certificate-modal__description {
        display: none;
    }

    .kommunen-certificate-modal__sidebar {
        max-height: 18vh;
    }

    .kommunen-certificate-modal__viewer {
        max-height: 30vh;
    }

    .kommunen-certificate-modal__viewer-frame,
    .kommunen-certificate-modal__viewer-canvas {
        min-height: 30vh;
        height: 30vh;
    }
}

/* :hover-Teil hier nicht mehr noetig - die Basisregel weiter oben
 * (.kommunen-certificate-card-v2:hover) ist bereits in
 * @media (hover:hover) eingepackt und greift auf Touch nie. Nur der
 * Tastatur-Fokus (:focus-visible) soll auf Touch-Geraeten (z.B. Tablet
 * mit Tastatur) weiterhin ohne Lift-Transform bleiben. */
@media (hover: none) {
    .kommunen-certificate-card-v2:focus-visible,
    .kommunen-certificate-card-v2:focus-visible .kommunen-certificate-icon-v2 {
        transform: none;
    }
}
