/* Moonlight Media Albums – Frontend */

/* === Lista albumów === */
.mma-album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.mma-album-card {
    display: block;
    text-decoration: none !important;
    color: inherit;
    overflow: hidden;
}
.mma-album-card:hover {
    background: #f2e8df;
}

.mma-album-cover-wrap {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    background: #e8e8e8;
}
.mma-album-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.mma-album-card:hover .mma-album-cover-img { transform: scale(1.04); }

.mma-album-cover-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #bbb;
}
.mma-album-cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.25);
    opacity: 0;
    transition: opacity .2s;
}
.mma-album-card:hover .mma-album-cover-overlay { opacity: 1; }

.mma-album-info {
    padding: 12px;
    text-align: center;
}
.mma-album-type {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    color: #b4c7b6;;
    letter-spacing: 4.3px;
    margin-bottom: 2px;
}
.mma-album-title {
    margin: 0;
    line-height: 1.3;
}

/* === Galeria zdjęć === */
.mma-album-gallery-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.mma-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
}
.mma-back-link:hover { color: #000; }
.mma-album-gallery-title {
    margin: 0;
    font-size: 30px;
    flex: 1;
    text-align: center;
    font-weight: 500;
    font-style: italic;
}
.mma-album-gallery-count {
    font-size: 13px;
    color: #888;
}

.mma-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}
.mma-gallery-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
    aspect-ratio: 1;
    cursor: pointer;
}
.mma-gallery-link {
    display: block;
    width: 100%;
    height: 100%;
}
.mma-gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.mma-gallery-item:hover .mma-gallery-thumb { transform: scale(1.06); }
.mma-gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}
.mma-gallery-item:hover .mma-gallery-item-overlay { opacity: 1; }
.mma-gallery-item-overlay .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #fff;
}
.mma-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 12px;
    padding: 6px 8px;
    text-align: center;
    transform: translateY(100%);
    transition: transform .2s;
}
.mma-gallery-item:hover .mma-gallery-caption { transform: translateY(0); }

/* Lightbox */
.mma-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mma-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.92);
    cursor: pointer;
}
.mma-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.mma-lightbox-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 80vh;
}
#mma-lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 4px 32px rgba(0,0,0,.5);
    transition: opacity .25s;
}
.mma-lightbox-close,
.mma-lightbox-prev,
.mma-lightbox-next {
    position: fixed;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background .15s;
    z-index: 2;
}
.mma-lightbox-close { top: 20px; right: 20px; }
.mma-lightbox-prev  { left: 16px;  top: 50%; transform: translateY(-50%); }
.mma-lightbox-next  { right: 16px; top: 50%; transform: translateY(-50%); }
.mma-lightbox-close:hover,
.mma-lightbox-prev:hover,
.mma-lightbox-next:hover { background: rgba(255,255,255,.3); }
.mma-lightbox-caption {
    color: rgba(255,255,255,.8);
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}
.mma-lightbox-counter {
    color: rgba(255,255,255,.5);
    font-size: 12px;
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .mma-album-grid { grid-template-columns: repeat(2, 1fr); gap: 10px;}
    .mma-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr))};


}

@media (max-width: 400px) {
        .mma-album-type {
        font-size: 10px;
    }

}
