/* Grid 5 cột, responsive */
.lppl-grid { display:grid; gap:16px; }
.lppl-cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1280px) { .lppl-cols-5 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1024px) { .lppl-cols-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .lppl-cols-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .lppl-cols-5 { grid-template-columns: repeat(1, 1fr); } }

/* Card */
.lppl-card { border-radius: 14px; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,0.08); background:#fff; display:flex; flex-direction:column; }
.lppl-img-wrap { display:block; background:#f3f5f7; }
.lppl-card-img { width: 100%; height: 220px; object-fit: cover; display:block; }
.lppl-noimg { display:flex; align-items:center; justify-content:center; color:#889; background:#eef1f4; }
.lppl-card-body { padding: 12px 14px 14px; }
.lppl-card-title { margin:0 0 8px; font-size:15px; font-weight:700; color:#0b5d37; }

/* Prompt clamp 3 lines */
.lppl-prompt { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; position:relative; }
.lppl-prompt:after { content:'…'; position:absolute; right:0; bottom:0; padding-left:6px; background:linear-gradient(90deg, rgba(255,255,255,0), #fff 60%); }

/* Readmore button */
.lppl-readmore { margin-top:10px; border:0; padding:8px 12px; border-radius:10px; background: linear-gradient(135deg, #0b5d37, #0f8a4a); color:#fff; font-weight:600; cursor:pointer; transition: transform .06s ease; }
.lppl-readmore:active { transform: scale(0.98); }

/* Source */
.lppl-source a { color:#0f8a4a; text-decoration:none; font-weight:600; }
.lppl-source a:hover { text-decoration:underline; }

/* Single page */
.lppl-single-img { width:100%; height:auto; border-radius:12px; margin-bottom:16px; }
.lppl-single-heading { margin-top:10px; color:#0b5d37; }
.lppl-single-source { margin-top:8px; }

/* Pagination */
.lppl-pagination ul { display:flex; list-style:none; gap:8px; padding:0; }
.lppl-pagination a, .lppl-pagination span { padding:6px 10px; border-radius:8px; background:#f3f6f5; }
.lppl-pagination .current { background:linear-gradient(135deg, #0b5d37, #0f8a4a); color:#fff; }

/* Modal */
.lppl-modal { position: fixed; inset: 0; display:none; z-index: 9999; }
.lppl-modal[aria-hidden="false"] { display:block; }
.lppl-modal-backdrop { position:absolute; inset:0; background: rgba(0,0,0,.5); }
.lppl-modal-dialog { position: relative; margin: 5vh auto 0; width: min(920px, 92vw); max-height: 90vh; background:#fff; border-radius:16px; overflow:hidden; box-shadow:0 20px 60px rgba(0,0,0,.25); display:flex; flex-direction:column; }
.lppl-modal-header { padding:12px 14px; display:flex; align-items:center; justify-content:space-between; background: linear-gradient(135deg, #0b5d37, #0f8a4a); color:#fff; }
.lppl-modal-title { margin:0; font-size:16px; }
.lppl-modal-actions { display:flex; gap:8px; align-items:center; }
.lppl-modal-close, .lppl-copy { border:0; padding:6px 10px; border-radius:8px; cursor:pointer; font-weight:600; }
.lppl-copy { background:#ffffff; color:#0b5d37; }
.lppl-modal-close { background:rgba(255,255,255,.15); color:#fff; font-size:18px; line-height:1; width:34px; height:34px; display:flex; align-items:center; justify-content:center; }
.lppl-modal-content { padding:14px; overflow:auto; }
.lppl-modal-source a { color:#0f8a4a; font-weight:600; text-decoration:none; }
.lppl-modal-source a:hover { text-decoration:underline; }

/* Prevent body scroll when modal open */
body.lppl-modal-open { overflow: hidden; }


/* Ensure card body uses flex so the Readmore button aligns across cards */
.lppl-card-body { display:flex; flex-direction:column; height:100%; }
.lppl-prompt { line-height:1.5; min-height: calc(1.5em * 3 + 6px); flex-grow:1; }

/* Keep Readmore buttons on the same baseline visually */
.lppl-readmore { align-self:flex-start; }

/* Modal header title white text */
.lppl-modal-title { color:#fff; }

/* Keep copy button text on one line */
.lppl-copy { white-space: nowrap; }
