/* STSC public sites (thai/, english/, SciMart/) — Bootstrap 5.3.8 + legacy look (css2.css 2015). */
body.stsc {
	background: #eaebec url(../../thai/images/graphics/top-bg2.png) top center no-repeat;
	font-family: Tahoma, Geneva, "Noto Sans Thai", sans-serif;
	font-size: 14px;
	color: #333;
}
.site-header { padding-top: 0; }
.site-brand { display: block; height: 150px; }
.site-nav { background: #1b1b1b url(../../thai/images/imgs.jpg) top center repeat-x; min-height: 50px; padding: 0; }
.site-nav .nav-link { color: #fff !important; padding: .9rem .8rem; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: #f97f13 !important; }
.site-nav .dropdown-menu { border: 0; border-bottom: 3px solid #f97f13; border-radius: 0; }
.site-nav .dropdown-item { white-space: normal; font-size: 14px; }
.site-nav .lang-switch .nav-link { padding: 0 .25rem; }
/* desktop: main menu centred in the bar, language flags kept at the right */
@media (min-width: 992px) {
	.site-nav .navbar-collapse { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; }
	.site-nav .navbar-collapse > .main-menu { grid-column: 2; }
	.site-nav .navbar-collapse > .lang-switch { grid-column: 3; justify-self: end; }
}
.site-nav .lang-switch img { margin-top: -2px; }
.hero-wrap { position: relative; padding-top: 6px; }
.hero-wrap .carousel { overflow: hidden; background: #000; }
.hero-wrap .carousel-item img { max-height: 420px; object-fit: cover; }
.hero-wrap .carousel-item.active .kenburns { animation: kenburns 12s ease-out both; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .hero-wrap .carousel-item.active .kenburns { animation: none; } }
.hero-wrap .carousel-caption { background: rgba(0, 0, 0, .45); border-radius: 4px; padding: .5rem 1rem; }
.hero-wrap .carousel-caption p { margin: 0; color: #fff; }
.hero-shadow { display: block; width: 100%; height: 40px; }
.site-body { margin-top: 3px; }
/* home page: menu under the slides */
.site-nav-below-hero { margin-top: 6px; }
.hero-wrap:has(+ .site-nav-below-hero) .hero-shadow { display: none; }
/* same background without the old black menu band (top-bg2.png rows 130-201 removed); slides start right under the logo strip */
body.stsc.home-menu-below { background-image: url(../img/top-bg-home.png); }
.home-menu-below .site-brand { height: 120px; }
.home-menu-below .hero-wrap { padding-top: 2px; }
.site-main { background: #fff; padding: 0 1.25rem 1.5rem; min-height: 400px; }
.site-side { padding: .75rem; }
.side-block a { display: block; margin-bottom: .5rem; }
.side-banners { display: flex; flex-wrap: wrap; gap: 4px; margin: .5rem 0; }
.side-banners img { width: 125px; height: 65px; object-fit: cover; }
.facebook-link { background: #3b5998; border-color: #3b5998; }
.page-title { background: url(../../thai/images/title-all.png) top left no-repeat; min-height: 68px; display: flex; align-items: center; gap: 2.5rem; padding: 18px 0 0 25px; margin: 0 -1.25rem .5rem; }
.page-title-section { color: #fff; font-size: 16px; min-width: 120px; }
.page-title-heading { font-size: 16px; font-weight: bold; margin: 0; }
@media (max-width: 575.98px) { .page-title { background: #f97f13; gap: 1rem; padding: .75rem 1rem; margin: 0 -1.25rem .75rem; } .page-title-heading { color: #fff; } }
.page-body { padding-top: .5rem; }
.rich-text img { max-width: 100%; height: auto; }
.rich-text table { max-width: 100%; }
.rich-text iframe { max-width: 100%; }
.title-test { font-size: 15px; font-weight: bold; color: #f60; }
a .title-test:hover { text-decoration: underline; }
.r11 { color: #f60; font-size: 15px; font-weight: bold; }
.r44 { color: #63f; font-size: 14px; font-weight: bold; }
.staff-group { font-size: 16px; font-weight: bold; color: #f06; margin-top: 1.5rem; }
.person-card { border-bottom: 1px dashed #ccc; }
.item-row { margin-top: 1rem; padding-bottom: .4rem; border-bottom: 1px dashed #ccc; }
.item-desc { font-size: 13px; }
.tool-name { color: #63c; font-weight: bold; margin-right: .5rem; }
/* ---- home page: news section ---- */
.home-news { --stsc-orange: #f97f13; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid #eee; }
.home-news-title { font-size: 18px; font-weight: bold; color: #333; margin: 0 0 .75rem; }
.home-news-title .bi { color: var(--stsc-orange); }
.home-news .news-tabs { flex-wrap: nowrap; overflow-x: auto; gap: .25rem; border-bottom: 2px solid #eee; margin-bottom: 1rem; scrollbar-width: thin; }
.home-news .news-tabs .nav-link { color: #666; font-size: 14px; white-space: nowrap; padding: .55rem .9rem; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: 0; background: none; }
.home-news .news-tabs .nav-link:hover { color: var(--stsc-orange); }
.home-news .news-tabs .nav-link.active { color: var(--stsc-orange); font-weight: bold; border-bottom-color: var(--stsc-orange); }
.news-lead { height: 100%; background: #fff; border: 1px solid #eee; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); transition: box-shadow .2s, transform .2s; }
.news-lead:hover { box-shadow: 0 6px 18px rgba(0,0,0,.12); transform: translateY(-2px); }
.news-lead-media { position: relative; display: block; aspect-ratio: 16 / 10; background: #f2f2f2; overflow: hidden; }
.news-lead-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-lead:hover .news-lead-media img { transform: scale(1.04); }
.news-badge { position: absolute; left: .75rem; top: .75rem; background: var(--stsc-orange); color: #fff; font-size: 12px; padding: .2rem .6rem; border-radius: 999px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.news-lead-body { padding: .85rem 1rem 1rem; }
.news-lead-title { font-size: 16px; font-weight: bold; line-height: 1.55; margin: 0 0 .4rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-lead-title a, .news-item-title { color: #222; text-decoration: none; }
.news-lead-title a:hover, .news-item-title:hover { color: var(--stsc-orange); }
.news-meta { font-size: 12.5px; color: #888; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; }
.news-cat { color: var(--stsc-orange); text-decoration: none; font-weight: bold; }
.news-cat:hover { text-decoration: underline; }
.news-side { display: flex; flex-direction: column; gap: .75rem; height: 100%; margin: 0; }
.news-item { display: flex; gap: .75rem; padding: .6rem; background: #fff; border: 1px solid #eee; border-radius: 10px; transition: box-shadow .2s, border-color .2s; }
.news-item:hover { border-color: #f9c79a; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.news-item-thumb { flex: 0 0 112px; height: 84px; border-radius: 8px; overflow: hidden; background: #f2f2f2; display: block; }
.news-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-item-body { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: .3rem; }
.news-item-title { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-noimg { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #ccc; font-size: 2rem; }
.home-news .news-list { border: 1px solid #eee; border-radius: 10px; overflow: hidden; background: #fff; }
.home-news .news-list li { border-bottom: 0; }
.home-news .news-list li + li { border-top: 1px solid #f0f0f0; }
.home-news .news-list a { display: flex; align-items: center; gap: 1rem; padding: .7rem 1rem; color: #333; text-decoration: none; }
.home-news .news-list a:hover { background: #fff7ef; color: var(--stsc-orange); }
.home-news .news-list-date { flex: 0 0 9.5rem; font-size: 12.5px; color: #888; }
.home-news .news-list-title { flex: 1; min-width: 0; }
.home-news .news-list-arrow { color: #ccc; }
.home-news .news-list a:hover .news-list-arrow { color: var(--stsc-orange); }
.news-empty { color: #999; padding: 2rem 0; text-align: center; }
.news-more { text-align: right; margin-top: 1rem; }
.btn-outline-stsc { color: #f97f13; border-color: #f97f13; border-radius: 999px; padding: .3rem 1rem; }
.btn-outline-stsc:hover, .btn-outline-stsc:focus { color: #fff; background: #f97f13; border-color: #f97f13; }
@media (max-width: 575.98px) {
	.home-news .news-list a { flex-wrap: wrap; gap: .2rem .5rem; }
	.home-news .news-list-date { flex-basis: 100%; }
	.home-news .news-list-arrow { display: none; }
	.news-item-thumb { flex-basis: 96px; height: 72px; }
}
/* news.php (list page) */
.news-card { display: flex; gap: .75rem; padding: .5rem; border-radius: 4px; }
.news-card:hover { background: #f5f5f5; }
.news-card-img { width: 160px; height: 110px; object-fit: cover; flex-shrink: 0; }
.news-card a { color: #333; text-decoration: none; }
.news-card a:hover { color: #fea107; text-decoration: underline; }
.link-cat, .news-card a.link-cat { color: #f00; }
.news-list li { border-bottom: 1px dashed #ccc; margin: 0; }
.news-list a { color: #333; text-decoration: none; }
.news-list a:hover { color: #fea107; text-decoration: underline; }
.news-cover { max-height: 300px; padding: 5px; border: 2px solid #f5f5f5; }
.search-box { border: 1px solid #090; background: #dafede; border-radius: 4px; }
.search-result { padding: 5px; border-top: 1px solid #f6c; border-bottom: 1px solid #f6c; background: #feebfe; }
.gallery-img { height: 130px; object-fit: cover; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.captcha-img { background: #f6f6fa; }
.site-footer { background: #1e1d1d; color: #fff; padding: 1.5rem 0; margin-top: 0; font-size: 13px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #f60; text-decoration: underline; }
.title-foot { font-size: 14px; color: #f60; margin-bottom: .25rem; }
.foot-address { color: #fb5ec9; }
/* SciMart */
body.scimart { background: #fff url(../../SciMart/images/bg-2.png) top center no-repeat; font-family: Tahoma, Geneva, sans-serif; }
.scimart-header { margin-top: 40px; row-gap: 1rem; }
.scimart-btn { background: #8e2cc0; color: #fff; margin: 3px; padding: .75rem 1rem; }
.scimart-btn:hover { background: #6d1f95; color: #fff; }
.scimart-main { min-height: 420px; padding-bottom: 3rem; }
.scimart-title { color: #9009b4; }
.prd { padding: 2px; margin: 10px 0; box-shadow: 0 4px 8px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12); }
.lead-indent { text-indent: 2.5em; }
.scimart-footer { background: #1e1d1d; color: #fff; text-align: center; padding: 2rem 0; }
.scimart-footer a { color: #fff; }
/* image popup (news-detail gallery): transparent box, only the dimmed backdrop behind the photo */
#lightbox .lightbox-content { background: transparent; border: 0; box-shadow: none; align-items: center; }
#lightbox .lightbox-frame { position: relative; display: inline-block; max-width: 100%; }
#lightbox .lightbox-img { max-height: 88vh; width: auto; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
#lightbox .lightbox-close { position: absolute; top: .5rem; right: .5rem; z-index: 2; width: 2rem; height: 2rem; padding: .5rem; background-color: rgba(0, 0, 0, .55); border-radius: 50%; opacity: .9; }
#lightbox .lightbox-close:hover { opacity: 1; background-color: rgba(0, 0, 0, .8); }
.modal-backdrop.show { opacity: .75; }
