/* =============================================================================
   คณะสาธารณสุขศาสตร์ มรภ.เชียงราย — ธีมหน้าบ้านสไตล์ NORM (โทนชมพู)
   โหลดต่อท้าย theme2/css/style1.css เพื่อปรับหน้าตาทั้งเว็บ โดยไม่ต้องแก้ไฟล์หน้าเพจ
   ============================================================================= */

/* ---------- 1. สี / ฟอนต์ ---------- */
:root {
  --ink: #1d1d1b; --ink-2: #47403f; --muted: #6e6a6c; --muted-2: #a39b9f;
  --line: #efe6ea; --line-2: #e4d9de;
  --bg: #fff; --soft: #fcf8fa; --soft-2: #f8f0f4;
  --pink: #fd5392; --pink-d: #e5417f; --pink-dd: #c22f68; --pink-l: #ffe6f0; --pink-ll: #fff4f8; --coral: #f86f64;
  --grad: linear-gradient(45deg, #fd5392, #f86f64);
  --grad-d: linear-gradient(45deg, #ea3d7f, #ef5a50);
  --dark: #211a1e;
  --sans: 'Urbanist', 'Anuphan', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 68px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 1px 2px rgba(29, 29, 27, .04), 0 14px 34px -22px rgba(70, 20, 45, .28);
  --shadow-h: 0 2px 6px rgba(29, 29, 27, .04), 0 34px 60px -34px rgba(150, 30, 85, .42);
  --bs-primary: #fd5392; --bs-primary-rgb: 253, 83, 146;
  --bs-body-font-family: var(--sans); --bs-font-sans-serif: var(--sans);
}
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 14px); }
body { font-family: var(--sans); font-size: 1rem; line-height: 1.65; color: var(--ink); background: var(--bg); padding-top: var(--nav-h); overflow-x: clip; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--sans); color: var(--ink); font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 { font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
p { text-wrap: pretty; }
a { color: var(--pink-d); text-decoration: none; transition: color .3s; }
a:hover { color: var(--pink); }
::selection { background: var(--pink-l); color: var(--ink); }
.text-primary { color: var(--pink) !important; }
.text-dark { color: var(--ink) !important; }
.text-muted { color: var(--muted) !important; }
.bg-primary { background: var(--grad) !important; }
.bg-light { background-color: var(--soft) !important; }
.border-primary { border-color: var(--pink) !important; }
.eyebrow { display: inline-flex; align-items: center; font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--pink); }
.eyebrow::before { content: ''; width: 26px; height: 1px; background: currentColor; margin-right: .65rem; opacity: .55; }

/* ---------- 2. ปุ่ม (ทรงแคปซูลแบบ NORM / สถานะ active เป็นสีชมพู) ---------- */
.btn { border-radius: 999px; font-weight: 500; padding: .6rem 1.35rem; letter-spacing: 0; transition: background .3s, color .3s, border-color .3s, box-shadow .4s var(--ease), transform .4s var(--ease); }
.btn-sm { padding: .38rem .95rem; font-size: .86rem; }
.btn-lg { padding: .85rem 1.9rem; }
.btn:focus, .btn:focus-visible { box-shadow: 0 0 0 .22rem rgba(253, 83, 146, .22); }
.btn.btn-primary, .btn.btn-dark { position: relative; overflow: hidden; isolation: isolate; }
.btn.btn-primary::after, .btn.btn-dark::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .3) 50%, transparent 70%); transform: translateX(-120%); transition: transform .9s var(--ease); z-index: -1; pointer-events: none; }
.btn.btn-primary:hover::after, .btn.btn-dark:hover::after { transform: translateX(120%); }
.btn.btn-primary { color: #fff; border: 0; background: var(--grad); box-shadow: 0 12px 26px -16px rgba(253, 83, 146, .95); }
.btn.btn-primary:hover, .btn.btn-primary:focus { color: #fff; background: var(--grad-d); transform: translateY(-1px); box-shadow: 0 16px 30px -16px rgba(253, 83, 146, 1); }
.btn.btn-primary:active { transform: scale(.97); }
.btn.btn-light, .btn.btn-secondary { color: var(--ink); background: #fff; border: 1px solid var(--line-2); }
.btn.btn-light:hover, .btn.btn-secondary:hover { color: var(--pink-dd); background: var(--pink-ll); border-color: rgba(253, 83, 146, .55); }
.btn.btn-light i, .btn.btn-light .fas { color: var(--pink); }
.btn.btn-dark { color: #fff; background: var(--ink); border: 1px solid var(--ink); }
.btn.btn-dark:hover { color: #fff; background: var(--pink); border-color: var(--pink); }
.btn-close { border-radius: 50%; transition: background-color .3s, opacity .3s; }
.btn-close:hover { background-color: var(--pink-ll); }

/* ---------- 3. หน้าโหลด ---------- */
#spinner { position: fixed; inset: 0; z-index: 99999; background: #fff; display: flex; align-items: center; justify-content: center; }
#spinner.show { animation: phAutoHide 0s 4s forwards; }
@keyframes phAutoHide { to { opacity: 0; visibility: hidden; } }
.ph-loader { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.ph-loader img { height: 54px; width: auto; animation: phLogoIn 1s var(--ease) both; }
.ph-loader-bar { position: relative; width: 120px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.ph-loader-bar::after { content: ''; position: absolute; inset: 0; background: var(--grad); transform-origin: left; animation: phBar 1.2s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes phLogoIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes phBar { 0% { transform: scaleX(0); transform-origin: left; } 50% { transform: scaleX(1); transform-origin: left; } 50.1% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }

/* ---------- 4. เมนูบน (กระจกโปร่ง ติดขอบจอ) ---------- */
.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1030; height: var(--nav-h); background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); transition: background .3s, box-shadow .5s var(--ease); }
.site-nav.scrolled { background: rgba(255, 255, 255, .94); box-shadow: 0 10px 30px -22px rgba(70, 20, 45, .5); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 1rem; }
.site-nav .brand, .mobile-menu .brand { display: flex; align-items: center; gap: .75rem; flex: none; color: var(--ink); text-decoration: none; }
.site-nav .brand img { height: 42px; width: auto; display: block; transition: transform .6s var(--ease); }
.site-nav .brand:hover img { transform: scale(1.03); }
.brand-text { font-size: .8rem; font-weight: 600; line-height: 1.3; color: var(--ink); padding-left: .75rem; border-left: 1px solid var(--line-2); }
.brand-text small { display: block; font-size: .72rem; font-weight: 400; color: var(--muted); }
.brand-text, .brand-text small { white-space: nowrap; }
/* มือถือ: แสดงชื่อคณะ/มหาวิทยาลัยเหมือนบน iPad โดยย่อโลโก้ ตัวอักษร และปุ่มให้พอดีจอ */
@media (max-width: 575.98px) {
  .site-nav .brand { gap: .4rem; }
  .brand-text { font-size: .72rem; line-height: 1.25; padding-left: .45rem; }
  .brand-text small { font-size: .63rem; }
}
.nav-main { list-style: none; margin: 0 auto; padding: 0; height: 100%; align-items: stretch; gap: .1rem; }
.nav-main > li { display: flex; align-items: center; position: static; }
.nav-main .nav-link { position: relative; display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .78rem; border: 0; background: none; font-family: inherit; font-size: .93rem; font-weight: 500; color: var(--ink); opacity: .82; white-space: nowrap; text-decoration: none; cursor: pointer; transition: opacity .3s, color .3s; }
.nav-main .nav-link i { font-size: .68rem; opacity: .7; transition: transform .45s var(--ease); }
.nav-main .nav-link::after { content: ''; position: absolute; left: .78rem; right: .78rem; bottom: .22rem; height: 1.5px; border-radius: 2px; background: var(--pink); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav-main .nav-link:hover, .nav-main .nav-link:focus-visible, .nav-main li.open > .nav-link { opacity: 1; color: var(--ink); text-decoration: none; }
.nav-main .nav-link:hover::after, .nav-main li.open > .nav-link::after, .nav-main .nav-link.active::after { transform: scaleX(1); transform-origin: left; }
.nav-main .nav-link.active { opacity: 1; color: var(--pink); }
.nav-main li.open > .nav-link i { transform: rotate(180deg); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: .55rem; flex: none; }
@media (min-width: 1200px) { .nav-actions { margin-left: 0; } }
.nav-ico { width: 42px; height: 42px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 50%; background: none; color: var(--ink); font-size: 1.15rem; line-height: 1; text-decoration: none; transition: background .3s, color .3s, border-color .3s; }
.nav-ico:hover { color: var(--pink); background: var(--pink-ll); border-color: rgba(253, 83, 146, .25); }
.nav-burger { font-size: 1.55rem; border-color: var(--line-2); }
.nav-phone { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; line-height: 1.2; }
.nav-phone .ico { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--pink-ll); color: var(--pink); border: 1px solid rgba(253, 83, 146, .2); transition: background .3s, color .3s; }
.nav-phone small { display: block; font-size: .7rem; color: var(--muted); }
.nav-phone b { font-weight: 600; font-size: .86rem; }
.nav-phone:hover { color: var(--pink-dd); }
.nav-phone:hover .ico { background: var(--grad); color: #fff; }
.nav-cta { padding: .5rem 1.15rem; font-size: .88rem; white-space: nowrap; }
/* เมนูย่อยแบบเต็มความกว้าง (mega menu) */
.mega { position: absolute; left: 0; right: 0; top: 100%; z-index: 1; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 40px 60px -40px rgba(70, 20, 45, .32); opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none; transition: opacity .25s ease, transform .45s var(--ease), visibility 0s linear .25s; }
.mega-wrap.open > .mega { opacity: 1; visibility: visible; transform: none; pointer-events: auto; z-index: 2; transition: opacity .25s ease, transform .45s var(--ease), visibility 0s; }
@media (hover: hover) { .mega-wrap:hover > .mega { opacity: 1; visibility: visible; transform: none; pointer-events: auto; z-index: 3; transition: opacity .25s ease, transform .45s var(--ease), visibility 0s; } .mega-wrap:hover > .nav-link { opacity: 1; } .mega-wrap:hover > .nav-link::after { transform: scaleX(1); transform-origin: left; } .mega-wrap:hover > .nav-link i { transform: rotate(180deg); } }
.mega-in { display: grid; grid-template-columns: minmax(200px, 270px) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4.5rem); padding: 2.4rem 0 2.7rem; }
.mega-title { font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); margin-top: .55rem; }
.mega-line { display: block; width: 0; height: 2px; border-radius: 2px; background: var(--grad); margin-top: 1.1rem; transition: width 1s var(--ease) .1s; }
.mega-wrap.open .mega-line { width: 56px; }
@media (hover: hover) { .mega-wrap:hover .mega-line { width: 56px; } }
.mega-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem 2.6rem; align-content: start; }
.mega-cols.is-flat .mega-col { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); column-gap: 2.6rem; }
.mega h6 { font-size: .74rem; font-weight: 600; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; margin: 0 0 .7rem; }
.mega a { display: flex; align-items: baseline; gap: .55rem; padding: .36rem 0; color: var(--ink); font-size: .98rem; line-height: 1.45; text-decoration: none; transition: color .3s; }
.mega a::before { content: ''; flex: none; width: 0; height: 1.5px; align-self: center; background: var(--pink); transition: width .45s var(--ease), margin .45s var(--ease); margin-right: -.55rem; }
.mega a:hover, .mega a.active { color: var(--pink-dd); }
.mega a:hover::before, .mega a.active::before { width: 14px; margin-right: 0; }
.mega a .ext { flex: none; font-size: .7rem; color: var(--muted-2); transition: color .3s, transform .4s var(--ease); }
.mega a:hover .ext { color: var(--pink); transform: translate(2px, -2px); }
/* แถบข้อมูลติดต่อใต้เมนู */
.promo-bar { font-size: .8rem; padding: .5rem 0; background: #fff; border-bottom: 1px solid var(--line); color: var(--muted); }
.promo-bar a { color: var(--muted); text-decoration: none; }
.promo-bar a:hover { color: var(--pink); text-decoration: none; }
.promo-bar i { color: var(--pink); }
/* เมนูมือถือ (offcanvas) */
.offcanvas.mobile-menu { width: min(100%, 440px); border-left: 0; background: #fff; }
.offcanvas-backdrop.show { opacity: .5; }
.offcanvas-backdrop { background: #1d1418; }
.mobile-menu .offcanvas-header { height: var(--nav-h); padding: 0 1.25rem; border-bottom: 1px solid var(--line); flex: none; }
.mobile-menu .brand img { height: 38px; width: auto; }
.mm-close { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: 1.5rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: transform .7s var(--ease), border-color .3s, color .3s; }
.mm-close:hover { transform: rotate(90deg); border-color: var(--pink); color: var(--pink); }
.mobile-menu .offcanvas-body { padding: 1.25rem 1.25rem 2rem; }
.mobile-menu .menu-link { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: .95rem 0; border: 0; border-bottom: 1px solid var(--line); background: none; font-family: inherit; font-size: 1.22rem; font-weight: 500; color: var(--ink); text-align: left; text-decoration: none; }
.mobile-menu .menu-link i { flex: none; font-size: 1.05rem; color: var(--muted-2); transition: transform .45s var(--ease), color .3s; }
.mobile-menu .menu-link:hover, .mobile-menu .menu-link.active { color: var(--pink); }
.mobile-menu .menu-link.active i, .mobile-menu .menu-link:hover i { color: var(--pink); }
.mobile-menu .menu-link[aria-expanded="true"] i { transform: rotate(45deg); color: var(--pink); }
.mm-sub { padding: .35rem 0 1rem .15rem; border-bottom: 1px solid var(--line); }
.mm-h { margin: .7rem 0 .15rem; font-size: .72rem; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.mm-sub a { display: flex; align-items: baseline; gap: .5rem; padding: .42rem 0; color: var(--ink-2); font-size: .98rem; line-height: 1.45; text-decoration: none; }
.mm-sub a .ext { font-size: .7rem; color: var(--muted-2); }
.mm-sub a:hover, .mm-sub a.active { color: var(--pink-dd); }
.mm-sub a.active::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--pink); flex: none; align-self: center; }
.mm-foot { margin-top: 1.6rem; display: flex; flex-direction: column; gap: .75rem; font-size: .9rem; }
.mm-foot a { color: var(--ink-2); text-decoration: none; }
.mm-foot a:hover { color: var(--pink); }
.mm-foot i { color: var(--pink); width: 1.2rem; display: inline-block; }
.mm-social { display: flex; gap: .5rem; margin-top: .25rem; }

/* ---------- 5. ส่วนหัวหน้าเพจ (breadcrumb) : พื้นไล่เฉดเคลื่อนไหว (Animated Gradient) โทนชมพูของเว็บ ตัวหนังสือขาว ---------- */
/* พื้นสำรองแบบ CSS (เห็นเมื่อเบราว์เซอร์ไม่รองรับ WebGL2) — js/animated-gradient.js จะวาง <canvas class="ag-canvas"> ทับให้ */
.container-fluid.bg-breadcrumb { position: relative; overflow: hidden; isolation: isolate; text-align: center; color: #fff; padding: clamp(3.2rem, 7vw, 5.8rem) 0 clamp(2.9rem, 6vw, 5rem) !important; border-bottom: 0;
  background-color: #5a2550 !important;
  background-image:
    radial-gradient(60% 120% at 100% 100%, rgba(245, 127, 174, .6), transparent 62%),
    radial-gradient(46% 95% at 8% 0%, rgba(245, 127, 174, .34), transparent 62%),
    linear-gradient(140deg, #52224a 0%, #642a5a 42%, #81356f 74%, #96407f 100%) !important;
  background-size: 100% 100% !important; background-position: 0 0 !important; background-repeat: no-repeat !important; }
.container-fluid.bg-breadcrumb .ag-canvas { position: absolute; inset: -48px; z-index: -2; display: block; width: calc(100% + 96px); height: calc(100% + 96px); pointer-events: none; filter: blur(18px); }
/* เงานุ่มกลางภาพ ให้ตัวหนังสือขาวอ่านชัดทุกเฟรม */
.container-fluid.bg-breadcrumb::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(50% 76% at 50% 52%, rgba(40, 10, 32, .22), transparent 72%); }
/* เกรนบางๆ แบบฟิล์ม */
.container-fluid.bg-breadcrumb::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .07; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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)'/%3E%3C/svg%3E"); }
.container-fluid.bg-breadcrumb > .container { display: flex; flex-direction: column; align-items: center; padding-top: 0 !important; padding-bottom: 0 !important; }
.container-fluid.bg-breadcrumb h4, .container-fluid.bg-breadcrumb .text-white { color: #fff !important; }
.container-fluid.bg-breadcrumb h4 { font-size: clamp(2rem, 4.8vw, 3.5rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.24; margin-bottom: 0 !important; text-wrap: balance; text-shadow: 0 2px 28px rgba(14, 4, 11, .45); }
.container-fluid.bg-breadcrumb h4::after { content: ''; display: block; width: 64px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #fff, #ffc2da); box-shadow: 0 0 16px rgba(255, 194, 218, .7); margin: 1.2rem auto 0; animation: phLine 1.4s var(--ease) .5s both; }
@keyframes phLine { from { width: 0; } }
.container-fluid.bg-breadcrumb .breadcrumb.d-flex { order: -1; display: inline-flex !important; flex-wrap: wrap; justify-content: center; gap: .1rem; margin: 0 0 1.35rem !important; padding: .36rem 1rem; border: 1px solid rgba(255, 255, 255, .24); border-radius: 999px; background: rgba(44, 12, 36, .3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 12px 30px -18px rgba(0, 0, 0, .7); font-size: .82rem; }
.container-fluid.bg-breadcrumb .breadcrumb-item { color: rgba(255, 255, 255, .78); }
.container-fluid.bg-breadcrumb .breadcrumb-item a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.container-fluid.bg-breadcrumb .breadcrumb-item a:hover { color: #fff; }
.container-fluid.bg-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .4); }
.container-fluid.bg-breadcrumb .breadcrumb-item.active, .container-fluid.bg-breadcrumb .text-warning { color: #ffa3c8 !important; font-weight: 500; }

/* ---------- 6. หน้าแรก: สไลด์หลัก ---------- */
.header-carousel { padding: clamp(.6rem, 1.6vw, 1.25rem) clamp(.6rem, 1.6vw, 1.25rem) 0; }
body .header-carousel .header-carousel-item { height: auto !important; min-height: clamp(460px, 64vh, 640px); display: flex; align-items: center; position: relative; overflow: hidden; isolation: isolate; border-radius: clamp(20px, 2.6vw, 32px); }
body .header-carousel .header-carousel-item.bg-primary { background: radial-gradient(50% 70% at 80% 62%, rgba(253, 83, 146, .2), transparent 70%), radial-gradient(42% 60% at 6% 0%, rgba(248, 111, 100, .15), transparent 70%), linear-gradient(140deg, #fff8fb 0%, #ffeef5 55%, #ffe3ee 100%) !important; }
body .header-carousel .header-carousel-item::before { content: ''; position: absolute; inset: 12px; z-index: -1; border: 1px solid rgba(253, 83, 146, .16); border-radius: calc(clamp(20px, 2.6vw, 32px) - 8px); pointer-events: none; }
body .header-carousel .header-carousel-item .carousel-caption { position: relative !important; inset: auto !important; width: 100%; height: auto !important; padding: clamp(2.4rem, 5vw, 4rem) 0 clamp(5rem, 8vw, 5.5rem) !important; background: none !important; color: var(--ink); display: block; }
.header-carousel h1 { font-size: clamp(2.1rem, 4.6vw, 4rem) !important; font-weight: 600; line-height: 1.12; letter-spacing: -.025em; margin-bottom: 1.1rem !important; background: linear-gradient(100deg, var(--ink) 40%, var(--pink) 50%, var(--ink) 60%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent !important; animation: phShimmer 6s 1.6s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes phShimmer { 0% { background-position: 100% 0; } 60%, 100% { background-position: -50% 0; } }
.header-carousel h4 { display: inline-flex; align-items: center; gap: .75rem; font-size: .82rem !important; font-weight: 600 !important; letter-spacing: .24em; color: var(--pink) !important; margin-bottom: 1.1rem !important; }
.header-carousel h4::before { content: ''; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.header-carousel .carousel-caption p { color: var(--muted) !important; font-size: clamp(1rem, 1.4vw, 1.12rem) !important; margin-bottom: 2rem !important; }
.header-carousel .calrousel-img { position: relative; isolation: isolate; max-width: 520px; margin-inline: auto; }
.header-carousel .calrousel-img::before { content: ''; position: absolute; left: 9%; right: 9%; bottom: 5%; aspect-ratio: 1; border-radius: 50%; z-index: -1; background: var(--grad); box-shadow: 0 40px 80px -36px rgba(253, 83, 146, .75); }
.header-carousel .calrousel-img::after { content: ''; position: absolute; left: 3%; right: 3%; bottom: -1%; aspect-ratio: 1; border-radius: 50%; z-index: -2; border: 1px dashed rgba(253, 83, 146, .35); animation: phSpin 40s linear infinite; }
@keyframes phSpin { to { transform: rotate(360deg); } }
.header-carousel .calrousel-img img { position: relative; filter: drop-shadow(0 26px 30px rgba(120, 20, 60, .16)); }
body .header-carousel .owl-nav .owl-prev, body .header-carousel .owl-nav .owl-next { width: 48px; height: 48px; top: auto !important; bottom: clamp(1.8rem, 3vw, 2.4rem) !important; left: auto !important; transform: none !important; margin: 0 !important; border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.05rem; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
body .header-carousel .owl-nav .owl-next { right: calc(clamp(.6rem, 1.6vw, 1.25rem) + clamp(1.2rem, 3vw, 2.4rem)) !important; }
body .header-carousel .owl-nav .owl-prev { right: calc(clamp(.6rem, 1.6vw, 1.25rem) + clamp(1.2rem, 3vw, 2.4rem) + 58px) !important; }
body .header-carousel .owl-nav .owl-prev:hover, body .header-carousel .owl-nav .owl-next:hover { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 14px 30px -14px rgba(253, 83, 146, .9); }
.header-carousel .owl-dots { position: absolute; left: calc(clamp(.6rem, 1.6vw, 1.25rem) + clamp(1.4rem, 3vw, 2.6rem)); bottom: calc(clamp(1.8rem, 3vw, 2.4rem) + 18px); display: flex; gap: 8px; }
.header-carousel .owl-dots .owl-dot { padding: 2px !important; border: 0; background: none; }
.header-carousel .owl-dots .owl-dot span { display: block; width: 8px; height: 8px; border-radius: 8px; background: rgba(29, 29, 27, .18); transition: width .6s var(--ease), background .3s; }
.header-carousel .owl-dots .owl-dot.active span { width: 30px; background: var(--grad); }

/* ---------- 7. หัวข้อของแต่ละส่วน ---------- */
.container-fluid .text-center.mx-auto > h3.text-primary, .container-fluid .text-center.mx-auto > h4.text-primary, .container-fluid .text-center.mx-auto > h2.text-primary { color: var(--ink) !important; font-size: clamp(1.65rem, 3.2vw, 2.4rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin-bottom: .5rem; }
.container-fluid .text-center.mx-auto > h3.text-primary::before, .container-fluid .text-center.mx-auto > h4.text-primary::before, .container-fluid .text-center.mx-auto > h2.text-primary::before { content: ''; display: block; width: 36px; height: 3px; border-radius: 3px; background: var(--grad); margin: 0 auto 1.05rem; }
.container-fluid .text-center.mx-auto > p { color: var(--muted); }
.container-fluid.service, .container-fluid.blog, .container-fluid.team, .container-fluid.feature, .container-fluid.testimonial { padding-top: clamp(2.2rem, 5vw, 3.6rem) !important; padding-bottom: clamp(2.2rem, 5vw, 3.6rem) !important; }

/* ---------- 8. การ์ด ---------- */
/* การ์ดไอคอน (feature) */
.feature .feature-item { position: relative; height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 1.6rem 1.3rem 1.5rem !important; transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .4s; }
.feature .feature-item:hover { background: #fff; transform: translateY(-4px); box-shadow: var(--shadow-h); border-color: rgba(253, 83, 146, .3); }
.feature .feature-item .feature-icon { width: auto; display: block; padding: 0 !important; margin: 0 0 1rem !important; background: none; border-radius: 0; color: var(--pink); }
.feature .feature-item .feature-icon::after { display: none; }
.feature .feature-item .feature-icon i { width: 60px; height: 60px; display: inline-flex; align-items: center; justify-content: center; border-radius: 18px; background: var(--pink-ll); border: 1px solid rgba(253, 83, 146, .16); color: var(--pink); font-size: 1.45rem; transition: background .4s, color .4s, transform .6s var(--ease), box-shadow .6s var(--ease); }
.feature .feature-item:hover .feature-icon, .feature .feature-item:hover .feature-icon i { color: #fff; }
.feature .feature-item:hover .feature-icon i { background: var(--grad); border-color: transparent; transform: rotate(-6deg) scale(1.05); box-shadow: 0 16px 30px -14px rgba(253, 83, 146, .8); }
.feature .feature-item h4, .feature .feature-item h5, .feature .feature-item h6 { color: var(--ink); line-height: 1.45; }
.feature .feature-item h4 { font-size: 1.2rem; }
.feature .feature-item h5 { font-size: 1.02rem; }
.feature .feature-item h6 { font-size: .95rem; }
.feature .feature-item p { color: var(--muted); }
.feature .feature-item:hover h4, .feature .feature-item:hover h5, .feature .feature-item:hover h6 { color: var(--ink); }
.feature .feature-item:hover p { color: var(--muted); }
.feature .feature-item > .btn { align-self: flex-start; margin-top: auto; }
.text-center .feature-item > .btn, .feature-item.text-center > .btn { align-self: center; }
.feature .feature-item:hover a.btn, .feature .feature-item:hover a.btn.btn-primary { color: #fff; background: var(--grad); }
.feature .feature-item:hover a.btn:hover { color: #fff; background: var(--grad-d); }
/* การ์ดหลักสูตร (service) */
.service .service-item { height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .4s; }
.service .service-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); border-color: rgba(253, 83, 146, .28); }
.service .service-item .service-img { border-radius: 0; }
.service .service-item .service-img img { border-radius: 0 !important; transition: transform 1.2s var(--ease); }
.service .service-item:hover .service-img img { transform: scale(1.06); }
.service .service-item .service-img::after { display: none; }
.service .service-item .service-img .service-icon { top: 14px; left: 14px; right: auto; bottom: auto; width: auto; padding: .38rem .7rem !important; border-radius: 999px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--ink); font-size: .78rem; font-weight: 700; letter-spacing: .08em; box-shadow: 0 8px 20px -12px rgba(70, 20, 45, .4); }
.service .service-item .service-img .service-icon i { color: var(--pink); }
.service .service-item:hover .service-img .service-icon { background: var(--grad); color: #fff; }
.service .service-item:hover .service-img .service-icon i { color: #fff; transform: none; }
.service .service-content, .service .service-item .service-content { flex: 1; display: flex; flex-direction: column; background: #fff; border-radius: 0; padding: 1.5rem 1.4rem 1.6rem !important; }
.service .service-item .service-content::after { display: none; }
.service .service-item .service-content .service-content-inner { flex: 1; display: flex; flex-direction: column; align-items: center; }
.service .service-item .service-content .service-content-inner .h4 { color: var(--ink); font-size: 1.12rem !important; font-weight: 600; line-height: 1.5; text-decoration: none; }
.service .service-item .service-content .service-content-inner p { color: var(--muted); font-size: .76rem; font-weight: 600; letter-spacing: .14em; margin-bottom: 1.4rem !important; }
.service .service-item .service-content .service-content-inner .btn { margin-top: auto; }
.service .service-item:hover .service-content .service-content-inner .h4 { color: var(--ink); }
.service .service-item:hover .service-content .service-content-inner .h4:hover { color: var(--pink); }
.service .service-item:hover .service-content .service-content-inner p { color: var(--muted); }
.service .service-item:hover .service-content .service-content-inner .btn.btn-primary { color: #fff; background: var(--grad); }
.service .service-item:hover .service-content .service-content-inner .btn.btn-primary:hover { color: #fff; background: var(--grad-d); }
/* การ์ดกิจกรรม (blog) */
.blog .blog-item { height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .4s; }
.blog .blog-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); border-color: rgba(253, 83, 146, .28); }
.blog .blog-item .blog-img { border-radius: 0; }
.blog .blog-item .blog-img img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0 !important; transition: transform 1.2s var(--ease); }
.blog .blog-item:hover .blog-img img { transform: scale(1.06); }
.blog .blog-item .blog-img::after { display: none; }
.blog .blog-item .blog-img .blog-categiry { left: 14px; right: auto; bottom: 14px; border-radius: 14px; padding: .45rem .85rem !important; background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--ink); line-height: 1.45; box-shadow: 0 10px 24px -14px rgba(70, 20, 45, .45); }
.blog .blog-item .blog-img .blog-categiry span { font-size: .78rem !important; }
.blog .blog-item .blog-img .blog-categiry i { color: var(--pink); }
.blog .blog-item .blog-content, .blog .blog-item:hover .blog-content { flex: 1; display: flex; flex-direction: column; align-items: flex-start; background: #fff; border-radius: 0; padding: 1.3rem 1.4rem 1.45rem !important; }
.blog .blog-item .blog-content h4 { font-size: 1.12rem; line-height: 1.45; margin-bottom: .6rem !important; }
.blog .blog-item .blog-content p { color: var(--muted); font-size: .92rem; }
.blog .blog-item .blog-content a.btn { margin-top: auto; padding: 0 0 2px !important; border-radius: 0; color: var(--ink); font-size: .9rem; font-weight: 600; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; box-shadow: none; transition: background-size .55s var(--ease), color .3s; }
.blog .blog-item .blog-content a.btn i { margin-left: .3rem; transition: transform .45s var(--ease); }
.blog .blog-item .blog-content a.btn:hover, .blog .blog-item:hover .blog-content a.btn:hover { color: var(--pink); background-size: 100% 1.5px; }
.blog .blog-item .blog-content a.btn:hover i { transform: translateX(4px); }
/* การ์ดบุคลากร / ข่าว (team) */
.team .team-item { height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .4s; }
.team .team-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); border-color: rgba(253, 83, 146, .28); }
.team .team-item .team-img { border-radius: 0; background: var(--soft); }
.team .team-item .team-img img { border-radius: 0 !important; transition: transform 1.2s var(--ease); }
.team .team-item:hover .team-img img { transform: scale(1.05); }
.team .team-item .team-img::after, .team .team-item:hover .team-img::after { display: none; }
.team .team-item .team-title, .team .team-item:hover .team-title { flex: 1; display: flex; flex-direction: column; background: #fff; color: var(--ink); border-radius: 0; padding: 1.2rem 1.1rem 1.35rem !important; }
.team .team-item .team-title .team-actions { margin-top: auto; padding-top: 1rem; }
.team .team-item .team-title h4, .team .team-item .team-title h5, .team .team-item .team-title h6 { color: var(--ink) !important; line-height: 1.45; }
.team .team-item .team-title h4 { font-size: 1.08rem; margin-bottom: .2rem !important; }
.team .team-item .team-title h6 { font-size: .95rem; }
.team .team-item .team-title p { color: var(--muted); font-size: .86rem; line-height: 1.55; }
.team .team-item .team-title i { color: var(--pink); }
.team .team-item .team-actions { margin-top: 1rem; gap: .5rem; }
.team .team-item .team-actions .btn { background: var(--pink-ll); color: var(--pink-dd); border: 1px solid rgba(253, 83, 146, .24); box-shadow: none; font-size: .8rem; font-weight: 600; }
.team .team-item .team-actions .btn i { color: inherit; }
.team .team-item .team-actions .btn:hover { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 12px 24px -14px rgba(253, 83, 146, .9); }
.team .team-item .team-actions .btn:hover i { color: #fff; }
/* การ์ดผู้บริหาร (testimonial) */
.testimonial .testimonial-item { background: #fff !important; border: 1px solid var(--line); border-radius: 24px !important; overflow: hidden; transition: box-shadow .6s var(--ease), border-color .4s; }
.testimonial .testimonial-item:hover { box-shadow: var(--shadow-h); border-color: rgba(253, 83, 146, .28); }
.testimonial .testimonial-item img { border-radius: 18px !important; }
.testimonial .testimonial-item h4 { font-size: 1.12rem; }
.testimonial .testimonial-item p { color: var(--muted); font-size: .9rem; }
.testimonial .testimonial-item i { color: var(--pink); }
.testimonial .owl-nav .owl-prev, .testimonial .owl-nav .owl-next { width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
.testimonial .owl-nav .owl-prev { left: auto; right: 54px; }
.testimonial .owl-nav .owl-prev i, .testimonial .owl-nav .owl-next i { transform: scaleX(-1); }
.testimonial .owl-nav .owl-prev:hover, .testimonial .owl-nav .owl-next:hover { background: var(--grad); color: #fff; border-color: transparent; }
/* ตัวเลขสถิติ / การ์ดพื้นขาว */
.counter-item { background: var(--soft) !important; border: 1px solid var(--line); border-radius: 18px !important; text-align: center; }
.counter-item .counter-counting span { font-size: 2rem !important; font-weight: 700 !important; letter-spacing: -.02em; }
.counter-item h6 { font-size: .85rem; font-weight: 500; color: var(--muted) !important; }
.container-fluid.bg-light .bg-white.rounded, .container-fluid .about-item-content { border: 1px solid var(--line); border-radius: 24px !important; box-shadow: var(--shadow); }
/* การ์ดสูงเท่ากันทั้งแถว และเนื้อหาไม่ล้นออกนอกการ์ด (แทนค่า .h-100 = 90% ของธีมเดิม) */
.container-fluid .bg-white.rounded.h-100, .container-fluid .about-item-content.h-100 { height: auto !important; min-height: 100%; }
.container-fluid.bg-light .bg-white.rounded img.rounded, .container-fluid.bg-light .rounded.bg-light { border-radius: 18px !important; }
.about-item-content h4 { font-size: 1.15rem; }
/* iframe (ปฏิทิน / แผนที่ ฯลฯ) ไม่ล้นกรอบบนจอเล็ก */
main iframe { max-width: 100%; }
@media (max-width: 575.98px) { .container-fluid .about-item-content.p-5, .container-fluid.bg-light .bg-white.rounded.p-5 { padding: 1.25rem !important; } }
/* หน้าติดต่อ */
.contact .contact-add-item { height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 22px !important; padding: 1.4rem 1.4rem 1.5rem; transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .4s; }
.contact .contact-add-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); border-color: rgba(253, 83, 146, .28); }
.contact .contact-icon.text-primary { display: flex; align-items: center; gap: .8rem; color: var(--ink) !important; font-weight: 600; line-height: 1.45; margin-bottom: .85rem !important; }
.contact .contact-icon i { flex: none; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--pink-ll); border: 1px solid rgba(253, 83, 146, .16); color: var(--pink); font-size: 1.15rem !important; }
.contact .contact-add-item p { color: var(--muted); }
.contact .col-12 > .rounded { border-radius: 24px !important; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.contact .col-12 > .rounded iframe { display: block; }

/* ---------- 9. Accordion / แท็บ / หน้าถัดไป / รายการ ---------- */
.accordion-item { border-color: var(--line); }
.accordion-button { font-family: var(--sans); }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(253, 83, 146, .15); border-color: transparent; }
.faq-section .accordion .accordion-item { border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0 !important; }
.faq-section .accordion .accordion-item:last-child { border-bottom: 0; }
.faq-section .accordion .accordion-item .accordion-header .accordion-button, .faq-section .accordion .accordion-item .accordion-header .accordion-button.collapsed { background: transparent !important; color: var(--ink) !important; font-size: 1.05rem; font-weight: 600; padding: 1.05rem .3rem; box-shadow: none !important; border-radius: 0 !important; }
.faq-section .accordion .accordion-item .accordion-header .accordion-button:not(.collapsed) { color: var(--pink) !important; }
.faq-section .accordion-button::after { width: 1.1rem; height: 1.1rem; background-size: 1.1rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a39b9f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6'/%3E%3C/svg%3E") !important; transition: transform .45s var(--ease); }
.faq-section .accordion-button:not(.collapsed)::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fd5392' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6'/%3E%3C/svg%3E") !important; }
.faq-section .accordion-body { padding: 0 .3rem 1.2rem !important; color: var(--muted); line-height: 1.75; }
.nav-tabs { border-bottom: 0; gap: .5rem; }
.nav-tabs .nav-link, .nav-pills .nav-link { border-radius: 999px !important; border: 1px solid var(--line-2) !important; background: #fff; color: var(--ink-2); font-weight: 500; padding: .62rem 1.15rem; transition: background .3s, color .3s, border-color .3s, box-shadow .4s var(--ease); }
.nav-tabs .nav-link:hover, .nav-pills .nav-link:hover { color: var(--pink-dd); border-color: rgba(253, 83, 146, .5) !important; text-decoration: none; }
.nav-tabs .nav-link.active, .nav-pills .nav-link.active { background: var(--grad) !important; color: #fff !important; border-color: transparent !important; box-shadow: 0 12px 26px -16px rgba(253, 83, 146, .95); }
.tab-content { padding-top: 1rem; }
.pagination { gap: .35rem; flex-wrap: wrap; }
.page-link { min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; padding: 0 .9rem; border-radius: 999px !important; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: .9rem; text-decoration: none; transition: background .3s, color .3s, border-color .3s; }
.page-link:hover { color: var(--pink-dd); background: var(--pink-ll); border-color: rgba(253, 83, 146, .5); text-decoration: none; }
.page-link:focus { box-shadow: 0 0 0 .2rem rgba(253, 83, 146, .18); }
.page-item.active .page-link { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 10px 22px -14px rgba(253, 83, 146, .95); }
.page-item.disabled .page-link { color: var(--muted-2); background: #fff; border-color: var(--line); }
.list-group-item { border-color: var(--line); }
.list-group-item-action:hover, .list-group-item-action:focus { background: var(--pink-ll); color: var(--pink-dd); }
.list-group-item.active { background: var(--grad); border-color: transparent; }

/* ---------- 10. ฟอร์ม / Select2 ---------- */
.form-control, .form-select { min-height: 46px; padding: .6rem .95rem; border: 1px solid var(--line-2); border-radius: 14px; background-color: #fff; color: var(--ink); transition: border-color .3s, box-shadow .3s; }
.form-control:focus, .form-select:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(253, 83, 146, .14); }
.form-control::placeholder { color: var(--muted-2); }
.input-group > .form-control { border-radius: 14px 0 0 14px; }
.select2-container .select2-selection--single, .select2-container .select2-selection--multiple { border-color: var(--line-2) !important; border-radius: 14px !important; }
.select2-container--default.select2-container--focus .select2-selection--single, .select2-container--default.select2-container--open .select2-selection--single, .select2-container:focus-within .select2-selection--single { border-color: var(--pink) !important; box-shadow: 0 0 0 4px rgba(253, 83, 146, .14) !important; }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-results__option--highlighted { background: var(--pink) !important; color: #fff !important; }
.select2-container .select2-selection--multiple .select2-selection__choice { background: var(--pink-l) !important; border-color: transparent !important; color: var(--pink-dd) !important; border-radius: 999px !important; }
.select2-container .select2-dropdown { border-color: var(--line-2) !important; border-radius: 14px !important; overflow: hidden; }

/* ---------- 11. หน้าต่าง (modal) / SweetAlert2 ---------- */
.modal-content { border: 0; border-radius: 24px; box-shadow: 0 40px 80px -30px rgba(40, 10, 25, .45); overflow: hidden; }
.modal-header { border-bottom: 1px solid var(--line); padding: 1.1rem 1.4rem; }
.modal-title { font-size: 1.12rem; font-weight: 600; line-height: 1.4; }
.modal-body { padding: 1.25rem 1.4rem; }
.modal-footer { border-top: 1px solid var(--line); padding: .9rem 1.4rem; }
.modal-backdrop.show { opacity: .55; }
.modal-backdrop { background: #1d1418; }
.modal-content.bg-dark { background: #120d10 !important; }
.modal-content.bg-dark .modal-footer { border-top: 0; }
.swal2-popup { border-radius: 24px !important; font-family: var(--sans) !important; padding: 2rem 1.5rem 1.5rem !important; box-shadow: 0 20px 60px rgba(40, 10, 25, .18); }
.swal2-title { font-family: var(--sans) !important; font-weight: 600 !important; color: var(--ink) !important; font-size: 1.4rem !important; }
.swal2-html-container { color: var(--muted) !important; font-size: .98rem !important; }
.swal2-styled { border-radius: 999px !important; padding: .62em 1.5em !important; font-weight: 500 !important; }
.swal2-styled.swal2-confirm { background: var(--grad) !important; box-shadow: 0 12px 26px -16px rgba(253, 83, 146, .95) !important; }
.swal2-styled.swal2-cancel { background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line-2) !important; }
.swal2-styled:focus { box-shadow: 0 0 0 3px rgba(253, 83, 146, .25) !important; }
.swal2-icon.swal2-success { border-color: rgba(253, 83, 146, .35) !important; color: var(--pink) !important; }
.swal2-icon.swal2-success [class^=swal2-success-line] { background-color: var(--pink) !important; }
.swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(253, 83, 146, .3) !important; }
.swal2-timer-progress-bar { background: var(--grad) !important; }
.swal2-container.swal2-backdrop-show { background: rgba(29, 20, 24, .42) !important; }

/* ---------- 12. ตารางข้อมูล (DataTables) ---------- */
table.dataTable thead th { color: var(--muted); font-weight: 500; background: var(--soft); border-bottom: 1px solid var(--line) !important; }
table.dataTable tbody td { border-color: var(--line); vertical-align: middle; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select { border: 1px solid var(--line-2); border-radius: 12px; min-height: 40px; }
.dataTables_wrapper .page-item.active .page-link { background: var(--grad); border-color: transparent; }

/* ---------- 13. ส่วนท้าย ---------- */
.site-footer { position: relative; background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding-top: clamp(3rem, 6vw, 4.5rem); overflow: hidden; }
.site-footer h6 { font-size: .86rem; font-weight: 600; color: var(--ink); margin-bottom: 1.1rem; letter-spacing: .01em; }
.site-footer .f-brand img { height: 48px; width: auto; }
.site-footer .f-title { font-size: 1.05rem; font-weight: 600; color: var(--ink); line-height: 1.45; margin: 1.1rem 0 .9rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer .f-links a, .site-footer .f-contact a, .footer-bottom .credit a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease), color .3s; }
.site-footer .f-links a:hover, .site-footer .f-contact a:hover, .footer-bottom .credit a:hover { color: var(--pink-dd); background-size: 100% 1px; text-decoration: none; }
.f-contact, .f-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.f-contact li { display: flex; gap: .65rem; align-items: baseline; line-height: 1.6; }
.f-contact i { color: var(--pink); flex: none; }
.f-links a { display: inline; line-height: 1.55; }
.f-links li { display: flex; gap: .55rem; align-items: baseline; }
.f-links li::before { content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); transform: translateY(-2px); transition: background .3s; }
.f-links li:hover::before { background: var(--pink); }
.site-footer .fb-wrap { margin-top: 1.25rem; border-radius: 16px; overflow: hidden; max-width: 400px; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; padding: 1.2rem 0; border-top: 1px solid var(--line); font-size: .82rem; }
.footer-bottom .credit i { color: var(--pink); }
.social { display: flex; gap: .5rem; }
.social a { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--ink); background: #fff; transition: background .3s, color .3s, border-color .3s, transform .4s var(--ease); }
.social a:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-2px); }
.wordmark { display: flex; justify-content: space-between; overflow: hidden; padding: 2.4rem 0 .4rem; font-family: var(--sans); font-weight: 400; font-size: clamp(2.5rem, 11.2vw, 10.4rem); line-height: .9; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1px rgba(29, 29, 27, .26); user-select: none; }
.wordmark span { display: inline-block; transition: transform 1.3s var(--ease), color .6s ease, -webkit-text-stroke-color .6s; transition-delay: calc(var(--i) * .06s), 0s, 0s; }
.wordmark.reveal span { transform: translateY(105%); }
.wordmark.reveal.in span { transform: none; }
.wordmark span:hover { color: var(--pink); -webkit-text-stroke-color: var(--pink); transition-delay: 0s; }
.wordmark .sp { width: .18em; }

/* ---------- 14. ลูกเล่นการเคลื่อนไหว ---------- */
.progress-top { position: fixed; left: 0; top: 0; z-index: 2001; width: 0; height: 2px; background: var(--grad); pointer-events: none; }
.to-top { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 1015; width: 50px; height: 50px; border: 0; border-radius: 50%; padding: 0; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--ink); display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none; box-shadow: 0 10px 26px -10px rgba(70, 20, 45, .35); transition: opacity .5s var(--ease), transform .6s var(--ease), color .3s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top circle { fill: none; stroke: var(--line); stroke-width: 1.5; }
.to-top .pg { stroke: var(--pink); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 138.2; stroke-dashoffset: 138.2; transition: stroke-dashoffset .15s linear; }
.to-top i { position: relative; font-size: 1.05rem; transition: transform .4s var(--ease); }
.to-top:hover { color: var(--pink); }
.to-top:hover i { transform: translateY(-2px); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.wordmark.reveal { opacity: 1; transform: none; }
/* ให้แอนิเมชันของ WOW.js / animate.css นุ่มนวลแบบ NORM */
@keyframes phUp { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
@keyframes phDown { from { opacity: 0; transform: translate3d(0, -16px, 0); } to { opacity: 1; transform: none; } }
@keyframes phLeft { from { opacity: 0; transform: translate3d(-28px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes phRight { from { opacity: 0; transform: translate3d(28px, 0, 0); } to { opacity: 1; transform: none; } }
.animated.fadeInUp { animation-name: phUp !important; }
.animated.fadeInDown { animation-name: phDown !important; }
.animated.fadeInLeft { animation-name: phLeft !important; }
.animated.fadeInRight { animation-name: phRight !important; }
.animated.fadeInUp, .animated.fadeInDown, .animated.fadeInLeft, .animated.fadeInRight { animation-duration: 1.1s; animation-timing-function: var(--ease); }

/* ---------- 15. รองรับทุกขนาดจอ ---------- */
@media (max-width: 1399.98px) { .nav-main .nav-link { padding: .45rem .45rem; font-size: .9rem; } .nav-main .nav-link::after { left: .45rem; right: .45rem; } }
/* แถบเมนูจอคอม: เมนูภาษาไทยยาว + ปุ่มภาษา 3 ภาษา ต้องอยู่ในความกว้างของแถบเสมอ (ไม่ล้นขอบจอ) และเหลือระยะเผื่อไว้
   1200-1399 ซ่อนไอคอนลูกโลก บีบช่องไฟ · 1400-1599 เบอร์โทรแสดงเป็นไอคอน (เบอร์อยู่ใน tooltip) · 1600 ขึ้นไป ขยายแถบเมนูให้แสดงเบอร์เต็ม */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .site-nav .nav-inner { gap: .75rem; }
  .site-nav .nav-actions { gap: .4rem; }
  .site-nav .lang-switch > i { display: none; }
}
@media (min-width: 1400px) and (max-width: 1599.98px) {
  .nav-main .nav-link { padding: .45rem .64rem; }
  .nav-main .nav-link::after { left: .64rem; right: .64rem; }
  .site-nav .nav-phone { display: none !important; }
  .site-nav .nav-actions .nav-ico.d-xxl-none { display: inline-flex !important; }
}
@media (min-width: 1600px) { .site-nav .nav-inner.container-xxl { max-width: 1520px; } }
@media (max-width: 1199.98px) { :root { --nav-h: 64px; } .site-nav .brand img { height: 38px; } }
@media (max-width: 991.98px) {
  .header-carousel .calrousel-img { max-width: 400px; margin-top: .5rem; }
  body .header-carousel .header-carousel-item { min-height: 0; }
  .testimonial .testimonial-item .p-4 { padding: 1.1rem !important; }
}
@media (max-width: 767.98px) {
  .header-carousel h4 { letter-spacing: .16em; }
  .header-carousel .carousel-caption .btn { padding: .7rem 1.25rem !important; font-size: .92rem; }
  .header-carousel .carousel-caption .d-flex { flex-wrap: wrap; gap: .5rem; }
  .header-carousel .carousel-caption .d-flex .btn { margin: 0 !important; }
  body .header-carousel .header-carousel-item::before { inset: 8px; }
  .container-fluid.bg-breadcrumb h4::after { margin-top: .9rem; }
  .feature .feature-item { padding: 1.2rem .95rem 1.2rem !important; border-radius: 18px; }
  .feature .feature-item .feature-icon i { width: 52px; height: 52px; border-radius: 16px; font-size: 1.25rem; }
  .feature .feature-item h5 { font-size: .95rem; }
  .to-top { width: 44px; height: 44px; right: 14px; bottom: 14px; }
  .mega-in { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  :root { --nav-h: 60px; }
  .site-nav .brand img { height: 30px; }
  .nav-inner { gap: .5rem; }
  .nav-actions { gap: .4rem; }
  .nav-cta { padding: .4rem .7rem; font-size: .76rem; }
  .nav-burger { width: 38px; height: 38px; font-size: 1.35rem; }
  .header-carousel .carousel-caption { text-align: center; }
  body .header-carousel .owl-nav .owl-prev, body .header-carousel .owl-nav .owl-next { width: 42px; height: 42px; }
  body .header-carousel .owl-nav .owl-prev { right: calc(clamp(.6rem, 1.6vw, 1.25rem) + clamp(1.2rem, 3vw, 2.4rem) + 50px) !important; }
  .container-fluid.bg-breadcrumb .breadcrumb.d-flex { font-size: .78rem; }
  .team .team-item .team-title { padding: 1rem .9rem 1.1rem !important; }
  .mobile-menu .menu-link { font-size: 1.12rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .wordmark.reveal span { transform: none; }
}
@media print { .site-nav, .promo-bar, .to-top, .progress-top, #spinner { display: none !important; } body { padding-top: 0; } }

/* ภาพกิจกรรมคณะ: มือถือแสดง 2 คอลัมน์ (หน้าแรกและหน้าภาพกิจกรรม) */
@media (max-width: 767.98px) {
  /* หน้าภาพกิจกรรมซ้อน container สองชั้น: ตัดระยะขอบชั้นในออก ให้การ์ดกว้างเท่าหน้าแรก */
  .container .container-fluid.blog, .container .container-fluid.blog > .container { padding-left: 0; padding-right: 0; }
  .container-fluid.blog .row.g-4 { --bs-gutter-x: .75rem; --bs-gutter-y: .75rem; }
  .container-fluid.blog .row.g-4 > [class*="col-"]:not(.col-12) { flex: 0 0 auto; width: 50%; max-width: 50%; margin-bottom: 0 !important; }
  .blog .blog-item { border-radius: 18px; }
  .blog .blog-item .blog-img img { aspect-ratio: 4 / 3; }
  .blog .blog-item .blog-img .blog-categiry { left: 8px; right: 8px; bottom: 8px; padding: .3rem .5rem !important; border-radius: 10px; line-height: 1.3; }
  .blog .blog-item .blog-img .blog-categiry span { font-size: .64rem !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .blog .blog-item .blog-content, .blog .blog-item:hover .blog-content { padding: .7rem .75rem .8rem !important; }
  .blog .blog-item .blog-content h4, .blog .blog-item .blog-content h5 { font-size: .86rem; line-height: 1.4; margin-bottom: .35rem !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .blog .blog-item .blog-content p { font-size: .74rem; line-height: 1.5; margin-bottom: .45rem !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .blog .blog-item .blog-content p.text-muted { display: none; }
  .blog .blog-item .blog-content a.btn { font-size: .76rem; padding: .3rem .7rem !important; }
}

/* ---------- ปุ่มเปลี่ยนภาษา TH / EN (แสดงทุกอุปกรณ์) ---------- */
/* ป้ายเมนูสองภาษา: ภาษาไทยปกติ / ภาษาอังกฤษแบบสั้นเมื่อหน้าถูกแปลแล้ว (Google ไม่แปลส่วนนี้ เมนูจึงไม่ล้นแถบ) */
.lbl-en, .lbl-zh { display: none; }
html.translated-ltr[data-site-lang="en"] .lbl-en, html.translated-ltr[data-site-lang="zh-CN"] .lbl-zh { display: inline; }
html.translated-ltr[data-site-lang="en"] .lbl-th, html.translated-ltr[data-site-lang="zh-CN"] .lbl-th { display: none; }
/* ภาษาจีน: ใช้ฟอนต์จีนของระบบ (ตัวเลข/อังกฤษยังเป็น Urbanist) */
html:lang(zh) { --sans: 'Urbanist', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'Noto Sans CJK SC', 'Anuphan', system-ui, sans-serif; }
/* เปิดหน้าในโหมด EN: ค้างหน้าโหลดไว้จนกว่า Google จะแปลเสร็จ ไม่ให้เห็นภาษาไทยแวบขึ้นมา
   (สคริปต์ปลดให้เองเมื่อแปลเสร็จ สูงสุด 6 วินาที ถ้าสคริปต์ไม่ทำงาน CSS ปลดเองที่ 7 วินาที) */
html.ph-en-wait #spinner { opacity: 1; visibility: visible; transition: none; animation: phAutoHide 0s 7s forwards; }
html.ph-en-wait .ph-loader::after { content: 'Translating to English…'; font-size: .76rem; font-weight: 500; letter-spacing: .04em; color: var(--muted); }
html.ph-en-wait[data-site-lang="zh-CN"] .ph-loader::after { content: '正在翻译成中文…'; letter-spacing: .08em; }
/* EN: ชื่อคณะ/มหาวิทยาลัยภาษาอังกฤษยาวกว่าภาษาไทย ย่อลงบนจอเล็ก ไม่ให้ดันปุ่มเมนู (☰) ล้นขอบ (จอแคบกว่านี้ดูชุด "แถบบนมือถือ" ด้านล่าง) */
@media (max-width: 575.98px) {
  html.translated-ltr[data-site-lang="en"] .brand-text { font-size: .66rem; letter-spacing: -.005em; }
  html.translated-ltr[data-site-lang="en"] .brand-text small { font-size: .56rem; }
}
.lang-switch { display: inline-flex; align-items: center; gap: 2px; flex: none; height: 38px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; box-shadow: 0 6px 16px -12px rgba(70, 20, 45, .5); }
.lang-switch > i { width: 26px; text-align: center; font-size: .98rem; color: var(--pink); }
.lang-switch button { appearance: none; height: 30px; min-width: 34px; padding: 0 .5rem; border: 0; border-radius: 999px; background: none; font: inherit; font-size: .76rem; font-weight: 700; letter-spacing: .05em; line-height: 1; color: var(--muted); cursor: pointer; transition: background .3s, color .3s, box-shadow .3s; }
.lang-switch button[lang="zh-CN"] { letter-spacing: 0; }
.lang-switch button[aria-pressed="true"] { background: var(--grad); color: #fff; box-shadow: 0 8px 18px -10px rgba(253, 83, 146, .9); }
.lang-switch button[aria-pressed="false"]:hover { color: var(--pink); }
.lang-switch button:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
html.is-translating .lang-switch button[aria-pressed="true"] { animation: langPulse 1s ease-in-out infinite; }
@keyframes langPulse { 50% { opacity: .5; } }
/* แถบบนมือถือ: ปุ่มภาษาแบบกะทัดรัด แตะเปลี่ยนภาษาได้ทันที (TH | EN | 中文) ส่วนปุ่มสมัครเรียนย้ายไปอยู่ในเมนูมือถือ (☰)
   โลโก้ + ชื่อคณะ + ปุ่มภาษา + ปุ่มเมนู ต้องอยู่ในแถวเดียว: ย่อโลโก้/ตัวอักษร/ช่องไฟเป็นขั้นตามความกว้างจอ (≤409 · ≤374 · ≤359px)
   ถ้ายังไม่พอ (เช่น ผู้ใช้ตั้งตัวอักษรใหญ่) ชื่อคณะจะตัดท้ายเป็น … แทนการดันปุ่มเมนูล้นขอบ */
@media (max-width: 575.98px) {
  .site-nav .nav-cta { display: none !important; }
  .site-nav .brand { flex: 0 1 auto; min-width: 0; }
  .site-nav .brand img { flex: none; }
  .brand-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-top: 3px; padding-bottom: 3px; margin-top: -3px; margin-bottom: -3px; }
  .brand-text small { overflow: hidden; text-overflow: ellipsis; }
  .lang-switch { height: 36px; padding: 2px; gap: 0; }
  .lang-switch > i { display: none; }
  .lang-switch button { height: 30px; min-width: 0; padding: 0 .4rem; font-size: .7rem; letter-spacing: .03em; }
}
@media (max-width: 409.98px) {
  .nav-inner { gap: .4rem; }
  .nav-actions { gap: .3rem; }
  .nav-burger { width: 34px; height: 34px; font-size: 1.25rem; }
  .site-nav .brand { gap: .3rem; }
  .site-nav .brand img { height: 28px; }
  .brand-text { padding-left: .35rem; font-size: .7rem; }
  .brand-text small { font-size: .61rem; }
  .lang-switch button { padding: 0 .3rem; }
  html.translated-ltr[data-site-lang="en"] .brand-text { font-size: .64rem; }
  html.translated-ltr[data-site-lang="en"] .brand-text small { font-size: .545rem; }
}
@media (max-width: 374.98px) {
  .site-nav .brand img { height: 26px; }
  .brand-text { border-left: 0; padding-left: 0; font-size: .66rem; }
  .brand-text small { font-size: .58rem; }
  html.translated-ltr[data-site-lang="en"] .brand-text { font-size: .6rem; }
  html.translated-ltr[data-site-lang="en"] .brand-text small { font-size: .52rem; }
}
@media (max-width: 359.98px) {
  .site-nav .nav-inner { padding-left: 10px; padding-right: 10px; gap: .35rem; }
  .nav-burger { width: 30px; height: 30px; font-size: 1.15rem; }
  .site-nav .brand { gap: .25rem; }
  .site-nav .brand img { height: 22px; }
  .brand-text { font-size: .61rem; }
  .brand-text small { font-size: .54rem; }
  .lang-switch button { min-width: 24px; padding: 0 .24rem; font-size: .66rem; }
  html.translated-ltr[data-site-lang="en"] .brand-text { font-size: .57rem; }
  html.translated-ltr[data-site-lang="en"] .brand-text small { font-size: .5rem; }
}
/* แท็บเล็ตเล็ก (576–767px): ปุ่มสมัครเรียนกลับมาบนแถบ ซ่อนไอคอนลูกโลกและบีบช่องไฟ ไม่ให้ล้นขอบ */
@media (min-width: 576px) and (max-width: 767.98px) {
  .lang-switch > i { display: none; }
  .lang-switch button { min-width: 30px; padding: 0 .42rem; }
  .nav-inner { gap: .75rem; }
  .nav-actions { gap: .45rem; }
  .site-nav .brand { gap: .55rem; }
  .site-nav .brand img { height: 36px; }
  .brand-text { padding-left: .55rem; }
}

/* ---------- Google Translate: ซ่อนแถบ/ป๊อปอัปของ Google ใช้ปุ่มของเว็บแทน ---------- */
#google_translate_element, body > .skiptranslate, iframe.skiptranslate, .goog-te-banner-frame, .goog-te-balloon-frame, #goog-gt-tt, .goog-tooltip,
.VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf, .VIpgJd-ZVi9od-aZ2wEe-OiiCO, .VIpgJd-ZVi9od-l4eHX-hSRGPd { display: none !important; }
html.translated-ltr body, html.translated-rtl body, body { top: 0 !important; }
.goog-text-highlight, .VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q { background: none !important; box-shadow: none !important; }

/* ข้อความแจ้งเตือนสั้นๆ */
.site-toast { position: fixed; left: 50%; bottom: 22px; z-index: 2000; max-width: min(92vw, 470px); padding: .75rem 1.15rem; border-radius: 14px; background: rgba(46, 14, 38, .94); color: #fff; font-size: .86rem; line-height: 1.5; text-align: center; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); opacity: 0; transform: translate(-50%, 18px); pointer-events: none; transition: opacity .4s, transform .5s var(--ease); }
.site-toast.show { opacity: 1; transform: translate(-50%, 0); }
