/*
Theme Name: Phetchabun News Modern
Description: Professional Thai news portal stylesheet. Keeps the existing pn-* HTML/PHP structure.
Version: 2.0.0
Text Domain: phetchabun-news-modern
*/

/* =========================================================
   01. DESIGN TOKENS
   ========================================================= */
:root{
  --pn-primary:#123f9f;
  --pn-primary-dark:#0b245f;
  --pn-primary-soft:#eef4ff;
  --pn-red:#df2434;
  --pn-green:#159447;
  --pn-purple:#6d2bd9;

  --pn-bg:#f4f7fb;
  --pn-surface:#ffffff;
  --pn-text:#172033;
  --pn-muted:#6b7280;
  --pn-border:#e1e7ef;

  --pn-radius:12px;
  --pn-radius-sm:8px;
  --pn-shadow:0 4px 18px rgba(15,23,42,.07);

  --pn-container:1180px;
}

/* =========================================================
   02. RESET / GLOBAL
   ========================================================= */
*,
*::before,
*::after{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  background:var(--pn-bg);
  color:var(--pn-text);
  font-family:system-ui,-apple-system,"Segoe UI","Noto Sans Thai",Tahoma,sans-serif;
  line-height:1.55;
}

a{
  color:inherit;
  text-decoration:none;
}

img{
  display:block;
  max-width:100%;
  height:auto;
}

button,
input,
textarea,
select{
  font:inherit;
}

.container{
  width:min(var(--pn-container),calc(100% - 32px));
  margin-inline:auto;
}

/* =========================================================
   03. HEADER
   ========================================================= */
.pn-top{
  color:#fff;
  background:linear-gradient(135deg,#061225,#0b1d39);
}

.pn-top-inner{
  min-height:82px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.pn-brand{
  min-width:250px;
}

.pn-logo{
  font-size:31px;
  line-height:1.15;
  font-weight:900;
  letter-spacing:-.7px;
}

.pn-logo span{
  color:#ff9f00;
}

.pn-tagline{
  margin-top:3px;
  color:#32c878;
  font-size:13px;
  font-weight:700;
}

.pn-tools{
  display:flex;
  align-items:center;
  gap:10px;
}

.pn-weather{
  padding:6px 15px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:10px;
  background:rgba(255,255,255,.05);
  text-align:center;
}

.pn-weather strong{
  display:block;
  font-size:20px;
  line-height:1.1;
}

.pn-social{
  display:flex;
  gap:6px;
}

.pn-social a{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#1557c8;
  color:#fff;
  font-size:13px;
  font-weight:800;
}

.pn-search{
  display:flex;
  overflow:hidden;
  border-radius:8px;
  background:#fff;
}

.pn-search input{
  width:150px;
  border:0;
  outline:0;
  padding:8px 10px;
}

.pn-search button{
  border:0;
  padding:0 10px;
  background:#fff;
  cursor:pointer;
}

/* =========================================================
   04. MAIN NAVIGATION
   ========================================================= */
.pn-nav{
  background:var(--pn-primary);
  color:#fff;
}

.pn-nav-inner{
  min-height:44px;
  display:flex;
  align-items:center;
}

.pn-nav ul,
.pn-nav .menu,
.pn-nav .pn-menu{
  display:flex;
  flex:1;
  align-items:center;
  flex-wrap:nowrap;
  gap:0;
  margin:0;
  padding:0;
  list-style:none;
}

.pn-nav li{
  margin:0;
  padding:0;
  list-style:none;
}

.pn-nav li::before,
.pn-nav li::after{
  display:none;
}

.pn-nav li a,
.pn-nav > a{
  display:block;
  padding:11px 15px;
  color:#fff;
  font-size:14px;
  font-weight:800;
  line-height:1.4;
  white-space:nowrap;
}

.pn-nav li a:hover,
.pn-nav li.current-menu-item > a,
.pn-nav li.current_page_item > a{
  background:rgba(0,0,0,.18);
  color:#fff;
}

.pn-menu-toggle{
  display:none;
  margin-left:auto;
  border:0;
  background:transparent;
  color:#fff;
  font-size:22px;
}

/* =========================================================
   05. BREAKING NEWS
   ========================================================= */
.pn-breaking{
  background:#fff;
  border-bottom:1px solid var(--pn-border);
}

.pn-breaking-inner{
  min-height:40px;
  display:flex;
  align-items:center;
  gap:10px;
  overflow:hidden;
}

.pn-breaking-label{
  flex:0 0 auto;
  padding:5px 13px;
  border-radius:5px;
  background:var(--pn-red);
  color:#fff;
  font-size:12px;
  font-weight:900;
}

.pn-breaking-text{
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  color:#4b5563;
  font-size:13px;
}

/* =========================================================
   06. SECTION HEADINGS
   ========================================================= */
.pn-section{
  margin:22px 0;
}

.pn-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin-bottom:11px;
}

.pn-section-title{
  position:relative;
  margin:0;
  padding-left:13px;
  color:#182b55;
  font-size:21px;
  font-weight:900;
  line-height:1.3;
}

.pn-section-title::before{
  content:"";
  position:absolute;
  left:0;
  top:2px;
  bottom:2px;
  width:4px;
  border-radius:4px;
  background:var(--pn-primary);
}

.pn-more{
  flex:0 0 auto;
  color:#1259d8;
  font-size:13px;
  font-weight:800;
}

.pn-more:hover{
  color:var(--pn-red);
  text-decoration:underline;
}

/* =========================================================
   07. FEATURED NEWS / HERO
   ========================================================= */
.pn-hero{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr);
  gap:12px;
}

.pn-hero-main,
.pn-hero-side article{
  position:relative;
  overflow:hidden;
  border-radius:var(--pn-radius);
  background:#111827;
  color:#fff;
}

.pn-hero-main{
  min-height:390px;
}

.pn-hero-side{
  display:grid;
  gap:12px;
}

.pn-hero-side article{
  min-height:189px;
}

.pn-cover{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

.pn-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(
    to bottom,
    rgba(0,0,0,.02) 20%,
    rgba(0,0,0,.18) 48%,
    rgba(0,0,0,.86) 100%
  );
}

.pn-hero-content{
  position:absolute;
  left:22px;
  right:22px;
  bottom:18px;
  z-index:2;
}

.pn-cat{
  display:inline-block;
  margin-bottom:6px;
  padding:3px 8px;
  border-radius:5px;
  background:var(--pn-red);
  color:#fff;
  font-size:11px;
  font-weight:900;
}

.pn-title{
  margin:0 0 7px;
  color:inherit;
  font-size:27px;
  line-height:1.28;
  font-weight:850;
  letter-spacing:-.15px;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

.pn-meta{
  color:rgba(255,255,255,.86);
  font-size:11px;
}

.pn-hero-side .pn-hero-content{
  left:15px;
  right:15px;
  bottom:13px;
}

.pn-hero-side .pn-title{
  font-size:17px;
  line-height:1.35;
}

/* =========================================================
   08. STANDARD NEWS CARDS
   ========================================================= */
.pn-latest-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}

.pn-news-card{
  min-width:0;
  overflow:hidden;
  border:1px solid var(--pn-border);
  border-radius:10px;
  background:#fff;
  box-shadow:0 2px 10px rgba(15,23,42,.04);
  transition:transform .18s ease,box-shadow .18s ease;
}

.pn-news-card:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 18px rgba(15,23,42,.09);
}

.pn-thumb{
  aspect-ratio:16/10;
  overflow:hidden;
  background:#e7edf5;
}

.pn-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .22s ease;
}

.pn-news-card:hover .pn-thumb img{
  transform:scale(1.025);
}

.pn-news-body{
  padding:9px 10px 11px;
}

.pn-news-cat{
  color:#1259d8;
  font-size:10px;
  font-weight:900;
}

.pn-news-title{
  margin:4px 0 6px;
  color:#18212f;
  font-size:14px;
  line-height:1.4;
  font-weight:750;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
}

.pn-news-meta{
  color:var(--pn-muted);
  font-size:10px;
}

/* =========================================================
   09. FEATURED BLOCK
   Existing .pn-youtube markup is intentionally retained
   so the PHP does not need to be changed.
   ========================================================= */
.pn-youtube{
  margin:22px 0;
  padding:0;
  overflow:hidden;
  border:1px solid var(--pn-border);
  border-radius:var(--pn-radius);
  background:#fff;
  box-shadow:var(--pn-shadow);
}

.pn-youtube > .pn-section-head,
.pn-youtube .pn-youtube-head{
  min-height:50px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px;
  border-bottom:1px solid var(--pn-border);
  background:#fff;
}

.pn-youtube > .pn-section-head::before,
.pn-youtube .pn-youtube-head::before{
  content:"ข่าวเด่น";
  padding-left:12px;
  color:#182b55;
  font-size:21px;
  font-weight:900;
}

.pn-youtube > .pn-section-head::after,
.pn-youtube .pn-youtube-head::after{
  content:"";
  position:absolute;
  left:8px;
  width:4px;
  height:26px;
  border-radius:4px;
  background:var(--pn-primary);
}

/* Remove YouTube visual identity without changing the content. */
.pn-youtube .pn-play,
.pn-youtube .pn-play-button{
  display:none;
}

.pn-youtube-grid{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr);
  gap:16px;
  padding:14px;
}

.pn-video-feature{
  position:relative;
  overflow:hidden;
  border-radius:10px;
  background:#111827;
}

.pn-video-feature .pn-thumb{
  aspect-ratio:16/9;
}

.pn-video-feature .pn-video-title{
  position:absolute;
  left:16px;
  right:16px;
  bottom:13px;
  z-index:2;
  margin:0;
  color:#fff;
  font-size:22px;
  line-height:1.3;
  font-weight:850;
  text-shadow:0 1px 3px rgba(0,0,0,.55);
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

.pn-video-feature::after{
  content:"";
  position:absolute;
  inset:35% 0 0;
  background:linear-gradient(transparent,rgba(0,0,0,.82));
  pointer-events:none;
}

.pn-video-list{
  display:grid;
  gap:8px;
  align-content:start;
}

.pn-video-item{
  min-width:0;
  display:grid;
  grid-template-columns:118px minmax(0,1fr);
  gap:10px;
  align-items:start;
  padding-bottom:8px;
  border-bottom:1px solid var(--pn-border);
}

.pn-video-item:last-child{
  border-bottom:0;
}

.pn-video-item .pn-thumb{
  border-radius:7px;
}

.pn-video-item .pn-news-title{
  margin:0;
  font-size:13px;
  line-height:1.4;
}

.pn-video-item .pn-news-meta{
  display:block;
  margin-top:3px;
}

/* =========================================================
   10. THREE INFORMATION PANELS
   ========================================================= */
.pn-three{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.pn-panel{
  overflow:hidden;
  border:1px solid var(--pn-border);
  border-radius:var(--pn-radius);
  background:#fff;
  box-shadow:var(--pn-shadow);
}

.pn-panel-head{
  padding:10px 14px;
  color:#fff;
  font-size:17px;
  font-weight:900;
}

.pn-panel-head.radio{
  background:linear-gradient(135deg,#6424ca,#8d44ea);
}

.pn-panel-head.top{
  background:linear-gradient(135deg,#df101e,#ff3542);
}

.pn-panel-head.district{
  background:linear-gradient(135deg,#0c53d8,#2c76f5);
}

.pn-panel-body{
  padding:11px;
}

.pn-radio-box{
  padding:12px;
  text-align:center;
}

.pn-radio-logo{
  width:135px;
  height:135px;
  display:grid;
  place-items:center;
  margin:0 auto 8px;
  border:8px solid #1b174a;
  border-radius:50%;
  background:radial-gradient(circle at 35% 30%,#fff,#eee);
  color:#5b1bc3;
  font-size:19px;
  font-weight:950;
}

.pn-radio-name{
  font-size:16px;
  font-weight:900;
}

.pn-radio-sub{
  color:var(--pn-muted);
  font-size:11px;
}

.pn-list{
  display:grid;
  gap:8px;
}

.pn-list-item{
  display:grid;
  grid-template-columns:78px minmax(0,1fr);
  gap:9px;
  min-width:0;
}

.pn-list-item .pn-thumb{
  border-radius:7px;
}

.pn-list-item h3{
  margin:0;
  color:#263b61;
  font-size:13px;
  line-height:1.4;
}

.pn-districts{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
}

.pn-districts a{
  padding:6px 7px;
  border-bottom:1px solid var(--pn-border);
  color:#263b61;
  font-size:13px;
  font-weight:700;
}

/* =========================================================
   11. AGRICULTURE / CATEGORY SECTIONS
   ========================================================= */
.pn-agri{
  padding:0;
}

.pn-agri-grid{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);
  gap:14px;
  padding:12px;
}

.pn-agri-main{
  position:relative;
  min-height:320px;
  overflow:hidden;
  border-radius:11px;
  background:#152b19;
  color:#fff;
}

.pn-agri-main .pn-title{
  font-size:24px;
}

.pn-agri-list{
  display:grid;
  gap:9px;
}

.pn-agri-item{
  display:grid;
  grid-template-columns:145px minmax(0,1fr);
  gap:10px;
}

.pn-agri-item .pn-thumb{
  border-radius:7px;
}

.pn-agri-item h3{
  margin:0;
  font-size:13px;
  line-height:1.4;
}

/* =========================================================
   12. ADS
   ========================================================= */
.pn-ad{
  min-height:90px;
  display:grid;
  place-items:center;
  margin:20px 0;
  border:1px dashed #c7ccd5;
  border-radius:10px;
  background:#fff;
  color:#8b93a1;
  font-weight:800;
}

/* =========================================================
   13. SINGLE ARTICLE
   ========================================================= */
.pn-single-wrap{
  width:min(1180px,calc(100% - 32px));
  margin-inline:auto;
}

.pn-breadcrumb{
  display:flex;
  align-items:center;
  gap:8px;
  margin:8px 0 14px;
  color:#7a8494;
  font-size:12px;
  overflow:hidden;
  white-space:nowrap;
}

.pn-breadcrumb a{
  color:#1259d8;
  font-weight:800;
}

.pn-single-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:20px;
  align-items:start;
}

.pn-article{
  min-width:0;
  overflow:hidden;
  border:1px solid var(--pn-border);
  border-radius:var(--pn-radius);
  background:#fff;
  box-shadow:var(--pn-shadow);
}

.pn-article-top{
  padding:22px 26px 17px;
}

.pn-article-title{
  margin:7px 0 11px;
  color:#101828;
  font-size:clamp(27px,3.2vw,40px);
  line-height:1.22;
  font-weight:900;
  letter-spacing:-.5px;
}

.pn-article-meta{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  color:#7b8492;
  font-size:12px;
}

.pn-article-hero{
  margin:0;
  padding:0;
  background:#eef2f7;
}

.pn-article-hero .pn-single-thumb{
  width:100%;
  max-height:620px;
  margin:0;
  border-radius:0;
  object-fit:cover;
}

.pn-article-hero figcaption{
  padding:7px 16px;
  color:#77808f;
  font-size:11px;
}

.pn-article-body{
  width:100%;
  padding:24px 28px 10px;
  color:#293241;
  font-size:17px;
  line-height:1.85;
}

.pn-article-body > p:first-child{
  color:#1f2937;
  font-size:19px;
  font-weight:600;
}

.pn-article-body h2{
  margin:26px 0 9px;
  color:#111827;
  font-size:25px;
  line-height:1.35;
}

.pn-article-body h3{
  margin:22px 0 7px;
  font-size:21px;
}

.pn-article-body blockquote{
  margin:20px 0;
  padding:13px 18px;
  border-left:4px solid var(--pn-red);
  background:#f7f8fb;
  color:#4b5563;
}

.pn-article-body ul,
.pn-article-body ol{
  padding-left:26px;
}

.pn-article-body a{
  color:#1259d8;
  text-decoration:underline;
}

.pn-article-share,
.pn-tags{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  padding:14px 28px;
  border-top:1px solid var(--pn-border);
}

.pn-article-share a,
.pn-tags a{
  padding:5px 10px;
  border:1px solid #dbe2ec;
  border-radius:999px;
  background:#fff;
  font-size:12px;
  font-weight:800;
}

.pn-article-share a:hover,
.pn-tags a:hover{
  background:#f1f5ff;
  color:#1259d8;
}

/* =========================================================
   14. SIDEBAR
   ========================================================= */
.pn-article-sidebar{
  display:grid;
  gap:14px;
  min-width:0;
}

.pn-side-card{
  overflow:hidden;
  border:1px solid var(--pn-border);
  border-radius:12px;
  background:#fff;
  box-shadow:var(--pn-shadow);
}

.pn-side-head{
  padding:10px 13px;
  color:#fff;
  font-size:17px;
  font-weight:900;
}

.pn-side-head.red{
  background:linear-gradient(135deg,#d90f1f,#f23848);
}

.pn-side-head.purple{
  background:linear-gradient(135deg,#6323c9,#9147eb);
}

.pn-side-list{
  padding:9px;
}

.pn-side-item{
  display:grid;
  grid-template-columns:88px minmax(0,1fr);
  gap:9px;
  padding:8px 0;
  border-bottom:1px solid var(--pn-border);
}

.pn-side-item:last-child{
  border-bottom:0;
}

.pn-side-thumb{
  aspect-ratio:16/10;
  overflow:hidden;
  border-radius:7px;
  background:#e8edf5;
}

.pn-side-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.pn-side-item h3{
  margin:0 0 4px;
  font-size:13px;
  line-height:1.4;
  font-weight:800;
}

.pn-side-item small{
  color:#7a8494;
  font-size:10px;
}

.pn-side-card .pn-radio-box{
  padding:16px;
}

.pn-side-card .pn-radio-logo{
  width:115px;
  height:115px;
}

.pn-side-ad{
  min-height:250px;
  display:grid;
  place-items:center;
  padding:20px;
  border:1px dashed #c8cfda;
  border-radius:12px;
  background:#fff;
  color:#9aa3b1;
  text-align:center;
  font-weight:900;
}

.pn-side-ad small{
  font-weight:600;
}

.pn-related{
  margin-top:20px;
}

.pn-related .pn-latest-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

/* =========================================================
   15. FOOTER / CONTENT
   ========================================================= */
.pn-footer{
  margin-top:28px;
  background:#07162b;
  color:#dce5f5;
}

.pn-footer-inner{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:25px;
  padding:30px 0;
}

.pn-footer h3{
  margin-top:0;
  color:#fff;
}

.pn-footer a{
  color:#dce5f5;
}

.pn-copy{
  padding:12px 0;
  border-top:1px solid rgba(255,255,255,.12);
  color:#9fb0ca;
  font-size:11px;
}

.pn-content{
  padding:22px;
  border-radius:var(--pn-radius);
  background:#fff;
  box-shadow:var(--pn-shadow);
}

.pn-content h1{
  line-height:1.25;
}

.pn-single-thumb{
  width:100%;
  height:auto;
  max-height:560px;
  margin:15px 0;
  border-radius:12px;
  object-fit:cover;
}

.pn-entry{
  font-size:18px;
}

.pn-entry img{
  border-radius:10px;
}

/* =========================================================
   16. RESPONSIVE
   ========================================================= */
@media (max-width:980px){
  .pn-top-inner{
    flex-wrap:wrap;
    padding:12px 0;
  }

  .pn-latest-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .pn-three{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .pn-three .district{
    grid-column:1/-1;
  }

  .pn-single-layout{
    grid-template-columns:minmax(0,1fr) 280px;
  }

  .pn-related .pn-latest-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:760px){
  .container,
  .pn-single-wrap{
    width:calc(100% - 20px);
  }

  .pn-top-inner{
    min-height:auto;
  }

  .pn-brand{
    min-width:0;
  }

  .pn-logo{
    font-size:25px;
  }

  .pn-weather,
  .pn-social{
    display:none;
  }

  .pn-search input{
    width:120px;
  }

  .pn-nav{
    display:none;
  }

  .pn-menu-toggle{
    display:block;
  }

  .pn-hero{
    grid-template-columns:1fr;
  }

  .pn-hero-main{
    min-height:310px;
  }

  .pn-hero-side{
    grid-template-columns:1fr 1fr;
  }

  .pn-hero-side article{
    min-height:155px;
  }

  .pn-title{
    font-size:23px;
  }

  .pn-hero-side .pn-title{
    font-size:15px;
  }

  .pn-latest-grid{
    grid-template-columns:1fr 1fr;
  }

  .pn-youtube-grid,
  .pn-three,
  .pn-agri-grid{
    grid-template-columns:1fr;
  }

  .pn-video-feature .pn-video-title{
    font-size:19px;
  }

  .pn-video-item{
    grid-template-columns:100px minmax(0,1fr);
  }

  .pn-agri-main{
    min-height:270px;
  }

  .pn-single-layout{
    grid-template-columns:1fr;
  }

  .pn-article-sidebar{
    grid-template-columns:1fr;
  }

  .pn-side-ad{
    grid-column:auto;
  }

  .pn-footer-inner{
    grid-template-columns:1fr;
  }
}

@media (max-width:430px){
  .pn-latest-grid{
    grid-template-columns:1fr;
  }

  .pn-hero-side{
    grid-template-columns:1fr;
  }

  .pn-breaking-text{
    display:none;
  }

  .pn-youtube-grid{
    padding:10px;
  }

  .pn-video-item{
    grid-template-columns:88px minmax(0,1fr);
  }

  .pn-video-feature .pn-video-title{
    left:12px;
    right:12px;
    bottom:10px;
    font-size:17px;
  }

  .pn-article-top{
    padding:18px;
  }

  .pn-article-title{
    font-size:28px;
  }

  .pn-article-body{
    padding:19px;
    font-size:16px;
  }

  .pn-article-share,
  .pn-tags{
    padding:13px 19px;
  }

  .pn-related .pn-latest-grid{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   FINAL FIX: แสดง "ข่าวเด่น" + "ดูทั้งหมด" และซ่อนเฉพาะ "YouTube"
   ========================================================= */

/* ทำให้หัวข้อมีตำแหน่งอ้างอิงสำหรับขีดสีน้ำเงิน */
.pn-youtube > .pn-section-head,
.pn-youtube .pn-youtube-head{
  position:relative;
}

/* ซ่อนข้อความ YouTube ที่อยู่ในชื่อหัวข้อ */
.pn-youtube > .pn-section-head .pn-section-title,
.pn-youtube .pn-youtube-head .pn-section-title{
  font-size:0 !important;
  line-height:1 !important;
}

/* ใส่ชื่อ "ข่าวเด่น" กลับมาแทน YouTube */
.pn-youtube > .pn-section-head .pn-section-title::after,
.pn-youtube .pn-youtube-head .pn-section-title::after{
  content:"ข่าวเด่น";
  display:inline-block;
  padding-left:12px;
  color:#182b55;
  font-size:21px;
  line-height:1.3;
  font-weight:900;
}

/* ขีดสีน้ำเงินด้านหน้าคำว่า ข่าวเด่น */
.pn-youtube > .pn-section-head .pn-section-title::before,
.pn-youtube .pn-youtube-head .pn-section-title::before{
  content:"";
  display:inline-block;
  width:4px;
  height:26px;
  margin-right:8px;
  vertical-align:-5px;
  border-radius:4px;
  background:var(--pn-primary);
}

/* ซ่อนชื่อ YouTube หาก PHP ใช้คลาสเฉพาะ */
.pn-youtube .youtube-title,
.pn-youtube .youtube-label,
.pn-youtube .youtube-heading{
  display:none !important;
}

/* คง "ดูทั้งหมด" เอาไว้ */
.pn-youtube > .pn-section-head .pn-more,
.pn-youtube .pn-youtube-head .pn-more{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  color:#1259d8 !important;
  font-size:13px !important;
  font-weight:800 !important;
  white-space:nowrap !important;
}

/* ซ่อนเฉพาะไอคอน/ปุ่มเล่น YouTube */
.pn-youtube .pn-play,
.pn-youtube .pn-play-button{
  display:none !important;
}

/*
Theme Name: Phetchabun News Modern - Background Fix
Description: ปรับพื้นหลังส่วนข่าวเกษตรและพื้นที่เนื้อหาให้เป็นกรอบสะอาดแบบเว็บไซต์ข่าวมืออาชีพ
Version: 1.0.1
*/

/* =========================================================
   พื้นหลังหลักของหน้า
   ========================================================= */
body{
    background:
        linear-gradient(180deg,#f3f6fb 0%,#eef3f9 48%,#f7f9fc 100%);
}

/* =========================================================
   กล่องส่วนข่าวเกษตร
   ให้มีพื้นหลัง/กรอบเหมือนส่วนข่าวเด่น
   ========================================================= */
.pn-agri{
    position:relative;
    margin:24px 0;
    padding:0 !important;
    background:#ffffff !important;
    border:1px solid #e1e7f0 !important;
    border-radius:16px !important;
    box-shadow:0 6px 24px rgba(15,23,42,.08) !important;
    overflow:hidden !important;
}

/* หัวข้อข่าวเกษตร */
.pn-agri > .pn-section-head{
    position:relative;
    min-height:54px;
    margin:0 !important;
    padding:14px 18px 12px 22px;
    background:#ffffff;
    border-bottom:1px solid #e7ebf1;
}

/* ขีดสีเขียวหน้าหัวข้อ */
.pn-agri > .pn-section-head::before{
    content:"";
    position:absolute;
    left:10px;
    top:13px;
    width:4px;
    height:28px;
    border-radius:4px;
    background:#2e9d55;
}

/* เนื้อหาด้านใน */
.pn-agri-grid{
    position:relative;
    padding:16px !important;
    background:#ffffff !important;
}

/* ข่าวหลัก */
.pn-agri-main{
    min-height:320px;
    border-radius:12px !important;
    overflow:hidden;
    background:
        linear-gradient(135deg,#173b2a,#0d241b) !important;
    box-shadow:0 3px 14px rgba(15,23,42,.10);
}

/* ทำให้ภาพข่าวหลักเต็มพื้นที่ */
.pn-agri-main .pn-cover{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* ไล่สีทับภาพเพื่อให้อ่านข้อความง่าย */
.pn-agri-main .pn-overlay{
    background:
        linear-gradient(
            0deg,
            rgba(0,0,0,.82) 0%,
            rgba(0,0,0,.35) 48%,
            rgba(0,0,0,.04) 100%
        ) !important;
}

/* รายการข่าวด้านขวา */
.pn-agri-list{
    padding:0;
    background:#ffffff;
}

/* ข่าวย่อยแต่ละรายการ */
.pn-agri-item{
    min-height:78px;
    padding:9px 0;
    background:#ffffff;
    border-bottom:1px solid #e7ebf1;
}

.pn-agri-item:last-child{
    border-bottom:0;
}

/* รูปข่าวย่อย */
.pn-agri-item .pn-thumb{
    background:#eef2f7;
    border-radius:8px !important;
    overflow:hidden;
}

.pn-agri-item .pn-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* ชื่อข่าวย่อย */
.pn-agri-item h3{
    color:#18212f;
    font-size:14px;
    line-height:1.45;
    margin:0;
    font-weight:750;
}

/* ลิงก์ "ดูทั้งหมด" */
.pn-agri .pn-more{
    color:#1259d8;
    font-size:13px;
    font-weight:800;
}

/* =========================================================
   ปรับกรอบข่าวเด่นให้ใช้มาตรฐานเดียวกัน
   ========================================================= */
.pn-youtube,
.pn-card{
    background:#ffffff;
    border:1px solid #e1e7f0;
    border-radius:16px;
    box-shadow:0 6px 24px rgba(15,23,42,.07);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width:700px){
    .pn-agri{
        margin:18px 0;
        border-radius:12px !important;
    }

    .pn-agri > .pn-section-head{
        min-height:48px;
        padding:12px 15px 11px 20px;
    }

    .pn-agri-grid{
        padding:10px !important;
    }

    .pn-agri-main{
        min-height:260px;
    }

    .pn-agri-item{
        grid-template-columns:100px 1fr;
    }
}