@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

:root {
  --pg:    #0a0a12;
  --pg2:   #13131f;
  --pg3:   #1c1c2e;
  --gold:  #f5c518;
  --white: #ffffff;
  --gray:  #aaaaaa;
  --red:   #e50914;
  --bdr:   rgba(255,255,255,0.08);
  --r:     8px;
}

.pali-home-wrap, .pali-lesson-wrap {
  font-family: 'Kanit', sans-serif !important;
  background: var(--pg);
  min-height: 100vh;
}

/* ===== HOME ===== */
.pali-home-wrap { padding: 24px 0 60px; }
.pali-section   { margin-bottom: 56px; padding: 0 16px; }
.pali-section-title {
  color: var(--white); font-size: 1.15rem; font-weight: 600;
  margin: 0 0 14px; border-left: 3px solid var(--gold); padding-left: 10px;
}

/* ===== ROW WRAP + ARROWS ===== */
.pali-row-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.pali-arrow {
  flex-shrink: 0;
  width: 40px; height: 100%;
  min-height: 120px;
  background: rgba(0,0,0,.6);
  border: none; color: var(--white);
  font-size: 2.2rem; font-weight: 300;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: background .2s;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .2s, background .2s;
}
.pali-row-wrap:hover .pali-arrow { opacity: 1; }
.pali-arrow:hover { background: rgba(255,255,255,.15); }
.pali-arrow-left  { margin-right: 4px; }
.pali-arrow-right { margin-left: 4px; }

/* ===== CARDS ROW ===== */
.pali-cards-row {
  flex: 1;
  display: flex;
  flex-wrap: nowrap !important;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 60px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.pali-cards-row::-webkit-scrollbar { height: 3px; }
.pali-cards-row::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

/* ===== CARD — 6 ต่อแถว ===== */
.pali-card {
  flex: 0 0 calc((100% - 50px) / 6);
  min-width: 200px;
  scroll-snap-align: start;
  position: relative;
  z-index: 1;
  cursor: pointer;
}
.pali-card:hover { z-index: 100; }

/* Thumbnail */
.pali-card-thumb-link { display: block; text-decoration: none; }
.pali-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--pg3);
  overflow: hidden;
  border-radius: var(--r);
  border: 1px solid transparent;
  transition: border-color .2s, transform .2s;
}
.pali-card:hover .pali-card-thumb {
  border-color: var(--gold);
  transform: scale(1.0);
}
.pali-card-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.pali-card-no-thumb {
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg,#1a1200,#0d0d1f);
}
.pali-play-icon { font-size: 2.4rem; color: rgba(245,197,24,.35); }
.pali-progress-bar { position:absolute; bottom:0; left:0; right:0; height:3px; background:rgba(255,255,255,.15); }
.pali-progress-fill { height:100%; background: var(--red); }
.pali-episode-badge {
  position:absolute; top:5px; left:5px;
  background:rgba(0,0,0,.8); color:var(--gold);
  font-size:.6rem; padding:2px 6px; border-radius:3px;
}

/* Responsive */
@media (max-width:1200px) { .pali-card { flex: 0 0 calc((100% - 40px)/5); } }
@media (max-width:900px)  { .pali-card { flex: 0 0 calc((100% - 30px)/4); } }
@media (max-width:600px)  { .pali-card { flex: 0 0 calc((100% - 20px)/3); min-width:130px; } .pali-arrow { display:none; } }
@media (max-width:400px)  { .pali-card { flex: 0 0 calc((100% - 10px)/2); } }

/* Empty state */
.pali-empty { color:var(--gray); font-size:.9rem; padding:16px 0; }
.pali-login-notice { color:var(--white); padding:40px 24px; text-align:center; background:var(--pg); }
.pali-login-notice a { color:var(--gold); }

/* ===== JS HOVER POPUP ===== */
#pali-hover-popup {
  position: fixed;
  width: 260px; min-width: 220px;
  background: var(--pg2);
  border: 1px solid rgba(245,197,24,.4);
  border-radius: var(--r);
  box-shadow: 0 20px 60px rgba(0,0,0,.9);
  opacity: 0; pointer-events: none;
  transform: scale(.85);
  transform-origin: center center;
  transition: opacity .22s ease, transform .22s cubic-bezier(.2,.7,.3,1);
  z-index: 99999; overflow: hidden;
  font-family: 'Kanit', sans-serif;
}
.php-thumb-wrap { aspect-ratio:16/9; overflow:hidden; background:#000; }
.php-thumb-link { display:block; }
.php-thumb-wrap img { width:100%; height:100%; object-fit:cover; display:block; }
.php-body { padding:10px 12px 14px; }
.php-actions { display:flex; align-items:center; gap:6px; margin-bottom:8px; }
.php-btn {
  width:34px; height:34px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; border:2px solid rgba(255,255,255,.5);
  background:rgba(255,255,255,.08); color:var(--white);
  font-size:.88rem; text-decoration:none; transition:all .15s; flex-shrink:0;
}
.php-btn:hover { border-color:var(--white); background:rgba(255,255,255,.2); }
.php-play { background:var(--white); color:#000; border-color:var(--white); width:40px; height:40px; font-size:1rem; }
.php-play:hover { background:rgba(255,255,255,.85); color:#000; }
.php-wl.in-wl { background:var(--gold); border-color:var(--gold); color:#000; }
.php-more { margin-left:auto; font-size:1.1rem; }
.php-title { color:var(--white); font-size:.95rem; font-weight:600; line-height:1.3; margin-bottom:4px; }
.php-meta { font-size:.80rem; color:var(--gray); margin-bottom:5px; display:flex; gap:6px; flex-wrap:wrap; }
.php-resume { color:var(--gold); }
.php-badges { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:4px; }
.pali-hbadge {
  background:rgba(245,197,24,.12); border:1px solid rgba(245,197,24,.4);
  color:var(--gold); padding:2px 8px; border-radius:3px; font-size:.75rem;
}
.php-cat { font-size:.78rem; color:var(--gray); }

/* ===== SINGLE LESSON ===== */
.pali-lesson-wrap {
  color:var(--white); padding:24px 24px 48px;
  max-width:1440px; margin:0 auto;
}
.pali-lesson-title { font-size:1.35rem; font-weight:700; color:var(--white); margin:0 0 10px; line-height:1.4; }
.pali-lesson-info-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:.82rem; color:var(--gray); margin-bottom:14px; }
.pali-badge { background:rgba(245,197,24,.15); border:1px solid var(--gold); color:var(--gold); padding:2px 8px; border-radius:3px; font-size:.72rem; }
.pali-cat-badge { background:rgba(245,197,24,.08)!important; border-color:#e6b800!important; color:#e6b800!important; }
.pali-lesson-actions { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.pali-btn { padding:7px 16px; border-radius:4px; text-decoration:none; font-size:.82rem; font-weight:500; cursor:pointer; border:none; display:inline-flex; align-items:center; gap:6px; transition:all .2s; font-family:'Kanit',sans-serif; }
.pali-btn-secondary { background:rgba(245,197,24,.1); color:var(--gold); border:1px solid rgba(245,197,24,.3); }
.pali-btn-secondary:hover { background:var(--gold); color:#000; }
.pali-wl-btn-lg.in-wl { background:var(--gold)!important; color:#000!important; border-color:var(--gold)!important; }
.pali-lesson-body { display:grid; grid-template-columns:1fr; gap:20px; margin-bottom:20px; }
@media (min-width:1024px) { .pali-lesson-body { grid-template-columns:1fr 1fr; } }
.pali-video-container { position:relative; background:#000; border-radius:var(--r); overflow:hidden; border:1px solid rgba(245,197,24,.2); }
.pali-video-container video { width:100%!important; height:auto!important; aspect-ratio:16/9; display:block; }
.pali-lesson-progress-bar { height:3px; background:rgba(255,255,255,.1); }
.pali-lesson-progress-fill { height:100%; background:var(--gold); }
.pali-quality-row { display:flex; align-items:center; gap:8px; padding:8px 0; font-size:.8rem; color:var(--gray); flex-wrap:wrap; }
.pali-quality-btn { background:var(--pg3); border:1px solid rgba(245,197,24,.3); color:var(--gray); padding:3px 12px; border-radius:4px; cursor:pointer; font-size:.78rem; font-family:'Kanit',sans-serif; transition:all .2s; }
.pali-quality-btn:hover,.pali-quality-btn.active { background:var(--gold); border-color:var(--gold); color:#000; font-weight:600; }
.pali-resources-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 0; border-top:1px solid var(--bdr); border-bottom:1px solid var(--bdr); margin:12px 0 16px; font-size:.82rem; }
.pali-resource-label { color:var(--white); font-weight:600; }
.pali-resource-link { color:var(--gold); text-decoration:none; }
.pali-resource-link:hover { text-decoration:underline; }
.pali-sections-wrap { background:var(--pg2); border:1px solid var(--bdr); border-radius:var(--r); padding:14px 18px; }
.pali-sections-label { font-weight:700; color:var(--white); margin-bottom:10px; display:flex; align-items:flex-start; gap:10px; flex-wrap:wrap; }
.pali-sections-hint { font-size:.75rem; color:var(--gray); font-weight:400; line-height:1.5; }
.pali-sections-list { display:grid; grid-template-columns:1fr; gap:6px; }
@media (min-width:768px) { .pali-sections-list { grid-template-columns:1fr 1fr; } }
.pali-section-item { display:flex; align-items:center; gap:8px; padding:8px 10px; background:var(--pg3); border-radius:5px; border:1px solid transparent; transition:all .2s; }
.pali-section-item:hover { background:rgba(245,197,24,.08); border-color:rgba(245,197,24,.3); }
.pali-section-num { width:22px; height:22px; background:var(--gold); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.7rem; color:#000; font-weight:700; flex-shrink:0; }
.pali-section-link { flex:1; color:#ddd; text-decoration:none; font-size:.82rem; }
.pali-section-link:hover { color:var(--gold); }
.pali-section-time { color:var(--gold); font-size:.75rem; font-family:monospace; }
.pali-pdf-side { display:none; }
@media (min-width:1024px) { .pali-pdf-side { display:block; } }
.pali-pdf-container { background:var(--pg2); border:1px solid rgba(245,197,24,.2); border-radius:var(--r); overflow:hidden; height:100%; display:flex; flex-direction:column; }
.pali-pdf-label { padding:14px; color:var(--gray); font-size:.82rem; line-height:1.6; text-align:center; background:rgba(245,197,24,.04); border-bottom:1px solid rgba(245,197,24,.15); }
.pali-pdf-frame { flex:1; width:100%; min-height:500px; border:none; }
.pali-pdf-mobile { display:block; margin-top:16px; }
@media (min-width:1024px) { .pali-pdf-mobile { display:none; } }
.pali-pdf-label-mobile { color:var(--gold); font-weight:600; margin-bottom:8px; font-size:.88rem; }
.pali-no-video { aspect-ratio:16/9; display:flex; align-items:center; justify-content:center; color:var(--gray); background:#111; }
.pali-lesson-nav { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:20px; }
.pali-nav-btn { display:flex; flex-direction:column; gap:4px; padding:14px 18px; background:var(--pg2); border:1px solid var(--bdr); border-radius:var(--r); text-decoration:none; color:var(--white); transition:all .2s; font-family:'Kanit',sans-serif; }
.pali-nav-btn:hover { background:rgba(245,197,24,.08); border-color:var(--gold); color:var(--white); }
.pali-nav-prev { text-align:left; }
.pali-nav-next { text-align:right; }
.pali-nav-title { font-size:.75rem; color:var(--gray); display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.pali-nav-disabled { opacity:.35; cursor:not-allowed; }
@media (max-width:600px) { .pali-lesson-nav { grid-template-columns:1fr; } .pali-lesson-wrap { padding:12px; } .pali-lesson-title { font-size:1.1rem; } }

/* ===== TOAST ===== */
#pali-toast {
  position:fixed; bottom:30px; left:50%; transform:translateX(-50%);
  background:rgba(245,197,24,.95); color:#000;
  padding:8px 20px; border-radius:20px; font-size:.85rem;
  font-family:'Kanit',sans-serif; font-weight:600;
  opacity:0; pointer-events:none; z-index:999999; transition:opacity .3s;
}
#pali-toast.show { opacity:1; }

/* ===== SECTIONS 2-COLUMN LAYOUT (ตาม wireframe) ===== */
.pali-sections-wrap {
  background: var(--pg2);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  padding: 16px 20px;
  margin-top: 16px;
}

.pali-sections-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* LEFT: section list */
.pali-sections-header {
  font-weight: 700;
  color: var(--white);
  font-size: .9rem;
  margin-bottom: 12px;
  font-family: 'Kanit', sans-serif;
}

.pali-sections-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pali-section-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--pg3);
  border-radius: 5px;
  border: 1px solid transparent;
  transition: all .2s;
}
.pali-section-item:hover { background: rgba(245,197,24,.08); border-color: rgba(245,197,24,.3); }

.pali-section-num {
  width: 22px; height: 22px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: #000; font-weight: 700; flex-shrink: 0;
}

.pali-section-link {
  flex: 1; color: #ddd; text-decoration: none; font-size: .82rem;
  line-height: 1.4;
}
.pali-section-link:hover { color: var(--gold); }

.pali-section-time {
  color: var(--gold); font-size: .75rem;
  font-family: monospace; flex-shrink: 0;
}

/* RIGHT: hint text */
.pali-sections-right {
  color: var(--gray);
  font-size: .82rem;
  line-height: 1.8;
  padding-top: 32px; /* align กับ sections list */
  border-left: 1px solid var(--bdr);
  padding-left: 20px;
}

/* Mobile: stack vertically */
@media (max-width: 767px) {
  .pali-sections-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .pali-sections-right {
    padding-top: 0;
    border-left: none;
    border-top: 1px solid var(--bdr);
    padding-left: 0;
    padding-top: 12px;
  }
}

/* PDF Mobile box */
.pali-pdf-mobile {
  display: none;
  margin-top: 16px;
}
.pali-pdf-mobile-label {
  background: rgba(245,197,24,.05);
  border: 1px solid rgba(245,197,24,.2);
  border-radius: var(--r) var(--r) 0 0;
  padding: 14px;
  color: var(--gray);
  font-size: .82rem;
  text-align: center;
  line-height: 1.7;
}

@media (max-width: 1023px) {
  .pali-pdf-mobile { display: block; }
  .pali-pdf-side   { display: none !important; }
}

/* PDF iframe fix */
.pali-pdf-frame {
  width: 100% !important;
  min-height: 600px;
  height: calc(100% - 80px);
  border: none;
  display: block;
}

.pali-pdf-container {
  background: var(--pg2);
  border: 1px solid rgba(245,197,24,.2);
  border-radius: var(--r);
  overflow: hidden;
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

/* Image quality fix */
.pali-card-thumb img,
.php-thumb-wrap img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: bicubic;
}

/* ===== HERO SLIDER ===== */
.pali-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
  border-radius: 0;
  margin-bottom: 0;
  user-select: none;
}

/* Track — aspect-ratio 16:9 แทน height fixed */
.pali-hero-track {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

/* Slide */
.pali-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  background-color: #1a1a2e;
  opacity: 0;
  transition: opacity .7s ease;
  pointer-events: none;
}
.pali-hero-slide.active {
  opacity: 1;
  pointer-events: all;
}

/* Gradient overlay */
.pali-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.6) 40%,
    rgba(0,0,0,.2) 70%,
    transparent 100%
  );
}

/* Content */
.pali-hero-content {
  position: absolute;
  bottom: 60px;
  left: 48px;
  max-width: 560px;
  z-index: 2;
  font-family: 'Kanit', sans-serif;
}

.pali-hero-cat {
  display: inline-block;
  background: var(--gold);
  color: #000;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
  letter-spacing: .5px;
}

.pali-hero-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin: 0 0 10px;
}
.pali-hero-title a {
  color: var(--white);
  text-decoration: none;
}
.pali-hero-title a:hover { color: var(--gold); }

.pali-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 10px;
}

.pali-hero-badge {
  background: rgba(245,197,24,.2);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 1px 8px;
  border-radius: 3px;
  font-size: .7rem;
}
.pali-hero-news-badge {
  background: rgba(229,9,20,.2);
  border-color: #e50914;
  color: #e50914;
}

.pali-hero-excerpt {
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pali-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  font-size: .9rem;
  padding: 10px 24px;
  border-radius: 4px;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.pali-hero-cta:hover { background: #e6b800; transform: scale(1.03); color: #000; }

/* Arrows */
.pali-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 80px;
  background: rgba(0,0,0,.45);
  border: none;
  color: var(--white);
  font-size: 2.4rem;
  cursor: pointer;
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .2s, background .2s;
}
.pali-hero:hover .pali-hero-arrow { opacity: 1; }
.pali-hero-arrow:hover { background: rgba(245,197,24,.3); }
.pali-hero-prev { left: 12px; }
.pali-hero-next { right: 12px; }

/* Dots */
.pali-hero-dots {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 10;
}
.pali-hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: all .2s;
  padding: 0;
}
.pali-hero-dot.active { background: var(--gold); width: 24px; border-radius: 4px; }

/* Counter */
.pali-hero-counter {
  position: absolute;
  bottom: 20px; right: 20px;
  color: rgba(255,255,255,.6);
  font-size: .75rem;
  font-family: 'Kanit', sans-serif;
  z-index: 10;
}
.pali-hero-current { color: var(--gold); font-weight: 600; }

/* Mobile */
@media (max-width: 768px) {
  .pali-hero-content { left: 20px; bottom: 40px; max-width: calc(100% - 40px); }
  .pali-hero-title { font-size: 1.15rem; }
  .pali-hero-excerpt { display: none; }
  .pali-hero-arrow { display: none; }
}

/* =====================================================
   ส่วนที่ 3 — Category Grid
   ===================================================== */
.pali-cat-section {
  padding: 28px 0 20px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.pali-cat-section-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
  font-family: 'Noto Sans Thai','Sarabun',sans-serif;
}
.pali-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.pali-cat-item { display: flex; flex-direction: column; }
.pali-cat-thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #2a2a3a;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  transition: transform .2s;
  border: 2px solid #3a4060;
}
.pali-cat-thumb:hover { transform: scale(1.02); }
.pali-cat-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.1), rgba(0,0,0,.5));
}
.pali-cat-future-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  font-family: 'Sarabun',sans-serif;
  text-align: center;
  padding: 12px;
  z-index: 1;
}
.pali-cat-hover-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s; z-index: 1;
}
.pali-cat-thumb:hover .pali-cat-hover-play { opacity: 1; }
.pali-cat-info { padding: 10px 2px 0; }
.pali-cat-name {
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  font-family: 'Noto Sans Thai','Sarabun',sans-serif;
  margin-bottom: 4px;
}
.pali-cat-count {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 8px;
}
.pali-cat-num { color: var(--gold); font-weight: 700; font-size: 1rem; }
.pali-cat-x { color: #e74c3c; }
.pali-cat-btn {
  display: inline-block;
  border: 1px solid #e74c3c;
  color: #e74c3c;
  font-size: .75rem;
  padding: 4px 12px;
  border-radius: 3px;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.pali-cat-btn:hover { background: #e74c3c; color: #fff; }
.pali-cat-future .pali-cat-thumb { background: #222233; opacity: .7; }
.pali-cat-future .pali-cat-name { color: rgba(255,255,255,.4); }

@media (max-width: 600px) {
  .pali-cat-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* =====================================================
   ส่วนที่ 4 — Bottom Section (เตรียมตัว + Help Desk + ข่าว)
   ===================================================== */
.pali-bottom-section {
  padding: 28px 0 0;
  border-top: 1px solid rgba(255,255,255,.07);
}
.pali-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
.pali-bottom-col-title {
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  font-family: 'Noto Sans Thai','Sarabun',sans-serif;
  margin-bottom: 12px;
}
.pali-bottom-col-title strong { color: var(--gold); }

/* เตรียมตัวก่อนเรียน */
.pali-prep-video { width: 100%; }
.pali-prep-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: #1e1e2e;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255,255,255,.3);
  font-size: .8rem;
  border: 1px dashed rgba(255,255,255,.15);
}
.pali-prep-play { cursor: pointer; }

/* Help Desk */
.pali-helpdesk-box {
  background: #1a1f30;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  height: 100%;
}
.pali-helpdesk-icon { color: var(--gold); }
.pali-helpdesk-desc {
  color: rgba(255,255,255,.65);
  font-size: .85rem;
  line-height: 1.7;
  font-family: 'Sarabun',sans-serif;
}
.pali-helpdesk-links { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.pali-helpdesk-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--gold);
  color: #1a1000;
  font-size: .82rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 5px;
  text-decoration: none;
  transition: background .2s;
}
.pali-helpdesk-btn:hover { background: #b8870f; color: #1a1000; }
.pali-helpdesk-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.5);
  font-size: .78rem;
  text-decoration: none;
}
.pali-helpdesk-email:hover { color: var(--gold); }

/* ข่าวสาร list */
.pali-news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 20px;
}
.pali-news-item {
  display: flex;
  gap: 14px;
  text-decoration: none;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  border: 0.5px solid rgba(255,255,255,.08);
  transition: background .2s;
}
.pali-news-item:hover { background: rgba(255,255,255,.07); }
.pali-news-thumb {
  width: 140px;
  min-width: 140px;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  background: #1e1e2e;
}
.pali-news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pali-news-thumb-placeholder { width: 100%; height: 100%; background: #252535; }
.pali-news-body { flex: 1; }
.pali-news-cat {
  display: inline-block;
  background: var(--gold);
  color: #1a1000;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 6px;
}
.pali-news-title {
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
  font-family: 'Noto Sans Thai','Sarabun',sans-serif;
}
.pali-news-date { color: rgba(255,255,255,.4); font-size: .75rem; margin-bottom: 5px; }
.pali-news-excerpt {
  color: rgba(255,255,255,.55);
  font-size: .8rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .pali-bottom-row { grid-template-columns: 1fr; gap: 20px; }
  .pali-news-thumb { width: 100px; min-width: 100px; }
}

/* =====================================================
   Category Archive Page
   ===================================================== */
.pali-archive-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  font-family: 'Noto Sans Thai','Sarabun',sans-serif;
}
.pali-archive-header { margin-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 16px; }
.pali-archive-title { color: #fff; font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.pali-archive-desc { color: rgba(255,255,255,.55); font-size: .9rem; margin-bottom: 6px; }
.pali-archive-count { color: var(--gold); font-size: .85rem; font-weight: 600; }

.pali-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.pali-arc-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 6px;
  overflow: hidden;
  background: #1a1a2a;
  transition: transform .2s, box-shadow .2s;
}
.pali-arc-card:hover { transform: scale(1.04); }

.pali-arc-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  overflow: hidden;
}
.pali-arc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pali-arc-nothumb {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #1e1e2e;
}
.pali-arc-ep {
  position: absolute; top: 6px; left: 6px;
  background: rgba(0,0,0,.7);
  color: var(--gold);
  font-size: .68rem; font-weight: 700;
  padding: 2px 7px; border-radius: 3px;
}
.pali-arc-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: rgba(255,255,255,.2);
}
.pali-arc-progress-bar { height: 100%; background: var(--gold); }

.pali-arc-info { padding: 8px 10px 10px; }
.pali-arc-title {
  color: #e5e5e5; font-size: .82rem; font-weight: 500;
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pali-arc-views { color: rgba(255,255,255,.4); font-size: .72rem; margin-top: 4px; }

.pali-arc-pagination { margin-top: 32px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pali-arc-pagination .page-numbers {
  display: inline-block; padding: 6px 14px; border-radius: 4px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.7);
  text-decoration: none; font-size: .85rem; transition: background .2s;
}
.pali-arc-pagination .page-numbers.current { background: var(--gold); color: #1a1000; font-weight: 700; }
.pali-arc-pagination .page-numbers:hover { background: rgba(212,160,23,.3); color: #fff; }

.pali-arc-empty { color: rgba(255,255,255,.4); padding: 40px 0; text-align: center; font-size: .95rem; }

/* ===== Grouped archive layout (ตอนที่ 1-12, 13-24, ...) — ใช้การ์ดเล็กแบบเดียวกับหน้าแรก ===== */
.pali-arc-group { margin-bottom: 36px; }
.pali-arc-group-title {
  color: var(--white); font-size: 1.05rem; font-weight: 600;
  margin: 0 0 16px; border-left: 3px solid var(--gold); padding-left: 10px;
}
.pali-arc-grid-fixed {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.pali-arc-divider {
  border: none; height: 2px; background: var(--gold);
  margin: 32px 0 0; opacity: .9;
}
@media (max-width: 1200px) { .pali-arc-grid-fixed { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px)  { .pali-arc-grid-fixed { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (max-width: 480px)  { .pali-arc-grid-fixed { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 600px) {
  .pali-archive-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pali-archive-wrap { padding: 16px 12px 30px; }
}

/* =====================================================
   Category Home Page Header
   ===================================================== */
.pali-cat-page { padding-top: 0; }
.pali-cat-page-header {
  padding: 24px 0 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 8px;
}
.pali-cat-page-title {
  color: #fff;
  font-size: 1.7rem;
  font-weight: 700;
  font-family: 'Noto Sans Thai','Sarabun',sans-serif;
  margin-bottom: 6px;
}
.pali-cat-page-desc {
  color: rgba(255,255,255,.55);
  font-size: .9rem;
  line-height: 1.7;
  margin-bottom: 8px;
  font-family: 'Sarabun',sans-serif;
}
.pali-cat-page-count {
  color: var(--gold);
  font-size: .85rem;
  font-weight: 700;
}

/* =====================================================
   My List Page
   ===================================================== */
.pali-mylist-login {
  text-align: center; padding: 60px 20px;
  color: rgba(255,255,255,.6); font-family: 'Sarabun',sans-serif;
}
.pali-mylist-login-icon { font-size: 2.5rem; margin-bottom: 12px; }
.pali-mylist-login a { color: var(--gold); text-decoration: none; font-weight: 700; }

.pali-mylist-header {
  padding: 24px 0 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 8px;
}
.pali-mylist-title {
  color: #fff; font-size: 1.6rem; font-weight: 700;
  font-family: 'Noto Sans Thai','Sarabun',sans-serif;
  margin-bottom: 6px;
}
.pali-mylist-sub {
  color: rgba(255,255,255,.5); font-size: .88rem;
  font-family: 'Sarabun',sans-serif; margin-bottom: 8px;
}
.pali-mylist-note {
  background: rgba(212,160,23,.08);
  border-left: 3px solid var(--gold);
  color: rgba(255,255,255,.55);
  font-size: .8rem; font-family: 'Sarabun',sans-serif;
  padding: 8px 14px; border-radius: 0 4px 4px 0;
  line-height: 1.6;
}

/* Empty state */
.pali-mylist-empty {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 4px 8px;
  color: rgba(255,255,255,.35);
  font-family: 'Sarabun',sans-serif; font-size: .85rem;
  min-width: 280px;
}
.pali-mylist-empty-icon { font-size: 1.6rem; }
.pali-mylist-empty p { margin: 0; line-height: 1.6; }
.pali-mylist-empty small { font-size: .75rem; color: rgba(255,255,255,.25); }

/* Top note banner */
.pali-mylist-topnote {
  margin: 28px 0 8px;
  padding: 14px 20px;
  background: rgba(255,255,255,.04);
  border: 0.5px solid rgba(255,255,255,.1);
  border-radius: 6px;
  display: flex; align-items: center; gap: 8px;
  font-family: 'Noto Sans Thai','Sarabun',sans-serif;
  font-size: .9rem;
}
.pali-mylist-topnote-label { color: rgba(255,255,255,.5); }
.pali-mylist-topnote strong { color: var(--gold); }

/* =====================================================
   Mark Watching Button
   ===================================================== */
.pali-mark-wrap { position: relative; display: inline-block; }
.pali-btn-mark {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.2);
  padding: 7px 14px;
  border-radius: 4px;
  font-size: .82rem;
  cursor: pointer;
  font-family: 'Sarabun',sans-serif;
  transition: background .2s;
  white-space: nowrap;
}
.pali-btn-mark:hover { background: rgba(255,255,255,.15); }
.pali-mark-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  overflow: hidden;
  min-width: 180px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.pali-mark-menu button {
  display: block; width: 100%;
  padding: 10px 16px;
  background: none; border: none;
  color: rgba(255,255,255,.8);
  font-size: .82rem;
  font-family: 'Sarabun',sans-serif;
  text-align: left; cursor: pointer;
  transition: background .15s;
}
.pali-mark-menu button:hover { background: rgba(255,255,255,.08); }







/* =====================================================
   FIX v34: Minimal lesson-page layout
   - Do not touch theme header/navigation
   - Expand only ancestors of the lesson wrap via JS-added class
   ===================================================== */
body.pali-lesson-page {
  background: var(--pg) !important;
}

body.pali-lesson-page .pali-lesson-ancestor-fix {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  float: none !important;
}

body.pali-lesson-page .pali-lesson-wrap {
  position: relative !important;
  width: min(1440px, calc(100vw - 40px)) !important;
  max-width: min(1440px, calc(100vw - 40px)) !important;
  margin: 0 auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  transform: none !important;
  left: auto !important;
  right: auto !important;
}

body.pali-lesson-page .pali-lesson-wrap * {
  box-sizing: border-box;
}

body.pali-lesson-page .pali-lesson-header {
  max-width: 960px;
}

body.pali-lesson-page .pali-lesson-body {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr) !important;
  gap: 28px !important;
  align-items: start !important;
}

body.pali-lesson-page .pali-video-side,
body.pali-lesson-page .pali-pdf-side,
body.pali-lesson-page .pali-video-container,
body.pali-lesson-page .pali-pdf-container {
  min-width: 0 !important;
}

body.pali-lesson-page .pali-pdf-side {
  display: block !important;
}

body.pali-lesson-page .pali-pdf-container {
  min-height: 720px !important;
  height: 100% !important;
}

body.pali-lesson-page .pali-pdf-frame {
  width: 100% !important;
  min-height: 660px !important;
  border: none !important;
}

body.pali-lesson-page .pali-sections-inner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .58fr) !important;
  gap: 18px !important;
  align-items: start !important;
}

body.pali-lesson-page .pali-sections-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

body.pali-lesson-page .pali-sections-right {
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.75;
  background: rgba(255,255,255,.035);
  border-left: 1px solid rgba(245,197,24,.22);
  border-radius: 8px;
  padding: 12px 14px;
}

body.pali-lesson-page .pali-sections-right p {
  margin: 0;
}

@media (max-width: 1023px) {
  body.pali-lesson-page .pali-lesson-wrap {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.pali-lesson-page .pali-lesson-body {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  body.pali-lesson-page .pali-pdf-side {
    display: none !important;
  }

  body.pali-lesson-page .pali-pdf-mobile {
    display: block !important;
  }

  body.pali-lesson-page .pali-sections-inner {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  body.pali-lesson-page .pali-lesson-wrap {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  body.pali-lesson-page .pali-lesson-title {
    font-size: 18px !important;
    line-height: 1.45 !important;
  }

  body.pali-lesson-page .pali-btn,
  body.pali-lesson-page .pali-quality-btn,
  body.pali-lesson-page .pali-section-link,
  body.pali-lesson-page .pali-resources-row {
    font-size: 14px !important;
  }

  body.pali-lesson-page .pali-sections-wrap {
    padding: 12px !important;
  }

  body.pali-lesson-page .pali-pdf-mobile iframe {
    height: 520px !important;
  }
}



/* =====================================================
   FIX v35: Normal post width after theme change
   - Applies only to non-lesson single posts
   - Does not affect lesson page / header / menu
   ===================================================== */
body.pali-normal-post-page {
  background: var(--pg) !important;
}

body.pali-normal-post-page #content,
body.pali-normal-post-page #primary,
body.pali-normal-post-page .content-area,
body.pali-normal-post-page .site-main,
body.pali-normal-post-page main,
body.pali-normal-post-page article,
body.pali-normal-post-page .post,
body.pali-normal-post-page .inside-article,
body.pali-normal-post-page .post-inner,
body.pali-normal-post-page .content-inner,
body.pali-normal-post-page .page-content,
body.pali-normal-post-page .entry,
body.pali-normal-post-page .single-content {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  float: none !important;
}

body.pali-normal-post-page #secondary,
body.pali-normal-post-page .sidebar,
body.pali-normal-post-page aside.widget-area,
body.pali-normal-post-page .widget-area,
body.pali-normal-post-page .right-sidebar,
body.pali-normal-post-page .left-sidebar,
body.pali-normal-post-page .ast-sidebar {
  display: none !important;
}

body.pali-normal-post-page .entry-content,
body.pali-normal-post-page .post-content,
body.pali-normal-post-page .single-post-content,
body.pali-normal-post-page article > .content,
body.pali-normal-post-page article .content {
  width: min(920px, calc(100vw - 40px)) !important;
  max-width: min(920px, calc(100vw - 40px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

body.pali-normal-post-page .entry-header,
body.pali-normal-post-page .post-header,
body.pali-normal-post-page .single-post-title,
body.pali-normal-post-page h1.entry-title {
  width: min(920px, calc(100vw - 40px)) !important;
  max-width: min(920px, calc(100vw - 40px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 600px) {
  body.pali-normal-post-page .entry-content,
  body.pali-normal-post-page .post-content,
  body.pali-normal-post-page .single-post-content,
  body.pali-normal-post-page article > .content,
  body.pali-normal-post-page article .content,
  body.pali-normal-post-page .entry-header,
  body.pali-normal-post-page .post-header,
  body.pali-normal-post-page .single-post-title,
  body.pali-normal-post-page h1.entry-title {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }
}



/* =====================================================
   FIX v36: Astra theme + normal post width
   - Target Astra specifically for regular posts
   - Keep lesson pages on their own layout
   - Expand Elementor/Container content width on single posts
   ===================================================== */
body.pali-normal-post-page.pali-theme-astra {
  background: var(--pg) !important;
}

body.pali-normal-post-page.pali-theme-astra .site-content > .ast-container,
body.pali-normal-post-page.pali-theme-astra #content > .ast-container,
body.pali-normal-post-page.pali-theme-astra .ast-container {
  width: min(1280px, calc(100vw - 40px)) !important;
  max-width: min(1280px, calc(100vw - 40px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

body.pali-normal-post-page.pali-theme-astra #primary,
body.pali-normal-post-page.pali-theme-astra .content-area,
body.pali-normal-post-page.pali-theme-astra .site-main,
body.pali-normal-post-page.pali-theme-astra main,
body.pali-normal-post-page.pali-theme-astra article.post,
body.pali-normal-post-page.pali-theme-astra article.type-post,
body.pali-normal-post-page.pali-theme-astra .inside-article,
body.pali-normal-post-page.pali-theme-astra .entry,
body.pali-normal-post-page.pali-theme-astra .entry-content,
body.pali-normal-post-page.pali-theme-astra .ast-article-single,
body.pali-normal-post-page.pali-theme-astra .ast-article-post {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  float: none !important;
  box-sizing: border-box !important;
}

body.pali-normal-post-page.pali-theme-astra #secondary,
body.pali-normal-post-page.pali-theme-astra .ast-sidebar,
body.pali-normal-post-page.pali-theme-astra .widget-area,
body.pali-normal-post-page.pali-theme-astra .sidebar-main,
body.pali-normal-post-page.pali-theme-astra aside.widget-area {
  display: none !important;
}

/* Elementor content inside Astra single posts */
body.pali-normal-post-page.pali-theme-astra .entry-content > .elementor,
body.pali-normal-post-page.pali-theme-astra .entry-content > .elementor .elementor-section,
body.pali-normal-post-page.pali-theme-astra .entry-content > .elementor .elementor-container,
body.pali-normal-post-page.pali-theme-astra .entry-content > .elementor .e-con,
body.pali-normal-post-page.pali-theme-astra .entry-content > .elementor .e-parent,
body.pali-normal-post-page.pali-theme-astra .entry-content > .elementor .e-child,
body.pali-normal-post-page.pali-theme-astra .entry-content > .elementor .elementor-widget-wrap,
body.pali-normal-post-page.pali-theme-astra .entry-content > .elementor [data-elementor-type="wp-post"] {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

/* Plain-content posts: still keep a readable content width */
body.pali-normal-post-page.pali-theme-astra .entry-header,
body.pali-normal-post-page.pali-theme-astra .ast-single-post-order,
body.pali-normal-post-page.pali-theme-astra .entry-content > :not(.elementor),
body.pali-normal-post-page.pali-theme-astra .entry-content > p,
body.pali-normal-post-page.pali-theme-astra .entry-content > ul,
body.pali-normal-post-page.pali-theme-astra .entry-content > ol,
body.pali-normal-post-page.pali-theme-astra .entry-content > h1,
body.pali-normal-post-page.pali-theme-astra .entry-content > h2,
body.pali-normal-post-page.pali-theme-astra .entry-content > h3,
body.pali-normal-post-page.pali-theme-astra .entry-content > h4,
body.pali-normal-post-page.pali-theme-astra .entry-content > h5,
body.pali-normal-post-page.pali-theme-astra .entry-content > h6,
body.pali-normal-post-page.pali-theme-astra .entry-content > blockquote,
body.pali-normal-post-page.pali-theme-astra .entry-content > table,
body.pali-normal-post-page.pali-theme-astra .entry-content > figure {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 921px) {
  body.pali-normal-post-page.pali-theme-astra .site-content > .ast-container,
  body.pali-normal-post-page.pali-theme-astra #content > .ast-container,
  body.pali-normal-post-page.pali-theme-astra .ast-container {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

@media (max-width: 600px) {
  body.pali-normal-post-page.pali-theme-astra .site-content > .ast-container,
  body.pali-normal-post-page.pali-theme-astra #content > .ast-container,
  body.pali-normal-post-page.pali-theme-astra .ast-container {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  body.pali-normal-post-page.pali-theme-astra .entry-header,
  body.pali-normal-post-page.pali-theme-astra .ast-single-post-order,
  body.pali-normal-post-page.pali-theme-astra .entry-content > :not(.elementor),
  body.pali-normal-post-page.pali-theme-astra .entry-content > p,
  body.pali-normal-post-page.pali-theme-astra .entry-content > ul,
  body.pali-normal-post-page.pali-theme-astra .entry-content > ol,
  body.pali-normal-post-page.pali-theme-astra .entry-content > h1,
  body.pali-normal-post-page.pali-theme-astra .entry-content > h2,
  body.pali-normal-post-page.pali-theme-astra .entry-content > h3,
  body.pali-normal-post-page.pali-theme-astra .entry-content > h4,
  body.pali-normal-post-page.pali-theme-astra .entry-content > h5,
  body.pali-normal-post-page.pali-theme-astra .entry-content > h6,
  body.pali-normal-post-page.pali-theme-astra .entry-content > blockquote,
  body.pali-normal-post-page.pali-theme-astra .entry-content > table,
  body.pali-normal-post-page.pali-theme-astra .entry-content > figure {
    max-width: 100%;
  }
}
