.post-section {
  padding: 0 0 60px;
  background: #f9fafb;
}

.post-thumbnail-header {
  width: 100%;
  height: 500px;
  overflow: hidden;
  position: relative;
}

.featured-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.post-container {
  max-width: 1200px;
  margin: -120px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.back-news {
  display: inline-block;
  margin: 20px 0;
  color: #5f7490;
  font-weight: 500;
  text-decoration: none;
}

.back-news:hover { 
  color: #000; 
  text-decoration: underline; 
}

.post-title{
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;

  /* Gradient text */
  background: linear-gradient(90deg, #6366f1, #a855f7 50%, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

  display: inline-block;

  /* FIX ổn định */
  backface-visibility: hidden;
  -webkit-transform: translate3d(0,0,0); /* nếu vẫn muốn GPU */
}

.post-layout {
  display: flex;
  gap: 40px;
}

.sidebar {
  width: 30%;
  flex-shrink: 0;
}

.post-main-content {
  width: 70%;
}

.widget {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  padding: 24px;
  margin-bottom: 32px;
}

.widget-title {
  font-size: 1.4rem;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.search-form {
  display: flex;
}

.search-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px 0 0 8px;
  font-size: 1rem;
}

.search-form button {
  padding: 0 20px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-size: 1.2rem;
}

.recent-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-posts-list li {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.recent-posts-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.recent-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.recent-info a {
  display: block;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.recent-info a:hover { 
  color: #3b82f6; 
}

.recent-date {
  font-size: 0.9rem;
  color: #6b7280;
}

/* =========================================================
   QUILL RENDER (GIỮ HIỂN THỊ Y HỆT FILE EDIT / QUILL EDITOR)
   - Không reset ul/ol/li bằng bullet thủ công
   - Không can thiệp ql-indent-x
   - Chỉ style nhẹ để đọc đẹp hơn
   ========================================================= */

.post-content.ql-editor {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: #111827;
  padding: 0;
}

/* Quill đôi khi chèn span ql-ui (marker hỗ trợ) -> ẩn đi cho sạch */
.post-content.ql-editor .ql-ui {
  display: none !important;
}

/* Ảnh trong nội dung: hiển thị đẹp + không bị cắt */
.post-content.ql-editor img {
  max-width: 900px;
  width: 100%;
  height: auto;
  display: block;
  margin: 18px auto;
  border-radius: 12px;
}

/* đảm bảo không container nào cắt ảnh */
.post-content.ql-editor p {
  overflow: visible;
}

/* Optional: bảng trong Quill nhìn rõ hơn (nếu bạn có table) */
.post-content.ql-editor table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.post-content.ql-editor table td,
.post-content.ql-editor table th {
  border: 1px solid #e5e7eb;
  padding: 10px;
  vertical-align: top;
}

/* ===== RESTORE BULLETS/NUMBERS (chuẩn, không phụ thuộc pseudo của Quill) ===== */
/* =========================================================
   QUILL RENDER FIX - HIỂN THỊ LẠI BULLET & NUMBER
   ========================================================= */

.post-content.ql-editor {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: #111827;
  padding: 0;
}

/* HIỂN THỊ LẠI DẤU CHẤM (BULLET) */
.post-content.ql-editor ul {
  list-style-type: disc !important; /* Hiện lại chấm tròn */
  padding-left: 1.5em !important;
  margin: 12px 0;
}

/* HIỂN THỊ LẠI SỐ (NUMBER) */
.post-content.ql-editor ol {
  list-style-type: decimal !important; /* Hiện lại số 1, 2, 3 */
  padding-left: 1.5em !important;
  margin: 12px 0;
}

/* Fix lỗi li bị mất dấu hoặc bị đè bởi class khác */
.post-content.ql-editor li {
  display: list-item !important; /* Bắt buộc hiển thị dạng list */
  margin-bottom: 8px;
  padding-left: 0.5em; /* Khoảng cách giữa dấu chấm và chữ */
}

/* Xử lý thụt đầu dòng (Indent) - Giữ nguyên phân cấp */
.post-content.ql-editor .ql-indent-1 { padding-left: 3em !important; }
.post-content.ql-editor .ql-indent-2 { padding-left: 4.5em !important; }
.post-content.ql-editor .ql-indent-3 { padding-left: 6em !important; }

/* Ẩn marker thừa của Quill nếu nó xuất hiện gây ra 2 chấm */
.post-content.ql-editor .ql-ui {
  display: none !important;
}

/* --- Các phần khác giữ nguyên --- */
.post-content.ql-editor img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 18px auto;
  border-radius: 12px;
}

.post-content.ql-editor table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.post-content.ql-editor table td,
.post-content.ql-editor table th {
  border: 1px solid #e5e7eb;
  padding: 10px;
}

/* FIX CHUẨN QUILL: chỉ ordered mới ra số */
.post-content.ql-editor ul {
  list-style-type: disc !important;
}

.post-content.ql-editor li[data-list="bullet"] {
  list-style-type: disc !important;
}

.post-content.ql-editor li[data-list="ordered"] {
  list-style-type: decimal !important;
}

/* Bullet sát chữ */
.post-content.ql-editor ul,
.post-content.ql-editor ol{
  padding-left: 1.2em !important;   /* giảm khoảng cách trái */
}

.post-content.ql-editor li{
  padding-left: 0 !important;       /* bỏ padding dư */
  list-style-position: inside;      /* QUAN TRỌNG */
}

.post-section {
  padding: 0 0 80px;
  background: url('/images/backgrounds/tech-bg-purple.jpg') no-repeat center center / cover fixed; /* fixed để parallax nhẹ nếu scroll */
  position: relative;
  overflow: hidden;
}

/* Overlay mờ để content dễ đọc hơn (rất quan trọng với bg hình) */
.post-section::before{
  content: none !important; /* tắt overlay */
}

.post-container{
  background: rgba(255,255,255,0.88); /* tăng trắng lên để chữ dễ đọc */
  backdrop-filter: blur(14px);
}

/* Glassmorphism cho container chính - vẫn giữ để content nổi bật trên bg hình */
.post-container {
  max-width: 1200px;
  margin: -120px auto 0;
  padding: 40px 32px;
  position: relative;
  z-index: 2; /* ở trên overlay */

  background: rgba(255, 255, 255, 0.78); /* trắng mờ + blur */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 24px;
  border: 1px solid rgba(99, 102, 241, 0.25); /* viền tím nhạt */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15),
              0 10px 30px rgba(99, 102, 241, 0.12);
}

/* Tăng contrast cho content text nếu cần */
.post-content.ql-editor {
  color: #111827; /* giữ tối */
  text-shadow: 0 1px 2px rgba(0,0,0,0.1); /* nhẹ để nổi trên bg mờ */
}


/* ===== THUMBNAIL: CLOUD/WAVE OVERLAY (hover chạy) ===== */
/* ===== MÂY BAY RÕ HƠN ===== */

.post-thumbnail-header{
  position: relative;
  overflow: hidden;
}

/* lớp mây chính */
.post-thumbnail-header::before{
  content:"";
  position:absolute;
  top:10%;
  left:-60%;
  width:60%;
  height:70%;
  pointer-events:none;
  z-index:3;

  background: radial-gradient(
    ellipse at center,
    rgba(255,255,255,0.8) 0%,
    rgba(255,255,255,0.5) 35%,
    rgba(255,255,255,0.25) 60%,
    rgba(255,255,255,0) 80%
  );

  filter: blur(25px);
  opacity:0.9;
  animation: cloudMove 10s linear infinite;
}

/* lớp mây phụ để nhìn tự nhiên hơn */
.post-thumbnail-header::after{
  content:"";
  position:absolute;
  top:30%;
  left:-80%;
  width:50%;
  height:60%;
  pointer-events:none;
  z-index:3;

  background: radial-gradient(
    ellipse at center,
    rgba(255,255,255,0.6) 0%,
    rgba(255,255,255,0.35) 40%,
    rgba(255,255,255,0.15) 65%,
    rgba(255,255,255,0) 85%
  );

  filter: blur(20px);
  opacity:0.8;
  animation: cloudMove2 14s linear infinite;
}

@keyframes cloudMove{
  0%   { left:-60%; }
  100% { left:130%; }
}

@keyframes cloudMove2{
  0%   { left:-80%; }
  100% { left:120%; }
}