/*
Theme Name: MCU IT Gateway
Theme URI: https://it.mcu.ac.th/
Author: ส่วนเทคโนโลยีสารสนเทศ มจร
Description: ธีมเว็บไซต์ส่วนเทคโนโลยีสารสนเทศ สำนักหอสมุดและเทคโนโลยีสารสนเทศ มหาวิทยาลัยมหาจุฬาลงกรณราชวิทยาลัย — หน้าแรกแบบศูนย์รวมบริการ ข่าวแยกหมวด สถิติ แดชบอร์ด Looker Studio ภาพกิจกรรม เครื่องมือปรับขนาดตัวอักษรและโหมดตัดกันสูงตามแนวมาตรฐานเว็บไซต์ภาครัฐ ไม่ต้องใช้ Elementor
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mcuit
Tags: education, news, custom-logo, custom-menu, featured-images, translation-ready, accessibility-ready
*/

/* ==========================================================
   Tokens
   ========================================================== */
:root {
	--indigo: #34488f;
	--indigo-2: #4a5fa8;
	--indigo-deep: #2a3561;
	--indigo-soft: #eaeef9;
	--saffron: #e8b56f;
	--saffron-2: #f2c992;
	--saffron-ink: #8a5a14;
	--ink: #2b3146;
	--muted: #656c81;
	--cloud: #f5f7fb;
	--line: #e4e8f1;
	--white: #ffffff;

	--font-head: "Chakra Petch", "IBM Plex Sans Thai", "Noto Sans Thai", Tahoma, sans-serif;
	--font-body: "IBM Plex Sans Thai", "Noto Sans Thai", "Sarabun", Tahoma, sans-serif;

	--wrap: 1240px;
	--gutter: clamp(1rem, 3vw, 2rem);
	--r-sm: 6px;
	--r-md: 10px;
	--r-lg: 16px;
	--shadow: 0 12px 32px -14px rgba(42, 53, 97, 0.22);
	--header-h: 84px;
}

html { font-size: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
html[data-fs="-1"] { font-size: 93.75%; }
html[data-fs="1"] { font-size: 112.5%; }

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--indigo-2); text-underline-offset: 3px; }
a:hover { color: var(--indigo); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); line-height: 1.35; margin: 0 0 .5em; color: var(--ink); font-weight: 600; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.skip-link {
	position: absolute; left: 1rem; top: -100px; z-index: 1000;
	background: var(--saffron); color: var(--indigo-deep); padding: .6rem 1rem; border-radius: var(--r-sm); font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.muted { opacity: .75; }

.icon { flex: none; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
	min-height: 44px; padding: .5rem 1.25rem; border-radius: var(--r-sm);
	border: 1px solid transparent; font-weight: 600; text-decoration: none; line-height: 1.2;
	transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--saffron); color: var(--indigo-deep); }
.btn-primary:hover { background: var(--saffron-2); color: var(--indigo-deep); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }

.pill {
	display: inline-block; font-size: .8rem; font-weight: 600; line-height: 1.4;
	padding: .15rem .6rem; border-radius: 999px;
	background: var(--indigo-soft); color: var(--indigo); text-decoration: none;
}
.pill:hover { background: var(--indigo); color: var(--white); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; font-size: .9rem; color: var(--muted); margin-bottom: .5rem; }
.meta-sm { font-size: .82rem; margin: .35rem 0 0; }

/* ==========================================================
   Topbar
   ========================================================== */
.topbar { background: var(--indigo-deep); color: rgba(255,255,255,.86); font-size: .85rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 42px; }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: var(--saffron-2); }
.topbar-contact { list-style: none; display: flex; gap: 1.5rem; }
.topbar-contact a { display: inline-flex; align-items: center; gap: .45rem; }
.a11y { display: flex; align-items: center; gap: .25rem; }
.a11y-label { margin-right: .35rem; opacity: .75; }
.a11y-btn {
	min-width: 32px; height: 30px; padding: 0 .4rem; border-radius: var(--r-sm);
	background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.22);
	display: inline-flex; align-items: center; justify-content: center; font-size: .85rem;
}
.a11y-btn:hover, .a11y-btn[aria-pressed="true"] { background: rgba(255,255,255,.12); }
.topbar-main { display: inline-flex; align-items: center; gap: .35rem; margin-left: .9rem; padding-left: .9rem; border-left: 1px solid rgba(255,255,255,.2); }

/* ==========================================================
   Header + navigation
   ========================================================== */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 6px 24px -14px rgba(19,28,69,.35); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: .85rem; min-width: 0; flex: 0 1 auto; }
.brand .custom-logo-link { flex: none; }
.brand .custom-logo { width: 56px; height: 56px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; text-decoration: none; line-height: 1.3; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--indigo); }
.brand-sub { font-size: .78rem; color: var(--muted); max-width: 30ch; }

.primary-nav { margin-left: auto; }
.primary-nav .menu { list-style: none; display: flex; align-items: center; gap: .15rem; }
.primary-nav .menu > li { position: relative; }
.primary-nav a {
	display: flex; align-items: center; gap: .3rem;
	padding: .55rem .75rem; border-radius: var(--r-sm);
	color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; line-height: 1.4;
}
.primary-nav .menu > li > a:hover,
.primary-nav .menu > li:focus-within > a,
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a { color: var(--indigo); background: var(--indigo-soft); }
.primary-nav .menu > .menu-item-has-children > a::after {
	content: ""; width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
	transform: rotate(45deg) translateY(-2px); margin-left: .2rem; opacity: .7;
}

.primary-nav .sub-menu {
	list-style: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 20;
	min-width: 260px; max-width: 340px; padding: .5rem;
	background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.primary-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a { font-size: .93rem; padding: .5rem .75rem; }
.primary-nav .sub-menu a:hover { background: var(--cloud); color: var(--indigo); }
.primary-nav .sub-menu .sub-menu { top: -.5rem; left: 100%; }
.primary-nav .menu > li:last-child > .sub-menu,
.primary-nav .menu > li:nth-last-child(2) > .sub-menu { left: auto; right: 0; }
.submenu-toggle { display: none; }

.header-actions { display: flex; align-items: center; gap: .25rem; }
.icon-btn {
	width: 44px; height: 44px; border-radius: var(--r-sm); border: 0;
	background: transparent; color: var(--indigo); display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--indigo-soft); }
.menu-toggle { display: none; }
.nav-close { display: none; }

.search-panel { border-top: 1px solid var(--line); background: var(--cloud); padding: 1rem 0; }

.search-form { display: flex; align-items: center; gap: .5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: .3rem .3rem .3rem .9rem; max-width: 720px; }
.search-form .icon { color: var(--muted); }
.search-field { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; padding: .5rem 0; color: var(--ink); }
.search-field:focus { outline: none; }
.search-form:focus-within { border-color: var(--indigo-2); box-shadow: 0 0 0 3px var(--indigo-soft); }

@media (max-width: 1180px) {
	.menu-toggle { display: inline-flex; }
	.primary-nav {
		position: fixed; inset: 0 0 0 auto; width: min(380px, 88vw); z-index: 200;
		background: var(--white); padding: 5rem 1rem 2rem; overflow-y: auto;
		transform: translateX(100%); transition: transform .25s ease; box-shadow: -20px 0 40px -20px rgba(0,0,0,.35);
		visibility: hidden;
	}
	.primary-nav.is-open { transform: none; visibility: visible; }
	.primary-nav .menu { flex-direction: column; align-items: stretch; gap: 0; }
	.primary-nav .menu > li { border-bottom: 1px solid var(--line); }
	.primary-nav a { padding: .85rem .5rem; font-size: 1.02rem; }
	.primary-nav .menu > .menu-item-has-children > a::after { display: none; }
	.primary-nav .menu-item-has-children { display: grid; grid-template-columns: 1fr auto; align-items: center; }
	.primary-nav .sub-menu {
		grid-column: 1 / -1; position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0; border-left: 2px solid var(--saffron); border-radius: 0;
		margin: 0 0 .75rem .5rem; padding: 0 0 0 .5rem; max-width: none; display: none;
	}
	.primary-nav .is-expanded > .sub-menu { display: block; }
	.submenu-toggle {
		display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center;
		background: transparent; border: 0; color: var(--indigo); border-radius: var(--r-sm);
	}
	.submenu-toggle .icon { transition: transform .2s; }
	.is-expanded > .submenu-toggle .icon { transform: rotate(180deg); }
	.nav-close { display: inline-flex; position: absolute; top: 1rem; right: 1rem; }
	.nav-backdrop { position: fixed; inset: 0; background: rgba(19,28,69,.5); z-index: 150; }
	body.nav-open { overflow: hidden; }
}
@media (max-width: 640px) {
	.brand-sub { display: none; }
	.brand .custom-logo { width: 46px; height: 46px; }
	.brand-name { font-size: 1.05rem; }
	.hide-sm { display: none !important; }
	.topbar-contact .muted { display: none; }
	:root { --header-h: 70px; }
}

/* ==========================================================
   Hero
   ========================================================== */
.hero {
	position: relative; overflow: hidden; color: var(--white);
	background:
		radial-gradient(1200px 500px at 85% 0%, rgba(43,61,134,.9), transparent 60%),
		var(--indigo);
}
.hero-wheel {
	position: absolute; width: 760px; height: 760px; right: -170px; top: 50%;
	margin-top: -420px; color: var(--saffron); opacity: .13; pointer-events: none;
	animation: wheel-in 1.8s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes wheel-in { from { transform: rotate(-45deg); opacity: 0; } to { transform: rotate(0); opacity: .13; } }

.hero-grid {
	position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero-title { color: var(--white); font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.28; font-weight: 700; margin-bottom: 1.1rem; max-width: 16ch; }
.hero-text { color: rgba(255,255,255,.82); font-size: 1.12rem; max-width: 46ch; margin-bottom: 2rem; }

.hero-search {
	display: flex; align-items: center; gap: .6rem; max-width: 560px;
	background: var(--white); border-radius: var(--r-md); padding: .4rem .4rem .4rem 1rem;
	color: var(--muted); box-shadow: 0 18px 40px -20px rgba(0,0,0,.55);
}
.hero-search input { flex: 1; min-width: 0; border: 0; font: inherit; font-size: 1.05rem; padding: .7rem 0; color: var(--ink); background: transparent; }
.hero-search input:focus { outline: none; }
.hero-search:focus-within { box-shadow: 0 0 0 4px rgba(242,163,58,.55), 0 18px 40px -20px rgba(0,0,0,.55); }
.hero-search .btn { min-height: 48px; padding-inline: 1.5rem; }
.hero-hint { min-height: 1.75em; margin: .75rem 0 0; font-size: .92rem; color: var(--saffron-2); }

.launcher { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-lg); padding: .6rem; backdrop-filter: blur(2px); }
.launcher-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.launcher-item { animation: tile-in .5s ease both; }
.launcher-item:nth-child(1) { animation-delay: .15s; }
.launcher-item:nth-child(2) { animation-delay: .2s; }
.launcher-item:nth-child(3) { animation-delay: .25s; }
.launcher-item:nth-child(4) { animation-delay: .3s; }
.launcher-item:nth-child(5) { animation-delay: .35s; }
.launcher-item:nth-child(6) { animation-delay: .4s; }
.launcher-item:nth-child(7) { animation-delay: .45s; }
.launcher-item:nth-child(8) { animation-delay: .5s; }
@keyframes tile-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.launcher-item[hidden] { display: none; }

.tile {
	display: flex; align-items: center; gap: .9rem; height: 100%;
	padding: .9rem 1rem; border-radius: var(--r-md);
	color: var(--white); text-decoration: none; transition: background-color .15s;
}
a.tile:hover, a.tile:focus-visible { background: rgba(255,255,255,.1); color: var(--white); }
.tile-icon {
	flex: none; width: 50px; height: 50px; border-radius: 12px;
	display: grid; place-items: center; background: var(--saffron); color: var(--indigo-deep);
	transition: transform .15s;
}
a.tile:hover .tile-icon { transform: rotate(-6deg) scale(1.05); }
.tile-body { display: flex; flex-direction: column; min-width: 0; }
.tile-title { font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; line-height: 1.35; }
.tile-desc { font-size: .86rem; color: rgba(255,255,255,.7); line-height: 1.5; }
.tile-soon { cursor: default; }
.tile-soon .tile-icon { background: rgba(255,255,255,.14); color: var(--saffron-2); }

.ticker { position: relative; background: rgba(10,15,40,.45); border-top: 1px solid rgba(255,255,255,.08); }
.ticker-inner { display: flex; align-items: center; gap: 1rem; min-height: 58px; }
.ticker-label { flex: none; font-size: .82rem; font-weight: 700; background: var(--saffron); color: var(--indigo-deep); padding: .2rem .7rem; border-radius: 999px; }
.ticker-link { color: var(--white); text-decoration: none; font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker-link:hover { color: var(--saffron-2); text-decoration: underline; }
.ticker-date { flex: none; margin-left: auto; font-size: .85rem; color: rgba(255,255,255,.65); }

@media (max-width: 980px) {
	.hero-grid { grid-template-columns: 1fr; }
	.hero-title { max-width: 20ch; }
	.hero-wheel { width: 520px; height: 520px; right: -200px; top: 0; margin-top: -140px; }
}
@media (max-width: 560px) {
	.launcher { padding: .35rem; }
	.launcher-grid { grid-template-columns: 1fr 1fr; }
	.tile { flex-direction: column; align-items: flex-start; gap: .6rem; padding: .85rem; }
	.tile-icon { width: 44px; height: 44px; }
	.tile-title { font-size: 1rem; }
	.tile-desc { font-size: .8rem; }
	.hero-search .btn { padding-inline: 1rem; }
	.ticker-date { display: none; }
}

/* ==========================================================
   Sections
   ========================================================== */
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section-tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-title { font-size: clamp(1.6rem, 2.8vw, 2.1rem); margin: 0; color: var(--indigo); }
.link-more { font-weight: 600; text-decoration: none; color: var(--indigo-2); display: inline-flex; gap: .35rem; align-items: center; }
.link-more:hover { text-decoration: underline; }

/* Tabs */
.tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: 1.5rem; scrollbar-width: thin; }
.tab {
	flex: none; border: 1px solid var(--line); background: var(--white); color: var(--ink);
	padding: .45rem 1.05rem; border-radius: 999px; font-weight: 500; font-size: .95rem; line-height: 1.5;
}
.tab:hover { border-color: var(--indigo-2); color: var(--indigo); }
.tab[aria-selected="true"] { background: var(--indigo); border-color: var(--indigo); color: var(--white); }

/* News */
.news-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.75rem); }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-md); background: var(--indigo-soft); }
.card-media-wide { aspect-ratio: 16 / 9; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.media-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--indigo-2); background: linear-gradient(135deg, var(--indigo-soft), #f7f0e3); }
.news-feature-link:hover img { transform: scale(1.03); }
.news-feature-body { padding-top: 1.1rem; }
.news-feature-title { font-size: clamp(1.3rem, 2.2vw, 1.65rem); line-height: 1.45; margin-bottom: .6rem; }
.news-feature-title a, .news-item-title a, .card-title a { color: var(--ink); text-decoration: none; }
.news-feature-title a:hover, .news-item-title a:hover, .card-title a:hover { color: var(--indigo-2); text-decoration: underline; }
.news-feature-excerpt { color: var(--muted); margin: 0; }

.news-list { list-style: none; display: flex; flex-direction: column; }
.news-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.news-item:first-child { padding-top: 0; }
.date-block {
	flex: none; width: 64px; text-align: center; border-radius: var(--r-md);
	background: var(--cloud); padding: .45rem 0 .5rem; line-height: 1.15;
}
.date-day { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; color: var(--indigo); }
.date-mon { display: block; font-size: .74rem; color: var(--muted); }
.news-item-title { font-family: var(--font-body); font-size: 1.02rem; font-weight: 600; line-height: 1.55; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-list-more { padding-top: 1rem; }

@media (max-width: 860px) { .news-grid { grid-template-columns: 1fr; } }

/* Stats */
.stats { background: var(--cloud); }
.stat-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0 0 2rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
.stat { padding: 1.5rem 1.25rem; border-left: 1px solid var(--line); display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stat:first-child { border-left: 0; }
.stat-num { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: clamp(1.9rem, 3vw, 2.5rem); color: var(--indigo); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .92rem; line-height: 1.5; margin-top: .25rem; }
@media (max-width: 980px) {
	.stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.stat:nth-child(4) { border-left: 0; }
	.stat:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
	.stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.stat:nth-child(odd) { border-left: 0; }
	.stat:nth-child(4) { border-left: 1px solid var(--line); }
	.stat:nth-child(n+3) { border-top: 1px solid var(--line); }
	.stat { padding: 1.1rem; }
}

.dashboard { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.dashboard summary { list-style: none; display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; cursor: pointer; }
.dashboard summary::-webkit-details-marker { display: none; }
.dashboard summary:hover { background: var(--cloud); }
.dashboard-icon { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--indigo); color: var(--saffron); }
.dashboard-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dashboard-title { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--ink); }
.dashboard-sub { font-size: .9rem; color: var(--muted); }
.dashboard-chevron { color: var(--indigo); transition: transform .2s; }
.dashboard[open] .dashboard-chevron { transform: rotate(180deg); }
.dashboard-frame { border-top: 1px solid var(--line); }
.dashboard-frame iframe { display: block; width: 100%; height: min(78vh, 760px); min-height: 480px; border: 0; }

/* Gallery */
.shots { display: grid; gap: .75rem; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 230px 230px; }
.shot { position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--indigo); color: var(--white); text-decoration: none; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s; }
.shot:hover img { transform: scale(1.04); opacity: .9; }
.shot-0 { grid-row: span 2; }
.shots-3 { grid-template-columns: 2fr 1fr; }
.shots-4 .shot-3 { grid-column: span 2; }
.shot-caption {
	position: absolute; inset: auto 0 0 0; padding: 2.5rem 1rem .9rem;
	background: linear-gradient(transparent, rgba(10,14,36,.88));
	display: flex; flex-direction: column; gap: .15rem;
}
.shot-title { font-weight: 600; line-height: 1.45; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shot-0 .shot-title { font-family: var(--font-head); font-size: 1.3rem; -webkit-line-clamp: 3; }
.shot-date { font-size: .8rem; color: rgba(255,255,255,.75); }
@media (max-width: 860px) {
	.shots, .shots-3 { grid-template-columns: 1fr 1fr; grid-template-rows: auto; grid-auto-rows: 180px; }
	.shot-0 { grid-column: span 2; grid-row: span 1; height: 260px; }
	.shots-4 .shot-3 { grid-column: span 2; }
	.shot-0 .shot-title { font-size: 1.1rem; }
}

/* Shortcuts */
.shortcuts { padding-top: 0; }
.shortcut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.shortcut { border-top: 3px solid var(--saffron); padding-top: 1.25rem; }
.shortcut-title { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; color: var(--indigo); margin-bottom: .75rem; }
.shortcut-list { list-style: none; }
.shortcut-list a { display: block; padding: .5rem 0; border-bottom: 1px dashed var(--line); color: var(--ink); text-decoration: none; font-size: .98rem; line-height: 1.55; }
.shortcut-list a:hover { color: var(--indigo-2); padding-left: .35rem; transition: padding .15s; }
@media (max-width: 860px) { .shortcut-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* ==========================================================
   Inner pages
   ========================================================== */
.page-head { background: var(--indigo); color: var(--white); padding-block: clamp(2rem, 4vw, 3.25rem); position: relative; overflow: hidden; }
.page-head::after {
	content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
	border: 1px solid rgba(242,163,58,.25); box-shadow: 0 0 0 40px rgba(242,163,58,.05), 0 0 0 41px rgba(242,163,58,.18);
	pointer-events: none;
}
.page-title { color: var(--white); font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.4; max-width: 34ch; margin: 0; position: relative; }
.page-desc { color: rgba(255,255,255,.8); margin-top: .75rem; max-width: 70ch; position: relative; }
.page-desc p:last-child { margin: 0; }
.page-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; font-size: .93rem; color: rgba(255,255,255,.8); position: relative; }
.page-meta span { display: inline-flex; align-items: center; gap: .4rem; }

.breadcrumb { position: relative; margin-bottom: .75rem; font-size: .88rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.breadcrumb li { color: rgba(255,255,255,.7); }
.breadcrumb li + li::before { content: "/"; margin-right: .35rem; opacity: .5; }
.breadcrumb a { color: var(--saffron-2); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.article-layout { display: grid; grid-template-columns: minmax(0, 760px); justify-content: center; gap: 3rem; padding-block: clamp(2rem, 4vw, 3.5rem); }
.article-layout.has-sidebar { grid-template-columns: minmax(0, 760px) 300px; }
@media (max-width: 1080px) { .article-layout.has-sidebar { grid-template-columns: minmax(0, 1fr); } }
.article-cover { margin: 0 0 2rem; }
.article-cover img { width: 100%; border-radius: var(--r-md); }

.entry-content { font-size: 1.08rem; line-height: 1.85; }
.entry-content > * { margin-block: 0 1.2em; }
.entry-content h2 { font-size: 1.6rem; margin-top: 2em; color: var(--indigo); }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .35em; }
.entry-content img { border-radius: var(--r-sm); }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption { font-size: .88rem; color: var(--muted); text-align: center; margin-top: .5rem; }
.entry-content blockquote { margin-inline: 0; padding: 1rem 1.25rem; border-left: 4px solid var(--saffron); background: var(--cloud); border-radius: 0 var(--r-md) var(--r-md) 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.entry-content th { background: var(--indigo-soft); color: var(--indigo); }
.entry-content iframe { width: 100%; border: 0; border-radius: var(--r-sm); }
.entry-content .wp-block-button__link { background: var(--saffron); color: var(--indigo-deep); border-radius: var(--r-sm); font-weight: 600; }
.entry-content .wp-block-file { display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); }
.entry-content .wp-block-file__button { background: var(--indigo); color: var(--white); border-radius: var(--r-sm); padding: .35rem .9rem; }
.entry-content .alignwide { margin-inline: calc(-1 * min(8vw, 120px)); max-width: none; }
.entry-content .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.entry-content .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.5em; }
.entry-content .aligncenter { margin-inline: auto; }
.wp-caption-text, .gallery-caption { font-size: .88rem; color: var(--muted); }
.sticky .card-title::before { content: "ปักหมุด · "; color: var(--saffron-ink); }

.article-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.tag-list a { display: inline-block; padding: .2rem .7rem; border-radius: 999px; background: var(--cloud); font-size: .85rem; text-decoration: none; color: var(--muted); }
.share { display: flex; align-items: center; gap: .4rem; }
.share-label { font-weight: 600; margin-right: .3rem; color: var(--muted); font-size: .92rem; }
.share-btn {
	width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center;
	border: 1px solid var(--line); background: var(--white); color: var(--indigo);
}
.share-btn:hover { background: var(--indigo); color: var(--white); border-color: var(--indigo); }
.share-btn.is-copied { background: var(--saffron); border-color: var(--saffron); color: var(--indigo-deep); }

.post-navigation { margin-top: 2rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.post-navigation a { display: block; height: 100%; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.post-navigation a:hover { border-color: var(--indigo-2); background: var(--cloud); }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.nav-label { display: block; font-size: .82rem; color: var(--muted); }
.nav-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; line-height: 1.5; }
@media (max-width: 640px) { .post-navigation .nav-links { grid-template-columns: 1fr; } .post-navigation .nav-next { grid-column: 1; } }

.child-pages { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; margin-top: 2rem; }
.child-pages a { display: flex; align-items: center; gap: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); font-weight: 500; }
.child-pages a:hover { border-color: var(--indigo-2); color: var(--indigo); }
.child-pages .icon { color: var(--saffron-ink); }

.related { background: var(--cloud); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 1.5rem; }
.card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color .15s; }
.card:hover { border-color: var(--indigo-2); }
.card .card-media { border-radius: 0; }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 1.1rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .4rem; }
.card-body .meta { margin: 0; }
.card-title { font-family: var(--font-body); font-size: 1.08rem; font-weight: 600; line-height: 1.55; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-excerpt { color: var(--muted); font-size: .95rem; line-height: 1.65; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.page-numbers { min-width: 44px; height: 44px; padding: 0 .8rem; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.page-numbers.current { background: var(--indigo); border-color: var(--indigo); color: var(--white); }
a.page-numbers:hover { border-color: var(--indigo-2); }
.page-numbers.dots { border: 0; }

.search-again { margin-bottom: 2rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty .search-form { margin: 1.5rem auto; text-align: left; }
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--indigo); font-weight: 500; }
.chip:hover { background: var(--indigo); color: var(--white); border-color: var(--indigo); }

/* Widgets / sidebar */
.sidebar .widget { margin-bottom: 2rem; }
.widget-title { font-size: 1.1rem; color: var(--indigo); padding-bottom: .5rem; border-bottom: 2px solid var(--saffron); }
.sidebar ul { list-style: none; }
.sidebar li { padding: .4rem 0; border-bottom: 1px dashed var(--line); }

/* Comments */
.comments { margin-top: 3rem; }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; font: inherit; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--r-sm);
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer { background: var(--indigo-deep); color: rgba(255,255,255,.78); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 2.5rem; padding-block: 3.5rem; }
.brand-footer .brand-name { color: var(--white); }
.brand-footer .brand-sub { color: rgba(255,255,255,.65); max-width: 34ch; }
.brand-footer .custom-logo { background: var(--white); border-radius: 50%; padding: 4px; }
.footer-address { font-style: normal; display: flex; gap: .6rem; margin-top: 1.25rem; line-height: 1.7; }
.footer-address .icon { margin-top: .3rem; color: var(--saffron); }
.footer-title { font-size: 1.05rem; color: var(--white); margin-bottom: 1rem; }
.footer-list { list-style: none; }
.footer-list li { margin-bottom: .55rem; }
.footer-list a { color: rgba(255,255,255,.82); text-decoration: none; display: inline-flex; gap: .55rem; align-items: flex-start; line-height: 1.5; }
.footer-list a .icon { margin-top: .15rem; color: var(--saffron); }
.footer-list a:hover { color: var(--saffron-2); }
.footer-map iframe { width: 100%; height: 220px; border: 0; border-radius: var(--r-md); filter: saturate(.85); }
.footer-map .footer-title { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.1rem; }
.footer-bottom p { margin: 0; color: rgba(255,255,255,.6); }
.to-top { color: rgba(255,255,255,.8); text-decoration: none; flex: none; }
.to-top:hover { color: var(--saffron-2); }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } .footer-bottom-inner { flex-direction: column; align-items: flex-start; } }

/* Floating contact */
.floating { position: fixed; right: 1rem; bottom: 1rem; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.float-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
	min-width: 48px; height: 48px; padding: 0 .9rem; border-radius: 999px;
	background: var(--indigo); color: var(--white); text-decoration: none; box-shadow: var(--shadow); font-weight: 600; font-size: .92rem;
}
.float-btn:hover { background: var(--indigo-2); color: var(--white); }
.float-chat { background: var(--saffron); color: var(--indigo-deep); padding-inline: 1.1rem; }
.float-chat:hover { background: var(--saffron-2); color: var(--indigo-deep); }
@media (max-width: 560px) { .float-chat span { display: none; } .float-btn:not(.float-chat) { display: none; } }

/* Cookie bar */
.cookie {
	position: fixed; left: 1rem; bottom: 1rem; z-index: 95; max-width: 520px;
	background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg);
	box-shadow: var(--shadow); padding: 1.1rem 1.25rem; font-size: .93rem;
}
.cookie p { margin: 0 0 .9rem; }
.cookie-actions { display: flex; gap: .5rem; justify-content: flex-end; }
.cookie .btn { min-height: 40px; }

/* ==========================================================
   High contrast mode
   ========================================================== */
html.hc {
	--indigo: #000; --indigo-2: #000; --indigo-deep: #000; --indigo-soft: #fff;
	--saffron: #ffd400; --saffron-2: #ffe14d; --saffron-ink: #000;
	--ink: #000; --muted: #000; --cloud: #fff; --line: #000;
}
html.hc body { background: #fff; }
html.hc a { text-decoration: underline; }
html.hc .hero, html.hc .page-head { background: #000; }
html.hc .hero-wheel, html.hc .page-head::after { display: none; }
html.hc .tile-desc, html.hc .hero-text, html.hc .page-desc { color: #fff; }
html.hc .pill { border: 1px solid #000; }
html.hc .card, html.hc .stat-row, html.hc .dashboard { border-width: 2px; }

/* ==========================================================
   Motion & print
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
	.topbar, .site-header, .site-footer, .floating, .cookie, .share, .post-navigation, .related { display: none !important; }
	.page-head { background: none; color: #000; }
	.page-title { color: #000; }
}

/* Sidebar block widgets */
.sidebar a { color: var(--ink); text-decoration: none; line-height: 1.55; }
.sidebar a:hover { color: var(--indigo-2); text-decoration: underline; }
.sidebar h2, .sidebar .wp-block-heading { font-size: 1.1rem; color: var(--indigo); padding-bottom: .5rem; border-bottom: 2px solid var(--saffron); margin-bottom: .5rem; }
.wp-block-search__label { font-weight: 600; color: var(--indigo); display: block; margin-bottom: .4rem; }
.wp-block-search__inside-wrapper { display: flex; gap: .4rem; }
.wp-block-search__input { flex: 1; min-width: 0; font: inherit; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); }
.wp-block-search__button { border: 0; border-radius: var(--r-sm); background: var(--saffron); color: var(--indigo-deep); font-weight: 600; padding: .5rem 1rem; }

/* ==========================================================
   Motion layer (v1.1) — active only with html.js-motion
   (added in <head> when the visitor hasn't asked for reduced motion)
   ========================================================== */

/* Scroll progress */
.scroll-progress {
	position: absolute; left: 0; bottom: -1px; height: 3px; width: 100%;
	background: linear-gradient(90deg, var(--saffron), var(--saffron-2));
	transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
}

/* Header shrinks after scrolling */
.site-header .header-inner { transition: min-height .25s ease; }
.site-header.is-scrolled .header-inner { min-height: 66px; }
.site-header .custom-logo { transition: width .25s ease, height .25s ease; }
.site-header.is-scrolled .brand .custom-logo { width: 46px; height: 46px; }

/* Hero: aurora + network canvas */
.hero-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-aurora span {
	position: absolute; width: 46vw; height: 46vw; max-width: 720px; max-height: 720px;
	border-radius: 50%; filter: blur(80px); opacity: .45; mix-blend-mode: screen;
}
.hero-aurora span:nth-child(1) { background: #3b56c9; left: -12%; top: -30%; animation: drift-a 18s ease-in-out infinite alternate; }
.hero-aurora span:nth-child(2) { background: #f2a33a; right: -10%; bottom: -45%; opacity: .22; animation: drift-b 22s ease-in-out infinite alternate; }
.hero-aurora span:nth-child(3) { background: #6a3fb5; left: 35%; top: 20%; opacity: .25; animation: drift-c 26s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(18%, 22%) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-22%, -18%) scale(1.2); } }
@keyframes drift-c { to { transform: translate(-30%, 15%) scale(.85); } }
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .9; }
.hero-wheel { animation: wheel-in 1.8s cubic-bezier(.2,.7,.2,1) both, wheel-spin 140s linear 1.8s infinite; }
@keyframes wheel-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.hero-grid { z-index: 1; }

/* Hero title: words rise in */
.js-motion .hw { display: inline-block; opacity: 0; transform: translateY(.55em) rotate(2deg); filter: blur(6px);
	animation: word-in .8s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.15s + var(--i) * .09s); }
@keyframes word-in { to { opacity: 1; transform: none; filter: none; } }
.hero-title .hw:last-child {
	background: linear-gradient(100deg, #fff 20%, var(--saffron-2) 50%, #fff 80%);
	background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
}
.js-motion .hero-title .hw:last-child { animation: word-in .8s cubic-bezier(.2,.8,.2,1) forwards, shine 6s ease-in-out 1.6s infinite; animation-delay: calc(.15s + var(--i) * .09s), 1.6s; }
@keyframes shine { 0% { background-position: 100% 0; } 50%, 100% { background-position: -50% 0; } }
.js-motion [data-hero-in] { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.8,.2,1) .55s forwards; }
.js-motion .hero-search[data-hero-in] { animation-delay: .7s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Search: blinking caret on typing placeholder */
.hero-search input::placeholder { color: #8a90a6; }

/* Launcher tiles: cursor spotlight + tilt */
.launcher { position: relative; isolation: isolate; }
.launcher::before {
	content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1;
	background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, rgba(242,163,58,.9) 80%, transparent 90%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
	animation: orbit 7s linear infinite;
}
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes orbit { to { --ang: 360deg; } }
.tile { position: relative; overflow: hidden; transform-style: preserve-3d; transition: background-color .15s, transform .2s ease; }
.tile::after {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s;
	background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), rgba(255,191,94,.22), transparent 65%);
}
a.tile:hover::after { opacity: 1; }
.js-motion .launcher-item { animation: tile-pop .6s cubic-bezier(.2,.9,.25,1.2) both; animation-delay: calc(.6s + var(--n, 0) * .07s); }
@keyframes tile-pop { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
a.tile:hover .tile-icon { animation: wiggle .5s ease; }
@keyframes wiggle { 30% { transform: rotate(-10deg) scale(1.08); } 60% { transform: rotate(6deg) scale(1.08); } 100% { transform: rotate(0) scale(1.05); } }

/* Ticker marquee */
.ticker-label { display: inline-flex; align-items: center; gap: .45rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #d7263d; box-shadow: 0 0 0 0 rgba(215,38,61,.6); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(215,38,61,0); } 100% { box-shadow: 0 0 0 0 rgba(215,38,61,0); } }
.ticker-viewport { flex: 1; min-width: 0; overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); }
.ticker-track { list-style: none; display: flex; width: max-content; gap: 3rem; }
.ticker-track li { display: flex; align-items: center; gap: .75rem; white-space: nowrap; }
.ticker-track li::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--saffron); margin-left: 2.25rem; opacity: .7; }
.ticker-track .ticker-date { margin-left: 0; display: inline; }
.ticker-track .ticker-link { overflow: visible; }
.ticker.is-marquee .ticker-track { animation: marquee var(--dur, 40s) linear infinite; }
.ticker.is-marquee:hover .ticker-track, .ticker.is-marquee:focus-within .ticker-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Scroll reveal */
.js-motion [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.js-motion [data-reveal-group] > * { opacity: 0; transform: translateY(32px) scale(.98); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--n, 0) * 80ms); }
.js-motion .is-in[data-reveal], .js-motion .is-in[data-reveal-group] > * { opacity: 1; transform: none; }
.js-motion .news-list > li { transition-delay: calc(var(--n, 0) * 70ms + 120ms); }

/* Tabs: sliding indicator + panel fade */
.tabs { position: relative; }
.tab-ink { position: absolute; left: 0; top: 0; height: calc(100% - .4rem); border-radius: 999px; background: var(--indigo); z-index: 0;
	transition: transform .35s cubic-bezier(.3,.8,.3,1), width .35s cubic-bezier(.3,.8,.3,1); }
.tabs.has-ink .tab { position: relative; z-index: 1; background: transparent; transition: color .25s, border-color .25s; }
.tabs.has-ink .tab[aria-selected="true"] { background: transparent; border-color: transparent; }
.tab-panel.is-entering { animation: panel-in .45s cubic-bezier(.2,.8,.2,1); }
@keyframes panel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Cards & media hover */
.card { transition: border-color .2s, transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 40px -24px rgba(19,28,69,.45); }
.news-item { transition: background-color .2s, padding .2s; border-radius: var(--r-md); }
.news-item:hover { background: var(--cloud); padding-inline: .6rem; }
.news-item:hover .date-block { background: var(--indigo); }
.news-item:hover .date-day, .news-item:hover .date-mon { color: var(--white); }
.date-block, .date-day, .date-mon { transition: background-color .2s, color .2s; }

/* Stats: animated underline as counters run */
.stat { position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; left: 1.25rem; bottom: 0; height: 3px; width: 0; background: var(--saffron); transition: width 1.4s cubic-bezier(.2,.8,.2,1) .2s; }
.is-in .stat::after { width: calc(100% - 2.5rem); }
.stat-num { transition: color .3s; }

/* Gallery: Ken Burns + caption slide */
.shot img { transition: transform 6s cubic-bezier(.2,.6,.2,1), opacity .3s; }
.shot:hover img { transform: scale(1.12) translate(-2%, -1%); opacity: 1; }
.shot-caption { transition: padding .35s ease; }
.shot:hover .shot-caption { padding-bottom: 1.3rem; }
.shot::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
	box-shadow: inset 0 0 0 0 var(--saffron); transition: box-shadow .3s; }
.shot:hover::before { box-shadow: inset 0 0 0 3px var(--saffron); }
.shot-caption { z-index: 2; }

/* Shortcut links slide */
.shortcut-list a { position: relative; transition: padding .2s, color .2s; }
.shortcut-list a::before { content: ""; position: absolute; left: 0; top: 50%; width: 0; height: 2px; background: var(--saffron); transition: width .2s; }
.shortcut-list a:hover { padding-left: 1.1rem; }
.shortcut-list a:hover::before { width: .7rem; }

/* Buttons: sheen */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
	background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); }
.btn-primary:hover::after { animation: sheen .7s ease; }
@keyframes sheen { to { left: 130%; } }

/* Floating chat: gentle attention pulse (stops after 3 rounds) */
.float-chat { animation: bob 2.4s ease-in-out 2s 3; }
@keyframes bob { 0%, 100% { transform: none; } 50% { transform: translateY(-6px); } }

/* Back to top with progress ring */
.back-top {
	position: fixed; left: 1rem; bottom: 1rem; z-index: 90; width: 48px; height: 48px; border-radius: 50%;
	border: 0; background: var(--white); color: var(--indigo); box-shadow: var(--shadow);
	display: grid; place-items: center; opacity: 0; transform: translateY(16px) scale(.8); pointer-events: none;
	transition: opacity .3s, transform .3s;
}
.back-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.back-top svg.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.back-top .ring circle { fill: none; stroke: var(--saffron); stroke-width: 3; stroke-dasharray: 138.2; stroke-dashoffset: calc(138.2 * (1 - var(--progress, 0))); }
.back-top:hover { background: var(--indigo); color: var(--white); }
.cookie:not([hidden]) ~ .back-top { bottom: 9rem; }

/* Inner page head: animated rings */
.page-head::after { animation: ring-breathe 8s ease-in-out infinite; }
@keyframes ring-breathe { 50% { transform: scale(1.08) rotate(8deg); } }
.js-motion .page-title, .js-motion .breadcrumb, .js-motion .page-meta { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
.js-motion .page-title { animation-delay: .08s; }
.js-motion .page-meta { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
	.hero-net, .hero-aurora { display: none; }
	.ticker-track { flex-direction: column; gap: 0; }
	.ticker-track li:not(:first-child) { display: none; }
}
html.hc .hero-net, html.hc .hero-aurora, html.hc .launcher::before { display: none; }


/* ==========================================================
   v1.2 — โทนสบายตา: ส่วนหัวพื้นสว่าง สีฟ้าอมเทานุ่ม ทองอ่อน
   ========================================================== */
body { background: #fcfcfe; }

/* Hero (light) */
.hero {
	color: var(--ink);
	background:
		radial-gradient(900px 480px at 90% -10%, rgba(201,213,245,.75), transparent 65%),
		radial-gradient(700px 420px at -5% 110%, rgba(246,222,186,.55), transparent 60%),
		linear-gradient(180deg, #f1f4fb 0%, #f7f6f2 100%);
}
.hero-aurora span { mix-blend-mode: normal; filter: blur(90px); }
.hero-aurora span:nth-child(1) { background: #c8d4f4; opacity: .55; }
.hero-aurora span:nth-child(2) { background: #f5dcb6; opacity: .5; }
.hero-aurora span:nth-child(3) { background: #e0d7f3; opacity: .45; }
.hero-wheel { color: var(--indigo); opacity: .07; }
@keyframes wheel-in { from { transform: rotate(-45deg); opacity: 0; } to { transform: rotate(0); opacity: .07; } }
.hero-title { color: var(--indigo); }
.hero-title .hw:last-child { background-image: linear-gradient(100deg, var(--indigo) 20%, #c98a3a 50%, var(--indigo) 80%); }
.hero-text { color: var(--muted); }
.hero-hint { color: var(--saffron-ink); }
.hero-search { border: 1px solid var(--line); box-shadow: 0 14px 34px -22px rgba(42,53,97,.35); }
.hero-search:focus-within { border-color: var(--indigo-2); box-shadow: 0 0 0 4px rgba(74,95,168,.15), 0 14px 34px -22px rgba(42,53,97,.35); }

.launcher { background: rgba(255,255,255,.72); border-color: rgba(52,72,143,.12); backdrop-filter: blur(8px); box-shadow: 0 24px 50px -32px rgba(42,53,97,.35); }
.launcher::before { background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, rgba(232,181,111,.95) 80%, transparent 90%); }
.tile, a.tile:hover, a.tile:focus-visible { color: var(--ink); }
a.tile:hover, a.tile:focus-visible { background: var(--white); }
.tile-icon { background: #fbefdc; color: #a8691f; }
a.tile:hover .tile-icon { background: var(--saffron); color: var(--white); }
.tile-title { color: var(--indigo); }
.tile-desc { color: var(--muted); }
.tile-soon .tile-icon { background: var(--indigo-soft); color: var(--indigo-2); }
.tile::after { background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), rgba(232,181,111,.18), transparent 65%); }

.ticker { background: rgba(255,255,255,.75); border-top: 1px solid var(--line); }
.ticker-label { background: var(--indigo); color: var(--white); }
.ticker-link { color: var(--ink); }
.ticker-link:hover { color: var(--indigo-2); }
.ticker-date { color: var(--muted); }

/* Topbar & header */
.topbar { background: var(--indigo-deep); }

/* Inner page head (light) */
.page-head { background: linear-gradient(180deg, #eef2fb, #f6f5f1); color: var(--ink); border-bottom: 1px solid var(--line); }
.page-head::after { border-color: rgba(52,72,143,.15); box-shadow: 0 0 0 40px rgba(52,72,143,.03), 0 0 0 41px rgba(52,72,143,.1); }
.page-title { color: var(--indigo); }
.page-desc, .page-meta { color: var(--muted); }
.breadcrumb li { color: var(--muted); }
.breadcrumb a { color: var(--indigo-2); }

/* Softer accents elsewhere */
.btn-primary { background: var(--saffron); color: #3a2a10; }
.btn-primary:hover { background: var(--saffron-2); color: #3a2a10; }
.tab[aria-selected="true"] { background: var(--indigo); }
.dashboard-icon { background: var(--indigo-soft); color: var(--indigo); }
.shot { background: var(--indigo-soft); }
.shot-caption { background: linear-gradient(transparent, rgba(34,42,78,.78)); }
.site-footer { background: #2a3561; }
.float-chat { color: #3a2a10; }
.float-chat:hover { color: #3a2a10; }
.skip-link { color: #3a2a10; }
.live-dot { background: #e0606f; }

/* Keep high-contrast mode strict */
html.hc .hero, html.hc .page-head { background: #000; color: #fff; }
html.hc .hero-title, html.hc .page-title, html.hc .tile-title, html.hc .ticker-link { color: #fff; }
html.hc .hero-title .hw:last-child { background: none; -webkit-background-clip: initial; background-clip: initial; color: #fff; }
html.hc .launcher, html.hc .ticker { background: #000; }
html.hc .tile-desc, html.hc .hero-text, html.hc .breadcrumb li, html.hc .page-meta { color: #fff; }
