/*
 * ThEP – site CSS (Biogenix child theme)
 * Survives Biogenix theme updates.
*/

@font-face {
  font-family: "SukhumvitSet-Text";
  src: url('/wp-content/uploads/2024/01/SukhumvitSet-Text.ttf') format('truetype');
  font-display: swap;
}

html body,
html h1,
html h2,
html h3,
html h4,
html h5,
html h6,
html a,
html p,
html generic,
html textbox,
html div,
html input,
html li,
html label,
html button,
html rs-layer,
html textarea,
html .sub-title {
  font-family: 'SukhumvitSet-Text' !important;
}

.auto-container {
  position: static;
  max-width: 1440px;
  padding: 0px 16px;
  margin: 0 auto;
}

/* ===== Header Style 1 – the active header) ===== */
@media (min-width:1201px){
  /* Raise the menu closer to the logo */
  html body.thep-header-v1 header.main-header.header-style-one .header-top{display:none!important}
  html body.thep-header-v1 header.main-header.header-style-one .logo-box{margin-bottom:-8px!important}
  /* Menu font size/weight as in Style 6 */
  html body.thep-header-v1 header.main-header .main-menu .navigation>li>a{font-size:clamp(15px,1.1vw,17px)!important;font-weight:600!important;letter-spacing:.1px}
  html body.thep-header-v1 header.main-header .main-menu .navigation>li>ul>li>a{font-size:15.5px!important;font-weight:500!important}
}
/* Mobile/tablet: logo and menu button on one row, vertically centred */
@media (max-width:1200px){

  html body.thep-header-v1 header.main-header.header-style-one .header-top{display:none!important}
  html body.thep-header-v1 header.main-header.header-style-one .logo-box{position:relative!important;left:auto!important;top:auto!important;padding:0!important;margin:0!important;text-align:left!important;flex:0 0 auto}
  html body.thep-header-v1 header.main-header.header-style-one .header-lower{padding:0!important;flex:0 0 auto}
  html body.thep-header-v1 header.main-header.header-style-one .header-lower .auto-container{padding:0!important}
}
/* Equal side spacing (the logo image has ~22px empty space, so the right side gets extra) */
@media (max-width:1200px){
  html body.thep-header-v1 header.main-header.header-style-one{ display:flex!important;align-items:center!important;justify-content:space-between;padding:10px 20px!important; padding-right:42px!important}
  html body.thep-header-v1 header.main-header.header-style-one .mobile-nav-toggler{ margin:0!important;float:none!important; padding-right:0!important}
}
@media (max-width:1200px){
  html body.thep-header-v1 header.main-header.header-style-one .header-lower .outer-box{ display:flex!important;align-items:center!important;padding:0!important; gap:22px!important}
  html body.thep-header-v1 header.main-header.header-style-one .menu-right-content{margin:0!important;padding:0!important}
}
/* ===== End of header-v1.css ===== */

/* ===== themes css custom ===== */

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery .gallery-item { width: auto; height: auto; margin: 0; }
.gallery .gallery-item img { width: 100%; height: auto; display: block; }

#lightcase-case {
	top: 50% !important; left: 50% !important; margin: 0 !important;
	transform: translate(-50%, -50%) !important;
	width: auto !important; height: auto !important; max-width: none !important;
}
#lightcase-case .lightcase-contentInner {
	width: min(90vw, 1000px) !important; height: auto !important;
	max-width: none !important; overflow: hidden !important;
}
#lightcase-case .lightcase-contentInner img {
	width: 100% !important; height: auto !important; max-width: 100% !important;
	max-height: calc(100vh - 100px) !important; object-fit: contain; display: block;
}

/* Single post: spacing under the title (font size lives in "Responsive heading sizes" below) */
.single-post .page-title h1 {
	margin-bottom: 60px;
}

/* Prev/Next post: clamp long titles to 2 lines */
.blog-details-content .post-nav-btn .single-btn h5 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 16px;
	line-height: 1.5;
}

/* Top spacing of page/post titles to fit the header height (logo + menu) per breakpoint */
.page-title {
	padding-top: 215px !important;
}
@media only screen and (max-width: 1199px) {
	.page-title { padding-top: 140px !important; }
}
@media only screen and (max-width: 767px) {
	.page-title { padding-top: 130px !important; }
}

/* Submenu: put the > arrow at the menu's right edge (li has 30px side padding) */
.main-menu .navigation > li > ul > li.dropdown > a:after,
.main-menu .navigation > li > ul > li > ul > li.dropdown > a:after {
	right: -10px;
}

/* sidebar-banner widget outside .service-sidebar */
.blog-sidebar .sidebar-banner .inner-box{
  position: relative;
  display: block;
  background: var(--thm-secnd);
  padding: 20px 30px 40px 30px;
}

.blog-sidebar .sidebar-banner .logo{
  position: relative;
  display: block;
  margin-bottom: 8px;
  z-index: 1;
}

.blog-sidebar .sidebar-banner .image-box{
  position: relative;
  display: block;
  margin-left: 34px;
  max-width: 256px;
  margin-bottom: 12px;
}

.blog-sidebar .sidebar-banner .image-box .image{
  position: relative;
  display: block;
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.blog-sidebar .sidebar-banner .image-box .image img{
  width: 100%;
}

.blog-sidebar .sidebar-banner .image-box .icon-box{
  position: absolute;
  left: -41px;
  bottom: 30px;
  display: inline-block;
  width: 80px;
  height: 70px;
  line-height: 80px;
  text-align: center;
  font-size: 40px;
  color: #fff;
  z-index: 1;
}

.blog-sidebar .sidebar-banner h3{
  position: relative;
  display: block;
  font-size: 24px;
  line-height: 34px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 4px;
  z-index: 1;
}

.blog-sidebar .sidebar-banner p{
  color: #d1dbe5;
  margin-bottom: 22px;
  z-index: 1;
}

.blog-sidebar .sidebar-banner .shape .shape-1{
  position: absolute;
  left: 0px;
  top: 0px;
  width: 228px;
  height: 140px;
  background-repeat: no-repeat;
  z-index: 1;
}

.blog-sidebar .sidebar-banner .shape .shape-2{
  position: absolute;
  right: 0px;
  bottom: 63px;
  width: 123px;
  height: 276px;
  background-repeat: no-repeat;
  z-index: 1;
}
.blog-sidebar .sidebar-banner .image-box:before{ position: absolute;
  content: '';
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  left: -1px;
  top: -1px;
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); 
	background: var(--thm-base);
}

.blog-sidebar .sidebar-banner .image-box .icon-box:before{ position: absolute;
  content: '';
  width: 80px;
  height: 70px;
  left: 0px;
  top: 0px;
  z-index: -1;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  transform: rotate(90deg); 
	background: var(--thm-base);
}

.blog-classic-content .news-block-one .inner-box .image-box .image img{width:100%;aspect-ratio:1170/440;object-fit:cover;display:block}
.news-block-one .lower-content .text p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.news-block-one .inner-box .lower-content h3 a{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media only screen and (max-width:991px){.news-style-two .news-block-one .inner-box .lower-content h3{font-size:20px;line-height:1.5}}
.news-style-two .news-block-one .inner-box .lower-content h3,.news-block-one .inner-box .lower-content h3{ font-size:20px;line-height:1.5; font-size:18px!important;line-height:1.5!important}
.news-block-one .inner-box h2 a{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.news-block-one .inner-box h2{ font-size:20px!important;line-height:1.5!important; font-weight:700!important}
.news-block-one .inner-box .lower-content h3{font-weight:700!important}
.news-block-two .inner-box .lower-content h3{font-weight:700!important;font-size:20px!important;line-height:1.5!important}
.service-block-one .inner-box .image-box .icon-box:before{background:#f5f5f5}
.service-block-one .inner-box .image-box .icon-box{color:var(--thm-base)}

/* visible grid lines for tables in post content */
.single-post .text table{border-collapse:collapse!important;width:100%;max-width:100%}
.single-post .text table th,.single-post .text table td{border:1px solid #cfd4da!important;padding:8px 12px!important;vertical-align:middle}
@media(max-width:767px){.single-post .text table{display:block;overflow-x:auto}}

/* ===== Header / menu / titles ===== */
/* Header (>=1200px): logo centred above a centred menu, not overlapping the slider – Header Style 1 only (body.thep-header-v1) */
@media (min-width: 1200px) {
  .thep-header-v1 .header-style-one .logo-box {
    position: relative;
    display: block;
    left: 0;
    top: 0;
    padding-top: 4px;
    text-align: center;
    line-height: 0;
  }
  .thep-header-v1 .header-style-one .header-lower .outer-box {
    justify-content: center;
    gap: 24px;
  }
  .thep-header-v1 .header-style-one .main-menu .navigation > li {
    margin: 0 10px;
  }
  .thep-header-v1 .header-style-one .main-menu .navigation > li > a {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .thep-header-v1 .header-style-one .main-menu .navigation > li > a::before {
    top: 12px;
  }
}

/* Home slider: equal slide heights (different text lengths left gaps while sliding) */
.banner-carousel .owl-stage { display: flex; }
.banner-carousel .owl-item { display: flex; }

/* Home slider: text vertically centred between the header and the overlapping cards (padding-top = header height, padding-bottom = 94px card overlap) */
.banner-style-three .banner-carousel .slide-item {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  padding: 140px 0 94px !important;
  min-height: 860px;
}

@media (max-width: 767px) {
  .banner-style-three .banner-carousel .slide-item { padding: 120px 0 94px !important; min-height: 640px; }
}

/* ===== Home slider: UX/UI tweaks ===== */
/* Background: dark gradient in the middle for white-text contrast */
.banner-style-three .banner-carousel .slide-item::before {
  background: radial-gradient(ellipse at center, rgba(0, 20, 40, 0.62) 0%, rgba(0, 20, 40, 0.45) 60%, rgba(0, 20, 40, 0.3) 100%) !important;
  opacity: 1 !important;
}
/* Title: responsive size, bolder, limited line length */
.banner-style-three .banner-carousel .content-box h2 {
  /*font-size: clamp(24px, 0.8rem + 2.4vw, 52px);
  line-height: 1.3;
  font-weight: 500;
  max-width: 900px;
  text-wrap: balance;*/
  margin: 0 auto 32px !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.banner-style-three .banner-carousel .content-box p {
  font-size: clamp(15px, 0.85rem + 0.3vw, 19px);
  line-height: 1.5;
  letter-spacing: 0.02em;
  opacity: 0.92;
  margin-bottom: 12px !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}
@media (max-width: 767px) {
  .banner-style-three .banner-carousel .content-box h2 { margin-bottom: 24px !important; }
}
/* Side padding so text doesn't sit under the arrows */
@media (min-width: 768px) and (max-width: 1699px) {
  .banner-style-three .banner-carousel .content-box {
    padding: 0 110px;
    box-sizing: border-box;
  }
}

/* Gradient behind logo and menu for white-text readability */
.thep-header-v1 .header-style-one {
  background: linear-gradient(to bottom, rgba(0, 20, 40, 0.65) 0%, rgba(0, 20, 40, 0.35) 60%, rgba(0, 20, 40, 0) 100%);
  padding-bottom: 20px;
}

/* Dropdown arrow as a chevron */
.main-header .main-menu .navigation > li.dropdown > a::before {
  content: "\f078" !important;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  font-size: 10px !important;
}

/* Wider submenus (fewer wrapped lines) */
.main-header .main-menu .navigation > li > ul {
  width: 400px;
}
.main-header .main-menu .navigation > li > ul > li > ul {
  width: 340px;
  left: 100%;
}
.main-header .main-menu .navigation > li:last-child > ul {
  left: auto;
  right: 0;
}

/* Submenu item of the current page uses the active menu colour */
.main-header .main-menu .navigation li ul li.current-menu-item > a,
.main-header .main-menu .navigation li ul li.current-menu-ancestor > a,
.main-header .main-menu .navigation li ul li.current-menu-parent > a {
  color: rgb(198, 169, 32) !important;
}

/* ===== Responsive heading sizes + Thai line heights ===== */

.page-title .content-box h1 {
  font-size: clamp(28px, 1rem + 2.6vw, 54px) !important;
  line-height: 1.3 !important;
}
/* Post title (longer, so slightly smaller) */
.single-post .page-title .content-box h1 {
  font-size: clamp(24px, 0.9rem + 1.8vw, 42px) !important;
  line-height: 1.35 !important;
}

.sec-title h2 {
  font-size: clamp(28px, 1rem + 2.4vw, 50px) !important;
  line-height: 1.3 !important;
}

.inner-box h3:not(.thep-bl-style-title-list h3), .single-item h3, .lower-content h3, .news-block-one h3 {
  font-size: clamp(18px, 0.95rem + 0.45vw, 24px) !important;
  line-height: 1.45 !important;
}

.widget-title h3, h3.widget-title, .widget-title {
  font-size: clamp(18px, 1rem + 0.35vw, 24px) !important;
  line-height: 1.4 !important;
}

.single-post .text h2, .single-post .entry-content h2 { font-size: clamp(22px, 1rem + 1vw, 32px); line-height: 1.4; }
.single-post .text h3, .single-post .entry-content h3 { font-size: clamp(20px, 1rem + 0.6vw, 26px); line-height: 1.45; }
.single-post .text h4, .single-post .entry-content h4 { font-size: clamp(18px, 1rem + 0.3vw, 22px); line-height: 1.5; }
.single-post .text p { line-height: 1.7; }
/* Elementor headings: cap sizes on tablet/mobile */
.elementor-heading-title { line-height: 1.35 !important; }
@media (max-width: 1024px) {
  .elementor-widget-heading h2.elementor-heading-title { font-size: 30px !important; }
  .elementor-widget-heading h3.elementor-heading-title { font-size: 21px !important; }
}
@media (max-width: 767px) {
  .elementor-widget-heading h2.elementor-heading-title { font-size: 25px !important; }
  .elementor-widget-heading h3.elementor-heading-title { font-size: 19px !important; }
}

/* Post cards: equal heights, same image ratio */
.news-block { display: flex; }
.news-block .news-block-one { display: flex; flex: 1 1 auto; width: 100%; }
.news-block .news-block-one .inner-box { display: flex; flex-direction: column; width: 100%; }
.news-block .news-block-one .image-box .image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.news-block .news-block-one .lower-content { flex: 1 1 auto; display: flex; flex-direction: column; }
.news-block .news-block-one .lower-content .lower-box { margin-top: auto; }
/* Post card categories: first category + "+N" on one row, click to show all (button built in assets/js/thep.js) */
.news-block-one .lower-content .category {
  top: auto !important;
  bottom: calc(100% - 13px);
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 4px;
  z-index: 3;
}
.news-block-one .lower-content .category:not(.is-open) > .cat-row ~ a { display: none; }
.news-block-one .lower-content .category .cat-row { position: relative; display: inline-flex; }
.news-block-one .lower-content .category .cat-row > a { padding-right: 50px !important; }
.news-block-one .lower-content .category .cat-more {
  position: absolute;
  top: 3px;
  right: 8px;
  height: 20px;
  min-width: 30px;
  padding: 0 6px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: rgb(230, 200, 60);
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  cursor: pointer;
  z-index: 2;
}
.news-block-one .lower-content .category .cat-more:hover,
.news-block-one .lower-content .category .cat-more:focus-visible { color: #fff; outline: none; }
/* Post title: always 2 lines (ellipsis) so dividers and buttons line up */
.news-block .news-block-one .lower-content h3 a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}

/* Post content: paragraph, image and caption spacing */
.single-post .blog-details-content .text p { margin: 0 0 1em; }
.single-post .blog-details-content .text ul,
.single-post .blog-details-content .text ol { margin: 0 0 1em; }
.text p.is-spacer { display: none; } /* Empty paragraphs used as spacers (class added by assets/js/thep.js) */
.single-post .blog-details-content .text p:has(img) { margin: 1.75em 0 0.75em; line-height: 0; }
.single-post .blog-details-content .text p:has(img) img { margin: 0 8px 8px 0; vertical-align: top; }
.single-post .blog-details-content .text p:has(img) + p:has(em, i) {
  font-size: 15px;
  line-height: 1.6;
  color: #6b6f73;
  margin-bottom: 1.75em;
}
.single-post .blog-details-content .content-one > .image-box { margin-bottom: 30px; }

/* Post content: darker text (contrast ~8:1, WCAG AA) */
.single-post .blog-details-content .text,
.single-post .blog-details-content .text p,
.single-post .blog-details-content .text li { color: #4a4f54; }

/* Post banner: category bar wraps as a whole instead of breaking */
.page-title .post-info li.category {
  display: flex;
  flex-wrap: wrap;
  justify-content: inherit;
  gap: 8px 26px;
}
.page-title .post-info li.category a {
  display: inline-block;
  position: relative;
  white-space: nowrap;
  max-width: calc(100vw - 60px);
  overflow: visible;
}

/* Post content: ul/ol markers, item spacing, paragraph line height */
.single-post .blog-details-content .text ul { list-style: disc; padding-left: 1.4em; }
.single-post .blog-details-content .text ol { list-style: decimal; padding-left: 1.6em; }
.single-post .blog-details-content .text ul li,
.single-post .blog-details-content .text ol li { list-style: inherit; line-height: 1.7; margin-bottom: 0.5em; padding-left: 0.2em; }
.single-post .blog-details-content .text li::marker { color: rgb(198, 169, 32); }

/* Biogenix Blog List (and same markup): no sidebar → full width (the plugin hard-codes col-lg-8) */
.sidebar-page-container .row > .content-side:only-child { flex: 0 0 100%; max-width: 100%; }

/* Language switcher: dropdown aligned right under the button, arrow pointing at it */
html body .main-header .main-menu .navigation > li.trp-language-switcher-container{position:relative!important}
html body .main-header .main-menu .navigation > li.trp-language-switcher-container > ul{left:auto!important;right:0!important;width:160px!important;min-width:0!important}
html body .main-header .main-menu .navigation > li.trp-language-switcher-container > ul::after{left:auto!important;right:36px!important}

/* Footer: bottom bar (theme hard-codes #1C1E40 in style.css) */
.footer-bottom-three { background-color: #212529; }

/* Footer: links – theme colour #D1DBE5, normal weight */
.footer-style-three .footer-widget ul li a,
.footer-style-three .footer-widget ol li a { font-weight: 400; }

/* Footer: link hover (theme uses green #38AB30 in custom.css) */
.footer-style-three .footer-widget ul li a:hover,
.footer-style-three .footer-widget ol li a:hover,
.footer-style-three .footer-widget ul li a:focus-visible,
.footer-style-three .footer-widget ol li a:focus-visible { color: #ffd236; }

/* Sticky header (Header Style 1): menu + search centred like the normal header, 68px tall */
@media (min-width: 1200px) {
  .thep-header-v1 .sticky-header .outer-box { justify-content: center; gap: 24px; }
  .thep-header-v1 .sticky-header .main-menu .navigation > li > a { padding-top: 19px !important; padding-bottom: 19px !important; }
  .thep-header-v1 .sticky-header .main-menu .navigation > li > a::before { top: 19px !important; }
}

/* Biogenix Blog Col 3 cards follow BIOGENIX Options > Blog Page Settings (body classes from functions.php) */
.thep-list-hide-date [data-widget_type="biogenix_blog_col_3.default"] .news-block-one .post-info li:nth-child(1),
.thep-list-hide-author [data-widget_type="biogenix_blog_col_3.default"] .news-block-one .post-info li:nth-child(2),
.thep-list-hide-comments [data-widget_type="biogenix_blog_col_3.default"] .news-block-one .comments-box { display: none !important; }
.thep-list-hide-author [data-widget_type="biogenix_blog_col_3.default"] .news-block-one .post-info li:nth-child(1)::before { display: none; }
.thep-list-hide-date.thep-list-hide-author [data-widget_type="biogenix_blog_col_3.default"] .news-block-one .post-info { display: none; }

/* Category/tag/archive pages: 3-column cards */
.archive .blog-classic-content > .thm-unit-test {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}
.archive .blog-classic-content > .thm-unit-test > * { display: flex; margin: 0; }
.archive .blog-classic-content .news-block-one { display: flex; flex: 1 1 auto; width: 100%; margin: 0 !important; }
.archive .blog-classic-content .news-block-one .inner-box { display: flex; flex-direction: column; width: 100%; }
.news-block-one .image-box img { width: 100% !important; height: auto !important; aspect-ratio: 16 / 10 !important; object-fit: cover; }
.archive .blog-classic-content .news-block-one .lower-content { flex: 1 1 auto; display: flex; flex-direction: column; }
.archive .blog-classic-content .news-block-one .lower-content .lower-box { margin-top: auto; }
.archive .blog-classic-content .news-block-one .lower-content h3 a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.archive .blog-classic-content .news-block-one .lower-content h3 + p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* With sidebar → 2 columns */
.archive .row:has(> .sidebar-side) .blog-classic-content > .thm-unit-test { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 991px) { .archive .blog-classic-content > .thm-unit-test { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .archive .blog-classic-content > .thm-unit-test { grid-template-columns: 1fr; } }
.news-block-one .lower-box .social-links:not(:has(li)) { display: none; } /* Leftover divider when there are no share buttons */

/* Pages (.text): paragraph spacing (the theme widget sets margin 0) */
.text > p + p,
.text > p + ul,
.text > ul + p { margin-top: 1em; }

/* Biogenix About Us: hide empty items (only "01" left) – Elementor can't delete the last repeater item */
.content-box .single-column:has(.single-item > h3:empty):has(.single-item > p:empty) { display: none; }

/* ===== Annual reports [thep_annual_reports] ===== */
.thep-ar { max-width: 1200px; margin: 0 auto; }
.thep-ar-latest { display: flex; align-items: center; gap: 30px; margin-bottom: 70px; }
.thep-ar-latest-cover { flex: 0 0 360px; padding: 24px; border: 1px solid #e6e8eb; border-radius: 10px; background: #fff; }
.thep-ar img.thep-ar-cover { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: 0 10px 25px rgba(0, 0, 0, .12); }
.thep-ar-badge { color: #c6a920; font-size: 15px; font-weight: 500; }
.thep-ar-latest h2 { margin: 6px 0 4px; font-size: clamp(26px, 1rem + 1.4vw, 36px); line-height: 1.3; }
.thep-ar-en { margin: 0 0 20px; color: #6b6f73; }
.thep-ar-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border: 1px solid #d5d8dc; border-radius: 4px; background: #fff; color: #222; font-size: 16px; transition: .2s; }
.thep-ar-btn:hover { border-color: #c6a920; background: #c6a920; color: #fff; }
.thep-ar-heading { margin: 0 0 6px; padding-left: 14px; border-left: 4px solid #c6a920; font-size: clamp(22px, 1rem + .8vw, 28px); line-height: 1.3; }
.thep-ar-hint { margin: 0 0 24px 18px; color: #6b6f73; }
.thep-ar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.thep-ar .thep-ar-item img.thep-ar-cover { aspect-ratio: 1 / 1.414; object-fit: cover; margin-bottom: 16px; }
.thep-ar-item h4 { margin: 0; font-size: 18px; line-height: 1.4; }
.thep-ar-item { display: flex; flex-direction: column; align-items: center; padding: 18px 18px 20px; border: 1px solid #e6e8eb; border-radius: 10px; background: #fff; text-align: center;  transition: box-shadow .25s, transform .25s; }
.thep-ar-item:hover { box-shadow: 0 12px 30px rgba(0, 0, 0, .08); transform: translateY(-3px); }
.thep-ar-item .thep-ar-en { margin: 2px 0 16px; font-size: 14px; }
.thep-ar-item .thep-ar-btn { margin-top: auto; font-size: 15px; padding: 8px 18px; }
@media (max-width: 991px) {
  .thep-ar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .thep-ar-latest { flex-direction: column; text-align: center; }
  .thep-ar-latest-cover { flex-basis: auto; width: min(360px, 100%); }
}
@media (max-width: 600px) { .thep-ar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .thep-ar-item { padding: 12px; } }

/* Blog List – "Title List" layout (replaces the Elementor Pro Posts widget) */
.thep-bl-style-title-list .sidebar-page-container{padding:0 !important;background:none}
.thep-bl-style-title-list .auto-container{max-width:none;padding:0}
.thep-bl-style-title-list .row{margin:0}
.thep-bl-style-title-list .content-side{flex:0 0 100%;max-width:100%;padding:0}
.thep-bl-style-title-list .news-block-two{margin:0 0 20px}
.thep-bl-style-title-list .news-block-two .inner-box{display:block;padding:0 0 8px;margin:0;background:none;box-shadow:none;border:0;border-bottom:1px solid #7c8083;border-radius:0;min-height:0}
.thep-bl-style-title-list .news-block-two .image-inner,
.thep-bl-style-title-list .news-block-two .post-info,
.thep-bl-style-title-list .news-block-two .content-box > p,
.thep-bl-style-title-list .news-block-two .lower-box{display:none !important}
.thep-bl-style-title-list .news-block-two .content-box{padding:0 !important;margin:0 !important;min-height:0 !important;width:auto !important;border:0;background:none;box-shadow:none}
.thep-bl-style-title-list .news-block-two .content-box h3{margin:0 !important;padding:0;font-size:18px;line-height:1.4;font-weight:400}
.thep-bl-style-title-list .news-block-two .content-box h3 a{color:#252525;font:inherit}
.thep-bl-style-title-list .news-block-two .content-box h3 a:hover{color:#C6A920}

/* Prev/Next post: no featured image (theme outputs an empty img src) → same gradient as cards */
.post-nav-btn .image-box:has(img[src=""]){background:radial-gradient(circle at 85% 15%,rgba(255,210,54,.28),rgba(255,210,54,0) 60%),linear-gradient(135deg,#2c4a6e,#0f1c2e)}
.post-nav-btn .image-box img[src=""]{visibility:hidden}

/* Blog List (news-block-two cards): follow Blog Page Settings like Blog Col 3 */
.thep-list-hide-date .news-block-two .post-info li:nth-child(1),
.thep-list-hide-author .news-block-two .post-info li:nth-child(2),
.thep-list-hide-comments .news-block-two .comments-box{display:none}
.thep-list-hide-author .news-block-two .post-info li:nth-child(1)::before{display:none}
/* Divider before the comment icon: not needed without social icons or comments */
.news-block-two .social-links:not(:has(li))::before,
.thep-list-hide-comments .news-block-two .social-links::before{display:none}

/* Elementor Text Editor: paragraph/heading spacing (the theme sets margin 0) */
.elementor-widget-text-editor p{margin:0 0 1em}
.elementor-widget-text-editor :is(h1,h2,h3,h4,h5,h6){margin:0 0 .5em}
.elementor-widget-text-editor * + :is(h2,h3,h4,h5,h6){margin-top:1.2em}
.elementor-widget-text-editor :is(p,ul,ol,h1,h2,h3,h4,h5,h6):last-child{margin-bottom:0}

/* Archive on mobile: single column (also with sidebar, whose 2-column rule is more specific) */
@media (max-width: 599px) {
  .archive .row:has(> .sidebar-side) .blog-classic-content > .thm-unit-test,
  .archive .blog-classic-content > .thm-unit-test { grid-template-columns: 1fr; }
}

/* Social icons (footer and [thep_social] shortcode, align="left|center|right")
   !important because the theme's footer CSS styles li/a more specifically */
ul.thep-social{display:flex !important;flex-wrap:wrap;gap:10px;margin:0 !important;padding:0 !important;list-style:none !important}
ul.thep-social.thep-social-center{justify-content:center}
ul.thep-social.thep-social-right{justify-content:flex-end}
ul.thep-social li{display:block !important;width:auto !important;float:none !important;margin:0 !important;padding:0 !important;list-style:none !important}
ul.thep-social li:before,ul.thep-social li::marker{display:none !important;content:none !important}
.footer-widget ul.thep-social{margin-top:18px !important}

/* Plain (non-Elementor) pages such as the privacy policy: heading/paragraph spacing, list markers */
.page .thm-unit-test > p{margin:0 0 1em}
.page .thm-unit-test > :is(h1,h2,h3,h4,h5,h6){margin:1.6em 0 .5em;line-height:1.35}
.page .thm-unit-test > :first-child{margin-top:0}
.page .thm-unit-test > :is(ol,ul){margin:0 0 1em;padding-left:1.6em}
.page .thm-unit-test > ol > li{list-style:decimal}
.page .thm-unit-test > ul > li{list-style:disc}
.page .thm-unit-test > :is(ol,ul) > li{margin:0 0 .35em;padding-left:.2em}
.page .thm-unit-test li > :is(ol,ul){margin:.35em 0 0}

/* Home slider: the slow Ken Burns zoom (scale 1.13) overflows, showing the next slide at the edge → clip each slide */
.banner-carousel .owl-item .slide-item{ flex: 1 1 auto; overflow:hidden}
/* owl-stage is flex → slides shrink by <1px, which adds up and shows the next slide's edge → no shrinking */
.owl-carousel .owl-stage > .owl-item{flex-shrink:0}

/* Social Links – Icon Style (set in Appearance > Social Links) */
ul.thep-social li a i{ position:static !important;margin:0 !important;line-height:1 !important;font-size:inherit !important;color:#fff !important; color:inherit !important}
ul.thep-social li a:hover{ transform:translateY(-3px);filter:brightness(1.12); filter:none}
ul.thep-social.thep-social-style-brand li a{background:var(--brand) !important}
ul.thep-social.thep-social-style-brand li a:hover{filter:brightness(1.12)}
ul.thep-social.thep-social-style-soft li a,
ul.thep-social.thep-social-style-soft-brand li a{background:rgba(255,255,255,.12) !important;color:#fff !important}
ul.thep-social.thep-social-style-soft li a:hover{background:#ffd236 !important;color:#212529 !important}
ul.thep-social.thep-social-style-soft-brand li a:hover{background:var(--brand) !important;color:#fff !important}
ul.thep-social.thep-social-style-outline li a{background:transparent !important;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.55);color:#fff !important}
ul.thep-social.thep-social-style-outline li a:hover{box-shadow:inset 0 0 0 1.5px #ffd236;color:#ffd236 !important}
ul.thep-social li a{ display:flex !important;align-items:center;justify-content:center;width:40px !important;height:40px !important;padding:0 !important;border-radius:50%;line-height:1 !important;color:#fff !important;font-size:17px;text-decoration:none !important;transition:transform .25s,filter .25s; transition:transform .25s,background .25s,color .25s,box-shadow .25s,filter .25s}

/* Top-level menu: highlight the current page/section (the theme styles li.current, but WP outputs current-menu-* classes) */
.main-menu .navigation > li:is(.current-menu-item,.current-menu-ancestor,.current-menu-parent,.current_page_item,.current_page_ancestor) > a{color:var(--thm-base)}

/* Prev/Next post: the theme omits the image box entirely on "next" when that post has no featured image (prev gets an empty img) → same gradient square */
.post-nav-btn .next-btn:not(:has(.image-box))::before{content:"";position:absolute;top:9px;right:0;width:70px;height:70px;background:radial-gradient(circle at 85% 15%,rgba(255,210,54,.28),rgba(255,210,54,0) 60%),linear-gradient(135deg,#2c4a6e,#0f1c2e)}

/* Single post: per-post "Display Options" hide category / date / author on the banner (body classes from functions.php) */
.thep-hide-category .page-title .post-info li:nth-child(1),
.thep-hide-date     .page-title .post-info li:nth-child(2),
.thep-hide-author   .page-title .post-info li:nth-child(3) { display: none; }

/* Sidebar categories: collapsible list with a toggle button on small screens (button added by assets/js/thep.js) */
.cat-toggle { display: none; }
@media (max-width: 991px) {
	.cat-toggle, #categories-2 ul.open { box-sizing: border-box; width: 100%; }
	.cat-toggle { display: block; padding: 12px 15px; text-align: left;
		background: #f5f5f5; border: 1px solid #ddd; border-radius: 4px;
		cursor: pointer; font: inherit; margin: 0; }
	.cat-toggle::after { content: "\25BE"; float: right; font-family: Arial, sans-serif; }
	.cat-toggle.open::after { content: "\25B4"; }
	.cat-toggle.open { border-radius: 4px 4px 0 0; }
	#categories-2 ul { display: none; }
	#categories-2 ul.open { display: block; margin: 0; padding: 16px;
		border: 1px solid #ddd; border-top: 0; border-radius: 0 0 4px 4px; }
}

/* ==== ThEP — mobile fixes ==== */
@media (max-width:767px){
	.archive .blog-classic-content > .thm-unit-test{grid-template-columns:minmax(0,1fr)!important}
  /* single post: category ribbons*/
  .post-info li.category{display:block!important;float:none!important;margin:0 0 8px!important;white-space:nowrap;overflow-x:auto;scrollbar-width:none}
  .post-info li.category::-webkit-scrollbar{display:none}
  /* single post: off screen */
  .single-post .blog-details-content .text{overflow-wrap:break-word}
  /* pagination row */
  .pagination-wrapper li{margin:0 2px!important}
  .pagination-wrapper li .page-numbers{width:48px!important;height:48px!important;line-height:48px!important;}
}