/* SpVgg Bilderverwaltung 2.0 – Frontend */

.spvgg-bv-public{width:100%;padding:60px 0 100px}
.spvgg-bv-public-container{width:min(1400px,calc(100% - 40px));margin:0 auto}
.spvgg-bv-page-header{margin-bottom:40px}
.spvgg-bv-page-header h1{margin:0}
.spvgg-bv-breadcrumb{display:flex;gap:10px;align-items:center;margin-bottom:24px;font-size:14px;opacity:.65}
.spvgg-bv-breadcrumb a{color:inherit;text-decoration:none}
.spvgg-bv-gallery-meta{margin-top:10px;font-size:14px;opacity:.65}

.spvgg-album-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;width:100%}
.spvgg-album-card{position:relative;display:block;overflow:hidden;cursor:pointer;background:#111;color:#fff;border-radius:12px;text-decoration:none;transition:transform .35s ease,box-shadow .35s ease}
.spvgg-album-card:hover{transform:translateY(-4px)}
.spvgg-album-card-image{position:relative;aspect-ratio:16/10;overflow:hidden}
.spvgg-album-card-image:after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(0,0,0,.75),rgba(0,0,0,0));pointer-events:none}
.spvgg-album-card-image img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .5s ease;-webkit-user-drag:none}
.spvgg-album-card:hover .spvgg-album-card-image img{transform:scale(1.05)}
.spvgg-album-card-content{padding:20px}
.spvgg-album-card-title{margin:0 0 8px;color:#fff;font-size:21px;line-height:1.2}
.spvgg-album-card-date,.spvgg-album-card-count{font-size:14px;line-height:1.4;color:rgba(255,255,255,.65)}
.spvgg-album-card-count{margin-top:3px}

/* --- FIX: Absolutes Covern mit Errechnungspriorität (!important) --- */
.spvgg-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;width:100%}
.spvgg-gallery-item{display:block;position:relative;overflow:hidden;border-radius:12px;background:#111;aspect-ratio:1/1 !important}
.spvgg-gallery-item img{position:absolute !important;inset:0 !important;width:100% !important;height:100% !important;max-width:100% !important;max-height:100% !important;object-fit:cover !important;object-position:center center !important;transition:transform .45s ease;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}
.spvgg-gallery-item:hover img{transform:scale(1.04) !important}
/* ------------------------------------------------------------------ */

.spvgg-lightbox{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;padding:40px;background:rgba(0,0,0,.96)}
.spvgg-lightbox-inner{position:relative;width:min(1500px,92vw);height:92vh;display:flex;flex-direction:column;align-items:center;justify-content:center}
.spvgg-lightbox-content{width:100%;height:calc(100% - 60px);display:flex;align-items:center;justify-content:center}
.spvgg-lightbox-content img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}
.spvgg-lightbox-info{height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#fff}
.spvgg-lightbox-title{font-size:16px;font-weight:600}
.spvgg-lightbox-counter{font-size:13px;opacity:.55}
.spvgg-lightbox-photographer{position:absolute;right:0;bottom:0;z-index:5;padding:8px 12px;color:rgba(255,255,255,.75);font-size:12px;line-height:1.3;background:rgba(0,0,0,.45);border-radius:12px;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);pointer-events:none}
.spvgg-lightbox-close,.spvgg-lightbox-prev,.spvgg-lightbox-next{position:absolute;z-index:2;border:0;background:transparent;color:#fff;cursor:pointer;transition:opacity .2s ease}
.spvgg-lightbox-close:hover,.spvgg-lightbox-prev:hover,.spvgg-lightbox-next:hover{opacity:.65}
.spvgg-lightbox-close{top:20px;right:30px;font-size:44px;line-height:1}
.spvgg-lightbox-prev,.spvgg-lightbox-next{top:50%;transform:translateY(-50%);padding:20px;font-size:70px;line-height:1}
.spvgg-lightbox-prev{left:15px}.spvgg-lightbox-next{right:15px}
body.spvgg-lightbox-open{overflow:hidden}

@media(max-width:1024px){
 .spvgg-album-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
 .spvgg-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:700px){
 .spvgg-bv-public{padding:40px 0 70px}
 .spvgg-bv-public-container{width:min(100% - 30px,1400px)}
 .spvgg-album-grid{grid-template-columns:1fr;gap:16px}
 .spvgg-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .spvgg-album-card-title{font-size:19px}
 .spvgg-lightbox{padding:15px}
 .spvgg-lightbox-inner{width:100%;height:90vh}
 .spvgg-lightbox-prev,.spvgg-lightbox-next{font-size:45px;padding:10px}
 .spvgg-lightbox-prev{left:0}.spvgg-lightbox-next{right:0}
 .spvgg-lightbox-close{top:10px;right:15px;font-size:38px}
 .spvgg-lightbox-title{font-size:14px}.spvgg-lightbox-counter{font-size:12px}
 .spvgg-lightbox-photographer{right:0;bottom:0;padding:6px 9px;font-size:11px}
}
@media(max-width:450px){.spvgg-gallery{grid-template-columns:1fr}}

/*
|--------------------------------------------------------------------------
| Galerie-Seite
|--------------------------------------------------------------------------
*/

.spvgg-gallery-page {
    width: 100%;
}

.spvgg-gallery-hero {
    width: 100%;
    background: #111111;
    color: #ffffff;
}

.spvgg-gallery-hero-inner {
    margin: 0 auto;
    padding: 70px var(--space-20) 65px;
}

.spvgg-gallery-hero-label {
    margin-bottom: 14px;
    color: #FFE900;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.spvgg-gallery-hero-title {
    max-width: 1000px;
    margin: 0;
    color: #ffffff!important;
    font-size: clamp(36px, 5vw, 72px);
    line-height: 1.05;
}

.spvgg-gallery-page-content {
    width: 100%;
}

.spvgg-gallery-photographer {
    margin-top: 18px;
    color: #666666;
}

.spvgg-gallery-back {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

@media (max-width: 700px) {
    .spvgg-gallery-hero-inner {
        width: min(100% - 30px, 1400px);
        padding: 50px 0 45px;
    }

    .spvgg-gallery-hero-label {
        margin-bottom: 10px;
        font-size: 12px;
    }

    .spvgg-gallery-hero-title {
        font-size: clamp(32px, 9vw, 48px);
    }

    .spvgg-gallery-back {
        margin-top: 32px;
    }
}

/*
|--------------------------------------------------------------------------
| Galerie-Hero unter transparentem Header
|--------------------------------------------------------------------------
*/

.spvgg-gallery-page .spvgg-gallery-hero {
    margin-top: -100px;
    padding-top: 100px;
}

@media (max-width: 700px) {
    .spvgg-gallery-page .spvgg-gallery-hero {
        margin-top: -80px;
        padding-top: 80px;
    }
}

