/* ==========================================================================
   GALERIA DE ÁLBUNS — 6º BC
   ========================================================================== */

:root {
    --album-gap: 24px;
    --album-card-bg: var(--card);
    --album-card-border: var(--border-subtle);
    --album-card-hover-border: var(--border-gold);
    --lightbox-bg: rgba(0,0,0,0.85);
    --lightbox-img-max-h: 80vh;
}

/* Grid de álbuns */
.albuns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--album-gap);
    padding: 24px 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.album-card {
    background: var(--album-card-bg);
    border: 1px solid var(--album-card-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 16px var(--accent-gold-soft);
    border-color: var(--album-card-hover-border);
}

.album-cover {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    background: linear-gradient(135deg, #15181e, #1e222b);
}

.album-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.album-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-meta {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.album-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lightbox modal centralizado 80% */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: var(--lightbox-bg);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-modal {
    width: 80vw;
    max-width: 1400px;
    max-height: 80vh;
    background: var(--card);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 32px var(--accent-gold-glow);
    animation: lbIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes lbIn {
    from { opacity:0; transform: scale(0.95) translateY(10px); }
    to { opacity:1; transform: scale(1) translateY(0); }
}

.lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, rgba(212,175,55,0.12), transparent);
}

.lightbox-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-gold-light);
    max-width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lightbox-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}
.lightbox-close:hover { color: var(--accent-gold); transform: rotate(90deg); }

.lightbox-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    min-height: 300px;
}

.lightbox-img {
    max-width: 100%;
    max-height: var(--lightbox-img-max-h);
    object-fit: contain;
    display: block;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: var(--text-white);
    font-size: 28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.lightbox-nav:hover { background: var(--accent-gold); color: #000; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-subtitle);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--muted);
    background: rgba(0,0,0,0.6);
    padding: 4px 12px;
    border-radius: 20px;
}

.lightbox-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.3);
}

.lightbox-autoplay {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
}
.lightbox-autoplay input { accent-color: var(--accent-gold); }

.lightbox-thumbs {
    display: flex;
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.2);
}
.lightbox-thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.lightbox-thumb.active,
.lightbox-thumb:hover { opacity: 1; border-color: var(--accent-gold); }

/* Responsivo */
@media (max-width: 768px) {
    .albuns-grid { padding: 16px; grid-template-columns: 1fr; }
    .lightbox-modal { width: 95vw; max-height: 90vh; }
    .lightbox-nav { width: 44px; height: 44px; font-size: 22px; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}