.shgallery-video-icon {
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #666;
}

.shgallery-video-icon i {
    color: #000;
    font-size: 42px;
    opacity: 0.85;
}

.shgallery {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}
gallery-item
.shgallery-video-icon * {
    text-decoration: none !important;
}

/* Toolbar Ã¼ber Galerie */
.gallery-toolbar {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.gallery-toggle-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #0078d4;
    background: transparent;
    color: #0078d4;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all .15s ease;
}
.gallery-toggle-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.gallery-toggle-btn:hover {
    background: rgba(0, 120, 212, 0.08);
}
.gallery-toggle-btn[aria-pressed="true"] {
    background: #0078d4;
    color: #fff;
}
.gallery-toggle-btn:focus {
     outline: 2px solid #0078d4;
     outline-offset: 2px;
 }

.gallery-download-btn {
    margin-left: auto; /* pushed nach rechts */
    border-color: #28a745;
    color: #28a745;
}
.gallery-download-btn[aria-disabled="false"]:not(:disabled) {
    border-color: #28a745;
    color: #28a745;
}
.gallery-download-btn:not(:disabled):hover {
    background: rgba(40, 167, 69, 0.08);
}
.gallery-download-btn:not(:disabled)[aria-pressed="true"] {
    background: #28a745;
    color: #fff;
}


.shgallery h1 {
    margin-bottom: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}



.gallery-item {
    background: #f5f5f5;
    aspect-ratio: 1;
    position: relative;
    overflow: visible;
    z-index: 1; /* Basis z-index */
}

.gallery-item a {
display: block;
position: relative;
width: 100%;
height: 100%;
transition: transform .25s ease 0ms;
z-index: 1;
text-decoration: none !important;
}

/* Gehovertes Item kommt nach vorne */
.gallery-grid:not(.select-mode) .gallery-item:hover {
    z-index: 10;
    .rating-display {
        visibility: hidden;
        opacity: 0;
        transition: 0s;
    }
}

/* Auswahl-Overlay: standardmäßig versteckt */
.select-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 20; /* höher als hover z-index */
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

/* sichtbar NUR wenn .select-mode aktiv ist */
.gallery-grid.select-mode .select-overlay {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* verstecke native checkbox */
.gallery-select-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* runde Checkbox-Optik */
.gallery-select-label {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.95);
    background: rgba(0,0,0,0.28);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.35);
    position: relative;
    transition: background .12s ease, transform .08s ease;
}

/* FÃ¼llung bei checked */
.gallery-select-label::after {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: transparent;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform .12s ease, background .12s ease;
}
.gallery-select-input:checked + .gallery-select-label {
    background: rgba(0,123,255,0.95);
    border-color: rgba(0,123,255,0.95);
}
.gallery-select-input:checked + .gallery-select-label::after {
    background: #fff;
    transform: translate(-50%, -50%) scale(1);
}

/* Markierung des ausgewählten Items */
.gallery-item.selected {
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center center;
    /* reveal animation */
    opacity: 0;
    transform: translateY(12px);
    will-change: opacity, transform;
    transition: opacity .6s cubic-bezier(.2,.8,.2,1) var(--reveal-delay, 0ms), transform .25s ease 0ms;
}

/* reveal on in-view */
.gallery-item.in-view img {
    opacity: 1;
    transform: none;
}

/* Hoverzoom: aktiv wenn NICHT im select-mode */
.gallery-grid:not(.select-mode) a.hoverzoom:hover img,
.gallery-grid:not(.select-mode) .detail-link.hoverzoom:hover img {
    transition: opacity .6s cubic-bezier(.2,.8,.2,1) var(--reveal-delay, 0ms), transform .25s ease 0ms;
    transform: scale(1.6);
}

/* Hoverzoom: deaktiviert im select-mode */
.gallery-grid.select-mode a.hoverzoom img,
.gallery-grid.select-mode .detail-link.hoverzoom img,
.gallery-grid.select-mode a.hoverzoom:hover img,
.gallery-grid.select-mode .detail-link.hoverzoom:hover img {
    transform: none !important;
}

.gslide-description {
    padding: 1rem 0;
}

/* Rating Display (oben rechts im Gallery Grid) */
.rating-display {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 1.1rem;
    z-index: 10;
    pointer-events: none;
}

.rating-display i {
    display: block;
}

/* Lightbox Rating Buttons */
/* Rating wird nicht mehr fixed im Viewport platziert (liegt in .lightbox-actions) */
.lightbox-rating { 
    position: static;
    bottom: auto;
    left: auto;
    transform: none;
}


.lightbox-rating-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.lightbox-rating-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.lightbox-rating-btn.active {
    background: rgba(0, 123, 255, 0.9);
    border-color: rgba(0, 123, 255, 1);
}

.lightbox-rating-down.active {
    background: rgba(211, 47, 47, 0.9);
    border-color: rgba(211, 47, 47, 1);
}

.lightbox-rating-btn i {
    pointer-events: none;
}

/* Lightbox Download Button */
.gdesc-inner {
    position: relative;
}

.lightbox-download {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    z-index: 99999;
}

.lightbox-download:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

/* Rating Modal */
.rating-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.rating-modal[aria-hidden="false"] {
    display: flex;
}

.rating-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.rating-modal-content {
    position: relative;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.rating-modal-content h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: #333;
}

.rating-modal-content p {
    margin: 0 0 1.5rem 0;
    color: #666;
}

.rating-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rating-modal-btn {
    flex: 1;
    padding: 1.5rem;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.rating-modal-btn i {
    font-size: 2rem;
}

.rating-modal-btn span {
    font-size: 0.9rem;
    font-weight: 500;
}

.rating-modal-btn:hover {
    border-color: #0078d4;
    background: rgba(0, 120, 212, 0.05);
}

.rating-modal-btn[aria-pressed="true"] {
    border-color: #0078d4;
    background: rgba(0, 120, 212, 0.1);
    color: #0078d4;
}

.rating-down[aria-pressed="true"] {
    border-color: #d32f2f;
    background: rgba(211, 47, 47, 0.1);
    color: #d32f2f;
}

.rating-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.rating-modal-action-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.rating-modal-action-btn:hover {
    background: #f5f5f5;
}

.rating-submit-btn {
    background: #0078d4;
    color: white;
    border-color: #0078d4;
}

.rating-submit-btn:hover {
    background: #005a9e;
}

.gallery-item a {
display: block;
position: relative;
width: 100%;
height: 100%;
transition: transform .25s ease 0ms;
z-index: 1;
}

.gallery-grid:not(.select-mode) .gallery-item:hover a {
transform: scale(1.6);
z-index: 100;
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Gegen-Skalierung für das Icon beim Hovern */
.gallery-grid:not(.select-mode) .gallery-item:hover .rating-display {
transform: scale(0.625); /* 1 / 1.6 = 0.625 */
transform-origin: top right; /* Damit es exakt in der Ecke bleibt */
}

.gallery-grid:not(.select-mode) a.hoverzoom:hover img,
.gallery-grid:not(.select-mode) .detail-link.hoverzoom:hover img {
transform: none !important;
}

.rating-display {
position: absolute;
top: 10px;
right: 10px;
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 8px 12px;
border-radius: 20px;
font-size: 1.1rem;
z-index: 10;
pointer-events: none;
visibility: visible !important;
opacity: 1 !important;
/* Sanfter Übergang für die Gegen-Skalierung */
transition: transform .25s ease 0ms;
}



/* Lightbox Actions: Download + Rating nebeneinander rechts unten */
.gdesc-inner {
    position: relative;
}

/* neuer gemeinsamer Container */
.gdesc-inner .lightbox-actions {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 99999;
}

/* Download-Button darf NICHT mehr absolut sein, sonst bricht flex */
.gdesc-inner .lightbox-actions .lightbox-download {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    transform: none;
}

/* Rating-Container neutralisieren (falls er noch existiert) */
.gdesc-inner .lightbox-actions .lightbox-rating {
    position: static;
    bottom: auto;
    left: auto;
    transform: none;
    display: contents; /* Buttons verhalten sich wie direkte Kinder */
}

/* Rating-Buttons exakt wie Download-Button dimensionieren */
.gdesc-inner .lightbox-actions .lightbox-rating-btn,
.gdesc-inner .lightbox-actions .lightbox-download {
    width: auto;
    height: auto;
    padding: 0.5rem 0.5rem;     /* entspricht deiner lightbox-download Größe */
    border-radius: 8px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    backdrop-filter: blur(10px);
}

/* Hover: wie Download */
.gdesc-inner .lightbox-actions .lightbox-rating-btn:hover,
.gdesc-inner .lightbox-actions .lightbox-download:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    transform: scale(1.1);
}


/* Actions (Rating + Download) nebeneinander rechts unten in der Beschreibung */
.gdesc-inner {
    position: relative;
}

.gdesc-inner .lightbox-actions {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 99999;
}

/* Alle Buttons exakt in der Größe des bisherigen Download-Buttons */
.gdesc-inner .lightbox-actions .lightbox-rating-btn,
.gdesc-inner .lightbox-actions .lightbox-download {
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;

    padding: 0.5rem 0.5rem; /* == bestehender Download-Button */
    border-radius: 8px;
    font-size: 1.5rem;      /* == bestehender Download-Button */

    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

/* Wichtig: Download darf nicht mehr absolut sein, sonst passt es nicht in die Reihe */
.gdesc-inner .lightbox-actions .lightbox-download {
    position: static;
    top: auto;
    right: auto;
    transform: none;
}

/* Hover identisch */
.gdesc-inner .lightbox-actions .lightbox-rating-btn:hover,
.gdesc-inner .lightbox-actions .lightbox-download:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    transform: scale(1.1);
}


/* Aktives Rating visuell hervorheben */
.gdesc-inner .lightbox-actions .lightbox-rating-btn.active {
    transform: scale(1.1);
    border-color: transparent;
}

/* Daumen hoch = grün */
.gdesc-inner .lightbox-actions .lightbox-rating-up.active {
    background: rgba(46, 204, 113, 0.95);
    color: #fff;
}

/* Daumen runter = rot */
.gdesc-inner .lightbox-actions .lightbox-rating-down.active {
    background: rgba(231, 76, 60, 0.95);
    color: #fff;
}
