/* ── Masonry grid ─────────────────────────────────────────────────────────── */
.LEW_TeamGallery {
    columns: 4;
    column-gap: 12px;
    min-height: 120px;
}

@media (max-width: 900px) { .LEW_TeamGallery { columns: 3; } }
@media (max-width: 600px) { .LEW_TeamGallery { columns: 2; } }
@media (max-width: 380px) { .LEW_TeamGallery { columns: 1; } }

/* ── Sentinel (infinite scroll) ──────────────────────────────────────────── */
.LEW_TeamGallery_Sentinel {
    height: 1px;
    column-span: all;
}

/* ── Loading ─────────────────────────────────────────────────────────────── */
.LEW_TeamGallery_Loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 60px 0;
    color: rgba(255,255,255,0.35);
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.LEW_TeamGallery_Loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: #1B99D2;
    border-radius: 50%;
    animation: lew-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes lew-spin { to { transform: rotate(360deg); } }

.LEW_TeamGallery_Empty {
    color: #9aaab8;
    font-size: 14px;
    font-family: 'Roboto Mono', monospace;
    text-align: center;
    padding: 40px 0;
}

/* ══ LEW_PGal — card de imagen (idéntico al de galería de jugador) ══════════ */
.LEW_PGal_Item { break-inside: avoid; margin-bottom: 12px; }

.LEW_PGal_Card { display: block; position: relative; border-radius: 16px; overflow: hidden; background: #111; border: 1px solid rgba(255,255,255,.06); box-shadow: 0 8px 24px rgba(0,0,0,.3); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; text-decoration: none; }
.LEW_PGal_Card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.LEW_PGal_CardImg { display: block; width: 100%; height: auto; transition: transform .28s ease; }
.LEW_PGal_Card:hover .LEW_PGal_CardImg { transform: scale(1.04); }

/* Gradient overlay */
.LEW_PGal_Gradient { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.7) 100%); pointer-events: none; z-index: 1; }

/* Top — category chip */
.LEW_PGal_Top { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 6; display: flex; justify-content: flex-end; pointer-events: none; }

/* Bottom — round + badges */
.LEW_PGal_Bottom { position: absolute; bottom: 8px; left: 8px; right: 8px; z-index: 6; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; pointer-events: none; }
.LEW_PGal_BottomLeft { display: flex; flex-direction: column; gap: 4px; }
.LEW_PGal_BottomRight { display: flex; gap: 6px; flex-shrink: 0; }

/* Chips */
.LEW_PGal_Chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.LEW_PGal_ChipCat   { background: rgba(0,0,0,.65); }
.LEW_PGal_ChipRound { background: rgba(27,153,210,.88); font-size: 12px; padding: 4px 12px; }

/* Team badges */
.LEW_PGal_TeamBadge { display: inline-flex; width: 44px; height: 44px; border-radius: 10px; align-items: center; justify-content: center; overflow: hidden; }
.LEW_PGal_TeamBadge img { display: block; width: 36px; height: 36px; object-fit: contain; }

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.LEW_Lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.LEW_Lightbox--open { display: flex; }

.LEW_Lightbox_Backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.93);
}
.LEW_Lightbox_Stage {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.LEW_Lightbox_Img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    opacity: 0;
    transition: opacity .2s ease;
}
.LEW_Lightbox_Img--ready { opacity: 1; }

.LEW_Lightbox_Btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255,255,255,.14);
    border: none;
    color: #fff;
    font-size: 38px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.LEW_Lightbox_Btn:hover { background: rgba(27,153,210,.7); }
.LEW_Lightbox_Prev { left: 14px; }
.LEW_Lightbox_Next { right: 14px; }

.LEW_Lightbox_Close {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 2;
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.LEW_Lightbox_Close:hover { background: rgba(255,255,255,.25); }

.LEW_Lightbox_Counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255,255,255,.55);
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    letter-spacing: .06em;
    pointer-events: none;
}

@media (max-width: 600px) {
    .LEW_Lightbox_Prev { left: 4px; }
    .LEW_Lightbox_Next { right: 4px; }
    .LEW_Lightbox_Btn  { width: 42px; height: 42px; font-size: 28px; }
}
