*,
*::before,
*::after{box-sizing:border-box}
html{line-height:1.15}
body,h1,h2,h3,h4,h5,h6,p,ul,li,figure,figcaption{margin:0;padding:0}

body{
  font-family:sans-serif;
  font-size:1rem;
  color:#ffc77f;
  font-weight:300;
  background-color:#000;
  overflow-x:hidden;
}

/* ลิงก์เป็นสีน้ำเงินตามผลลัพธ์เดิม */
a{text-decoration:none;outline:none;color:blue}

.container{
  width:100%;
  margin-left:auto;
  margin-right:auto;
  padding-left:15px;
  padding-right:15px;
  max-width:100%;
}
@media (min-width:576px){.container{max-width:540px}}
@media (min-width:768px){.container{max-width:720px}}
@media (min-width:992px){.container{max-width:960px}}
@media (min-width:1200px){.container{max-width:1140px}}
@media (min-width:1400px){.container{max-width:1600px}}

.row{
  display:flex;
  flex-wrap:wrap;
  margin-right:-8px;
  margin-left:-8px;
}
.row>[class^="col-"]{
  position:relative;
  width:100%;
  min-height:1px;
  padding-right:8px;
  padding-left:8px;
  flex-grow:1;
  flex-shrink:1;
  flex-basis:0;
  max-width:100%;
}

/* 12 columns */
.col-1{flex:0 0 8.3333%;max-width:8.3333%}
.col-2{flex:0 0 16.6667%;max-width:16.6667%}
.col-3{flex:0 0 25%;max-width:25%}
.col-4{flex:0 0 33.3333%;max-width:33.3333%}
.col-5{flex:0 0 41.6667%;max-width:41.6667%}
.col-6{flex:0 0 50%;max-width:50%}
.col-7{flex:1 1 65%;max-width:65%}
.col-8{flex:0 0 66.6667%;max-width:66.6667%}
.col-9{flex:0 0 75%;max-width:75%}
.col-10{flex:0 0 83.3333%;max-width:83.3333%}
.col-11{flex:0 0 91.6667%;max-width:91.6667%}
.col-12{flex:0 0 100%;max-width:100%}

/* grid collapse for bootstrap-like rows only */
@media (max-width:768px){
  .row>[class^="col-"]{flex:0 0 100%;max-width:100%}
}

/* =========================
   HEADER
   ========================= */
header{width:100%;height:75px;background-color:#fff}
header .logo{width:250px;height:auto;margin-top:20px}
header .logo img{max-width:100%;height:auto}
header .search-header{text-align:right}
header .search-header .search-form{margin-top:-35px}
header .search-header .search-form label{margin-right:5px}

header .search-header .search-form input[type="search"]{
  width:200px;height:30px;background-color:#f3f3f3;
  font-size:16px;border:1px solid #444;padding:5px 10px
}
header .search-header .search-form input[type="submit"]{
  width:80px;height:30px;
  background:url("./images/search-icon.png") top 7px center no-repeat;
  background-size:15px;
  background-color:#707070;
  border:0;padding:5px 10px;outline:none;cursor:pointer;
  transition:all .2s ease-in-out;text-indent:-9999px
}
header .search-header .search-form input[type="submit"]:hover{background-color:#000}

/* =========================
   NAV
   ========================= */
.nav-wrapper{
  width:100%;
  height:auto;
  background-color:#120053;
  padding:10px 0;
  border-bottom:5px solid #fdca02
}
.nav-wrapper nav .select-cate{display:none}
.nav-wrapper nav ul{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  list-style:none;
  padding:0;
  margin:0
}
.nav-wrapper nav ul li{
  background-color:#b10000;
  padding:5px;
  border-radius:5px
}
.nav-wrapper nav ul li a{
  color:#fff;
  font-size:inherit;
  font-weight:700;
  transition:color .2s ease-in-out,background-color .2s ease-in-out
}
.nav-wrapper nav ul li a:hover{color:#cbcbcb}
.nav-wrapper nav ul li:last-child{margin-right:0}

.nav-wrapper .hamberger{
  display:none;
  cursor:pointer;
  position:absolute;
  right:15px;
  top:13px
}
.nav-wrapper .hamberger .bar1,
.nav-wrapper .hamberger .bar2,
.nav-wrapper .hamberger .bar3{
  width:30px;height:3px;background-color:#fff;margin:4px 0;transition:.2s
}
.nav-wrapper .hamberger.change .bar1{
  width:25px;
  transform:rotate(-45deg) translate(-5px,4px);
  transition:transform .3s ease-in-out
}
.nav-wrapper .hamberger.change .bar2{opacity:0}
.nav-wrapper .hamberger .bar3{transition:transform .3s ease-in-out}
.nav-wrapper .hamberger.change .bar3{
  width:25px;
  transform:rotate(45deg) translate(-5px,-5px)
}

/* =========================
   LISTING PAGES (Unified)
   Mobile: 1 col | Tablet: 3 col | Desktop: 4 col
   ========================= */
:is(.homepage,.archive-page,.archive,.single-list,.search-page) .list-box-wrapper{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  width:100%;
  height:auto;
  margin:0 -6px;
}
:is(.homepage,.archive-page,.archive,.single-list,.search-page) .list-box-wrapper .col-3.list-box-item{
  box-sizing:border-box;
  padding:6px;
  display:flex;
  flex:0 0 25%;
  max-width:25%;
  margin:0;
}

/* ให้พื้นขาวเต็ม และการ์ดสูงเท่ากัน */
:is(.homepage,.archive-page,.archive,.single-list,.search-page) .list-box-wrapper .col-3.list-box-item > a.list-link{
  display:flex;
  flex-direction:column;
  width:100%;
  height:100%;
  background:#fff;
  border-radius:5px;
  overflow:hidden;
  text-decoration:none;
}

/* ถ้าในบางหน้าไม่มี a.list-link ให้การ์ดก็ยังสวย */
:is(.homepage,.archive-page,.archive,.single-list,.search-page) .list-box{
  width:100%;
  background-color:#fff;
  padding:3px;
  border-radius:5px;
  transition:all .2s ease-in-out;
}
:is(.homepage,.archive-page,.archive,.single-list,.search-page) .list-box:hover{box-shadow:0 0 15px #aaa}
:is(.homepage,.archive-page,.archive,.single-list,.search-page) .list-box::after{display:table;clear:both;content:""}

:is(.homepage,.archive-page,.archive,.single-list,.search-page) .list-box-inner{
  position:relative;
  height:100%;
  display:flex;
  flex-direction:column;
}

:is(.homepage,.archive-page,.archive,.single-list,.search-page) .list-thumbnail{
  width:100%;
  height:auto;
  overflow:hidden;
  margin-bottom:4px;
  background-color:#c5c5c5;
}
:is(.homepage,.archive-page,.archive,.single-list,.search-page) .list-thumbnail img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:3/2;
  object-fit:cover;
}

:is(.homepage,.archive-page,.archive,.single-list,.search-page) .list-title{
  font-size:.9em;
  font-weight:700;
  color:#000;
  margin:0;
  padding:6px;
  text-align:center;
  background:#fff;
  flex:1;
}

h2.list-title,h4.list-title{text-align:center}

/* Tablet: 3 columns */
@media (max-width:1024px){
  :is(.homepage,.archive-page,.archive,.single-list,.search-page) .list-box-wrapper .col-3.list-box-item{
    flex:0 0 33.3333%;
    max-width:33.3333%;
  }
}

/* Mobile: 1 column */
@media (max-width:767px){
  :is(.homepage,.archive-page,.archive,.single-list,.search-page) .list-box-wrapper .col-3.list-box-item{
    flex:0 0 100%;
    max-width:100%;
  }
}

/* =========================
   COUNTER / PAGINATION
   ========================= */
.count1{
  width:100%;
  font-size:20px;
  font-weight:600;
  background:#bb0000;
  text-align:center;
  border-style:groove;
  border-color:#00ff8f;
  border-radius:3px;
  color:#fff;
}
.pagination{
  width:100%;
  margin-top:2px;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  padding:7px 0;
}
.pagination a{margin-bottom:5px}
.pagination .page-numbers{
  float:left;
  min-width:30px;
  margin:3px;
  font-weight:400;
  text-align:center;
  color:#555;
  transition:all .2s ease-in-out;
  padding:5px 10px;
  background-color:#fff;
  border-radius:10px;
  border:1px solid #3a3939;
}
.pagination .page-numbers:last-child{margin-right:0}
.pagination .page-numbers:hover,
.pagination .page-numbers.current{
  color:#fff;
  background-color:#707070;
}

/* page wrappers */
.homepage,.archive-page,.single-page,.search-page{width:100%;padding:5px}

/* เดิมใช้ .archive (ไม่ใช่ .archive-page) เลยคงไว้ */
.archive .title{
  width:100%;
  text-align:center;
  margin-bottom:5px;
}
.archive .title h1{font-size:1.2em;font-weight:500}

/* =========================
   SINGLE PAGE
   ========================= */
.single-page{width:100%}
.single-page .show{
  width:100%;
  background-color:#fff;
  border:3px solid #e4e4e4;
  padding:10px;
  border-radius:7px;
}
/*
.single-page .show h1{
  color:red;
  font-size:1.3em;
  font-weight:700;
}
*/

.single-page .container h1{
  color:red;
  font-size:1.3em;
  font-weight:700;
  text-align: center;
}

.single-page .show .user::after,
.single-page .show .cate::after,
.single-page .show .tags::after{display:table;clear:both;content:""}
.single-page .show .user{margin-top:5px}
.single-page .show .user,
.single-page .show .cate{
  font-size:1.1em;
  color:#000;
  font-weight:700;
  line-height:30px;
  margin-bottom:5px;
}
.single-page .show .user span,
.single-page .show .cate span{font-weight:500}
.single-page .show .user a,
.single-page .show .cate a{
  color:#990101;
  text-decoration:underline;
}
.single-page .show .tags{margin-top:8px}
.single-page .show .tags a{
  font-size:1.1em;
  color:#fff;
  display:inline-block;
  background-color:#00317a;
  padding:5px;
  margin:0 5px 5px 0;
  border-radius:5px;
  transition:all .2s ease-in-out;
  font-weight:700;
}
.single-page .show .x-content{color:#fff;font-weight:700;margin-top: 5px;line-height:20px;background-color: #000;padding: 5px;}

.video-box{position:relative;overflow:hidden;width:100%;padding-top:56.5%}
.video-box iframe{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%}

.titlex{background-color:#f0f0f1;border-radius:inherit;color:#000;padding:5px;margin-bottom:5px;font-size:14px}
.datex{font-size:1.1em;color:#000;font-weight:700;line-height:30px}

.tagrow{display:flex;justify-content:center;width:100%;align-items:center;flex-wrap:wrap;padding-bottom:10px;padding-top:5px}
span.tagx a{
  font-size:14px;
  background:blue;
  color:#fff;
  margin:3px;
  padding:3px;
  float:left;
  border-radius:7px;
  font-weight:700;
}
span.tagx2 a{
  font-size:14px;
  background:#00517f;
  color:#fff;
  margin:3px;
  padding:3px;
  float:left;
  border-radius:7px;
  font-weight:700;
}
.single-page .show .tags .textstar a{background:#ff006a}
.single-page .show .tags .textstudio a{background:#0e4401}
.single-page .show .tags .cattx a{background:#840000}

article{width:100%}
p.content{font-weight:700;color:red;font-size:1rem}
.single-page .show .tags a:last-child{margin-right:0}
.single-page .show .tags a:hover{background-color:#000}

.single-page .sidebar{width:100%}
.single-page .sidebar .list{
  display:flex;
  align-items:center;
  gap:15px;
  width:100%;
  margin-bottom:10px;
  padding-bottom:7px;
  border-bottom:1px solid #fff;
}
.single-page .sidebar .list:last-child{border-bottom:0}
.single-page .sidebar .list .thumbnail{
  width:120px;
  height:93px;
  background-color:#fff;
  overflow:hidden;
  border:1px solid #e4e4e4;
  padding:5px;
  border-radius:5px;
}
.single-page .sidebar .list .thumbnail img{width:100%;height:auto;transition:all .2s ease-in-out}
.single-page .sidebar .list .thumbnail:hover img{transform:scale(1.2)}
.single-page .sidebar .list .title{
  position:relative;
  width:300px;
  font-size:.9em;
  font-weight:400;
  color:#707070;
  transition:all .2s ease-in-out;
  padding-top:10px;
}
.single-page .sidebar .list .title::before{
  content:"";
  display:block;
  width:15px;
  height:15px;
  background-color:#707070;
  margin-bottom:5px;
  transition:all .2s ease-in-out;
}
.single-page .sidebar .list .title:hover{color:#000}
.single-page .sidebar .list .title:hover::before{background-color:#000}

.single-list{margin-bottom:5px;padding-top:5px}
.single-list .top-title{
  font-size:1.3em;
  font-weight:700;
  text-align:center;
  color:#fff;
  background-color:blue;
  padding:2px;
}

.page-not-found{width:100%;text-align:center;padding:25px 0}
.page-not-found .title{font-size:3em}

header .col-6{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}

footer{
  padding:10px 0;
  text-align:center;
  background-color:#e4e4e4;
  border-top:1px solid #ddd;
  border-bottom:1px solid #c5c5c5;
}

/* =========================
   RESPONSIVE: general (non-listing)
   ========================= */
@media screen and (max-width:1024px){
  .single-page{padding:5px}
  .single-page .col-7{flex:0 0 100%;max-width:100%}
  .single-page .sidebar{display:none}
}
@media screen and (max-width:530px){
  .pagination{width:99%;margin:2px auto 0}
}

@media screen and (max-width:767px){
  header{height:auto}
  header .logo{
    margin-top:10px;
    float:left;
    margin-left:0;
    width:150px;
  }
  header .search-header{margin-top:15px}
  header .search-header .search-form{
    margin-top:0;
    width:100%;
    margin-bottom:5px;
  }
  header .search-header .search-form input[type="search"]{width:80%}
  header .search-header .search-form input[type="submit"]{width:80px}

  .nav-wrapper{min-height:40px;position:relative}
  .nav-wrapper nav .select-cate{display:block;color:#fff;font-weight:700}
  .nav-wrapper nav ul{display:none}
  .nav-wrapper nav.open{height:100%}
  .nav-wrapper nav.open ul{
    width:100%;
    margin-top:15px;
    display:block;
  }
  .nav-wrapper nav.open ul li{
    width:100%;
    text-align:center;
    border-bottom:1px solid #828282;
    padding-bottom:4px;
    margin-bottom:4px;
  }
  .nav-wrapper .hamberger{
    position:absolute;
    display:block;
    top:0;
    right:10px;
    margin-top:-5px;
  }

  .single-page .show{margin-bottom:1px}
  .archive-page .title{text-align:center}
}

.rowx{margin-right:8px;margin-left:8px}

@media screen and (max-width:639px){
  .nav-wrapper{
    min-height:30px;
    position:fixed;
    top:2px;
    z-index:999;
    padding:5px 0;
    border-bottom:none;
    width:65%;
    right:1px;
    border-radius:4px;
  }
  .nav-wrapper .hamberger{margin-top:-3px;right:15px}
  .nav-wrapper nav .select-cate{margin-left:10px}

  header .logo img{height:25px}
  header .logo{
    margin-top:4px;
    float:left;
    margin-left:5px;
    width:100px;
    z-index:9999;
  }
  header .search-header{margin-top:35px}
  header .search-header .search-form input[type="submit"]{
    width:13%;
    margin-right:5px;
  }
  header .search-header .search-form{margin-left:0}

  .container{padding-left:10px;padding-right:10px}

  .row>[class^="col-"],
  .row>.col{padding-left:1px;padding-right:1px}

  .single-page .show{padding:2px}
  .single-page .show .user,
  .single-page .show .cate{font-size:.8em}
  .single-page .show h1{font-size:1.2em;line-height:1.3}
  .single-page .show .x-content{font-size:.9em}
  .single-page .show .tags a{font-size:.9em}
  .starx{font-size:.9em}
  .datex{font-size:.8em}
  .studiox{font-size:.9em}
}

.video-badges{text-align:center;background:#32373c;border-radius:inherit;padding:5px;font-size:1.2em;font-weight:700}
.movie-poster{text-align:center;margin:4px}
.movie-poster img{max-width:100%;height:auto}

/* =========================
   ADS
   ========================= */
img.ads728x130{max-width:100%;height:auto}
img.ads728{max-width:49%;height:auto}
img.ads140s{width:140px;height:250px}

#slider-r{
  width:140px;
  right:3px;
  position:fixed;
  top:160px;
  text-align:center;
  line-height:0;
}
#slider-l{
  width:140px;
  left:3px;
  position:fixed;
  top:160px;
  text-align:center;
  line-height:0;
}
img.ads300s{width:300px;height:100px}
#slider-f{
  width:300px;
  right:30px;
  left:0;
  bottom:5px;
  margin:0 auto;
  position:fixed;
  text-align:center;
  line-height:0;
}
.xcc{width:30px;height:100px;position:absolute;left:100%;top:0}
img.close{height:auto}

@media (min-width:768px) and (max-width:959px){
  img.ads728{max-width:40%;height:auto}
  img.ads140s{width:120px;max-height:200px}
  #slider-r{width:120px;top:130px}
  #slider-l{width:120px;top:130px}
}
@media (min-width:640px) and (max-width:767px){
  img.ads728{max-width:40%;height:auto}
  img.ads140s{width:100px;max-height:200px}
  #slider-r{width:100px;top:120px}
  #slider-l{width:100px;top:120px}
}
@media (min-width:319px) and (max-width:639px){
  img.ads728{max-width:95%;height:auto}
  img.ads728x130{max-width:98%;height:auto}
  img.ads140s{width:90px;max-height:150px}
  #slider-r{width:90px;top:72px}
  #slider-l{width:90px;top:72px}
  img.ads300s{width:250px;max-height:80px}
  #slider-f{width:250px}
  .xcc{width:25px;height:80px}
}
@media (max-width:318px){
  img.ads728,
  img.ads728x130,
  img.ads140s,
  img.ads300s,
  #slider-r,
  #slider-l,
  #slider-f,
  .xcc{display:none}
}

#ads-header,#ads-footer,#ads-single{text-align:center}

#ads-player-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:0;
  pointer-events:none;
  width:70%;
  left:15%;
}
#ads-player-overlay .player-overlay-box{
  position:relative !important;
  width:400px;
  max-width:min(92vw,400px);
  pointer-events:auto;
}
#ads-player-overlay .player-overlay-box img{
  display:block;
  width:100%;
  height:auto;
  border-radius:10px;
  box-shadow:0 12px 28px rgba(0,0,0,.35);
}
#ads-player-overlay .player-overlay-box .dd-overlay-close{
  position:absolute;
  top:-35px;
  right:-5px;
  width:35px;
  height:35px;
  border-radius:999px;
  background:#e53935;
  border:3px solid #fff;
  color:#fff;
  font-size:32px;
  font-weight:900;
  cursor:pointer;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:center;
}

.share-buttons{text-align:center;}

.screen-reader-text{display:none}

.home-intro {
  margin: 0px 10px 10px;
  color: #fff;
}

.home-intro h1 {
  font-size: 17px;
  line-height: 1.1;
  margin: 0 0 5px;
  color: #fff;
  background-color: #8d0000;
  text-align: center;
  padding: 5px;
}

.home-intro p {
  margin: 0 0 12px;
  line-height: 1.1;
  color: #ddd;
}

.home-intro a {
  color: #8ec5ff;
}

.home-intro-body p{margin:0 0 12px;line-height:1.7;color:#ddd}.home-intro-body a{color:#8ec5ff}

.list-box-item .list-box .list-title,
.list-box-item .list-title,
h2.list-title {
  display: block !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  height: 2.8em !important;     /* ล็อกความสูงพอดี 2 บรรทัด (1.4 x 2) */
  max-height: 2.8em !important;
  margin: 0 !important;
  padding: 4px 6px 0 !important;
  word-break: break-word !important;
  box-sizing: content-box !important;
}