/* ==========================================================================
   MusicNetics — Gallery, Lightbox & Press Styles (v1.3.0)
   Loaded only on pages using [musicnetics_photos], [musicnetics_press],
   or [musicnetics_epk].
   ========================================================================== */

/* --------------------------------------------------------------------------
   Photo Gallery — [musicnetics_photos]
   -------------------------------------------------------------------------- */

.mat-gallery-wrap {
    columns: 3;
    column-gap: 2px;
    margin: 1.5rem 0;
}

/* Column count variants */
.mat-gallery-cols-2 { columns: 2; }
.mat-gallery-cols-3 { columns: 3; }
.mat-gallery-cols-4 { columns: 4; }

.mat-gallery-item {
    break-inside: avoid;
    margin-bottom: 2px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    display: block;
    outline-offset: 2px;
}

.mat-gallery-item:focus-visible {
    outline: 2px solid var(--mat-accent, #1a1a2e);
}

.mat-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.35s ease;
}

.mat-gallery-item:hover img,
.mat-gallery-item:focus-visible img {
    transform: scale(1.05);
}

.mat-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.4;
    padding: 0.45em 0.8em;
    transform: translateY(100%);
    transition: transform 0.25s ease;
}

.mat-gallery-item:hover .mat-gallery-caption,
.mat-gallery-item:focus-visible .mat-gallery-caption {
    transform: translateY(0);
}

/* Responsive breakpoints */
@media (max-width: 900px) {
    .mat-gallery-cols-4 { columns: 3; }
}

@media (max-width: 680px) {
    .mat-gallery-wrap,
    .mat-gallery-cols-3,
    .mat-gallery-cols-4 { columns: 2; }
}

@media (max-width: 420px) {
    .mat-gallery-wrap,
    .mat-gallery-cols-2,
    .mat-gallery-cols-3,
    .mat-gallery-cols-4 { columns: 1; }
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */

.mat-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.mat-lightbox.mat-lb-open {
    display: flex;
}

.mat-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    cursor: pointer;
}

.mat-lb-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 98vw;
    max-height: 96vh;
    pointer-events: none; /* let backdrop clicks fall through — inner elements re-enable */
}

.mat-lb-content {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
}

.mat-lb-img {
    display: block;
    max-width: 88vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}

.mat-lb-caption {
    color: #d0d0d0;
    font-size: 0.88rem;
    margin: 0.6rem 0 0;
    text-align: center;
    max-width: 80vw;
}

.mat-lb-counter {
    color: #787878;
    font-size: 0.78rem;
    margin: 0.25rem 0 0;
    text-align: center;
}

/* Close button */
.mat-lb-close {
    position: fixed;
    top: 0.9rem;
    right: 1.1rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.8rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    opacity: 0.75;
    padding: 0;
    pointer-events: auto;
    transition: opacity 0.15s;
    font-family: Arial, sans-serif;
}

.mat-lb-close:hover,
.mat-lb-close:focus-visible {
    opacity: 1;
    outline: none;
}

/* Prev / Next arrows */
.mat-lb-prev,
.mat-lb-next {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
    font-family: Arial, sans-serif;
    user-select: none;
}

.mat-lb-prev:hover,
.mat-lb-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mat-lb-prev:focus-visible,
.mat-lb-next:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Lock body scroll when lightbox is open */
.mat-lb-body-lock {
    overflow: hidden;
}

/* Mobile: stack arrows below image */
@media (max-width: 600px) {
    .mat-lb-inner {
        flex-direction: column;
        gap: 0.5rem;
    }

    .mat-lb-prev,
    .mat-lb-next {
        font-size: 1.8rem;
        padding: 0.25rem 1.2rem;
    }

    .mat-lb-img {
        max-width: 95vw;
        max-height: 65vh;
    }
}

/* --------------------------------------------------------------------------
   Press / News — [musicnetics_press]
   -------------------------------------------------------------------------- */

.mat-press-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.mat-press-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.mat-press-card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.mat-press-card-header {
    padding: 1.1rem 1.25rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #f2f2f2;
}

.mat-press-logo {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    background: #f5f5f5;
    padding: 4px;
}

.mat-press-publication-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mat-press-publication {
    font-size: 0.8rem;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mat-press-date {
    font-size: 0.77rem;
    color: #888;
}

.mat-press-card-body {
    padding: 0.9rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.6rem;
}

.mat-press-headline {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1a1a1a;
    margin: 0;
}

.mat-press-featured-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.mat-press-summary {
    font-size: 0.88rem;
    line-height: 1.55;
    color: #555;
    margin: 0;
    flex: 1;
}

.mat-press-card-footer {
    padding: 0 1.25rem 1.25rem;
}

.mat-press-card-footer .mat-btn {
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .mat-press-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   EPK-specific section wrappers (v1.3.0 layout)
   -------------------------------------------------------------------------- */

.mat-epk-streaming-section .mat-streaming-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.mat-epk-streaming-section .mat-stream-btn {
    font-size: 0.88rem;
}
