/* --- Galerie Off-White Museum Look --- */

body.artwork-page {
    background: #f8f8f8;
    opacity: 0;
    animation: pageFadeIn 0.8s ease forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Container */
.gallery-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 60px 40px;
}

/* Titel */
.gallery-title {
    font-family: "Cormorant Garamond", serif;
    font-size: 48px;
    font-weight: 300;
    text-align: center;
    margin-bottom: 28px;
    color: #222;

    padding-bottom: 12px;
    border-bottom: 0.5px solid rgba(0,0,0,0.15); /* Hairline */
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* Untertitel – 100% edel + Fade-In */
.gallery-info {
    text-align: center;
    font-size: 22px;
    font-family: "Cormorant Garamond", serif;
    color: #444;
    margin-bottom: 60px;

    max-width: 620px;
    margin-left: auto;
    margin-right: auto;

    line-height: 1.45;
    letter-spacing: 0.3px;

    opacity: 0;
    animation: fadeInSubtitle 1.2s ease forwards;
    animation-delay: 0.3s;
}

@keyframes fadeInSubtitle {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* GRID – dynamisch, 4–6 Bilder pro Reihe */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 35px;
}

/* --- Galerie-Item: Museum-Layout, bündige Titel --- */
.gallery-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    min-height: 380px;
    height: 100%;

    opacity: 0;
    transform: translateY(10px);
    animation: fadeInItem 0.6s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.10s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.20s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.30s; }

@keyframes fadeInItem {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Frame: Bildbereich --- */
.frame {
    width: 100%;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.frame:hover {
    box-shadow: 
        0 6px 18px rgba(0,0,0,0.12),
        0 0 22px rgba(255,255,255,0.25); /* Ambient Light Glow */
    transform: translateY(-2px);
}

/* Bild – immer korrekt skaliert */
.frame img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* --- Caption: bündig, gleiche Höhe --- */
.caption {
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;

    font-family: "Cormorant Garamond", serif;
    font-size: 16px;
    color: #666;
    text-align: center;
    opacity: 0.8;
}

/* --- LIGHTBOX --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

/* --- ATZE BOX --- */
.atze-box {
    position: fixed;
    bottom: 40px;
    left: 40px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(255,255,255,0.95);
    border: 1px solid #ddd;
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
    max-width: 380px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 99999;
}

.atze-box.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.atze-img {
    width: 70px;
    height: auto;
}

.atze-text {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    color: #333;
    line-height: 1.4;
}

/* Atze Close Button */
.atze-close {
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    margin-left: auto;
    padding-left: 10px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.atze-close:hover {
    opacity: 1;
}

/* --- Mobile Optimierung --- */
@media (max-width: 600px) {
    .atze-box {
        bottom: 20px;
        left: 20px;
        max-width: 85%;
        padding: 14px 18px;
        flex-direction: row;
    }

    .atze-img {
        width: 50px;
    }

    .atze-text {
        font-size: 14px;
    }

    .atze-close {
        font-size: 20px;
    }
}