/* Muro - Carrusel de imágenes de las publicaciones */

.muro-carousel {
    position: relative;
    border-radius: 0.875rem;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--dm-outline-variant, rgba(0, 0, 0, 0.12));
}

.muro-carousel-viewport {
    overflow: hidden;
    width: 100%;
}

.muro-carousel-track {
    display: flex;
    transition: transform 0.35s ease;
    will-change: transform;
}

.muro-carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.muro-carousel-img {
    width: 100%;
    height: clamp(220px, 56vw, 460px);
    object-fit: contain;
    display: block;
    user-select: none;
}

/* Botones de navegación */
.muro-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    z-index: 2;
}
.muro-carousel-btn:hover {
    background: rgba(0, 0, 0, 0.65);
}
.muro-carousel-prev { left: 0.5rem; }
.muro-carousel-next { right: 0.5rem; }
.muro-carousel-btn .material-symbols-outlined { font-size: 22px; }

/* Contador 1/N */
.muro-carousel-counter {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    z-index: 2;
}

/* Puntos indicadores */
.muro-carousel-dots {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.375rem;
    z-index: 2;
}
.muro-carousel-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    border: none;
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease, width 0.2s ease;
}
.muro-carousel-dot.is-active {
    background: #fff;
    width: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
    .muro-carousel-track { transition: none; }
}

.muro-carousel-img[data-lightbox-src],
[data-lightbox-src] { cursor: zoom-in; }

/* ── Lightbox ──────────────────────────────────────────────────────── */
.muro-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    padding: 1.5rem;
}
.muro-lightbox.hidden { display: none; }
.muro-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
}
.muro-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.25rem;
    line-height: 1;
    cursor: pointer;
}

/* ── Modal (reportar) ──────────────────────────────────────────────── */
.muro-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
}
.muro-modal-card {
    background: var(--dm-surface-container-lowest, #fff);
    border: 1px solid var(--dm-outline-variant, rgba(0, 0, 0, 0.12));
    border-radius: 1rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 24rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

/* ── Toast ─────────────────────────────────────────────────────────── */
.muro-toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translate(-50%, 1rem);
    z-index: 1100;
    background: var(--dm-surface-container-highest, #333);
    color: var(--dm-on-surface, #fff);
    border: 1px solid var(--dm-outline-variant, rgba(0, 0, 0, 0.12));
    padding: 0.625rem 1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}
.muro-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ── Spinner del scroll infinito ───────────────────────────────────── */
.muro-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    border: 3px solid var(--dm-outline-variant, rgba(0, 0, 0, 0.15));
    border-top-color: var(--dm-primary, #6750a4);
    animation: muro-spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes muro-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .muro-spinner { animation-duration: 1.6s; }
}
