/* ==========================================================
   Galerie
   ========================================================== */

/* ---------- Tabs ---------- */
.gal-tabs {
    display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 24px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    box-shadow: var(--shadow-sm);
    max-width: 100%; overflow-x: auto;
}
.gal-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 999px;
    font-size: 14px; font-weight: 600; color: var(--text-muted); white-space: nowrap;
    transition: background .15s, color .15s;
}
.gal-tab:hover { color: var(--navy); background: var(--accent-50); }
.gal-tab.is-active { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 4px 12px rgba(var(--accent-rgb), .3); }
.gal-tab em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(0, 0, 0, .06); }
.gal-tab.is-active em { background: rgba(255, 255, 255, .25); }

/* ---------- Albenraster ---------- */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px 22px; align-items: start; }
.gal-card { position: relative; display: flex; flex-direction: column; padding-top: 10px; }
.gal-card__frame { position: relative; display: block; }
.gal-card__stack { position: absolute; inset: 0; pointer-events: none; }
.gal-card__stack img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    border-radius: var(--radius-lg); border: 3px solid var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .35s var(--ease);
}
.gal-card__stack img:nth-child(1) { transform: rotate(-4deg) translate(-6px, 4px) scale(.94); opacity: .7; }
.gal-card__stack img:nth-child(2) { transform: rotate(3deg) translate(6px, 2px) scale(.96); opacity: .85; }
.gal-card:hover .gal-card__stack img:nth-child(1) { transform: rotate(-8deg) translate(-16px, 6px) scale(.94); }
.gal-card:hover .gal-card__stack img:nth-child(2) { transform: rotate(6deg) translate(16px, 0) scale(.96); }

.gal-card__img {
    position: relative; z-index: 1; display: block;
    aspect-ratio: 4 / 3; overflow: hidden;
    border-radius: var(--radius-lg);
    border: 3px solid var(--surface);
    box-shadow: var(--shadow-md);
    background: var(--accent-50);
}
.gal-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gal-card:hover .gal-card__img img { transform: scale(1.06); }
.gal-card__year {
    position: absolute; top: 10px; left: 10px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 700; color: var(--navy);
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px);
}
.gal-card__body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; padding: 12px 4px 0; }
.gal-card__body strong { font-size: 16px; color: var(--navy); line-height: 1.3; transition: color .15s; }
.gal-card:hover .gal-card__body strong { color: var(--accent-ink); }
.gal-card__body span { font-size: 13px; color: var(--text-muted); }
.gal-card__body i { color: var(--accent); margin-right: 4px; }

.gal-card--feature { grid-column: span 2; }
.gal-card--feature .gal-card__img { aspect-ratio: 16 / 9; }
.gal-card--feature .gal-card__body strong { font-size: 20px; }

.gal-grid--models .gal-card { padding-top: 0; }
.gal-grid--models .gal-card__img { aspect-ratio: 1; box-shadow: var(--shadow-sm); }

/* ---------- Albumansicht ---------- */
.gal-head { flex-wrap: wrap; }
.gal-back { margin-left: auto; }
.gal-desc { margin-bottom: 24px; padding: 24px 28px; }
.gal-desc h2 { margin: 0 0 10px; font-size: 20px; color: var(--navy); }
.gal-desc .prose { color: var(--text-muted); max-width: 80ch; }

.gal-masonry { columns: 4 240px; column-gap: 14px; }
.gal-photo {
    position: relative; display: block;
    margin-bottom: 14px; break-inside: avoid;
    border-radius: var(--radius); overflow: hidden;
    background: var(--accent-50);
    box-shadow: var(--shadow-sm);
    cursor: zoom-in;
}
.gal-photo img, .gal-photo video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease), filter .2s; }
.gal-photo:hover img { transform: scale(1.04); }
.gal-photo::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 rgba(var(--accent-rgb), .0); transition: box-shadow .2s; }
.gal-photo:hover::after { box-shadow: inset 0 0 0 3px rgba(var(--accent-rgb), .7); }
.gal-photo--video { aspect-ratio: 16 / 9; cursor: pointer; }
.gal-play {
    position: absolute; inset: 0; margin: auto;
    width: 56px; height: 56px; display: grid; place-items: center;
    border-radius: 50%; color: var(--accent-ink); font-size: 20px;
    background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-md);
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
    .gal-card--feature { grid-column: auto; }
    .gal-card--feature .gal-card__img { aspect-ratio: 4 / 3; }
    .gal-masonry { columns: 2 140px; column-gap: 10px; }
    .gal-photo { margin-bottom: 10px; }
}
@media (max-width: 640px) {
    .gal-grid { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
    .gal-card__body strong { font-size: 14px; }
    .gal-card--feature { grid-column: span 2; }
    .gal-back { margin-left: 0; }
    .gal-tab__long { display: none; }
    .gal-tab { padding: 9px 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .gal-card__stack img, .gal-card__img img, .gal-photo img { transition: none; }
}
