/* Niệm Lành — khung luận giải. Đổi màu ở biến bên dưới. */
.nlg {
  --nlg-nen: #fffaf2; --nlg-the: #fdf3e3; --nlg-vien: #e8d6b8; --nlg-chu: #2b2118; --nlg-phu: #6b5a48;
  --nlg-nhan: #9a3d1c; --nlg-nhan-dam: #7a2e12; --nlg-khoa: #f6efe4;
  color: var(--nlg-chu); font-size: 17px; line-height: 1.75; max-width: 860px; margin: 24px auto;
}
.nlg * { box-sizing: border-box; }
.nlg-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end;
  background: var(--nlg-the); border: 1px solid var(--nlg-vien); border-radius: 12px; padding: 16px; margin-bottom: 20px; }
.nlg-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--nlg-phu); }
.nlg-form input, .nlg-form select { font-size: 16px; padding: 8px 10px; border: 1px solid var(--nlg-vien); border-radius: 8px; background: #fff; }
.nlg-form button, .nlg-nut { display: inline-block; background: var(--nlg-nhan); color: #fff !important; border: 0; border-radius: 999px;
  padding: 11px 22px; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.nlg-form button:hover, .nlg-nut:hover { background: var(--nlg-nhan-dam); }
.nlg-nut-phu { background: #fff; color: var(--nlg-nhan) !important; border: 1px solid var(--nlg-nhan); padding: 7px 16px; font-size: 14px; }
.nlg-nut-phu:hover { background: var(--nlg-the); }
.nlg-the { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 16px;
  background: var(--nlg-the); border: 1px solid var(--nlg-vien); border-radius: 12px; padding: 14px 18px; margin-bottom: 24px; }
.nlg-o { display: flex; flex-direction: column; }
.nlg-nhan { font-size: 13px; color: var(--nlg-phu); }
.nlg-gt { font-weight: 600; }
.nlg-cc, .nlg-menh, .nlg-khoa, .nlg-cta { background: var(--nlg-nen); border: 1px solid var(--nlg-vien); border-radius: 14px; padding: 22px 24px; margin-bottom: 24px; }
.nlg-h2 { font-size: 22px; line-height: 1.4; color: var(--nlg-nhan-dam); margin: 0 0 14px; }
.nlg-h3 { font-size: 18px; color: var(--nlg-nhan); margin: 20px 0 8px; }
.nlg-p { margin: 0 0 12px; text-align: justify; }
.nlg-nen { margin: 0 0 12px 20px; padding: 0; }
.nlg-nen li { margin-bottom: 6px; }
.nlg-cancu { font-size: 13px; color: var(--nlg-phu); border-top: 1px dashed var(--nlg-vien); padding-top: 10px; margin: 16px 0 0; }
.nlg-dan { color: var(--nlg-phu); }
/* Khối Cách cục (1.0.9) */
.nlg-cc-ds { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.nlg-cc-nut { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 14px; font-size: 15px;
  font-weight: 600; line-height: 1.35; cursor: pointer; text-align: left; border: 1px solid var(--nlg-vien); transition: transform .12s ease, box-shadow .12s ease; }
.nlg-cc-nut:hover { transform: translateY(-1px); }
.nlg-cc-nut.is-open { box-shadow: 0 0 0 2px var(--nlg-nhan); }
.nlg-cc-nut.nlg-cc-cat, .nlg-cc-tag.nlg-cc-cat { background: #eef7f0 !important; border-color: #9dcbb0 !important; color: #1e5a38 !important; }
.nlg-cc-nut.nlg-cc-trung, .nlg-cc-tag.nlg-cc-trung { background: #fdf5e6 !important; border-color: #dec292 !important; color: #6b491d !important; }
.nlg-cc-nut.nlg-cc-hung, .nlg-cc-tag.nlg-cc-hung { background: #fdf0ed !important; border-color: #e4b4a8 !important; color: #8c2d19 !important; }
.nlg-cc-nut.nlg-cc-pha { border-style: dashed !important; opacity: .94; }
.nlg-cc-muc { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.78); border: 1px solid rgba(0,0,0,.1); white-space: nowrap; }
.nlg-cc-hop { background: var(--nlg-the) !important; border: 1px solid var(--nlg-vien); border-radius: 12px; padding: 16px 18px; margin-top: 14px; }
.nlg-cc-dau { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.nlg-cc-tieude { font-size: 17px; color: var(--nlg-nhan-dam) !important; }
.nlg-cc-nhomnhan { display: flex; flex-wrap: wrap; gap: 6px; }
.nlg-cc-tag { font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--nlg-vien); background: #fff; color: var(--nlg-phu); }
.nlg-cc-tag.nlg-cc-thanh { background: #fff !important; color: var(--nlg-nhan-dam) !important; border-color: var(--nlg-vien) !important; }
.nlg-cc-tag.nlg-cc-pha { background: #fff8f0 !important; color: var(--nlg-phu) !important; border: 1px dashed var(--nlg-phu) !important; }
.nlg-cc-yn { margin: 0 0 8px !important; }
.nlg-cc-lydo { margin-top: 10px !important; }
.nlg-luoi { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.nlg-cung { background: var(--nlg-khoa); border: 1px solid var(--nlg-vien); border-radius: 10px; padding: 14px 16px; }
.nlg-cung-ten { font-size: 16px; font-weight: 700; color: var(--nlg-nhan-dam); margin: 0; line-height: 1.45; }
.nlg-cung-cau { font-size: 16px; margin: 0 0 10px; line-height: 1.7; }
.nlg-cung-khoa { font-size: 13px; color: var(--nlg-phu); margin: 0; }
/* Accordion 12 cung (1.1.0) */
.nlg-acc { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.nlg-cung-acc { padding: 0 !important; overflow: hidden; border-radius: 12px !important; transition: border-color .15s ease, box-shadow .15s ease; }
.nlg-cung-acc.is-open { border-color: var(--nlg-nhan) !important; background: #fff !important; box-shadow: 0 2px 10px rgba(122, 46, 18, .07); }
.nlg-cung-dau { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px;
  background: var(--nlg-khoa) !important; color: var(--nlg-chu) !important; border: 0; cursor: pointer; text-align: left; font-family: inherit; }
.nlg-cung-acc.is-open .nlg-cung-dau { background: var(--nlg-the) !important; border-bottom: 1px solid var(--nlg-vien); }
.nlg-cung-dau:hover { background: var(--nlg-the) !important; }
.nlg-cung-trai { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; min-width: 0; }
.nlg-cung-stt { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 7px;
  border-radius: 999px; background: #fff; border: 1px solid var(--nlg-vien); font-size: 13px; font-weight: 700; color: var(--nlg-nhan-dam); }
.nlg-huy-hieu-than { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--nlg-nhan) !important; color: #fff !important; letter-spacing: .2px; white-space: nowrap; }
.nlg-cung-mui-ten { font-size: 13.5px; font-weight: 600; color: var(--nlg-nhan) !important; white-space: nowrap; flex-shrink: 0; }
.nlg-cung-than { padding: 16px 18px 18px; background: #fff; }
.nlg-cung-khuyen { background: var(--nlg-nen); border-left: 3px solid var(--nlg-nhan); border-radius: 6px; padding: 10px 14px; margin: 10px 0 14px !important; font-size: 15.5px; }
.nlg-nhan-khuyen { color: var(--nlg-nhan-dam) !important; }
.nlg-cung-moi { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--nlg-vien); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.nlg-cung-moi-cau { margin: 0 !important; font-size: 14.5px; font-weight: 600; color: var(--nlg-phu) !important; flex: 1 1 280px; }
.nlg-cung-moi-nut { display: flex; flex-wrap: wrap; gap: 8px; }
.nlg-nut-nho { padding: 7px 14px !important; font-size: 13.5px !important; line-height: 1.35 !important; }
.nlg-cta { text-align: center; background: var(--nlg-the); }
.nlg-cta .nlg-p { text-align: center; }
.nlg-ma { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 4px 0 16px; }
.nlg-ma-so { font-size: 18px; font-weight: 700; letter-spacing: .5px; background: #fff; border: 1px dashed var(--nlg-nhan); border-radius: 8px; padding: 6px 14px; color: var(--nlg-nhan-dam); }
.nlg-cho, .nlg-loi { text-align: center; padding: 20px; color: var(--nlg-phu); }
.nlg-loi { color: #a3261a; }
.nlg-thieu { color: #a3261a; font-style: italic; }
.nlg-noibo { font-size: 13px; background: #f4f4f4; border-radius: 8px; padding: 10px; }
@media (max-width: 600px) { .nlg { font-size: 16px; } .nlg-cc, .nlg-menh, .nlg-khoa, .nlg-cta { padding: 16px; } .nlg-p { text-align: left; } }
/* Chống theme (Flatsome) ghi đè màu nền/chữ */
.nlg .nlg-cc, .nlg .nlg-menh, .nlg .nlg-khoa, .nlg .nlg-cta, .nlg .nlg-the, .nlg .nlg-cung { color: var(--nlg-chu) !important; }
.nlg .nlg-cc, .nlg .nlg-menh, .nlg .nlg-khoa { background: var(--nlg-nen) !important; }
.nlg .nlg-cta, .nlg .nlg-the { background: var(--nlg-the) !important; }
.nlg .nlg-cung { background: var(--nlg-khoa) !important; }
.nlg .nlg-p, .nlg .nlg-nen li, .nlg .nlg-gt, .nlg .nlg-cung-cau { color: var(--nlg-chu) !important; }
.nlg .nlg-h2, .nlg .nlg-cung-ten { color: var(--nlg-nhan-dam) !important; }
.nlg .nlg-h3 { color: var(--nlg-nhan) !important; }
.nlg .nlg-nhan, .nlg .nlg-cancu, .nlg .nlg-dan, .nlg .nlg-cung-khoa { color: var(--nlg-phu) !important; }
.nlg .nlg-cta .nlg-nut { color: #fff !important; }
/* Lề trong + điện thoại (1.0.3+) */
.nlg .nlg-cc, .nlg .nlg-menh, .nlg .nlg-khoa, .nlg .nlg-cta { padding: 22px 24px !important; border-radius: 14px !important; margin: 0 0 20px !important; }
.nlg .nlg-the { padding: 14px 18px !important; border-radius: 12px !important; margin: 0 0 20px !important; }
.nlg .nlg-cung { padding: 14px 16px !important; }
.nlg .nlg-cung.nlg-cung-acc { padding: 0 !important; background: #fff !important; }
.nlg { overflow-wrap: anywhere; word-break: normal; }
.nlg .nlg-luoi { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
@media (max-width: 600px) {
  .nlg { margin: 16px 0; font-size: 16px; line-height: 1.7; }
  .nlg .nlg-cc, .nlg .nlg-menh, .nlg .nlg-khoa, .nlg .nlg-cta { padding: 16px 14px !important; }
  .nlg .nlg-the { grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px 14px !important; }
  .nlg .nlg-h2 { font-size: 19px; } .nlg .nlg-h3 { font-size: 16.5px; margin-top: 16px; }
  .nlg .nlg-nen { margin-left: 18px !important; }
  .nlg .nlg-ma-so { font-size: 15px; }
  .nlg .nlg-cc-nut { width: 100%; justify-content: space-between; }
}

/* 1.1.1 — chống chớp: chặn hiệu ứng/transition của theme trên accordion, giữ nội dung ổn định */
.nlg .nlg-cung-acc, .nlg .nlg-cung-acc * { animation: none !important; transition: none !important; }
.nlg .nlg-cung-acc .nlg-cung-dau, .nlg .nlg-cung-acc .nlg-cung-dau:hover, .nlg .nlg-cung-acc .nlg-cung-dau:focus { transform: none !important; box-shadow: none !important; outline-offset: -2px; }
.nlg .nlg-cung-acc .nlg-cung-than { display: block !important; height: auto !important; max-height: none !important; opacity: 1 !important; visibility: visible !important; overflow: visible !important; padding: 16px 18px 18px !important; }
.nlg .nlg-cung-acc .nlg-cung-than[hidden] { display: none !important; }
.nlg .nlg-cung-acc.is-open { overflow: visible !important; }

/* 1.1.1b — khung Niệm Lành luôn hiển thị tông sáng, không để chế độ tối của theme/plugin xử lý lại liên tục */
.nlg, .nlg * { color-scheme: light !important; }
.nlg .nlg-cung-than, .nlg .nlg-cung-than p, .nlg .nlg-cc-hop, .nlg .nlg-cc-hop p { color: #2b2118 !important; }
