/* ===== CENTRO DE RECURSOS - ESTILOS MEJORADOS ===== */

/* Grid principal */
.rem-resource-center .rem-grid,
.rem-rc-frontend .rem-grid,
.rem-rc-admin-wrap .rem-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 16px;
}

/* Tarjetas - Escritorio */
.rem-resource-center .rem-card,
.rem-rc-frontend .rem-card,
.rem-rc-admin-wrap .rem-card {
    width: calc(25% - 14px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Miniatura más grande */
.rem-card .rem-thumb {
    height: 160px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 15px;
}

.rem-card .rem-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Cuerpo de la tarjeta */
.rem-card .rem-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* TÍTULO MÁS PEQUEÑO */
.rem-card .rem-body h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    color: #2c3e50;
}

/* Descripción */
.rem-card .rem-body p {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    flex: 1;
}

/* Acciones */
.rem-card .rem-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.rem-card .rem-actions .button {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    background: #3498db;
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.rem-card .rem-actions .button:hover {
    background: #2980b9;
}

/* Mensaje sin acceso */
.rem-card .rem-actions.no-access {
    text-align: center;
    padding: 10px 0;
}

.rem-card .rem-no-access-message {
    background: linear-gradient(135deg, #e74c3c, #e67e22);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: block;
}

/* ========== MÓVILES ========== */

/* Tablets */
@media (max-width: 1024px) {
    .rem-resource-center .rem-card,
    .rem-rc-frontend .rem-card,
    .rem-rc-admin-wrap .rem-card {
        width: calc(50% - 9px);
    }
    
    .rem-card .rem-body h3 {
        font-size: 13px;
    }
}

/* Móviles - Diseño horizontal */
@media (max-width: 768px) {
    .rem-resource-center .rem-grid,
    .rem-rc-frontend .rem-grid {
        gap: 12px;
    }
    
    .rem-resource-center .rem-card,
    .rem-rc-frontend .rem-card {
        width: 100%;
        flex-direction: row;
        min-height: 140px;
    }
    
    .rem-card .rem-thumb {
        width: 140px;
        height: 140px;
        flex-shrink: 0;
    }
    
    .rem-card .rem-body {
        padding: 15px;
        min-width: 0;
    }
    
    .rem-card .rem-body h3 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .rem-card .rem-body p {
        font-size: 11px;
        margin-bottom: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .rem-card .rem-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .rem-card .rem-actions .button {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .rem-resource-center .rem-card,
    .rem-rc-frontend .rem-card {
        min-height: 130px;
    }
    
    .rem-card .rem-thumb {
        width: 130px;
        height: 130px;
    }
    
    .rem-card .rem-body h3 {
        font-size: 12px;
    }
}

/* Para el admin, mantener diseño de cuadrícula */
@media (max-width: 768px) {
    .rem-rc-admin-wrap .rem-card {
        width: calc(50% - 9px);
        flex-direction: column;
        min-height: auto;
    }
    
    .rem-rc-admin-wrap .rem-card .rem-thumb {
        width: 100%;
        height: 140px;
    }
}

/* Filtros */
.rem-rc-filters {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rem-rc-filters .rem-filter {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 20px;
    font-size: 13px;
}

.rem-rc-filters .rem-filter.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Modal - Versión minimalista */
.rem-rc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.rem-rc-modal-inner {
    background: #fff;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    padding: 25px;
    border-radius: 12px;
    position: relative;
    overflow: auto;
}

.rem-rc-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.rem-rc-modal-close::before {
    content: "×";
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.rem-rc-modal-close:hover {
    background: #c0392b;
    transform: rotate(90deg);
}