/**
 * =============================================
 * FEED DE OBRAS — Estilos
 * =============================================
 * Ruta: /assets/css/feed-obras.css (dentro del child theme)
 */


/* ---- GRILLA PRINCIPAL ---- */

.feed-obras-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* MODIFICAR: cambia a repeat(4, 1fr) si quieres 4 columnas */
    gap: 8px; /* MODIFICAR: espacio entre cards */
}

/* Responsive: 2 columnas en tablet */
@media (max-width: 980px) {
    .feed-obras-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: 1 columna en mobile */
@media (max-width: 480px) {
    .feed-obras-grid {
        grid-template-columns: 1fr;
    }
}


/* ---- CARD DE OBRA ---- */

.feed-obra-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1; /* Cuadrado — MODIFICAR: usa 4/3 o 3/2 si prefieres otra proporción */
    background-color: #f0f0f0;
}

.feed-obra-card a.feed-obra-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.feed-obra-imagen {
    width: 100%;
    height: 100%;
}

.feed-obra-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.feed-obra-card:hover .feed-obra-imagen img {
    transform: scale(1.05);
}


/* ---- OVERLAY CON NOMBRE DEL ARTISTA ---- */

.feed-obra-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 16px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
    pointer-events: none;
}

.feed-obra-artista {
    color: #ffffff;
    font-size: 15px;
    font-style: italic;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}


/* ---- BOTÓN CARGAR MÁS ---- */

.feed-obras-loadmore-wrapper {
    text-align: center;
    margin-top: 40px;
}

.feed-obras-loadmore {
    background-color: #1a1a1a; /* MODIFICAR: color del botón */
    color: #ffffff;
    border: none;
    padding: 14px 40px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    letter-spacing: 0.5px;
}

.feed-obras-loadmore:hover {
    background-color: #333333; /* MODIFICAR: color hover */
}

.feed-obras-loadmore:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Spinner de carga */
.feed-obras-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: feedObrasSpinner 0.6s linear infinite;
    vertical-align: middle;
    margin-left: 10px;
}

@keyframes feedObrasSpinner {
    to {
        transform: rotate(360deg);
    }
}


/* ---- MODAL ---- */

.feed-obra-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-obra-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
}

.feed-obra-modal-content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feed-obra-modal-close {
    position: absolute;
    top: -40px;
    right: -10px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 5px 10px;
    z-index: 3;
    transition: opacity 0.2s ease;
}

.feed-obra-modal-close:hover {
    opacity: 0.7;
}

.feed-obra-modal-image img {
    max-width: 85vw;
    max-height: 75vh;
    object-fit: contain;
    display: block;
}

.feed-obra-modal-info {
    text-align: center;
    margin-top: 16px;
    color: #ffffff;
}

.feed-obra-modal-titulo {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #ffffff;
}

.feed-obra-modal-anio {
    font-size: 14px;
    opacity: 0.7;
    display: inline-block;
}

.feed-obra-modal-artista {
    font-size: 14px;
    font-style: italic;
    opacity: 0.8;
    display: block;
    margin-top: 4px;
}

/* Responsive modal */
@media (max-width: 768px) {
    .feed-obra-modal-image img {
        max-width: 95vw;
        max-height: 70vh;
    }

    .feed-obra-modal-close {
        top: -35px;
        right: 0;
    }
}




/* Fix: modal por encima del header de Divi */
.feed-obra-modal {
    z-index: 999999 !important;
}

.feed-obra-modal-overlay {
    z-index: 1;
}

.feed-obra-modal-content {
    z-index: 2;
    max-width: 80vw;
}

/* Asegurar que la imagen no se desborde */
.feed-obra-modal-image img {
    max-width: 80vw;
    max-height: 70vh;
    object-fit: contain;
}