/* ==========================================================================
   Gov Template for Joomla! 5.x
   All colours come from CSS custom properties written by index.php,
   so the whole look can be re-skinned from the template options screen.
   ========================================================================== */

:root {
	--my-primary: #1b5fa8;
	--my-dark: #10427a;
	--my-light: #2e80d6;
	--my-accent: #f0a020;
	--my-footer-bg: #16243c;
	--my-container: 1200px;
	--my-font-size: 16px;
	--my-font: 'Sarabun', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
	--my-pagehero-h: 220px;

	--my-ink: #1f2937;
	--my-muted: #6b7280;
	--my-line: #e5e7eb;
	--my-bg: #f4f7fb;
	--my-card: #ffffff;
	--my-radius: 14px;
	--my-radius-sm: 8px;
	--my-shadow: 0 2px 14px rgba(16, 40, 80, .08);
	--my-shadow-lg: 0 10px 34px rgba(16, 40, 80, .14);
	--my-scale: 1;
}

/* --------------------------------------------------------------- base --- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.my-site {
	margin: 0;
	font-family: var(--my-font);
	font-size: calc(var(--my-font-size) * var(--my-scale));
	line-height: 1.7;
	color: var(--my-ink);
	background: var(--my-bg);
	-webkit-font-smoothing: antialiased;
}

body.my-site img { max-width: 100%; height: auto; }

a { color: var(--my-primary); text-decoration: none; }
a:hover { color: var(--my-ink-strong, var(--my-dark)); text-decoration: underline; }

h1, h2, h3, h4, h5 { font-family: var(--my-font); font-weight: 700; line-height: 1.35; color: #13203a; margin: 0 0 .6em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.visually-hidden {
	position: absolute !important; width: 1px; height: 1px;
	padding: 0; margin: -1px; overflow: hidden;
	clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--my-accent); outline-offset: 2px; }

/* ---------------------------------------------------------- utilities --- */
.my-container {
	width: 100%;
	max-width: var(--my-container);
	margin-inline: auto;
	padding-inline: 16px;
}

.my-row { display: flex; flex-wrap: wrap; margin-inline: -12px; }
.my-col { padding-inline: 12px; width: 100%; }
.my-col--main { width: 100%; }
.my-col--3 { width: 25%; }
.my-col--4 { width: 33.3333%; }
.my-col--6 { width: 50%; }
.my-col--8 { width: 66.6667%; }
.my-col--9 { width: 75%; }
.my-col--12 { width: 100%; }

.my-section { padding-block: 40px; }
.my-section--feature { padding-block: 32px; }

/* ---------------------------------------------------------- skip link --- */
.my-skip {
	position: absolute; left: -9999px; top: 0; z-index: 2000;
	background: var(--my-accent); color: #1b1b1b; padding: 10px 18px; font-weight: 600;
}
.my-skip:focus { left: 8px; top: 8px; }

/* ------------------------------------------------------------- header --- */
/*
 * White behind the brand bar, unless the bar is asking to be seen through.
 *
 * The bar's own opacity is mixed into its colour, so it can only ever blend
 * with whatever is behind it - and that is this box. Left solid white, turning
 * the bar down to 40% simply faded it towards white and nothing of the page
 * showed through, which is not what the setting says it does. index.php hands
 * this transparent whenever the bar is less than fully opaque.
 */
.my-header { background: var(--my-header-bg, #fff); position: relative; z-index: 50; }
body[data-sticky="1"] .my-header { position: sticky; top: 0; }
body[data-sticky="1"].my-scrolled .my-header { box-shadow: 0 4px 18px rgba(16, 40, 80, .12); }

.my-topbar {
	background: linear-gradient(90deg, var(--my-dark), var(--my-primary));
	color: var(--my-on-primary, #e8f1fb); font-size: .82rem;
}
.my-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.my-topbar a { color: var(--my-on-primary, #fff); }

.my-a11y { display: flex; gap: 6px; }
.my-a11y__btn {
	border: 1px solid color-mix(in srgb, var(--my-on-primary, #fff) 45%, transparent); background: transparent; color: var(--my-on-primary, #fff);
	width: 28px; height: 24px; border-radius: 6px; cursor: pointer; font-size: .78rem;
	display: inline-flex; align-items: center; justify-content: center; padding: 0;
	font-family: var(--my-font);
}
.my-a11y__btn:hover { background: color-mix(in srgb, var(--my-on-primary, #fff) 18%, transparent); }

/*
 * Background of the logo / organisation-name strip. The value is written by
 * index.php and can be a solid colour, an rgba() tint, or a gradient.
 */
.my-brandbar {
	background: var(--my-brandbar-bg, #fff);
	border-bottom: var(--my-brandbar-border, 0);
}

/* "โปร่งใส": let the page background show through the whole header. */
.my-brandbar.is-transparent { background: transparent; }
.my-header--transparent { background: transparent; }

.my-brandbar__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; padding-block: 12px;
}

.my-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.my-brand:hover { text-decoration: none; }
.my-brand__logo { display: block; height: auto; }
.my-brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.my-brand__name { font-size: 1.32rem; font-weight: 700; color: var(--my-ink-strong, var(--my-dark)); }
.my-brand__sub { font-size: .84rem; color: var(--my-muted); }

.my-brandbar__tools { display: flex; align-items: center; gap: 10px; }

.my-search__form { display: flex; align-items: center; background: #eef3f9; border-radius: 999px; padding: 3px 3px 3px 14px; }
.my-search__input {
	border: 0; background: transparent; outline: none; width: 190px;
	font-family: var(--my-font); font-size: .88rem; color: var(--my-ink); padding: 5px 0;
}
.my-search__btn {
	border: 0; width: 32px; height: 32px; border-radius: 50%;
	background: var(--my-primary); color: var(--my-on-primary, #fff); cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.my-search__btn:hover { background: var(--my-dark); }

/* Light text, used when the brand bar sits on a dark colour or gradient. */
.my-brandbar.is-light .my-brand__name { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
.my-brandbar.is-light .my-brand__sub { color: rgba(255, 255, 255, .85); }

.my-brandbar.is-light .my-search__form {
	background: rgba(255, 255, 255, .16);
	border: 1px solid rgba(255, 255, 255, .3);
	backdrop-filter: blur(4px);
}
.my-brandbar.is-light .my-search__input { color: #fff; }
.my-brandbar.is-light .my-search__input::placeholder { color: rgba(255, 255, 255, .7); }
.my-brandbar.is-light .my-search__btn { background: rgba(255, 255, 255, .9); color: var(--my-ink-strong, var(--my-dark)); }
.my-brandbar.is-light .my-search__btn:hover { background: #fff; }

.my-brandbar.is-light .my-iconbtn,
.my-brandbar.is-light .my-navtoggle {
	background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); color: #fff;
}
.my-brandbar.is-light .my-iconbtn:hover,
.my-brandbar.is-light .my-navtoggle:hover { background: rgba(255, 255, 255, .3); }

.my-iconbtn {
	width: 34px; height: 34px; border-radius: 8px; background: var(--my-primary); color: var(--my-on-primary, #fff);
	display: inline-flex; align-items: center; justify-content: center; font-size: .9rem;
}
.my-iconbtn:hover { background: var(--my-dark); color: var(--my-on-primary, #fff); text-decoration: none; }

.my-navtoggle {
	display: none; border: 0; background: var(--my-primary); color: var(--my-on-primary, #fff);
	width: 38px; height: 34px; border-radius: 8px; cursor: pointer;
}

/* --------------------------------------------------------------- nav ---- */
.my-nav { background: linear-gradient(90deg, var(--my-dark), var(--my-primary) 55%, var(--my-light)); }
.my-nav__inner { display: flex; align-items: center; gap: 10px; }

.my-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.my-nav ul li { position: relative; }
.my-nav ul li > a,
.my-nav ul li > span.separator {
	display: flex; align-items: center; gap: 7px;
	padding: 12px 16px; color: var(--my-on-primary, #fff); font-size: .95rem; font-weight: 500;
	white-space: nowrap; transition: background .15s ease;
}
.my-nav ul li > a:hover,
.my-nav ul li:focus-within > a { background: color-mix(in srgb, var(--my-on-primary, #fff) 16%, transparent); text-decoration: none; color: var(--my-on-primary, #fff); }
.my-nav ul li.current > a,
.my-nav ul li.active > a { background: color-mix(in srgb, var(--my-on-primary, #fff) 24%, transparent); }

/* dropdowns */
.my-nav ul ul {
	display: none; position: absolute; top: 100%; left: 0; min-width: 230px;
	background: #fff; border-radius: 0 0 var(--my-radius-sm) var(--my-radius-sm);
	box-shadow: var(--my-shadow-lg); padding: 6px 0; flex-direction: column; z-index: 60;
}
.my-nav ul li:hover > ul,
.my-nav ul li:focus-within > ul { display: flex; }
.my-nav ul ul li > a { color: var(--my-ink); padding: 9px 16px; font-weight: 400; }
.my-nav ul ul li > a:hover { background: #eef4fb; color: var(--my-primary); }
.my-nav ul ul ul { top: 0; left: 100%; border-radius: var(--my-radius-sm); }

/* ---------------------------------------------------------- page hero --- */
.my-pagehero {
	position: relative; min-height: var(--my-pagehero-h);
	background-size: cover; background-position: center;
	display: flex; align-items: center; color: #fff;
}
.my-pagehero__overlay {
	position: absolute; inset: 0;
	background: linear-gradient(90deg, color-mix(in srgb, var(--my-dark, #10427a) 86%, transparent), color-mix(in srgb, var(--my-primary, #1b5fa8) 62%, transparent));
}
.my-pagehero__inner { position: relative; z-index: 2; padding-block: 34px; }
.my-pagehero__title { color: #fff; font-size: 2.1rem; margin: 0 0 4px; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.my-pagehero__sub { color: rgba(255, 255, 255, .9); margin: 0; font-size: 1rem; }

/* --------------------------------------------------------- quicklinks --- */
.my-quicklinks-wrap { position: relative; z-index: 5; }
.my-quicklinks-wrap.is-overlap { margin-top: -48px; }

/* ------------------------------------------------------- breadcrumbs ---- */
.my-crumbs { background: #fff; border-bottom: 1px solid var(--my-line); }
.my-crumbs ol, .my-crumbs ul {
	list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
	margin: 0; padding: 10px 0; font-size: .86rem; color: var(--my-muted);
}
.my-crumbs li + li::before { content: "\203A"; margin-inline-end: 6px; color: #9aa4b2; }
.my-crumbs a { color: var(--my-primary); }

.my-crumbs__mod + .my-crumbs__mod { margin-top: 2px; }

/* "แสดงเส้นทางหน้า" off: keep the strip, drop only the breadcrumb trail. */
.my-crumbs.hide-trail .mod-mod_breadcrumbs { display: none; }
.my-crumbs.hide-trail:not(:has(.my-crumbs__mod:not(.mod-mod_breadcrumbs))) { display: none; }

/* -------------------------------------------------------------- main ---- */
.my-main { padding-block: 36px; min-height: 320px; }

/*
 * Straight after the quick links band. The band already ends on the bottom of
 * whatever stood tallest in it, so the usual 36px on top of the content added a
 * second gap to the first and left a bare strip between them. index.php only
 * puts this on when the band really is the previous thing on the page.
 */
.my-main.is-tight { padding-block-start: 0; }

/*
 * Nothing overhangs the content any more: the column on the right is a rail
 * beside it rather than a card hanging over it, so a section's "ดูทั้งหมด" link
 * can sit against the right edge of its own column the way it was meant to. The
 * rule that used to hold those links clear of the card is gone with the card.
 */
.my-main-top { margin-bottom: 24px; }
.my-main-bottom { margin-top: 24px; }
.my-sidebar > * + * { margin-top: 20px; }

/* ======================================================= card surfaces ===
 * Every panel on the site - module chrome, news cards, service tiles, the
 * calendar, the contact block - paints itself from this one set of variables,
 * which index.php writes from the template options. Changing the card colour
 * or glow there restyles all of them at once.
 * ======================================================================== */
/*
 * The outer shell a module sits in: the chosen card colour, but a plain line
 * around it. The glow belongs to the cards INSIDE - news items, service
 * tiles, album cards - where it marks one thing out from the next. On the
 * shell it would only draw a box around everything at once.
 */
.my-card,
.my-surface {
	background: var(--my-card-bg, var(--my-card));
	border: 1px solid var(--my-line);
	border-radius: var(--my-radius);
	box-shadow: var(--my-shadow);
	backdrop-filter: var(--my-card-blur, none);
}

.my-card { padding: 20px; margin-bottom: 24px; }

@keyframes my-card-pulse {
	0%, 100% { box-shadow: var(--my-card-shadow, var(--my-shadow)); }
	50%      { box-shadow: var(--my-card-shadow-hover, var(--my-shadow-lg)); }
}

/* Light text when a dark card colour is chosen. */
body.is-card-dark .my-card,
body.is-card-dark .my-surface { color: #eaf1fa; }
body.is-card-dark .my-card__title,
body.is-card-dark .my-surface h2,
body.is-card-dark .my-surface h3,
body.is-card-dark .my-surface h4 { color: #fff; border-bottom-color: rgba(255, 255, 255, .16); }
body.is-card-dark .my-card a:not(.my-btn),
body.is-card-dark .my-surface a:not(.my-btn) { color: #9fd0ff; }
body.is-card-dark .my-card .my-news__intro,
body.is-card-dark .my-surface .my-news__intro,
body.is-card-dark .my-surface .my-news__date,
body.is-card-dark .my-surface .my-cal-agenda__time,
body.is-card-dark .my-surface .my-cal-agenda__place { color: rgba(255, 255, 255, .72); }

/*
 * The same treatment for every panel shipped by the Gov modules and
 * components. The `body.my-site` prefix keeps these ahead of the module
 * stylesheets, which the browser loads after this file.
 */
body.my-site .my-news__lead,
body.my-site .my-news__row,
body.my-site .my-news__card,
body.my-site .my-services__card,
body.my-site .my-contact.is-card,
body.my-site .my-quicklinks.is-card,
body.my-site .my-cal,
body.my-site .my-cal-agenda,
body.my-site .my-ev {
	background: var(--my-card-bg, #fff);
	border: var(--my-card-bw, 1px) solid var(--my-card-bd, var(--my-line));
	box-shadow: var(--my-card-shadow, var(--my-shadow));
	backdrop-filter: var(--my-card-blur, none);
	transition: box-shadow .25s ease, border-color .2s ease, transform .2s ease;
}

body.my-site .my-news__lead:hover,
body.my-site .my-news__row:hover,
body.my-site .my-news__card:hover,
body.my-site a.my-services__card:hover,
body.my-site .my-cal-agenda__item:hover {
	border-color: var(--my-card-glow);
	box-shadow: var(--my-card-shadow-hover, var(--my-shadow-lg));
}

body.my-site.card-glow-pulse .my-news__card,
body.my-site.card-glow-pulse .my-services__card,
body.my-site.card-glow-pulse .my-cal,
body.my-site.card-glow-pulse .my-cal-agenda,
body.my-site.card-glow-pulse .my-quicklinks.is-card {
	animation: my-card-pulse 3s ease-in-out infinite;
}

/* Inside the dark footer the cards stay transparent, whatever is set above. */
body.my-site .my-footer .my-card,
body.my-site .my-footer .my-contact.is-card {
	background: transparent; border: 0; box-shadow: none; backdrop-filter: none; animation: none;
}

@media (prefers-reduced-motion: reduce) {
	body.my-site.card-glow-pulse .my-news__card,
	body.my-site.card-glow-pulse .my-services__card,
	body.my-site.card-glow-pulse .my-cal,
	body.my-site.card-glow-pulse .my-cal-agenda,
	body.my-site.card-glow-pulse .my-quicklinks.is-card { animation: none; }
}
.my-card__title {
	display: flex; align-items: center; gap: 10px;
	font-size: 1.12rem; margin: 0 0 14px; color: var(--my-ink-strong, var(--my-dark));
	padding-bottom: 10px; border-bottom: 2px solid #edf2f8;
}
.my-card__title::before {
	content: ""; width: 5px; height: 20px; border-radius: 3px;
	background: linear-gradient(180deg, var(--my-primary), var(--my-light));
}

/* section heading used by modules on the home page */
.my-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
/*
 * Every module's heading is dressed from here. A module writes only what its
 * editor changed as custom properties on the heading, so the defaults below
 * are what an untouched module looks like.
 */
.my-heading__text {
	display: flex; align-items: center; gap: 10px; margin: 0;
	font-size: var(--my-head-size, 1.35rem);
	font-weight: var(--my-head-weight, 700);
	font-style: var(--my-head-style, normal);
	color: var(--my-head-colour, var(--my-ink-strong, var(--my-dark)));
	/*
	 * A colour behind the words, for a heading that has to read against a
	 * photograph or a busy background. The spacing arrives with the colour:
	 * without one the three fall back to nothing and the heading is untouched.
	 */
	background: var(--my-head-bg, transparent);
	padding: var(--my-head-pad, 0);
	border-radius: var(--my-head-round, 0);
	width: var(--my-head-w, auto);
}
.my-heading__text::before {
	content: ""; width: 6px; height: 24px; border-radius: 3px;
	background: linear-gradient(180deg, var(--my-primary), var(--my-light));
}

/* With an icon in front of the words, the bar would be a second marker. */
.my-heading__text.no-bar::before { display: none; }

.my-heading__icon {
	color: var(--my-head-icon, var(--my-primary));
	font-size: .92em; line-height: 1;
}

/* The calendar module's title is drawn here rather than in the module. */
.my-calmod__title {
	font-weight: var(--my-head-weight, inherit);
	font-style: var(--my-head-style, inherit);
	color: var(--my-head-colour, inherit);
	background: var(--my-head-bg, transparent);
	padding: var(--my-head-pad, 0);
	border-radius: var(--my-head-round, 0);
	width: var(--my-head-w, auto);
}
.my-calmod__title[class] { font-size: var(--my-head-size, inherit); }
.my-calmod__title .my-heading__icon { margin-inline-end: 8px; }
.my-heading__more { font-size: .88rem; font-weight: 600; color: var(--my-primary); white-space: nowrap; }
.my-heading__more i { margin-inline-start: 4px; }

/* ----------------------------------------------------------- buttons ---- */
.my-btn {
	display: inline-flex; align-items: center; gap: 8px; justify-content: center;
	background: var(--my-primary); color: var(--my-on-primary, #fff); border: 0; cursor: pointer;
	padding: 10px 22px; border-radius: var(--my-radius-sm);
	font-family: var(--my-font); font-size: .95rem; font-weight: 600;
	transition: background .15s ease, transform .15s ease;
}
.my-btn:hover { background: var(--my-dark); color: var(--my-on-primary, #fff); text-decoration: none; transform: translateY(-1px); }
.my-btn--block { width: 100%; }
.my-btn--ghost { background: transparent; color: var(--my-primary); border: 1px solid var(--my-primary); }
.my-btn--ghost:hover { background: var(--my-primary); color: var(--my-on-primary, #fff); }

/* ------------------------------------------------------------- forms ---- */
.my-field { margin-bottom: 14px; }
.my-field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 5px; color: #33405a; }
.my-input, .my-textarea, .my-select,
body.my-site input[type="text"],
body.my-site input[type="email"],
body.my-site input[type="tel"],
body.my-site input[type="password"],
body.my-site textarea,
body.my-site select {
	width: 100%; border: 1px solid var(--my-line); border-radius: var(--my-radius-sm);
	padding: 9px 12px; font-family: var(--my-font); font-size: .95rem;
	background: #fff; color: var(--my-ink);
}
.my-input:focus, .my-textarea:focus, body.my-site input:focus, body.my-site textarea:focus {
	border-color: var(--my-light); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--my-light, #2e80d6) 15%, transparent);
}

/* --------------------------------------------- vertical pill side menu -- */
.my-sidenav { list-style: none; margin: 0; padding: 0; }
.my-sidenav li { margin-bottom: 6px; }
.my-sidenav li > a {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 14px; border-radius: var(--my-radius-sm);
	background: #f4f7fb; color: #33405a; font-size: .94rem; font-weight: 500;
	transition: all .15s ease;
}
.my-sidenav li > a::before {
	content: "\25CF"; font-size: .5rem; color: var(--my-light);
}
.my-sidenav li > a:hover { background: color-mix(in srgb, var(--my-primary, #1b5fa8) 12%, #fff); color: var(--my-primary); text-decoration: none; }
.my-sidenav li.current > a,
.my-sidenav li.active > a {
	background: linear-gradient(90deg, var(--my-primary), var(--my-light));
	color: var(--my-on-primary, #fff); box-shadow: 0 4px 12px color-mix(in srgb, var(--my-primary, #1b5fa8) 28%, transparent);
}
.my-sidenav li.current > a::before,
.my-sidenav li.active > a::before { color: var(--my-on-primary, #fff); }
.my-sidenav ul { list-style: none; padding-inline-start: 16px; margin: 6px 0 0; }

/* ---------------------------------------------------- content styling --- */
.my-main .page-header h1, .my-main .page-header h2 { font-size: 1.6rem; color: var(--my-ink-strong, var(--my-dark)); }
.my-main .com-content-article,
.my-main .com-content-category-blog,
.my-main .com-content-category__items,
.my-main .blog,
.my-main .item-page {
	background: #fff; border: 1px solid var(--my-line); border-radius: var(--my-radius);
	box-shadow: var(--my-shadow); padding: 26px;
}
.my-main .item-page img, .my-main .blog img { border-radius: var(--my-radius-sm); }

.my-article-info {
	display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
	font-size: .85rem; color: var(--my-muted);
	padding: 8px 0 14px; border-bottom: 1px dashed var(--my-line); margin-bottom: 16px;
	list-style: none;
}
.my-article-info i { color: var(--my-primary); margin-inline-end: 5px; }

/* --------------------------------------------------- หน้าโล่ง (Blank) --- */
/*
 * The bare page: content only, no bar, menu or footer. Used by the "Blank"
 * template style and by Joomla's own tmpl=component, which render the same
 * markup (blank.php).
 */
/*
 * เต็มหน้าต่างเสมอ
 *
 * The bare page is what a popup shows inside its window, and a short page -
 * a folder with nothing in it yet - painted its colour only as far as the
 * content went, leaving the rest of the window white below it. The colour is
 * meant to be the window's, so the page is told to be at least as tall as the
 * window it is in; a longer page still grows past it as before.
 */
.my-blank {
	background: var(--my-bg, #f6f8fb);
	min-height: 100vh;
	min-height: 100dvh;
}

.my-blank__inner {
	width: 100%; max-width: 1000px;
	margin-inline: auto; padding-inline: 16px;
}
.my-blank.is-narrow .my-blank__inner { max-width: 760px; }
.my-blank.is-wide .my-blank__inner   { max-width: var(--my-container); }

.my-blank__body { padding-block: 24px 40px; }

/* The optional line saying which site the window came from. */
.my-blank__brand {
	background: var(--my-surface, #fff);
	border-bottom: 1px solid var(--my-line, #e5e7eb);
}
.my-blank__brand .my-blank__inner {
	display: flex; align-items: center; gap: 10px;
	padding-block: 10px; font-weight: 600; color: var(--my-ink-strong, var(--my-dark, #12395f));
}
.my-blank__brand img { width: 34px; height: auto; }

/*
 * Joomla's own article "Details" block is a <dl>, so every entry stacks on its
 * own line by default. Lay it out as one horizontal row instead.
 *
 * Scoped to the body class, not .my-main: the bare "tmpl=component" layout has
 * no .my-main wrapper, and the block stacked again in that window.
 */
.my-site dl.article-info {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px;
	margin: 0 0 18px; padding: 10px 0 14px;
	border-bottom: 1px dashed var(--my-line);
	font-size: .85rem; color: var(--my-muted);
}

.my-site dl.article-info dt.article-info-term {
	margin: 0; font-weight: 600; color: #33405a;
	background: #eef4fb; border-radius: 999px; padding: 3px 12px;
}

.my-site dl.article-info dd {
	margin: 0; display: inline-flex; align-items: center; gap: 6px;
	white-space: nowrap;
}

.my-site dl.article-info dd [class^="icon-"],
.my-site dl.article-info dd [class*=" icon-"] { color: var(--my-primary); }

.my-site dl.article-info dd + dd::before {
	content: ""; width: 4px; height: 4px; border-radius: 50%;
	background: #c3cbd6; margin-inline-end: 12px;
}

@media (max-width: 575px) {
	.my-site dl.article-info { gap: 6px 12px; }
	.my-site dl.article-info dd + dd::before { display: none; }
}

/*
 * เลขหน้า - on an ordinary page and inside the "ดูทั้งหมด" popup alike. The
 * popup is the bare page (blank.php), whose content sits in .my-blank__body
 * rather than .my-main, so a rule scoped to .my-main left it as a bulleted list.
 *
 * Only the box the item holds is styled - a span inside it is the arrow icon,
 * and styling every span drew a second box inside the first.
 */
:is(.my-main, .my-blank__body) .pagination__wrapper,
:is(.my-main, .my-blank__body) .pagination-wrapper { margin-top: 24px; }
:is(.my-main, .my-blank__body) .pagination ul,
:is(.my-main, .my-blank__body) ul.pagination {
	list-style: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 0; margin: 24px 0 0;
}
:is(.my-main, .my-blank__body) .pagination li { margin: 0; padding: 0; }
:is(.my-main, .my-blank__body) .pagination li::marker { content: none; }
:is(.my-main, .my-blank__body) .pagination li > :is(a, span) {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 36px; height: 36px; padding: 0 10px; border-radius: var(--my-radius-sm);
	border: 1px solid var(--my-line); background: #fff; color: var(--my-ink); font-size: .9rem;
	text-decoration: none; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
:is(.my-main, .my-blank__body) .pagination li > a:hover,
:is(.my-main, .my-blank__body) .pagination li > a:focus-visible {
	border-color: var(--my-primary); color: var(--my-primary);
}
:is(.my-main, .my-blank__body) .pagination .active > :is(a, span) {
	background: var(--my-primary); border-color: var(--my-primary); color: var(--my-on-primary, #fff);
}
:is(.my-main, .my-blank__body) .pagination .disabled > :is(a, span) { opacity: .45; cursor: default; }

/*
 * Joomla names the first / previous / next / last arrows with its own icon
 * classes, which only its icon font maps to glyphs - and the site loads Font
 * Awesome instead, so the four end buttons came out empty. Mapped here.
 */
.pagination [class^="icon-angle"]::before {
	font-family: "Font Awesome 6 Free"; font-weight: 900; font-style: normal; line-height: 1;
}
.pagination .icon-angle-double-left::before  { content: "\f100"; }
.pagination .icon-angle-left::before         { content: "\f104"; }
.pagination .icon-angle-right::before        { content: "\f105"; }
.pagination .icon-angle-double-right::before { content: "\f101"; }

table.my-table, .my-main table.table {
	width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--my-radius-sm); overflow: hidden;
}
table.my-table th, .my-main table.table th { background: var(--my-primary); color: var(--my-on-primary, #fff); text-align: start; padding: 10px 12px; font-weight: 600; }
table.my-table td, .my-main table.table td { padding: 10px 12px; border-bottom: 1px solid var(--my-line); }
table.my-table tbody tr:nth-child(even) { background: #f8fafd; }

/* Joomla system messages */
.my-main .alert, joomla-alert { border-radius: var(--my-radius-sm); }

/* -------------------------------------------- right sidebar to the edge -- */
/*
 * "ชิดขอบ": on wide screens the main container spans the full width and the
 * left padding keeps the content lined up with the rest of the page, so the
 * right sidebar gains the width that would otherwise be empty margin.
 *
 * It stops one gutter short of the glass rather than touching it - a card
 * pressed against the screen edge (and the scrollbar beside it) reads as
 * broken. Percentages, not vw, so the scrollbar never causes an overflow.
 */
@media (min-width: 992px) {
	/*
	 * The rail is a column of the page row now, so it is that row's container
	 * that has to widen - the whole page opens out together and the rail keeps
	 * the width that would otherwise be empty margin beside it.
	 */
	.my-site.is-sidebar-edge .my-page__row.my-container {
		max-width: none;
		padding-inline-start: max(16px, calc((100% - var(--my-container)) / 2 + 16px));
		padding-inline-end: 16px;
	}
}

/*
 * Sticky right column on tall screens - handy for menus and contact blocks.
 *
 * It sticks only while there is something to scroll past: the rail runs the
 * height of the page now, so on a page whose left column is the shorter of the
 * two there is nothing for it to follow and the browser leaves it where it is.
 */
@media (min-width: 992px) {
	/*
	 * It stops below the header rather than under it. --my-header-h is the
	 * header's measured height, set by template.js on load and whenever the
	 * header changes size; the 72px fallback is for a page without JavaScript
	 * and comes to the 96px this distance used to be written at.
	 */
	.my-sidebar--right {
		align-self: flex-start;
		position: sticky;
		top: calc(var(--my-header-h, 72px) + var(--my-rail-gap, 12px));
	}

	/*
	 * คอลัมน์ที่สูงเกินจอ - ปล่อยให้ยาวลงไปเลย ไม่ปักหมุด
	 *
	 * A rail taller than the screen cannot be pinned: sticky holds its top in
	 * place and the cards below the fold are then unreachable, because the page
	 * scrolls and the rail does not. It was given a ceiling and its own
	 * scrollbar to get around that, which worked but put a scrollbar down the
	 * side of the column, and a scrollbar inside a page that already has one is
	 * a thing to explain rather than a thing to use.
	 *
	 * So a rail that does not fit is simply not pinned. It runs the full length
	 * of the page and scrolls with everything else - every card reachable, no
	 * bar anywhere. A rail that does fit still follows the reader down, which is
	 * what the pinning was for in the first place.
	 *
	 * The class is put on by the script, because whether it fits depends on the
	 * height of the window and the height of the cards, and CSS cannot compare
	 * the two.
	 */
	/*
	 * ระยะห่างยังต้องใช้ได้ตอนไม่ปักหมุด
	 *
	 * "top" only means something to an element that is positioned, so the
	 * moment a rail is let loose the setting stopped doing anything at all -
	 * dragging the slider moved nothing, which is exactly what it looked like.
	 * A column standing in the ordinary flow is moved by a margin instead, so
	 * the same number is applied that way here.
	 *
	 * The header's own height is left out on purpose: a pinned rail has to
	 * clear a header that floats over it, and one standing in the flow is
	 * already below it.
	 *
	 * ทำไมติดลบแล้วไม่ขึ้นไปทับ
	 *
	 * A negative number was meant for the pinned case, where it slides the
	 * column up under a header that is floating over the page anyway. In the
	 * ordinary flow there is no floating header above it - there is the rest of
	 * the page - so the same number dragged the card up over the banner and the
	 * buttons instead. Held at nothing below zero here: dragging that way means
	 * "as close as it goes", not "on top of what is above".
	 */
	.my-sidebar--right.is-tall {
		position: static;
		top: auto;
		margin-top: max(0px, var(--my-rail-gap, 12px));
	}

	body[data-sticky="0"] .my-sidebar--right { top: var(--my-rail-gap, 12px); }

	/*
	 * Switched off in the template settings the column simply sits where it is
	 * and scrolls away with everything else - the same thing a rail too tall to
	 * pin does on its own.
	 */
	body[data-rail-sticky="0"] .my-sidebar--right {
		position: static;
		top: auto;
		margin-top: max(0px, var(--my-rail-gap, 12px));
	}
}

/* --------------------------------------------------------- prefooter ---- */
.my-prefooter {
	background: #fff;
	border-top: 1px solid var(--my-line);
	padding-block: 26px;
}
.my-prefooter > .my-container > * + * { margin-top: 22px; }

/* ------------------------------------------------------------ footer ---- */
.my-footer { color: #cfd8e6; background: var(--my-footer-bg); margin-top: 40px; }

.my-footer__strip { position: relative; background-size: cover; background-position: center; }
.my-footer__strip-overlay {
	position: absolute; inset: 0;
	background: linear-gradient(90deg, color-mix(in srgb, var(--my-dark, #10427a) 90%, transparent), color-mix(in srgb, var(--my-primary, #1b5fa8) 68%, transparent));
}
.my-footer__strip-inner {
	position: relative; z-index: 2; padding-block: 26px; color: #fff;
	display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
}
.my-footer__slogan { display: flex; flex-direction: column; }
.my-footer__slogan strong { font-size: 1.35rem; }
.my-footer__slogan span { font-size: .95rem; opacity: .92; }

.my-footer__main { padding-block: 34px; }
.my-footer__title { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.my-footer__list { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.my-footer__list li { display: flex; gap: 10px; margin-bottom: 9px; align-items: flex-start; }
.my-footer__list li i { color: var(--my-accent); width: 16px; text-align: center; margin-top: 5px; }
.my-footer a { color: #cfd8e6; }
.my-footer a:hover { color: #fff; }

.my-footer__social { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.my-social {
	width: 34px; height: 34px; border-radius: 50%; background: var(--sc, var(--my-primary));
	color: #fff !important; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem;
}
.my-social:hover { filter: brightness(1.15); text-decoration: none; }

.my-footer__qr { margin-top: 16px; }
.my-footer__qr img { background: #fff; padding: 6px; border-radius: var(--my-radius-sm); }

.my-footer__bottom { background: rgba(0, 0, 0, .25); font-size: .84rem; }
.my-footer__bottom-inner {
	display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: center;
	padding-block: 12px; text-align: center;
}
.my-footer__credit { opacity: .75; }

/* footer menu module */
.my-footer .my-card { background: transparent; border: 0; box-shadow: none; padding: 0; }
.my-footer .my-card__title { color: #fff; border-bottom-color: rgba(255, 255, 255, .18); }
.my-footer ul.menu, .my-footer .menu { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.my-footer ul.menu li { margin-bottom: 8px; }
.my-footer ul.menu li a::before { content: "\203A"; margin-inline-end: 7px; color: var(--my-accent); }

/* --------------------------------------------------------- back to top -- */
.my-totop {
	position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 900;
	width: 44px; height: 44px; border: 0; border-radius: 50%;
	background: var(--my-primary); color: var(--my-on-primary, #fff); cursor: pointer;
	box-shadow: var(--my-shadow-lg); opacity: 0; visibility: hidden;
	transition: opacity .2s ease, visibility .2s ease;
}
.my-totop.is-visible { opacity: 1; visibility: visible; }
.my-totop:hover { background: var(--my-dark); }

/* ------------------------------------------------------- error/offline -- */
.my-errorpage, .my-offline { background: var(--my-bg); }
.my-error { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.my-error__box {
	background: #fff; border-radius: var(--my-radius); box-shadow: var(--my-shadow-lg);
	padding: 44px 34px; max-width: 560px; width: 100%; text-align: center;
}
.my-error__code { font-size: 4.5rem; font-weight: 700; color: var(--my-primary); line-height: 1; }
.my-error__title { font-size: 1.35rem; }
.my-error__text { color: var(--my-muted); }
.my-error__debug { text-align: start; font-size: .8rem; overflow: auto; margin-top: 20px; }
.my-offline__login { text-align: start; margin-top: 22px; }

/* ------------------------------------------------------- high contrast -- */
body.my-contrast {
	--my-primary: #000000;
	--my-dark: #000000;
	--my-light: #333333;
	--my-accent: #ffdd00;
	--my-ink: #000000;
	--my-muted: #222222;
	--my-bg: #ffffff;
	--my-footer-bg: #000000;
}
body.my-contrast .my-pagehero__overlay,
body.my-contrast .my-footer__strip-overlay { background: rgba(0, 0, 0, .82); }
body.my-contrast a { text-decoration: underline; }

/* ---------------------------------------------------------- responsive -- */
@media (max-width: 991px) {
	.my-col--3, .my-col--4, .my-col--6, .my-col--8, .my-col--9 { width: 50%; }
	.my-main .my-col--3, .my-main .my-col--6, .my-main .my-col--8, .my-main .my-col--9 { width: 100%; }
	.my-main .my-col--main, .my-main .my-sidebar { width: 100%; flex: 0 0 100%; max-width: 100%; }
	.my-sidebar { margin-top: 24px; }
	.my-pagehero__title { font-size: 1.6rem; }
}

@media (max-width: 767px) {
	.my-col--3, .my-col--4, .my-col--6, .my-col--8, .my-col--9 { width: 100%; }

	.my-navtoggle { display: inline-flex; align-items: center; justify-content: center; }

	/*
	 * The search box goes away on a phone. It was narrowed to 120px to make it
	 * fit, but even that much takes the room the organisation's name needs, and
	 * a name the visitor cannot read costs more than a search box they can
	 * reach from the menu.
	 */
	.my-brandbar .my-search { display: none; }

	.my-brand__name { font-size: 1.05rem; }
	.my-brand__sub { font-size: .76rem; }

	.my-nav__inner { display: block; }
	.my-nav ul { display: none; flex-direction: column; }
	.my-nav.is-open ul { display: flex; }
	.my-nav ul ul { position: static; display: flex; box-shadow: none; background: rgba(0, 0, 0, .14); border-radius: 0; }
	.my-nav ul ul li > a { color: var(--my-on-primary, #fff); padding-inline-start: 34px; }
	.my-nav ul ul li > a:hover { background: color-mix(in srgb, var(--my-on-primary, #fff) 14%, transparent); color: var(--my-on-primary, #fff); }
	.my-nav ul li > a { border-bottom: 1px solid color-mix(in srgb, var(--my-on-primary, #fff) 12%, transparent); }

	.my-quicklinks-wrap.is-overlap { margin-top: 0; }
	.my-main .com-content-article, .my-main .item-page, .my-main .blog { padding: 18px; }
	.my-footer__strip-inner { justify-content: center; text-align: center; }
}

/*
 * Phone gutters.
 *
 * Three paddings stack up before any text is reached: 16px of container, 12px
 * of column and 20px of card put the first letter 48px in from the screen -
 * nearly a third of a 360px screen spent on empty margin down both sides. By
 * this width every column is already full width, so its gutter has no work
 * left to do at all and is taken out; the container and the card keep just
 * enough to stop the text touching the glass.
 */
@media (max-width: 575px) {
	.my-container { padding-inline: 8px; }

	.my-row { margin-inline: 0; }
	.my-col { padding-inline: 0; }

	.my-card { padding-inline: 12px; }

	.my-main .com-content-article,
	.my-main .item-page,
	.my-main .blog { padding-inline: 12px; }
}

@media print {
	.my-header, .my-footer, .my-totop, .my-quicklinks-wrap, .my-pagehero { display: none !important; }
	body.my-site { background: #fff; }
}

/* ------------------------------------------------------ share buttons --- */
/*
 * One implementation for every section that offers sharing: news, photo
 * albums and documents. The markup carries the url and title as data
 * attributes so no per-section script is needed.
 */
.my-share { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.my-share__label { font-size: .78rem; color: var(--my-muted); margin-inline-end: 2px; }

/*
 * The bottom row of a card: what to press on the left, where to share hard
 * against the right. One rule for news cards and photo albums alike. On a
 * narrow card the share buttons drop to their own line, still right-aligned.
 */
.my-cardfoot {
	display: flex; align-items: center; flex-wrap: wrap;
	gap: 10px; margin-top: 12px;
}
.my-cardfoot .my-share { margin-inline-start: auto; }

/* Each network keeps its own colour, so the buttons read at a glance. */
.my-share__btn {
	width: 30px; height: 30px; border: 0; border-radius: 50%; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	background: #46566f; color: #fff; font-size: .82rem;
	transition: filter .16s ease, transform .16s ease;
}
.my-share__btn[data-share="facebook"] { background: #1877f2; }
.my-share__btn[data-share="line"]     { background: #06c755; }
.my-share__btn[data-share="x"]        { background: #000; }
.my-share__btn[data-share="email"]    { background: #d97706; }
.my-share__btn[data-share="copy"]     { background: var(--my-primary); }

/*
 * The one button. It opens the machine's own share sheet - which already lists
 * Facebook, LINE, mail and the rest, and is handed the headline that
 * Facebook's own sharer page will not accept - and copies the link where there
 * is no sheet.
 */
.my-share__btn[data-share="native"] { background: var(--my-primary); }

/* On a detail page the button carries the word as well as the mark. */
.my-share__btn--wide {
	width: auto; height: auto; border-radius: 999px;
	gap: 7px; padding: 7px 15px;
	font: inherit; font-size: .86rem; font-weight: 700;
}

.my-share__t { white-space: nowrap; }

.my-share__btn:hover { transform: translateY(-2px); filter: brightness(1.12); }
/* Copied: the button goes green and the script swaps the mark for a tick. */
.my-share__btn.is-done { background: #16a34a; }

@media (prefers-reduced-motion: reduce) {
	.my-share__btn { transition: none; }
}

/* ------------------------------------------- view count and "ถูกใจ" --- */
/*
 * The small line under a news item or album: how many people opened it and
 * the like button. Shared by both sections so the two read the same.
 */
.my-news__meta,
.my-alb__meta {
	display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
	margin: 8px 0 2px;
}

.my-news__hits,
.my-alb__hits {
	display: inline-flex; align-items: center; gap: 5px;
	font-size: .8rem; color: var(--my-muted, #6b7280);
}
.my-news__hits i,
.my-alb__hits i { color: var(--my-primary, #1b5fa8); }

/*
 * The like button sits at the far right of that line, away from the view
 * count on the left - it is the one thing there to press, so it gets its own
 * corner. On a narrow card the line wraps and it keeps the right edge.
 */
.my-news__meta .my-like,
.my-alb__meta .my-like { margin-inline-start: auto; }

.my-like {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 4px 11px; border-radius: 999px; cursor: pointer;
	border: 1px solid var(--my-line, #e2e8f0);
	background: var(--my-surface, #fff); color: var(--my-muted, #6b7280);
	font: inherit; font-size: .8rem; line-height: 1.4;
	transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.my-like:hover { border-color: var(--my-primary, #1b5fa8); color: var(--my-primary, #1b5fa8); }

/* Already liked in this visit: filled in, and the button stops responding. */
.my-like.is-done {
	background: var(--my-primary, #1b5fa8); border-color: var(--my-primary, #1b5fa8);
	color: #fff; cursor: default;
}
.my-like.is-done:hover { color: #fff; }

.my-like__n { font-variant-numeric: tabular-nums; font-weight: 600; }

/* A short nudge when the count goes up, so the click is felt. */
.my-like.is-bump { animation: my-like-bump .32s ease; }

@keyframes my-like-bump {
	40% { transform: scale(1.12); }
	100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.my-like { transition: none; }
	.my-like.is-bump { animation: none; }
}

/* -------------------------------------------------------- popup modal --- */
/*
 * Opens a page in an overlay instead of navigating. The iframe loads the bare
 * "tmpl=component" layout, so what shows inside is the content alone.
 */
.my-modal {
	position: fixed; inset: 0; z-index: 1300;
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
	opacity: 0; transition: opacity .2s ease;
}
.my-modal.is-open { opacity: 1; }
.my-modal[hidden] { display: none; }

/*
 * ฉากหลังและตัวกล่องเดินตามชุดโทนสี
 *
 * The head has always taken the tone; the rest of the overlay was a fixed navy
 * wash and a white card, which over a brown or a green site reads as a window
 * belonging to some other page. Both are now mixed out of the tone's own dark
 * shade and its page colour, and every fallback is the value that was there
 * before, so a page with no tone set looks exactly as it did.
 */
.my-modal__backdrop {
	position: absolute; inset: 0;
	background: var(--my-modal-backdrop, color-mix(in srgb, var(--my-dark, #061223) 72%, transparent));
}

.my-modal__box {
	position: relative; z-index: 1;
	display: flex; flex-direction: column;
	width: min(960px, 100%); height: min(86vh, 900px);
	background: var(--my-bg, #fff); border-radius: var(--my-radius, 14px); overflow: hidden;
	box-shadow: 0 24px 60px color-mix(in srgb, var(--my-dark, #061223) 45%, transparent);
	transform: translateY(12px) scale(.99);
	transition: transform .2s ease;
}
.my-modal.is-open .my-modal__box { transform: none; }

.my-modal__head {
	flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
	padding: 12px 16px; color: var(--my-on-primary, #fff);
	background: linear-gradient(135deg, var(--my-primary), var(--my-light));
}

.my-modal__title {
	flex: 1 1 auto; min-width: 0; margin: 0; color: var(--my-on-primary, #fff);
	font-size: 1rem; line-height: 1.4;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.my-modal__close {
	flex: 0 0 auto; width: 32px; height: 32px; border: 0; border-radius: 50%;
	background: color-mix(in srgb, var(--my-on-primary, #fff) 20%, transparent); color: var(--my-on-primary, #fff); cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.my-modal__close:hover { background: color-mix(in srgb, var(--my-on-primary, #fff) 34%, transparent); }

/*
 * สีระหว่างรอหน้าโหลด
 *
 * Shown for the moment before the page inside has painted. It takes this
 * page's own background rather than white, so the window does not flash pale
 * on a site that is not.
 */
.my-modal__frame { flex: 1 1 auto; width: 100%; border: 0; background: var(--my-bg, #f4f7fb); }

/* Stop the page behind from scrolling while the overlay is up. */
body.my-modal-open { overflow: hidden; }

@media (max-width: 575px) {
	.my-modal { padding: 0; }
	.my-modal__box { width: 100%; height: 100%; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.my-modal, .my-modal__box { transition: none; }
}
/* Social icons on the brand row, beside the organisation name. */
.my-topbar__right { display: flex; align-items: center; gap: 14px; }

.my-brandbar__social { display: flex; align-items: center; gap: 6px; }

/* Each network wears its own colour, so it is recognised at a glance. */
.my-brandbar__social .my-social {
	width: 32px; height: 32px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--sc, var(--my-primary)); color: #fff; font-size: .86rem;
	transition: filter .16s ease, transform .16s ease;
}
.my-brandbar__social .my-social:hover {
	color: #fff; text-decoration: none;
	filter: brightness(1.12); transform: translateY(-2px);
}

/* A white ring keeps them apart from a dark or gradient brand bar. */
.my-brandbar.is-light .my-brandbar__social .my-social {
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .45);
}

@media (max-width: 767px) {
	/* The brand row is for the emblem and the name on a phone; the footer
	   still lists every channel. */
	.my-brandbar__social { display: none; }

	/* And a long organisation name gives way rather than break the row. */
	.my-brandbar__inner { gap: 10px; }
	.my-brandbar__tools { flex: 0 0 auto; }
	.my-brand { min-width: 0; }
	.my-brand__text { min-width: 0; }
	.my-brand__name,
	.my-brand__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* =========================================================== "ใหม่" flag ==== */
/*
 * ข่าวใหม่ / กิจกรรมใหม่ / วีดีโอใหม่ - each module draws its own flag and
 * decides its words and colours; the movement is the same choice everywhere,
 * so the animations are written once here rather than three times over.
 *
 * Nothing but movement belongs in these rules: the flag keeps the colours its
 * own module gave it.
 */
/*
 * --my-fx-time is written on the module, not here: a default declared on the
 * flag itself would win over the module's own value instead of giving way to
 * it, so the speed is carried in the fallback of every use.
 */
.my-fx--pulse  { animation: my-fx-pulse  var(--my-fx-time, 1.8s) ease-in-out infinite; }
.my-fx--blink  { animation: my-fx-blink  var(--my-fx-time, 1.8s) steps(1, end) infinite; }
.my-fx--bounce { animation: my-fx-bounce var(--my-fx-time, 1.8s) ease-in-out infinite; }
.my-fx--glow   { animation: my-fx-glow   var(--my-fx-time, 1.8s) ease-in-out infinite; }
.my-fx--shake  { animation: my-fx-shake  calc(var(--my-fx-time, 1.8s) * 2) ease-in-out infinite; }

@keyframes my-fx-pulse {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.11); }
}

@keyframes my-fx-blink {
	0%  { opacity: 1; }
	50% { opacity: .2; }
}

@keyframes my-fx-bounce {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-5px); }
}

/*
 * A glow drawn with drop-shadow rather than box-shadow, so the coloured halo
 * each module already gives its flag stays where it is. currentColor is the
 * words on the flag, which keeps the halo in the flag's own palette.
 */
@keyframes my-fx-glow {
	0%, 100% { filter: drop-shadow(0 0 0 transparent); }
	50%      { filter: drop-shadow(0 0 7px currentColor); }
}

@keyframes my-fx-shake {
	0%, 70%, 100% { transform: rotate(0); }
	74%           { transform: rotate(-7deg); }
	78%           { transform: rotate(6deg); }
	82%           { transform: rotate(-5deg); }
	86%           { transform: rotate(3deg); }
}

/*
 * The sweep of light needs the flag to be the frame its own shine is measured
 * against. On a picture the flag is already positioned; in a list it is not,
 * and setting "position" there would move the ones on pictures. A transform
 * makes the flag a containing block either way and moves nothing.
 */
.my-fx--shine { transform: translateZ(0); overflow: hidden; }

.my-fx--shine::after {
	content: ''; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(115deg, transparent 38%, rgb(255 255 255 / .6) 50%, transparent 62%);
	transform: translateX(-130%);
	animation: my-fx-shine calc(var(--my-fx-time, 1.8s) * 1.6) ease-in-out infinite;
}

@keyframes my-fx-shine {
	0%        { transform: translateX(-130%); }
	55%, 100% { transform: translateX(130%); }
}

/* Anyone who asked their computer for less movement gets a flag that sits still. */
@media (prefers-reduced-motion: reduce) {
	.my-fx, .my-fx::after { animation: none; }
	.my-fx--shine::after  { display: none; }
	.my-fx--blink         { opacity: 1; }
}
/* ============================================================ แบ่งหน้า ==== */
/*
 * The pager the template's script builds under a module that was given more
 * items than it shows at once. It reads the site's own colours, so it belongs
 * to whichever tone is in use.
 */
.my-pager {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
	gap: 6px; margin: 16px 0 2px;
}

.my-pager__btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 38px; height: 38px; padding: 0 11px;
	border: 1px solid var(--my-line, #e5e7eb);
	border-radius: 10px;
	background: var(--my-card-bg, #fff);
	color: var(--my-ink-strong, var(--my-dark, #13203a));
	font: inherit; font-size: .9rem; font-weight: 600; line-height: 1;
	cursor: pointer;
	transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.my-pager__btn:hover:not(:disabled):not(.is-on) {
	border-color: var(--my-primary, #1b5fa8);
	color: var(--my-primary, #1b5fa8);
}

.my-pager__btn:focus-visible { outline: 3px solid var(--my-primary, #1b5fa8); outline-offset: 2px; }

.my-pager__btn.is-on {
	background: var(--my-primary, #1b5fa8);
	border-color: var(--my-primary, #1b5fa8);
	color: var(--my-on-primary, #fff);
}

.my-pager__btn:disabled { opacity: .4; cursor: default; }

.my-pager__gap { padding: 0 2px; color: var(--my-muted, #6b7280); }

/* Items on another page. !important because each layout sets its own display. */
.is-pagehide { display: none !important; }

@media (max-width: 480px) {
	.my-pager__btn { min-width: 34px; height: 34px; padding: 0 8px; font-size: .84rem; }
}
/* --------------------------------------- คอลัมน์ขวายาวตลอดหน้า (rail) ---- */
/*
 * The page below the banner is one row: everything on the left, and a rail down
 * the right that begins level with the quick links and carries on past the
 * content under them.
 *
 * It replaces a short column that used to sit beside the quick-link buttons
 * only. That column was a stub - it started and stopped inside one band - so a
 * card taller than the buttons either made the band grow a strip of empty space
 * beside them or hung over the section below and covered it. Neither is a
 * problem a full-height column can have: it is as tall as what is in it, and
 * what is beside it simply gets the width that is left.
 */
.my-page__row {
	display: flex;
	align-items: flex-start;
	gap: 24px;
}

.my-page__main { flex: 1 1 auto; min-width: 0; }

.my-page__rail {
	/*
	 * The width set in the template, but never more than 45% of the row: on a
	 * screen just past the 992px break a wide rail would otherwise leave the
	 * content a sliver.
	 */
	flex: 0 0 min(var(--my-quickside, 280px), 45%);
	min-width: 0;

	/*
	 * Above the hero, not under it.
	 *
	 * Over a hero the row is pulled up 48px onto the picture, and the picture's
	 * active slide carries z-index 2 while .my-hero itself sets no z-index, so
	 * that 2 counts against the page rather than against the hero. An unpositioned
	 * rail paints below anything positioned, so the top of its first card went
	 * behind the slide and read as the header having eaten it - at every scroll
	 * position, because the overlap is in the layout rather than in the sticking.
	 *
	 * The quick links met this first and were given the same two lines; this is
	 * the other half of that fix, for the column beside them. 5 clears the hero
	 * and stays well under the header's 50.
	 */
	position: relative;
	z-index: 5;
}

.my-page__rail > * + * { margin-top: 20px; }

/*
 * Over a hero slide the page is pulled up onto the picture, the same lift the
 * quick links band used to take on its own. The rail rides up with it, which is
 * the point of them being one row.
 */
.my-page.is-overlap .my-page__row { margin-top: -48px; }

.my-quicklinks-wrap { position: relative; z-index: 5; }

/*
 * The trail and the feature band used to run the full width of the window. In
 * one row they cannot: a full-width strip would have to cut across the rail. So
 * they keep to the left column, and the trail's rule is the width of that
 * column rather than of the page.
 */
.my-page__main > .my-crumbs {
	background: transparent;
	border-bottom: 1px solid var(--my-line);
	margin-bottom: 18px;
}

.my-page__main > .my-section--feature { padding-block: 0 24px; }

/* Narrow screens have no right edge to spare: the rail goes underneath. */
@media (max-width: 991px) {
	.my-page__row { display: block; }
	.my-page__rail { margin-top: 24px; }
	.my-page.is-overlap .my-page__row { margin-top: -24px; }
}

/* ================================================= โลโก้ - ขนาดและเอฟเฟกต์ ==== */
/*
 * The header logo used to be a bare <img> with a width on it. It now sits in a
 * wrapper so there is something to hang a ring on and something to turn that is
 * not the image itself, and the wrapper carries the chosen width as a property
 * so the ring and the plate follow the size instead of being set twice.
 *
 * The default is "none" and these rules then add nothing at all, so a site that
 * never opens the setting keeps exactly the header it had.
 */
.my-brand__mark {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: var(--my-logo-w, 58px);
}

.my-brand__logo { max-width: 100%; }

/* วงแหวนประจุด - รอบโลโก้ */
.my-brand__ring {
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px dashed currentColor;
	color: var(--my-primary, #1f2f6b);
	opacity: .32;
	pointer-events: none;
}

.my-logofx--ring .my-brand__ring { animation: my-logo-spin 26s linear infinite; }

/* เรืองแสง */
.my-logofx--glow .my-brand__logo {
	filter: drop-shadow(0 0 7px rgba(255, 255, 255, .85))
	        drop-shadow(0 0 14px var(--my-primary, #1f2f6b));
}

/* ลอยขึ้นลง - ทั้งกรอบขยับ วงแหวนจึงลอยไปด้วยถ้าเลือกไว้ */
.my-logofx--float { animation: my-logo-float 4.5s ease-in-out infinite; }

@keyframes my-logo-float {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-5px); }
}

/* เต้นเป็นจังหวะ */
.my-logofx--pulse .my-brand__logo { animation: my-logo-pulse 2.8s ease-in-out infinite; }

@keyframes my-logo-pulse {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.06); }
}

/*
 * หมุนรอบตัว
 *
 * Two of them, because "round itself" means two different pictures. The flat
 * one turns the image in the page, which suits a round emblem; the other turns
 * it about its vertical axis like a coin, which keeps lettering upright for
 * half the turn and reads better on a logo that has words in it.
 */
.my-logofx--spin .my-brand__logo {
	animation: my-logo-spin var(--my-logo-spin, 12s) linear infinite;
}

.my-logofx--flip { perspective: 600px; }

.my-logofx--flip .my-brand__logo {
	animation: my-logo-flip var(--my-logo-spin, 12s) linear infinite;
	transform-style: preserve-3d;
}

@keyframes my-logo-spin {
	to { transform: rotate(360deg); }
}

@keyframes my-logo-flip {
	to { transform: rotateY(360deg); }
}

/* ตัดเป็นวงกลม - วางบนแผ่นขาวเพื่อไม่ให้มุมภาพหาย */
.my-brand__mark.is-round .my-brand__logo {
	border-radius: 50%;
	background: #fff;
	padding: 3px;
	object-fit: contain;
	aspect-ratio: 1 / 1;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
}

/* เครื่องที่ตั้งค่าลดการเคลื่อนไหวไว้ ให้โลโก้อยู่นิ่ง */
@media (prefers-reduced-motion: reduce) {
	.my-brand__mark,
	.my-brand__ring,
	.my-brand__logo { animation: none; }
}
/* ================================== ปุ่มเมนูมือถือ - สามขีดแบบ nav-bar ==== */
/*
 * Worn only when a mod_my_navbar module is on the page: the button in the brand
 * row then stands in for the one the module draws inside the menu strip, so it
 * wears the module's three strokes rather than the template's fa-bars and folds
 * them into a cross the same way. The strokes are currentColor, so the button
 * keeps the brand row's own colours and stays readable whatever the module was
 * painted in.
 */
.my-navtoggle--mark { flex-direction: column; }

.my-navtoggle__mark,
.my-navtoggle__mark::before,
.my-navtoggle__mark::after {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .22s ease, opacity .22s ease;
}

.my-navtoggle__mark { position: relative; }

.my-navtoggle__mark::before,
.my-navtoggle__mark::after { content: ''; position: absolute; left: 0; }

.my-navtoggle__mark::before { top: -6px; }
.my-navtoggle__mark::after  { top: 6px; }

.my-navtoggle--mark.is-open .my-navtoggle__mark { background: transparent; }
.my-navtoggle--mark.is-open .my-navtoggle__mark::before { transform: translateY(6px) rotate(45deg); }
.my-navtoggle--mark.is-open .my-navtoggle__mark::after  { transform: translateY(-6px) rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
	.my-navtoggle__mark,
	.my-navtoggle__mark::before,
	.my-navtoggle__mark::after { transition: none; }
}