.gallery-switcher-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    justify-content: center;
    position: relative;
    z-index: 100 !important; /* Forces menu to the front */
    pointer-events: auto !important;
    /* --- NEW BOUNDARY RULES --- */
    width: 100%;
    max-width: 100%; /* Prevents off-canvas stretching */
    padding: 0 15px; /* Keeps buttons safely away from screen edges on mobile */
    box-sizing: border-box; /* Forces padding to calculate inward, not outward */
}

.switch-btn {
    background: transparent;
    color: #969696;
    border: 1px solid #333;
    padding: 8px 20px;
    font-family: serif;
    font-size: 14px;
	font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s ease;
}

    .switch-btn.active {
        color: #d4af37; /* Surrealist Gold */
        border-color: #d4af37;
    }

.all-galleries {
    display: none;
    opacity: 0;
    transform: scale(0.99);
    transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
    pointer-events: none; /* Prevents "Ghost" layers from blocking clicks */
    position: relative;
    z-index: 1;
}

    .all-galleries.is-visible {
        display: flex !important;
        opacity: 1 !important;
        transform: scale(1);
        pointer-events: auto; /* Re-enables interaction once visible */
        z-index: 100;
    }

/* Entfernt den Fokus-Rahmen der Haupt-Container nach dem Ausführen des Switcher-Skripts */
.all-galleries:focus,
.all-galleries:focus-visible,
.e-con:focus,
.e-con:focus-visible,
.elementor-widget:focus,
.elementor-widget:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

