/* --- ESTILOS COMUNES --- */
.mpls-contenedor-cards,
.mpls-lista-bloques-interna {
    margin: 20px 0;
    list-style: none;
    padding: 0;
}

.mpls-title {
    margin: 0 0 5px 0;
    font-size: 1.3em;
    line-height: 1.2;
}

.mpls-resumen {
    color: #666;
    margin: 0 0 10px 0;
    font-size: 0.9em;
}

/* --- Botón de Detalle --- */
.mpls-btn-detalle {
    display: inline-block;
    padding: 10px 18px;
    background-color: #0073aa; 
    color: white !important; 
    text-decoration: none; 
    border: none; 
    border-radius: 4px;
    font-size: 0.95em;
    font-weight: bold; 
    text-align: center;
    cursor: pointer; 
    transition: background-color 0.2s;
}

.mpls-btn-detalle:hover {
    background-color: #005177;
}

/* --- Indicadores de Estado (Badge) --- */
.mpls-badge {
    padding: 4px 8px;
    border-radius: 3px;
    color: white;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}
/* Colores de Estado de Ejemplo */
.mpls-estado-nuevo .mpls-badge { background-color: #28a745; }
.mpls-estado-antiguo .mpls-badge { background-color: #ffc107; }
.mpls-estado-urgente .mpls-badge { background-color: #dc3545; }


/* ======================================================= */
/* --- FORMATO BLOQUES (Horizontal 3 Columnas) --- */
/* ======================================================= */

.mpls-lista-bloques-interna {
    list-style: none;
    padding: 0;
}

.mpls-item-bloque {
    display: flex;
    align-items: center;
    gap: 20px;
    
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 1. Bloque Izquierdo: Foto (Aseguramos 120x120px) */
.mpls-bloque-izq {
    flex-shrink: 0;
    width: 120px;
    height: 120px; 
    min-width: 120px; /* Evitar que se encoja por debajo de este tamaño */
    overflow: hidden; /* Corta la imagen si es demasiado grande */
}
.mpls-bloque-izq .mpls-thumbnail,
.mpls-bloque-izq .mpls-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para llenar el contenedor */
    border-radius: 4px;
}

/* 2. Bloque Central: Info */
.mpls-bloque-centro {
    flex-grow: 1;
    min-width: 0;
}
.mpls-meta-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85em;
}
.mpls-seccion {
    color: #0073aa;
    font-weight: 500;
}

/* 3. Bloque Derecho: Acciones */
.mpls-bloque-der {
    flex-shrink: 0;
    margin-left: auto;
}


/* ======================================================= */
/* --- FORMATO CARD (Vertical en Grilla) --- */
/* ======================================================= */

.mpls-contenedor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.mpls-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.mpls-card:hover {
    transform: translateY(-5px);
}

.mpls-card-imagen {
    height: 200px;
    overflow: hidden;
}
.mpls-card-imagen .mpls-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mpls-card-contenido {
    padding: 15px;
    flex-grow: 1;
}

.mpls-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #fafafa;
}

.mpls-card-footer .mpls-btn-detalle {
    padding: 8px 15px; 
    font-size: 0.9em;
}

/* Diseño Responsivo para Móviles */
@media (max-width: 768px) {
    .mpls-item-bloque {
        flex-wrap: wrap; 
        justify-content: center;
    }
    
    /* En móvil, reducimos el tamaño de la imagen para que no ocupe demasiado */
    .mpls-bloque-izq {
        width: 80px; /* Reducido para móvil */
        height: 80px;
        min-width: 80px; 
        text-align: center;
        margin-bottom: 10px;
    }
    .mpls-bloque-izq .mpls-thumbnail,
    .mpls-bloque-izq .mpls-thumbnail-placeholder {
        width: 100%;
        height: 100%;
        margin: 0 auto;
    }
    
    .mpls-bloque-centro, .mpls-bloque-der {
        width: 100%;
        text-align: center;
    }
    .mpls-meta-info {
        justify-content: center;
    }
    .mpls-bloque-der .mpls-btn-detalle {
        display: block;
        width: 100%;
    }
}
