/* site_2027 — the 2019 arrangement, modernised (D6), on Bootstrap 5.3.8; every rule scoped to .s27 / .s27-*. */
:root {
	--s27-green: #056839;
	--s27-green-dark: #04502c;
	--s27-news: #1d6b3a;
	--s27-products: #b35900;
	--s27-suppliers: #0f6e6e;
}

body.s27 { display: flex; flex-direction: column; min-height: 100vh; font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", Tahoma, sans-serif; }
.s27-main { flex: 1 0 auto; }
.s27-skip:focus { position: absolute; z-index: 2000; background: #fff; padding: .5rem 1rem; }

/* header: sticky */
.s27-header .navbar-brand,
.s27-header .nav-link { color: #fff; }
.s27-header .nav-link:hover,
.s27-header .nav-link:focus-visible { color: #e3fee3; }
.s27-header .navbar-toggler { border-color: rgba(255,255,255,.6); }
.s27-header .navbar-toggler-icon { filter: invert(1); }
.s27-brand { font-weight: 700; white-space: normal; }
.s27-dropdown-long { max-height: 70vh; overflow-y: auto; }
a:focus-visible, button:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }

/* home */
.s27-top { margin-bottom: 1.5rem; }
.s27-hero .carousel-item { background: #f6f8f7; border-radius: .5rem; overflow: hidden; }
.s27-hero .carousel-control-prev-icon,
.s27-hero .carousel-control-next-icon { filter: drop-shadow(0 0 2px #000); }
.s27-tile { background: #e8f2ec; border-radius: .5rem; padding: 1rem; flex: 1 1 0; }
.s27-section { margin-top: 2rem; }
.s27-band { color: #fff; font-size: 1.4rem; padding: .5rem 1rem; border-radius: .375rem; margin-bottom: 1rem; }
.s27-band-news { background: var(--s27-news); }
.s27-band-products { background: var(--s27-products); }
.s27-band-suppliers { background: var(--s27-suppliers); }
.s27-card { background: #fff; border: 1px solid #dee2e6; border-radius: .5rem; overflow: hidden; height: 100%; }
.s27-card-img { display: block; width: 100%; height: auto; }
.s27-card-body { padding: .75rem 1rem; }
.s27-card-title { font-size: 1.1rem; margin: 0 0 .25rem; }
.s27-card-text > :last-child { margin-bottom: 0; }
/* AS IS (adverts, picture blocks with no title): the art whole (no crop, no rounded corner), nothing over it, the card only frames it */
.s27-asis { padding: .5rem; }
body .s27-asis .s27-card-img { max-width: 100%; border-radius: 0; object-fit: contain; }
.s27-hero-nav { display: flex; justify-content: center; gap: 1rem; padding: .25rem 0 .5rem; }
body .s27-hero-nav > button { position: static; }
.s27-vendor { display: flex; align-items: center; justify-content: center; min-height: 90px; padding: .75rem; background: #fff; border: 1px solid #eee; border-radius: .5rem; }
.s27-vendor img { max-height: 80px; width: auto; }
.s27-vendor-name { font-weight: 600; }
.s27-air { display: flex; justify-content: flex-end; margin-bottom: .5rem; cursor: pointer; }
.s27-lic { color: #2b5d3f; }

/* notices + cookie bar: never a pop-up */
.s27-notice { background: #fff4e5; border-bottom: 1px solid #f0c27b; }
.s27-cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: #2b2f33; color: #fff; }

/* pages */
.s27-page-title { font-size: 1.75rem; margin-bottom: 1rem; }
.s27-page-body img { max-width: 100%; height: auto; }
.s27-figure img { max-width: 100%; height: auto; }
.s27-contact-addr { font-size: 1.05rem; }

/* footer */
.s27-footer { background: var(--s27-green-dark); color: #e3fee3; font-size: .9rem; }
.s27-footer a { color: #fff; }
.s27-warning { color: #ffe9a8; }

/* ── the light design (owner 2026-12-04: green glass bubbles, frosted cards). 16 bubbles rise slowly (transform only, paused while the
   tab is hidden, a still frame for reduced motion); every text sits on glass, never on a raw bubble; no library, no canvas. */
:root {
	--s27-bg-base: #e7f2ec;
	--s27-tint-1: rgba(5, 104, 57, .12);
	--s27-tint-2: rgba(15, 110, 110, .10);
	--s27-bubble-rim: rgba(5, 104, 57, .34);
	--s27-glass: rgba(255, 255, 255, .38);   /* the clearest card glass */
	--s27-head-glass: rgba(5, 104, 57, .86);   /* white text AA over white */
	--s27-head-glass-2: rgba(15, 110, 110, .9);
	--s27-menu-glass: rgba(255, 255, 255, .72);   /* dark text AA over black */
	--s27-edge-tint: rgba(5, 104, 57, .1);   /* refraction: more tint at the edges */
	--s27-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
	--s27-streak: linear-gradient(115deg, rgba(255, 255, 255, .5) 0, rgba(255, 255, 255, .12) 24%, transparent 40%);
	--s27-rim: inset 1px 1px 0 rgba(255, 255, 255, .95), inset -1px -1px 0 rgba(16, 48, 32, .14), inset 0 0 18px var(--s27-edge-tint);
	--s27-shadow: var(--s27-rim), 0 2px 3px -1px rgba(16, 48, 32, .2), 0 6px 16px rgba(16, 48, 32, .08), 0 18px 40px rgba(16, 48, 32, .1);
	--s27-shadow-up: var(--s27-rim), 0 3px 4px -1px rgba(16, 48, 32, .18), 0 12px 26px rgba(16, 48, 32, .11), 0 30px 56px rgba(16, 48, 32, .14);
}
.s27-bg {
	/* top-anchored, LARGE-viewport height: a phone's address bar showing / hiding while scrolling never resizes this layer, so the
	   bubbles (top: 100%) and the gradients never jump (owner 2026-12-04: "when scrolling up and down the background seems shifting") */
	position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; overflow: hidden; pointer-events: none; contain: strict;
	background: radial-gradient(70vmax 50vmax at 8% 0%, var(--s27-tint-1), transparent 70%), radial-gradient(60vmax 60vmax at 100% 35%, var(--s27-tint-2), transparent 70%),
		linear-gradient(180deg, #f0f8f3 0%, #f6faf8 45%, var(--s27-bg-base) 100%);
}
.s27-bg i {
	position: absolute; top: 100%; width: 6vmax; aspect-ratio: 1; border-radius: 50%; will-change: transform;
	background:
		radial-gradient(circle at 32% 27%, rgba(255, 255, 255, .95) 0, rgba(255, 255, 255, .45) 7%, transparent 20%),
		radial-gradient(circle at 50% 50%, rgba(220, 244, 230, .12) 0, rgba(130, 200, 160, .14) 58%, rgba(5, 104, 57, .16) 74%, var(--s27-bubble-rim) 88%, rgba(255, 255, 255, .7) 97%, transparent 100%),
		linear-gradient(160deg, rgba(255, 255, 255, .22), rgba(5, 104, 57, .10));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), inset -6px -10px 24px rgba(5, 104, 57, .12), 0 10px 30px rgba(5, 104, 57, .08);
	animation: s27-rise 60s linear infinite;
}
.s27-bg i::before { content: ""; position: absolute; inset: 9%; border-radius: 50%; border: 2px solid transparent; border-top-color: rgba(255, 255, 255, .8); border-left-color: rgba(255, 255, 255, .3); transform: rotate(-18deg); }
.s27-bg i::after { content: ""; position: absolute; right: 19%; bottom: 15%; width: 16%; height: 8%; border-radius: 50%; background: rgba(255, 255, 255, .5); transform: rotate(-38deg); }
.s27-bg i:nth-child(1) { left: 3%; width: 24vmax; animation-duration: 92s; animation-delay: -30s; }
.s27-bg i:nth-child(2) { left: 60%; width: 30vmax; animation-duration: 118s; animation-delay: -80s; }
.s27-bg i:nth-child(3) { left: 33%; width: 17vmax; animation-duration: 96s; animation-delay: -55s; opacity: .9; }
.s27-bg i:nth-child(4) { left: 82%; width: 11vmax; animation-duration: 64s; animation-delay: -22s; filter: blur(1px); }
.s27-bg i:nth-child(5) { left: 17%; width: 9vmax; animation-duration: 70s; animation-delay: -48s; }
.s27-bg i:nth-child(6) { left: 47%; width: 12vmax; animation-duration: 76s; animation-delay: -12s; filter: blur(2px); opacity: .8; }
.s27-bg i:nth-child(7) { left: 71%; width: 8vmax; animation-duration: 58s; animation-delay: -40s; }
.s27-bg i:nth-child(8) { left: 91%; width: 10vmax; animation-duration: 82s; animation-delay: -66s; filter: blur(3px); opacity: .7; }
.s27-bg i:nth-child(9) { left: 9%; width: 4vmax; animation-duration: 46s; animation-delay: -15s; filter: blur(1.5px); }
.s27-bg i:nth-child(10) { left: 26%; width: 3vmax; animation-duration: 40s; animation-delay: -30s; }
.s27-bg i:nth-child(11) { left: 40%; width: 5vmax; animation-duration: 52s; animation-delay: -38s; filter: blur(3px); opacity: .75; }
.s27-bg i:nth-child(12) { left: 55%; width: 2.5vmax; animation-duration: 38s; animation-delay: -24s; }
.s27-bg i:nth-child(13) { left: 66%; width: 4vmax; animation-duration: 50s; animation-delay: -10s; filter: blur(2px); }
.s27-bg i:nth-child(14) { left: 77%; width: 3vmax; animation-duration: 42s; animation-delay: -33s; }
.s27-bg i:nth-child(15) { left: 87%; width: 5vmax; animation-duration: 56s; animation-delay: -44s; filter: blur(4px); opacity: .65; }
.s27-bg i:nth-child(16) { left: 1%; width: 6vmax; animation-duration: 60s; animation-delay: -36s; filter: blur(2px); }
@keyframes s27-rise {
	0% { transform: translate3d(0, 0, 0); }
	25% { transform: translate3d(2vw, -40vh, 0); }
	50% { transform: translate3d(-1vw, -80vh, 0); }
	75% { transform: translate3d(2.5vw, -120vh, 0); }
	100% { transform: translate3d(0, -160vh, 0); }
}
@keyframes s27-rise-b {
	0% { transform: translate3d(0, 0, 0); }
	25% { transform: translate3d(-2vw, -40vh, 0); }
	50% { transform: translate3d(1.5vw, -80vh, 0); }
	75% { transform: translate3d(-2.5vw, -120vh, 0); }
	100% { transform: translate3d(0, -160vh, 0); }
}
.s27-bg i:nth-child(3n+2) { animation-name: s27-rise-b; }
.s27-paused .s27-bg i { animation-play-state: paused; }

/* frosted glass cards; hover lift + tilt (site.js: --s27-rx/-ry) */
.s27-home .s27-hero,
.s27-home .s27-tile,
.s27-home .s27-card,
.s27-home .s27-vendor,
.s27-home .s27-vendors .s27-lic,
.s27-glassy .s27-linkcard {
	background: var(--s27-grain), var(--s27-streak), linear-gradient(180deg, rgba(255, 255, 255, .58), var(--s27-glass));
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 1rem;
	box-shadow: var(--s27-shadow);
	-webkit-backdrop-filter: blur(22px) saturate(180%);
	backdrop-filter: blur(22px) saturate(180%);
}
.s27-home :is(.s27-hero, .s27-tile, .s27-card) a { color: #084298; }
.s27-home .s27-lic { color: var(--s27-green-dark); }
.s27-home .s27-notice { background: rgba(255, 244, 229, .8); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.s27-home .s27-vendors .s27-lic { display: inline-block; margin-top: .35rem; padding: .1rem .6rem; border-radius: 1rem; box-shadow: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.s27-home .s27-hero, .s27-home .s27-tile, .s27-home .s27-card, .s27-home .s27-vendor, .s27-home .s27-vendors .s27-lic, .s27-glassy .s27-linkcard, body .s27-header .dropdown-menu { background: rgba(255, 255, 255, .93); }
	body .s27-header::before { background: linear-gradient(110deg, var(--s27-green) 55%, var(--s27-suppliers)); }
}
.s27-home .s27-hero { overflow: hidden; }
.s27-home .s27-hero .carousel-item { background: transparent; border-radius: 0; }
.s27-home .s27-hero .carousel-item .s27-card-body { padding: 1rem 3.75rem; }
.s27-home .s27-hero .carousel-control-prev,
.s27-home .s27-hero .carousel-control-next { width: 3rem; opacity: .8; }
.s27-home .s27-hero .carousel-control-prev-icon,
.s27-home .s27-hero .carousel-control-next-icon { width: 2.25rem; height: 2.25rem; border-radius: 50%; background-color: rgba(5, 104, 57, .82); background-size: 55%; filter: none; }
[data-s27-tilt] {
	transform: perspective(900px) rotateX(var(--s27-rx, 0deg)) rotateY(var(--s27-ry, 0deg)) translateY(var(--s27-lift, 0));
	transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s ease;
}
[data-s27-tilt]:hover,
[data-s27-tilt]:focus-within { --s27-lift: -4px; box-shadow: var(--s27-shadow-up); }
.s27-tilting { transition: transform .12s linear, box-shadow .45s ease; }
.s27-home .s27-card-img { border-radius: 1rem 1rem 0 0; }
/* link cards (html.php siteLinkCards): a page's list of links as whole-card links */
.s27-linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; margin: 1rem 0 1.75rem; }
.s27-linkcard { display: flex; align-items: center; gap: .9rem; min-height: 4.75rem; padding: 1rem 1.1rem; color: #1b2a22; font-weight: 600; text-decoration: none; }
.s27-linkcard:hover, .s27-linkcard:focus-visible { color: var(--s27-green-dark); }
.s27-linkcard-ico { flex: 0 0 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: .8rem; background: rgba(5, 104, 57, .1); color: var(--s27-green-dark); font-size: 1.2rem; }
.s27-linkcard-title { flex: 1 1 auto; line-height: 1.35; }
.s27-linkcard-go { color: var(--s27-green-dark); opacity: .75; }
.s27-home .s27-band { box-shadow: 0 6px 18px rgba(16, 48, 32, .12); border-radius: .75rem; }

/* reveal on scroll, once (site.js) */
[data-s27-reveal] { transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.s27-pending { opacity: 0; transform: translateY(18px); }

/* header (glass) / footer */
.s27-header { background: none; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .25), 0 2px 14px rgba(4, 80, 44, .25); }   /* glass on ::before: menus can blur */
.s27-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--s27-grain), linear-gradient(110deg, var(--s27-head-glass) 55%, var(--s27-head-glass-2));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(0, 0, 0, .15);
	-webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); }
.s27-header .dropdown-menu { background: var(--s27-grain), var(--s27-streak), linear-gradient(var(--s27-menu-glass), var(--s27-menu-glass)); border: 1px solid rgba(255, 255, 255, .6);
	box-shadow: var(--s27-rim), 0 2px 3px -1px rgba(16, 48, 32, .2), 0 12px 32px rgba(16, 48, 32, .16);
	-webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); }
.s27-footer { background: linear-gradient(110deg, var(--s27-green-dark) 0%, var(--s27-green-dark) 55%, var(--s27-suppliers) 100%); }

@media (prefers-reduced-motion: reduce) {
	.s27-bg i { animation-play-state: paused; }   /* a still frame */
	[data-s27-tilt], [data-s27-reveal], .s27-tilting { transition: none; }
	[data-s27-tilt] { transform: none; }
	.s27-pending { opacity: 1; transform: none; }
}

/* preview ribbon */
.s27-preview-ribbon { position: sticky; top: 0; z-index: 1040; background: #b00020; color: #fff; text-align: center; font-weight: 700; padding: .25rem; }

/* no snapshot behind (fallback, refused preview) */
body.s27-fallback { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; background: #f6f8f7; color: #222; }
.s27-fallback-box { max-width: 40rem; margin: 15vh auto; padding: 2rem; background: #fff; border-top: 6px solid #056839; border-radius: .5rem; }
.s27-fallback-name { font-weight: 700; color: #056839; }
