/* =========================================================
   โครงการ Sukhothai AI Model
   ไฟล์สไตล์หลัก (Main Stylesheet)
   ========================================================= */

/* กำหนดตัวแปรสีและค่าพื้นฐาน */
:root {
    --primary-navy: #002D56;
    --accent-gold: #B8860B;
    --bright-gold: #D4AF37;
}
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Kanit', sans-serif;
    scroll-behavior: smooth;
}

/* คลาสยูทิลิตี้สำหรับสี */
.text-navy { color: var(--primary-navy); }
.bg-navy { background-color: var(--primary-navy); }
.text-gold { color: var(--accent-gold); }

/* ปุ่มทางลัดภายในหน้า */
.quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 42px;
    padding: 0.65rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    color: #002D56;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.quick-link:hover,
.quick-link:focus-visible {
    border-color: #B8860B;
    background: #fffaf0;
    color: #8a6508;
    transform: translateY(-2px);
    outline: none;
}

/* ตั้งค่าระยะเลื่อนเพื่อให้ไม่โดนเมนูบังเมื่อเลื่อนถึง Section */
section {
    scroll-margin-top: 100px;
}

/* =========================================================
   แถบนำทาง (Navigation Bar) และ เมนูดรอปดาวน์
   ========================================================= */
.site-nav {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0 !important;
    border-bottom: 1px solid #e8edf3 !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06) !important;
}

.nav-shell {
    max-width: 1680px;
    margin: 0 auto;
    padding: 14px 28px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 26px;
}

/* โลโก้และข้อความแบรนด์ */
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon {
    width: 50px;
    height: 50px;
    border-radius: 50% !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent !important;
    color: #ffffff;
    box-shadow: none !important;
}

.brand-icon-image {
    padding: 0;
    border-radius: 50% !important;
    overflow: hidden;
    background: transparent !important;
    box-shadow: none !important;
}

.brand-icon-image img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.site-footer-brand-logo {
    border-radius: 50% !important;
    overflow: hidden;
    background: transparent !important;
    box-shadow: none !important;
}

.site-footer-brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.brand-copy {
    line-height: 1.05;
    white-space: nowrap;
}

.brand-title {
    display: block;
    color: #002D56;
    font-size: clamp(18px, 1.35vw, 24px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-tagline {
    display: block;
    margin-top: 7px;
    color: #B8860B;
    font-size: clamp(9px, 0.72vw, 12px);
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* กล่องรายการเมนูบนจอใหญ่ (Desktop Menu) */
.menu-wrap {
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: clamp(11px, 1.05vw, 20px) !important;
    min-width: 0;
    width: auto !important;
    font-size: clamp(13px, 0.9vw, 16px) !important;
    font-weight: 600;
    overflow: visible;
}

.menu-wrap > * {
    flex-shrink: 0;
}

.nav-link,
.menu-anchor,
.menu-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    background: transparent;
    min-height: 40px;
    padding: 8px 2px !important;
    color: #475569 !important;
    font: inherit;
    font-weight: 600 !important;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    white-space: nowrap;
    transition: color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.menu-anchor:hover,
.menu-button:hover {
    color: #002D56 !important;
    transform: translateY(-1px);
}

.nav-link::after,
.menu-anchor::after,
.menu-button::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.menu-anchor:hover::after,
.menu-button:hover::after {
    width: 100%;
}

.nav-link.is-active,
.menu-anchor.is-active,
.menu-button.is-active {
    color: #002D56 !important;
    font-weight: 700 !important;
}

.nav-link.is-active::after,
.menu-anchor.is-active::after,
.menu-button.is-active::after {
    width: 100%;
    background-color: #B8860B;
}

/* ปุ่มแฮมเบอร์เกอร์สำหรับเปิดเมนูบนมือถือ (Hamburger Button) */
.nav-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #002D56;
    cursor: pointer;
    transition: all 0.22s ease;
    padding: 0;
    flex-shrink: 0;
}

.nav-hamburger:hover,
.nav-hamburger:focus {
    background: #002D56;
    color: #ffffff;
    border-color: #002D56;
    box-shadow: 0 4px 12px rgba(0, 45, 86, 0.2);
}

.nav-hamburger[aria-expanded="true"] {
    background: #002D56;
    color: #ffffff;
    border-color: #002D56;
}

/* แผงเมนูสำหรับหน้าจอมือถือและแท็บเล็ต (Mobile Navigation Drawer) */
.mobile-nav-drawer {
    display: none;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #e8edf3;
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.08);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.mobile-nav-drawer.open {
    display: block;
    animation: slideDownMobileNav 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownMobileNav {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background: #f1f5f9;
    color: #002D56;
    transform: translateX(4px);
}

.mobile-nav-link.is-active {
    background: rgba(0, 45, 86, 0.08);
    color: #002D56;
    font-weight: 700;
    border-left: 4px solid #B8860B;
}

/* กลุ่มเมนูย่อยหลักสูตรบนมือถือ */
.mobile-nav-group {
    display: flex;
    flex-direction: column;
}

.mobile-group-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.mobile-group-button:hover {
    background: #f1f5f9;
    color: #002D56;
}

.mobile-group-button.active {
    background: #f8fafc;
    color: #002D56;
}

.mobile-submenu-chevron {
    transition: transform 0.25s ease;
}

.mobile-group-button.active .mobile-submenu-chevron {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding-left: 12px;
    margin: 4px 0 6px 20px;
    border-left: 2px solid #e2e8f0;
}

.mobile-submenu.open {
    display: flex;
}

.mobile-submenu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-submenu-item:hover {
    background: #f8fafc;
    color: #002D56;
    font-weight: 600;
    transform: translateX(4px);
}

.mobile-dashboard-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 20px;
    border-radius: 13px;
    background: linear-gradient(135deg, #002D56 0%, #004080 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 45, 86, 0.2);
    transition: all 0.2s ease;
}

.mobile-dashboard-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 45, 86, 0.28);
}

.mobile-partner-logos img {
    max-width: 240px;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* ปุ่มลิงก์ Dashboard บน Desktop */
.dashboard-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 9px 15px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #002D56, #064b83);
    color: #ffffff !important;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 45, 86, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    white-space: nowrap;
}

.dashboard-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 45, 86, 0.24);
}

/* ปุ่มเข้าสู่ระบบ Admin ในส่วนล่างของ Sidebar */
.admin-navigation-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    margin-top: 10px;
    padding: 9px 15px;
    border: 1px solid #ead486;
    border-radius: 13px;
    color: #002D56 !important;
    background: linear-gradient(135deg, #fff9df, #f5d86e);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 7px 17px rgba(184, 134, 11, 0.15);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.admin-navigation-link:hover {
    color: #002D56 !important;
    background: linear-gradient(135deg, #fff3b5, #e9c23d);
    transform: translateY(-2px);
    box-shadow: 0 11px 23px rgba(184, 134, 11, 0.23);
}

.admin-navigation-link svg {
    color: #9a6d00;
}

/* โลโก้หน่วยงานสนับสนุน */
.partner-logos {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.partner-logos img {
    display: block;
    width: min(315px, 20vw);
    height: auto;
    max-height: 52px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* เมนูดรอปดาวน์ Desktop */
.dropdown {
    position: relative;
}

.dropdown-chevron {
    transition: transform 0.25s ease;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px) !important;
    left: 50%;
    z-index: 250;
    width: 280px;
    padding: 10px 0;
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    border-top: 3px solid #B8860B !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 10px);
    transition:
        opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.24s ease;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.dropdown.open .dropdown-chevron {
    transform: rotate(180deg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    color: #334155 !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #002D56 !important;
    padding-left: 22px;
}

/* =========================================================
   ส่วนหัวและ Hero Banner
   ========================================================= */
.hero-gradient {
    background: radial-gradient(circle at 50% 30%, #004080 0%, #002D56 70%, #001f3d 100%);
    position: relative;
}

.hero-section::before,
.hero-team::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.15) 0%, transparent 40%);
    pointer-events: none;
}

.hero-team {
    background: radial-gradient(circle at 50% 30%, #004080 0%, #002D56 70%, #001f3d 100%);
    position: relative;
    overflow: hidden;
}

/* หน้าแรก: Hero แบบ Interactive Showcase */
.home-hero {
    position: relative;
    isolation: isolate;
    min-height: 760px;
    padding: clamp(72px, 9vw, 118px) clamp(24px, 5vw, 72px) 48px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 78% 18%, rgba(31, 152, 215, 0.25), transparent 31%),
        radial-gradient(circle at 15% 90%, rgba(212, 175, 55, 0.16), transparent 28%),
        linear-gradient(135deg, #001d38 0%, #003766 48%, #00264a 100%);
}

.home-hero-partner-logos {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 50%;
    box-sizing: border-box;
    width: min(1040px, 72%);
    height: clamp(64px, 6.8vw, 80px);
    padding: 4px clamp(10px, 1.2vw, 14px);
    transform: translateX(-50%);
    overflow: hidden;
    border: 1px solid rgba(210, 233, 248, 0.3);
    border-radius: 13px;
    background: rgba(209, 229, 242, 0.18);
    -webkit-backdrop-filter: blur(14px) saturate(118%);
    backdrop-filter: blur(14px) saturate(118%);
    box-shadow: 0 8px 20px rgba(0, 10, 25, 0.2), inset 0 1px rgba(255, 255, 255, 0.1);
}

.home-hero-partner-logos img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: contrast(1.16) saturate(1.12);
}

.home-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.15;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, #000, transparent 86%);
}

.hero-orb {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.hero-orb-one {
    width: 360px;
    height: 360px;
    top: -170px;
    right: 14%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.025), 0 0 0 140px rgba(255, 255, 255, 0.018);
}

.hero-orb-two {
    width: 190px;
    height: 190px;
    bottom: 34px;
    left: 40%;
    background: rgba(212, 175, 55, 0.08);
    filter: blur(50px);
}

.home-hero-grid {
    position: relative;
    z-index: 2;
    width: min(100%, 1240px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.98fr);
    align-items: center;
    gap: clamp(42px, 6vw, 92px);
}

.home-hero-copy {
    max-width: 690px;
}

.home-hero-eyebrow {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #f6d46d;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.home-hero-eyebrow-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #f2c230;
    box-shadow: 0 0 0 6px rgba(242, 194, 48, 0.13);
    animation: heroPulse 2.4s ease-in-out infinite;
}

.home-hero h1 {
    margin: 0;
    font-size: clamp(3.15rem, 5vw, 5.35rem);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

.home-hero-mainline {
    white-space: nowrap;
}

.home-hero h1 .home-hero-accent {
    display: inline-block;
    margin-top: 0.28em;
    color: transparent;
    background: linear-gradient(90deg, #f7d66b, #d7a914 52%, #fff0a5);
    background-clip: text;
    -webkit-background-clip: text;
}

.home-hero-copy > p {
    max-width: 650px;
    margin: 2rem 0 0;
    color: #c8dff1;
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    font-weight: 400;
    line-height: 1.8;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2.1rem;
}

.home-primary-action,
.home-secondary-action {
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.9rem 1.35rem;
    border-radius: 18px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.home-primary-action {
    color: #002d56;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.home-primary-action:hover {
    color: #002d56;
    transform: translateY(-4px);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.26);
}

.home-secondary-action {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.home-secondary-action:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.home-primary-action svg,
.home-secondary-action svg {
    width: 1.2rem;
    height: 1.2rem;
}

.home-hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1.15rem;
    margin-top: 1.4rem;
    color: #a9c7dc;
    font-size: 0.85rem;
    font-weight: 600;
}

.home-hero-highlights span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.home-hero-highlights svg {
    width: 1rem;
    height: 1rem;
    color: #f2c230;
}

.home-hero-visual {
    position: relative;
    min-height: 490px;
    display: grid;
    place-items: center;
}

.hero-visual-ring {
    position: absolute;
    width: min(88%, 470px);
    aspect-ratio: 1;
    border: 1px dashed rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    animation: heroSpin 28s linear infinite;
}

.hero-visual-ring::before,
.hero-visual-ring::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f2c230;
    box-shadow: 0 0 22px rgba(242, 194, 48, 0.8);
}

.hero-visual-ring::before { top: 9%; left: 18%; }
.hero-visual-ring::after { right: 5%; bottom: 28%; }

.hero-visual-card {
    position: relative;
    width: min(76%, 410px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 32px 80px rgba(0, 15, 32, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(18px);
    animation: heroFloat 6s ease-in-out infinite;
}

.hero-project-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}

.hero-visual-shine {
    position: absolute;
    inset: -40%;
    z-index: 2;
    background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.3) 50%, transparent 58%);
    transform: translateX(-60%) rotate(10deg);
    animation: heroShine 5.5s ease-in-out infinite;
    pointer-events: none;
}

.hero-floating-chip {
    position: absolute;
    z-index: 3;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 16px;
    color: #eaf6ff;
    background: rgba(0, 37, 71, 0.72);
    box-shadow: 0 16px 35px rgba(0, 18, 35, 0.28);
    backdrop-filter: blur(15px);
    font-size: 0.78rem;
}

.hero-floating-chip svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #f2c230;
}

.hero-floating-chip span { display: grid; line-height: 1.15; }
.hero-floating-chip b { color: #ffffff; font-size: 0.86rem; }
.hero-chip-reading { top: 11%; left: 0; animation: chipFloat 5s ease-in-out infinite; }
.hero-chip-thinking { top: 24%; right: -2%; animation: chipFloat 5.7s ease-in-out -1.2s infinite; }
.hero-chip-game { bottom: 11%; left: 5%; animation: chipFloat 6.2s ease-in-out -2.4s infinite; }

.home-hero-stats {
    position: relative;
    z-index: 3;
    width: min(100%, 1080px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: clamp(46px, 6vw, 72px) auto 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: 0 22px 54px rgba(0, 18, 35, 0.25);
    backdrop-filter: blur(16px);
}

.home-hero-stats > div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    padding: 1rem 1.2rem;
    background: rgba(0, 33, 63, 0.44);
}

.home-hero-stats svg {
    width: 1.45rem;
    height: 1.45rem;
    flex: 0 0 auto;
    color: #f2c230;
}

.home-hero-stats span { display: grid; gap: 0.12rem; }
.home-hero-stats b { color: #ffffff; font-size: 0.9rem; }
.home-hero-stats small { color: #abc5d9; font-size: 0.72rem; }

.hero-enter {
    animation: heroEnter 0.9s cubic-bezier(.16, 1, .3, 1) both;
}

.hero-enter-delay { animation-delay: 0.14s; }
.hero-enter-late { animation-delay: 0.28s; }

.home-reveal-section {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.75s ease, transform 0.75s cubic-bezier(.16, 1, .3, 1);
}

.home-reveal-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#overview {
    background:
        radial-gradient(circle at 15% 15%, rgba(212, 175, 55, 0.08), transparent 25%),
        #f8fafc;
}

#benefits .grid > div {
    position: relative;
    overflow: hidden;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

#benefits .grid > div::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    top: -60px;
    right: -60px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.08);
    transition: transform 0.35s ease;
}

#benefits .grid > div:hover {
    transform: translateY(-8px);
    border-color: rgba(184, 134, 11, 0.28);
    box-shadow: 0 22px 45px rgba(15, 35, 60, 0.1);
}

#benefits .grid > div:hover::after { transform: scale(1.45); }

/* หน้าแรก: ภาษาภาพร่วมของ Section */
.home-content-section {
    position: relative;
    overflow: hidden;
}

.home-section-heading {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.home-section-eyebrow {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.52rem 0.95rem;
    border: 1px solid rgba(184, 134, 11, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 8px 24px rgba(15, 35, 60, 0.05);
    backdrop-filter: blur(12px);
}

.home-section-eyebrow svg {
    width: 1rem;
    height: 1rem;
}

.home-section-title {
    line-height: 1.2;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.home-section-intro {
    max-width: 700px;
    margin: 1.15rem auto 0;
    color: #64748b;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.75;
}

.home-section-rule {
    position: relative;
    width: 88px !important;
    height: 5px !important;
    overflow: visible;
    background: linear-gradient(90deg, #002d56 0 35%, #d4af37 35% 100%) !important;
    box-shadow: 0 6px 18px rgba(184, 134, 11, 0.16);
}

.home-section-rule::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    top: 50%;
    left: 35%;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #d4af37;
    transform: translate(-50%, -50%);
}

/* Showcase นวัตกรรม */
.innovation-section::before {
    content: '';
    position: absolute;
    width: 440px;
    height: 440px;
    top: 8%;
    right: -240px;
    border: 1px solid rgba(0, 45, 86, 0.08);
    border-radius: 50%;
    box-shadow: 0 0 0 70px rgba(0, 45, 86, 0.025), 0 0 0 140px rgba(0, 45, 86, 0.018);
}

.innovation-grid {
    position: relative;
    z-index: 2;
    max-width: 1060px !important;
}

.innovation-card {
    position: relative;
    border-color: rgba(0, 45, 86, 0.09) !important;
    box-shadow: 0 18px 55px rgba(15, 35, 60, 0.08) !important;
}

.innovation-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    z-index: 3;
    height: 5px;
    background: linear-gradient(90deg, #d4af37, #f4dc87);
}

.innovation-card-game::before {
    background: linear-gradient(90deg, #07558b, #29a4d8);
}

.innovation-media {
    position: relative;
    isolation: isolate;
}

.innovation-media::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.82), transparent 55%);
}

.innovation-media img {
    transition: transform 0.55s cubic-bezier(.16, 1, .3, 1), filter 0.4s ease !important;
}

.innovation-card:hover .innovation-media img {
    transform: scale(1.06) !important;
    filter: saturate(1.08);
}

/* สิทธิประโยชน์ */
.benefits-section {
    background:
        radial-gradient(circle at 8% 18%, rgba(212, 175, 55, 0.08), transparent 23%),
        radial-gradient(circle at 92% 84%, rgba(0, 78, 130, 0.07), transparent 24%),
        #ffffff;
}

.benefit-grid {
    position: relative;
    z-index: 2;
    gap: 1.35rem !important;
}

.benefit-card {
    min-height: 100%;
    padding: clamp(1.45rem, 2.4vw, 2rem) !important;
    border-color: #e4ebf1 !important;
    background: rgba(248, 250, 252, 0.88) !important;
    box-shadow: 0 12px 34px rgba(15, 35, 60, 0.055);
    backdrop-filter: blur(10px);
}

.benefit-card h4 {
    position: relative;
    z-index: 2;
    min-height: 3.1rem;
}

.benefit-icon {
    position: relative;
    z-index: 2;
    width: 58px !important;
    height: 58px !important;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: linear-gradient(145deg, #002d56, #07558b) !important;
    box-shadow: 0 13px 28px rgba(0, 45, 86, 0.22) !important;
    transition: transform 0.35s cubic-bezier(.16, 1, .3, 1);
}

.benefit-card-teacher .benefit-icon { background: linear-gradient(145deg, #8b6400, #d4af37) !important; }
.benefit-card-student .benefit-icon { background: linear-gradient(145deg, #086a76, #13a8a6) !important; }
.benefit-card-mentor .benefit-icon { background: linear-gradient(145deg, #4f3a80, #7865ad) !important; }
.benefit-card:hover .benefit-icon { transform: rotate(-6deg) scale(1.08); }

.benefit-card ul {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 0.65rem !important;
}

.benefit-card li {
    margin: 0 !important;
    padding: 0.62rem 0.7rem;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
}

.benefit-card li svg {
    margin-top: 0.16rem;
    padding: 2px;
    border-radius: 50%;
    background: #fff6da;
}

.benefit-recommended {
    z-index: 4;
    padding: 0.45rem 0.85rem !important;
    border-radius: 0 1.45rem 0 1rem !important;
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.22);
}

/* วิดีโอแนะนำโครงการ */
.home-video-section {
    color: #ffffff;
    background:
        radial-gradient(circle at 10% 10%, rgba(25, 134, 190, 0.22), transparent 27%),
        radial-gradient(circle at 90% 90%, rgba(212, 175, 55, 0.17), transparent 28%),
        linear-gradient(145deg, #001c35, #00345f 55%, #002644);
}

.home-video-section::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: radial-gradient(circle, #ffffff 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(90deg, #000, transparent 48%, #000);
}

.home-video-layout {
    position: relative;
    z-index: 2;
    max-width: 1040px !important;
}

.home-video-copy h3 { color: #ffffff !important; text-wrap: balance; }
.home-video-copy p { max-width: 700px; margin-right: auto; margin-left: auto; color: #b9d0e2 !important; }

.home-video-badge {
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffe17d !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.home-video-shell {
    position: relative;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 28px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 32px 80px rgba(0, 15, 30, 0.46) !important;
    backdrop-filter: blur(15px);
}

.home-video-shell iframe {
    display: block;
    border-radius: 19px;
}

/* หน่วยงานผู้ร่วมขับเคลื่อน */
.partner-section {
    background: linear-gradient(180deg, #ffffff, #f7fafc);
}

.partner-grid {
    position: relative;
    z-index: 2;
    max-width: 1120px;
    margin-right: auto;
    margin-left: auto;
}

.partner-card {
    position: relative;
    overflow: hidden;
    border-color: #e2e8f0 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 16px 45px rgba(15, 35, 60, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.partner-card::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    top: -110px;
    right: -90px;
    border-radius: 50%;
    background: rgba(0, 69, 117, 0.07);
    box-shadow: 0 0 0 28px rgba(0, 69, 117, 0.025);
}

.partner-card-pmua::before {
    background: rgba(212, 175, 55, 0.11);
    box-shadow: 0 0 0 28px rgba(212, 175, 55, 0.035);
}

.partner-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(15, 35, 60, 0.12);
}

.partner-icon {
    position: relative;
    flex: 0 0 auto;
    border: 1px solid #e4ebf1;
    box-shadow: 0 12px 26px rgba(0, 45, 86, 0.1) !important;
    transition: transform 0.3s ease;
}

.partner-card:hover .partner-icon { transform: rotate(-5deg) scale(1.06); }

@media (max-width: 768px) {
    .home-section-intro { font-size: 0.98rem; }
    .benefit-card h4 { min-height: auto; }
    .home-video-shell { padding: 6px; border-radius: 20px !important; }
    .home-video-shell iframe { border-radius: 14px; }
    .partner-card { padding: 1.55rem !important; }
    .partner-card > div:first-child { align-items: flex-start; }
}

@keyframes heroEnter {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-14px) rotate(1deg); }
}

@keyframes chipFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

@keyframes heroSpin { to { transform: rotate(360deg); } }

@keyframes heroShine {
    0%, 58% { transform: translateX(-62%) rotate(10deg); }
    82%, 100% { transform: translateX(62%) rotate(10deg); }
}

@keyframes heroPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.75); opacity: 0.65; }
}

@media (max-width: 1020px) {
    .home-hero { padding-top: 124px; }
    .home-hero-grid { grid-template-columns: 1fr; text-align: center; }
    .home-hero-copy { max-width: 760px; margin: 0 auto; }
    .home-hero-eyebrow, .home-hero-actions, .home-hero-highlights { justify-content: center; }
    .home-hero-copy > p { margin-right: auto; margin-left: auto; }
    .home-hero-visual { width: min(100%, 590px); margin: -10px auto 0; }
}

@media (max-width: 640px) {
    .home-hero { min-height: auto; padding: 124px 18px 34px; }
    .home-hero h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
    .home-hero-mainline { white-space: normal; }
    .home-hero-copy > p { font-size: 1rem; line-height: 1.7; }
    .home-hero-actions { display: grid; grid-template-columns: 1fr; }
    .home-primary-action, .home-secondary-action { width: 100%; }
    .home-hero-visual { min-height: 390px; }
    .hero-visual-card { width: min(72vw, 310px); }
    .hero-visual-ring { width: min(82vw, 350px); }
    .hero-floating-chip { min-height: 46px; padding: 0.55rem 0.7rem; font-size: 0.7rem; }
    .hero-floating-chip b { font-size: 0.76rem; }
    .hero-chip-reading { left: 1%; }
    .hero-chip-thinking { right: 0; }
    .hero-chip-game { left: 2%; bottom: 8%; }
    .home-hero-stats { grid-template-columns: 1fr; border-radius: 18px; }
    .home-hero-stats > div { justify-content: flex-start; padding: 0.9rem 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-enter,
    .hero-visual-card,
    .hero-visual-ring,
    .hero-floating-chip,
    .hero-visual-shine,
    .home-hero-eyebrow-dot {
        animation: none !important;
    }

    .home-reveal-section {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* =========================================================
   ปุ่มหมวดหมู่และการนำทางด่วน (Category Links)
   ========================================================= */
.category-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: 9999px;
    background: #ffffff;
    color: #002D56;
    border: 2px solid #e2e8f0;
    font-size: 0.98rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    transition: all 0.25s ease;
    text-decoration: none;
}

.category-link:hover {
    border-color: #B8860B;
    background: #fffdfa;
    color: #B8860B;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.15);
}

.category-link:active {
    transform: translateY(0);
}

/* =========================================================
   หัวข้อ Section และ Badges
   ========================================================= */
.section-title-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2.2rem;
    border-radius: 9999px;
    background: #ffffff;
    border: 2px solid #002D56;
    box-shadow: 0 6px 18px rgba(0, 45, 86, 0.08);
}

/* =========================================================
   การ์ดทั่วไปและการ์ดข่าวสาร
   ========================================================= */
.apply-card {
    transition: all 0.3s ease;
}

.apply-card:hover {
    transform: translateY(-8px);
    border-color: rgba(184, 134, 11, 0.3);
}

.news-card,
.activity-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    background: #ffffff;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.news-card:hover,
.activity-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(184, 134, 11, 0.3);
}

.card-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ภาพแบนเนอร์ข่าวเป็นภาพแนวกว้าง จึงรักษาสัดส่วนต้นฉบับเพื่อไม่ให้ข้อความในภาพถูกตัด */
.news-banner-image {
    aspect-ratio: 2244 / 701;
    object-fit: cover;
}

.public-news-notice {
    width: min(100%, 48rem);
    margin: 1rem auto 0;
    padding: 0.85rem 1rem;
    border: 1px solid #fde68a;
    border-radius: 0.75rem;
    color: #854d0e;
    background: #fffbeb;
    text-align: center;
}

.public-news-empty {
    padding: 3rem 1.5rem;
    border: 1px dashed #cbd5e1;
    border-radius: 1.25rem;
    color: #64748b;
    background: #fff;
    text-align: center;
}

.public-news-date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    color: #64748b;
    font-size: 0.875rem;
}

.news-card-without-image {
    border-top: 0.3rem solid #d4af37;
}

.public-news-detail-button {
    width: fit-content;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.public-news-dialog {
    width: min(42rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 1.5rem;
    color: #334155;
    background: #fff;
    box-shadow: 0 2rem 5rem rgba(0, 31, 61, 0.3);
}

.public-news-dialog::backdrop {
    background: rgba(0, 31, 61, 0.65);
    backdrop-filter: blur(3px);
}

.public-news-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.75rem 1.75rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.public-news-dialog-header h2 {
    margin: 0.35rem 0 0;
    color: #002d56;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 800;
    line-height: 1.35;
}

.public-news-dialog-category {
    margin: 0;
    color: #b8860b;
    font-weight: 700;
}

.public-news-dialog-date {
    margin: 0.6rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
}

.public-news-dialog-close {
    width: 2.6rem;
    height: 2.6rem;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 1.75rem;
    line-height: 1;
}

.public-news-dialog-content {
    margin: 0;
    padding: 1.5rem 1.75rem;
    color: #475569;
    line-height: 1.8;
    white-space: pre-line;
}

.public-news-dialog-actions {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.75rem 1.5rem;
}

.public-news-dialog-done {
    min-height: 2.75rem;
    padding: 0.65rem 1.25rem;
    border: 0;
    border-radius: 0.75rem;
    color: #fff;
    background: #002d56;
    cursor: pointer;
    font-weight: 700;
}

/* ภาพกิจกรรมเด่น: เต็มความสูงของคอลัมน์บน Desktop และเป็น 16:9 บนจอเล็ก */
.featured-activity-media {
    min-height: 240px;
}

.featured-activity-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
    object-position: center;
}

/* =========================================================
   ปุ่มดูรูปภาพและปุ่มแอ็กชัน
   ========================================================= */
.photo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.85rem 1.25rem;
    border-radius: 0.85rem;
    background: #002D56;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 45, 86, 0.18);
    transition: all 0.25s ease;
    border: 0;
    cursor: pointer;
}

.photo-button:hover {
    background: #001f3d;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 45, 86, 0.25);
}

/* =========================================================
   ส่วนเอกสารประกอบการอบรม (Training Documents Accordion)
   ========================================================= */
.document-toggle {
    cursor: pointer;
    font: inherit;
}

.document-chevron {
    transition: transform 0.3s ease;
}

.document-toggle.active .document-chevron {
    transform: rotate(180deg);
}

.document-center {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}

.document-center.open {
    grid-template-rows: 1fr;
}

.document-center-inner {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding-top: 1.25rem;
}

.managed-document-groups {
    display: contents;
}

.managed-document-groups[hidden] {
    display: none;
}

.managed-document-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.1rem 0 0.15rem;
    padding: 0 0.2rem;
    color: #B8860B;
    font-size: 0.85rem;
    font-weight: 700;
}

.managed-document-notice {
    margin: 0;
    padding: 0.85rem 1rem;
    border: 1px solid #f2dfab;
    border-radius: 0.85rem;
    color: #7b5b00;
    background: #fff9e8;
    font-size: 0.82rem;
    line-height: 1.55;
}

.managed-document-group {
    border-color: #d9e6f0;
    box-shadow: inset 3px 0 0 #B8860B;
}

.document-group {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #f8fafc;
    overflow: hidden;
}

.document-group-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 0;
    background: transparent;
    color: #002D56;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.document-group-button:hover {
    background: #f1f5f9;
}

.group-chevron {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: #B8860B;
}

.document-group-button.active .group-chevron {
    transform: rotate(180deg);
}

.document-group-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.document-group-content.open {
    grid-template-rows: 1fr;
}

.document-group-inner {
    overflow: hidden;
}

.document-links {
    padding: 0 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.document-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #002D56;
    text-decoration: none;
    transition: all 0.2s ease;
}

.document-link:hover {
    border-color: #B8860B;
    background: #fffdfa;
    transform: translateX(4px);
}

.document-link-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.document-link-icon {
    flex-shrink: 0;
    color: #B8860B;
}

.document-link-title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.35;
}

.document-link-note {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.15rem;
}

/* =========================================================
   แท็บภาคการอบรม (Training Terms Tabs)
   ========================================================= */
.training-term-button {
    cursor: pointer;
    font: inherit;
}

.training-term-button.active {
    background: #002D56 !important;
    color: #ffffff !important;
    border-color: #002D56 !important;
    box-shadow: 0 12px 24px rgba(0, 45, 86, 0.22);
}

.training-term-button .term-chevron {
    transition: transform 0.3s ease;
}

.training-term-button.active .term-chevron {
    transform: rotate(180deg);
}

.training-term-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}

.training-term-content.open {
    grid-template-rows: 1fr;
}

.training-term-inner {
    overflow: hidden;
}

/* =========================================================
   แท็บภาพการนิเทศ (Supervision Photos)
   ========================================================= */
.supervision-term-button {
    cursor: pointer;
    font: inherit;
}

.supervision-term-button.active {
    background: #002D56 !important;
    color: #ffffff !important;
    border-color: #002D56 !important;
    box-shadow: 0 12px 24px rgba(0, 45, 86, 0.22);
}

.supervision-term-button .term-chevron {
    transition: transform 0.3s ease;
}

.supervision-term-button.active .term-chevron {
    transform: rotate(180deg);
}

.supervision-term-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}

.supervision-term-content.open {
    grid-template-rows: 1fr;
}

.supervision-term-inner {
    overflow: hidden;
}

.supervision-card {
    height: 100%;
}

.pending-photo-button {
    background: #64748b;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.2);
}

.pending-photo-button:hover {
    background: #475569;
}

/* =========================================================
   การ์ดข้อมูลคณะทำงาน (Team Cards)
   ========================================================= */
.person-card {
    position: relative;
    background: #ffffff;
    border-radius: 1.6rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    transition: all 0.3s ease;
}

/* การ์ดนักวิจัยและผู้ช่วยนักวิจัยให้กระชับกว่าส่วนพี่เลี้ยง */
#researchers .person-card {
    width: 100%;
    max-width: 330px;
    margin-inline: auto;
}

.researcher-grid {
    display: grid;
    grid-template-columns: minmax(0, 330px);
    justify-content: center;
    gap: clamp(1.75rem, 3vw, 2.25rem);
}

@media (min-width: 640px) {
    .researcher-grid {
        grid-template-columns: repeat(2, minmax(0, 330px));
    }

    .researcher-grid > .person-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
    }
}

@media (min-width: 1280px) {
    .researcher-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        max-width: 1030px;
        margin-inline: auto;
    }

    .researcher-grid > .person-card {
        grid-column: span 2;
    }

    .researcher-grid > .person-card:nth-child(4) {
        grid-column: 2 / span 2;
    }

    .researcher-grid > .person-card:last-child:nth-child(5) {
        grid-column: 4 / span 2;
    }
}

.person-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(0, 45, 86, 0.12);
    border-color: rgba(184, 134, 11, 0.35);
}

.person-photo-wrap {
    position: relative;
    width: 100%;
    height: clamp(280px, 30vw, 320px);
    background: #eaf1f7;
    overflow: hidden;
}

.person-photo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 18%;
    transform: none;
    transition: opacity 0.3s ease;
}

.person-card:hover .person-photo {
    opacity: 0.96;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    background: #fff8e5;
    color: #9a6d00;
    font-size: 0.78rem;
    font-weight: 700;
}

.person-affiliations {
    display: grid;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.75rem;
    color: #64748b;
    line-height: 1.55;
}

.person-affiliation-line {
    display: grid;
    grid-template-columns: 1rem minmax(0, auto);
    align-items: start;
    justify-content: center;
    gap: 0.5rem;
    max-width: 100%;
}

.person-affiliation-line svg {
    width: 1rem;
    height: 1rem;
    margin-top: 0.25rem;
    color: #B8860B;
}

.person-affiliation-line span {
    text-align: center;
}

.code-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 2;
    padding: 0.4rem 0.75rem;
    border-radius: 9999px;
    color: #ffffff;
    background: rgba(0, 45, 86, 0.92);
    font-weight: 800;
    font-size: 0.78rem;
    box-shadow: 0 8px 20px rgba(0, 45, 86, 0.22);
}

/* =========================================================
   ปุ่มกลับขึ้นด้านบน (Back to Top)
   ========================================================= */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 90;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 14px;
    background: rgba(0, 45, 86, 0.92);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(0, 45, 86, 0.25);
    transition: transform 0.25s ease, background 0.25s ease;
}

.back-to-top:hover {
    transform: translateY(-4px);
    background: #001f3d;
}

/* =========================================================
   การจัดวางตามขนาดหน้าจอ (Media Queries & Breakpoints)
   ========================================================= */
@media (max-width: 1420px) {
    .nav-shell {
        gap: 14px;
        padding-left: 18px;
        padding-right: 18px;
    }
    .partner-logos img {
        width: min(200px, 14vw);
        max-height: 44px;
    }
    .menu-wrap {
        gap: 10px !important;
        font-size: 14px !important;
    }
    .dashboard-link {
        padding: 7px 12px;
        font-size: 13px;
        min-height: 38px;
    }
}

@media (max-width: 1240px) {
    .nav-shell {
        gap: 10px;
        padding-left: 14px;
        padding-right: 14px;
    }
    .brand-title {
        font-size: 19px;
    }
    .brand-tagline {
        font-size: 10px;
    }
    .brand-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    .partner-logos img {
        width: min(160px, 13vw);
        max-height: 38px;
    }
    .menu-wrap {
        gap: 8px !important;
        font-size: 13px !important;
    }
    .dashboard-link {
        padding: 6px 10px;
        font-size: 12px;
        min-height: 36px;
    }
}

/* Legacy mobile header rules: ปิดใช้งานหลังเปลี่ยนเป็น Sidebar ทุกขนาดหน้าจอ */
@media (max-width: 0px) {
    .nav-shell {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
        gap: 12px;
    }

    /* ซ่อนเมนูแบบเต็มของจอใหญ่ และซ่อนโลโก้ใน Header */
    .desktop-menu,
    .menu-wrap,
    .partner-logos {
        display: none !important;
    }

    /* แสดงปุ่มแฮมเบอร์เกอร์ */
    .nav-hamburger {
        display: inline-flex;
    }
}

@media (max-width: 640px) {
    .nav-shell {
        padding: 10px 16px;
    }

    .card-image {
        height: auto;
        max-width: 100%;
        aspect-ratio: 16 / 9;
        object-fit: contain;
        object-position: center;
        background: #f8fafc;
    }

    .news-banner-image {
        aspect-ratio: 16 / 9;
        object-fit: contain;
        object-position: center;
        background: #f8fafc;
    }

    .news-card,
    .activity-card {
        overflow: hidden;
    }

    .section-title-pill {
        min-width: 0;
        width: 100%;
    }

    .quick-link {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .featured-activity-media {
        min-height: 0;
    }

    .featured-activity-image {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
        object-fit: contain;
        background: #f8fafc;
    }
}

@media (max-width: 560px) {
    .brand-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .brand-tagline {
        display: none;
    }

    .brand-title {
        font-size: 17px;
    }
}

/* =========================================================
   Sidebar Navigation Layout
   Desktop: Sidebar คงที่ด้านซ้าย
   Tablet/Mobile: Header ขนาดย่อและ Drawer จากด้านซ้าย
   ========================================================= */
:root {
    --sidebar-width: 286px;
    --sidebar-collapsed-width: 86px;
    --mobile-header-height: 72px;
}

site-navbar {
    display: block;
}

.desktop-sidebar,
.mobile-nav-header,
.mobile-nav-backdrop {
    box-sizing: border-box;
}

.sidebar-link-copy {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.sidebar-divider-wrap {
    position: relative;
    width: 100%;
    height: 40px;
    margin: 14px 0 8px;
}

.sidebar-divider {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    width: 100%;
    height: 1px;
    margin: 0;
    background: linear-gradient(90deg, #e2e8f0, transparent);
}

.sidebar-label,
.mobile-drawer-title {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.mobile-nav-header,
.mobile-nav-backdrop {
    display: none;
}

.sidebar-toggle {
    display: none;
}

@media (min-width: 0px) {
    body {
        padding-left: var(--sidebar-width);
        transition: padding-left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    body.sidebar-collapsed {
        padding-left: var(--sidebar-collapsed-width);
    }

    section,
    header,
    footer {
        scroll-margin-top: 24px;
    }

    site-navbar {
        width: 0;
        height: 0;
    }

    .site-nav {
        position: static !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .desktop-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 200;
        width: var(--sidebar-width);
        display: flex;
        flex-direction: column;
        padding: 26px 20px 22px;
        overflow-x: hidden;
        overflow-y: auto;
        background: rgba(255, 255, 255, 0.98);
        border-right: 1px solid #e2e8f0;
        box-shadow: 12px 0 35px rgba(15, 23, 42, 0.07);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .sidebar-toggle {
        position: fixed;
        top: 62px; /* Fallback ก่อน JavaScript จัดตำแหน่งให้ตรง .sidebar-divider */
        left: calc(var(--sidebar-width) - 19px);
        z-index: 1000;
        width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 2px solid #ffffff;
        border-radius: 12px;
        background: #002D56;
        color: #ffffff;
        box-shadow: 0 8px 22px rgba(0, 45, 86, 0.28);
        cursor: pointer;
        pointer-events: auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, transform 0.2s ease;
    }

    .sidebar-toggle:hover,
    .sidebar-toggle:focus-visible {
        background: #B8860B;
        transform: scale(1.06);
        outline: none;
    }

    body.sidebar-collapsed .sidebar-toggle {
        left: calc(var(--sidebar-collapsed-width) - 19px);
    }

    body.sidebar-collapsed .desktop-sidebar {
        width: var(--sidebar-collapsed-width);
        padding-right: 12px;
        padding-left: 12px;
    }

    body.sidebar-collapsed .sidebar-brand {
        justify-content: center;
        padding-right: 0;
        padding-left: 0;
    }

    body.sidebar-collapsed .sidebar-brand .brand-copy,
    body.sidebar-collapsed .sidebar-label,
    body.sidebar-collapsed .desktop-sidebar .menu-anchor > span,
    body.sidebar-collapsed .desktop-sidebar .sidebar-link-copy > span,
    body.sidebar-collapsed .desktop-sidebar .dropdown-chevron,
    body.sidebar-collapsed .desktop-sidebar .dashboard-link > span,
    body.sidebar-collapsed .desktop-sidebar .dashboard-link svg:last-child,
    body.sidebar-collapsed .desktop-sidebar .admin-navigation-link > span {
        display: none;
    }

    body.sidebar-collapsed .sidebar-divider-wrap {
        margin-top: 14px;
        margin-bottom: 8px;
    }

    body.sidebar-collapsed .desktop-sidebar .menu-wrap {
        gap: 8px !important;
    }

    body.sidebar-collapsed .desktop-sidebar .nav-link,
    body.sidebar-collapsed .desktop-sidebar .menu-anchor,
    body.sidebar-collapsed .desktop-sidebar .menu-button {
        justify-content: center;
        min-height: 50px;
        padding: 12px !important;
    }

    body.sidebar-collapsed .desktop-sidebar .sidebar-link-copy {
        gap: 0;
    }

    body.sidebar-collapsed .desktop-sidebar .dropdown-menu {
        display: none;
    }

    body.sidebar-collapsed .sidebar-bottom {
        padding-top: 16px;
    }

    body.sidebar-collapsed .desktop-sidebar .dashboard-link,
    body.sidebar-collapsed .desktop-sidebar .admin-navigation-link {
        min-height: 50px;
        padding: 12px;
    }

    .sidebar-brand {
        align-items: flex-start;
        padding: 2px 4px;
    }

    .sidebar-brand .brand-icon {
        width: 48px;
        height: 48px;
        border-radius: 50% !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .sidebar-brand .brand-copy {
        white-space: normal;
    }

    .sidebar-brand .brand-title {
        font-size: 20px;
        line-height: 1.08;
        letter-spacing: -0.035em;
    }

    .sidebar-brand .brand-tagline {
        margin-top: 8px;
        font-size: 10px;
        line-height: 1.45;
    }

    .desktop-sidebar .menu-wrap {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start !important;
        width: 100% !important;
        margin-top: 10px;
        gap: 5px !important;
        overflow: visible;
        font-size: 15px !important;
    }

    .desktop-sidebar .nav-link,
    .desktop-sidebar .menu-anchor,
    .desktop-sidebar .menu-button {
        width: 100%;
        min-height: 48px;
        justify-content: flex-start;
        gap: 12px;
        padding: 11px 14px !important;
        border-radius: 13px;
        color: #475569 !important;
        white-space: normal;
        transform: none;
    }

    .desktop-sidebar .menu-button {
        justify-content: space-between;
    }

    .desktop-sidebar .nav-link::after,
    .desktop-sidebar .menu-anchor::after,
    .desktop-sidebar .menu-button::after {
        display: none;
    }

    .desktop-sidebar .nav-link:hover,
    .desktop-sidebar .menu-anchor:hover,
    .desktop-sidebar .menu-button:hover {
        color: #002D56 !important;
        background: #f1f5f9;
        transform: translateX(3px);
    }

    .desktop-sidebar .nav-link.is-active,
    .desktop-sidebar .menu-anchor.is-active {
        color: #ffffff !important;
        background: linear-gradient(135deg, #002D56, #07518e);
        box-shadow: 0 9px 20px rgba(0, 45, 86, 0.2);
    }

    .desktop-sidebar .dropdown.open > .menu-button {
        color: #ffffff !important;
        background: linear-gradient(135deg, #002D56, #07518e);
        box-shadow: 0 9px 20px rgba(0, 45, 86, 0.2);
        transform: none;
    }

    /* เมื่อเปิดเมนูย่อย ให้พักสถานะหน้าปัจจุบันเพื่อไม่ให้มีพื้นหลังสีน้ำเงินสองรายการ */
    .desktop-sidebar.has-open-dropdown .menu-anchor.is-active {
        color: #475569 !important;
        background: transparent;
        box-shadow: none;
    }

    .desktop-sidebar.has-open-dropdown .menu-anchor.is-active svg {
        color: #64748b;
    }

    .desktop-sidebar .nav-link.is-active svg,
    .desktop-sidebar .menu-anchor.is-active svg,
    .desktop-sidebar .dropdown.open > .menu-button svg {
        color: #D4AF37;
    }

    .desktop-sidebar .dropdown {
        width: 100%;
    }

    .desktop-sidebar .dropdown-menu {
        position: static;
        width: auto;
        max-height: 0;
        margin: 0 0 0 18px;
        padding: 0;
        overflow: hidden;
        border: 0 !important;
        border-left: 2px solid #e2e8f0 !important;
        border-radius: 0 !important;
        background: transparent;
        box-shadow: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: none;
        transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
    }

    .desktop-sidebar .dropdown.open .dropdown-menu {
        max-height: 480px;
        padding: 5px 0 7px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .desktop-sidebar .dropdown-item {
        gap: 9px;
        padding: 9px 10px 9px 14px;
        font-size: 12.5px;
        line-height: 1.35;
        border-radius: 0 9px 9px 0;
    }

    .desktop-sidebar .dropdown-item:hover {
        padding-left: 17px;
        background: #f1f5f9;
    }

    .desktop-sidebar .dropdown-item svg {
        color: #B8860B;
        flex-shrink: 0;
    }

    .sidebar-bottom {
        margin-top: auto;
        padding-top: 22px;
    }

    .desktop-sidebar .dashboard-link,
    .desktop-sidebar .admin-navigation-link {
        width: 100%;
        min-height: 48px;
        padding: 10px 14px;
        justify-content: center;
        font-size: 14px;
    }

    .mobile-nav-drawer {
        display: none !important;
    }
}

/* Legacy mobile drawer rules: ปิดใช้งานหลังนำ Hamburger ออกจากเว็บไซต์ */
@media (max-width: 0px) {
    body {
        padding-top: var(--mobile-header-height);
    }

    body.mobile-nav-open {
        overflow: hidden;
    }

    section,
    header,
    footer {
        scroll-margin-top: calc(var(--mobile-header-height) + 16px);
    }

    .site-nav {
        position: fixed !important;
        inset: 0 0 auto 0;
        z-index: 300;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .desktop-sidebar {
        display: none !important;
    }

    .mobile-nav-header {
        position: relative;
        z-index: 320;
        height: var(--mobile-header-height);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 10px 20px;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .mobile-nav-header .brand-icon {
        width: 46px;
        height: 46px;
        border-radius: 13px;
    }

    .mobile-nav-header .brand-title {
        font-size: 19px;
    }

    .mobile-nav-header .brand-tagline {
        font-size: 10px;
        margin-top: 5px;
    }

    .mobile-nav-header .nav-hamburger {
        display: inline-flex;
    }

    .mobile-nav-drawer {
        position: fixed;
        top: var(--mobile-header-height);
        bottom: 0;
        left: 0;
        z-index: 320;
        display: block;
        width: min(380px, 88vw);
        max-height: none;
        overflow-y: auto;
        border: 0;
        border-right: 1px solid #e2e8f0;
        background: rgba(255, 255, 255, 0.99);
        box-shadow: 18px 0 40px rgba(15, 23, 42, 0.16);
        opacity: 0;
        visibility: hidden;
        transform: translateX(-105%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease, visibility 0.3s ease;
    }

    .mobile-nav-drawer.open {
        display: block;
        animation: none;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    .mobile-nav-content {
        max-width: none;
        min-height: 100%;
        padding: 22px 18px 28px;
    }

    .mobile-drawer-title {
        padding: 0 14px 9px;
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: var(--mobile-header-height) 0 0 0;
        z-index: 310;
        display: block;
        background: rgba(15, 23, 42, 0.44);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .mobile-nav-drawer.open + .mobile-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 560px) {
    :root {
        --mobile-header-height: 66px;
    }

    .mobile-nav-header {
        padding: 9px 14px;
    }

    .mobile-nav-header .brand-icon {
        width: 42px;
        height: 42px;
    }

    .mobile-nav-header .brand-title {
        font-size: 16px;
    }

    .mobile-nav-header .brand-tagline {
        display: none;
    }

    .mobile-nav-drawer {
        width: min(340px, 92vw);
    }
}

/* Sidebar บน Tablet/Mobile: เริ่มแบบย่อและขยายทับพื้นที่เนื้อหาได้ */
@media (max-width: 920px) {
    body,
    body.sidebar-collapsed {
        padding-top: 0;
        padding-left: var(--sidebar-collapsed-width);
    }

    .desktop-sidebar {
        width: min(var(--sidebar-width), 88vw);
    }

    body.sidebar-collapsed .desktop-sidebar {
        width: var(--sidebar-collapsed-width);
    }

    .sidebar-toggle {
        left: calc(min(var(--sidebar-width), 88vw) - 19px);
    }

    body.sidebar-collapsed .sidebar-toggle {
        left: calc(var(--sidebar-collapsed-width) - 19px);
    }

    section,
    header,
    footer {
        scroll-margin-top: 20px;
    }
}

@media (max-width: 560px) {
    :root {
        --sidebar-collapsed-width: 72px;
    }

    .desktop-sidebar {
        padding-right: 10px;
        padding-left: 10px;
    }

    body.sidebar-collapsed .desktop-sidebar {
        padding-right: 9px;
        padding-left: 9px;
    }

    body.sidebar-collapsed .sidebar-brand .brand-icon {
        width: 44px;
        height: 44px;
    }

}

/* =========================================================
   ระยะห่างหน้าแรกแบบกระชับ + Light/Dark Mode
   ========================================================= */
.home-content-section {
    padding-top: clamp(3.25rem, 5vw, 4rem) !important;
    padding-bottom: clamp(3.25rem, 5vw, 4rem) !important;
}

.home-section-heading {
    margin-bottom: clamp(2.25rem, 4vw, 3rem) !important;
}

.home-section-rule {
    margin-top: 1.25rem !important;
}

.home-hero {
    padding-bottom: 32px;
}

.home-hero-stats {
    margin-top: clamp(28px, 4vw, 42px);
}

/* =========================================================
   ส่วนท้ายเว็บไซต์ (Site Footer & Contact Social Links)
   ========================================================= */
.site-footer-contact-card {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.site-footer-contact-list {
    color: #002D56;
}

.site-footer-contact-item {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
}

.site-footer-contact-item a,
.site-footer-contact-item span {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer-contact-item a:hover {
    color: #B8860B;
}

.site-footer-social-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.site-footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0.48rem 1rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.site-footer-social-link svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.site-footer-social-link:hover svg {
    transform: scale(1.12);
}

.site-footer-version {
    display: block;
    margin: 0.85rem auto 0;
    color: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
}

html[data-theme="dark"] .site-footer-version {
    color: #cbd5e1;
}

/* Light Mode: สีโทนนุ่มนวล เนียนตา สบายตา ไม่ฉูดฉาด */
.site-footer-social-line {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.site-footer-social-line:hover,
.site-footer-social-line:focus-visible {
    background: #06c755;
    color: #ffffff;
    border-color: #06c755;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(6, 199, 85, 0.22);
}

.site-footer-social-facebook {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.site-footer-social-facebook:hover,
.site-footer-social-facebook:focus-visible {
    background: #1877f2;
    color: #ffffff;
    border-color: #1877f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.22);
}

.theme-toggle {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 10px;
    padding: 9px 10px;
    border: 1px solid #dbe4ed;
    border-radius: 14px;
    color: #18344f;
    background: #f4f7fa;
    cursor: pointer;
    text-align: left;
    transition: color 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: rgba(184, 134, 11, 0.5);
    background: #fffaf0;
    transform: translateY(-1px);
    outline: none;
}

.theme-toggle-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #8a6508;
    background: #fff3c4;
}

.theme-toggle-icon svg {
    grid-area: 1 / 1;
    width: 18px;
    height: 18px;
}

.theme-icon-dark { display: none; }

.theme-toggle-copy {
    min-width: 0;
    display: grid;
    flex: 1;
    line-height: 1.15;
}

.theme-toggle-title { font-size: 13px; }
.theme-toggle-subtitle { margin-top: 3px; color: #8493a4; font-size: 10px; font-weight: 600; }

.theme-toggle-switch {
    width: 34px;
    height: 20px;
    flex: 0 0 34px;
    padding: 3px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color 0.22s ease;
}

.theme-toggle-switch span {
    width: 14px;
    height: 14px;
    display: block;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.2);
    transition: transform 0.22s ease;
}

body.sidebar-collapsed .theme-toggle {
    min-height: 50px;
    justify-content: center;
    padding: 8px;
}

body.sidebar-collapsed .theme-toggle-copy,
body.sidebar-collapsed .theme-toggle-switch {
    display: none;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] body {
    color: #d8e3ee !important;
    background: #07111f !important;
}

html[data-theme="dark"] .desktop-sidebar {
    border-right-color: #23374a;
    background: rgba(8, 20, 33, 0.98);
    box-shadow: 12px 0 35px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .brand-icon,
html[data-theme="dark"] .brand-icon-image,
html[data-theme="dark"] .site-footer-brand-logo,
html[data-theme="dark"] .sidebar-brand .brand-icon {
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .brand-title,
html[data-theme="dark"] .site-footer-brand-title {
    color: #eef6ff !important;
}

html[data-theme="dark"] .sidebar-divider,
html[data-theme="dark"] .site-footer-social,
html[data-theme="dark"] .site-footer-copyright {
    border-color: #26394b !important;
}

html[data-theme="dark"] .sidebar-divider {
    background: linear-gradient(90deg, #334a60, transparent);
}

html[data-theme="dark"] .desktop-sidebar .nav-link,
html[data-theme="dark"] .desktop-sidebar .menu-anchor,
html[data-theme="dark"] .desktop-sidebar .menu-button,
html[data-theme="dark"] .desktop-sidebar.has-open-dropdown .menu-anchor.is-active {
    color: #b7c7d7 !important;
}

html[data-theme="dark"] .desktop-sidebar .nav-link:hover,
html[data-theme="dark"] .desktop-sidebar .menu-anchor:hover,
html[data-theme="dark"] .desktop-sidebar .menu-button:hover,
html[data-theme="dark"] .desktop-sidebar .dropdown-item:hover {
    color: #ffffff !important;
    background: #13283b;
}

html[data-theme="dark"] .desktop-sidebar .nav-link.is-active,
html[data-theme="dark"] .desktop-sidebar .menu-anchor.is-active,
html[data-theme="dark"] .desktop-sidebar .dropdown.open > .menu-button {
    color: #ffffff !important;
    background: linear-gradient(135deg, #07518e, #0b6aa9);
}

html[data-theme="dark"] .desktop-sidebar .dropdown-menu {
    border-left-color: #334a60 !important;
}

html[data-theme="dark"] .desktop-sidebar .dropdown-item {
    color: #afc1d2 !important;
}

html[data-theme="dark"] .theme-toggle {
    border-color: #2d4459;
    color: #edf6ff;
    background: #102438;
}

html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:focus-visible {
    border-color: rgba(212, 175, 55, 0.64);
    background: #163049;
}

html[data-theme="dark"] .theme-toggle-icon {
    color: #dcecff;
    background: #243c59;
}

html[data-theme="dark"] .theme-icon-light { display: none; }
html[data-theme="dark"] .theme-icon-dark { display: block; }
html[data-theme="dark"] .theme-toggle-subtitle { color: #91a7ba; }
html[data-theme="dark"] .theme-toggle-switch { background: #b8860b; }
html[data-theme="dark"] .theme-toggle-switch span { transform: translateX(14px); }

html[data-theme="dark"] .bg-white { background-color: #0f1e2d !important; }
html[data-theme="dark"] .bg-slate-50 { background-color: #0a1725 !important; }
html[data-theme="dark"] .text-slate-800,
html[data-theme="dark"] .text-slate-700 { color: #dce7f1 !important; }
html[data-theme="dark"] .text-slate-600,
html[data-theme="dark"] .text-slate-500 { color: #a9bac9 !important; }
html[data-theme="dark"] .text-slate-400 { color: #8196a9 !important; }
html[data-theme="dark"] .text-\[\#002D56\] { color: #edf6ff !important; }
html[data-theme="dark"] .border-slate-100,
html[data-theme="dark"] .border-slate-200,
html[data-theme="dark"] .border-slate-300 { border-color: #293c4f !important; }

html[data-theme="dark"] #overview {
    background:
        radial-gradient(circle at 15% 15%, rgba(212, 175, 55, 0.1), transparent 25%),
        #091827;
}

html[data-theme="dark"] .benefits-section {
    background:
        radial-gradient(circle at 8% 18%, rgba(212, 175, 55, 0.1), transparent 23%),
        radial-gradient(circle at 92% 84%, rgba(18, 126, 190, 0.12), transparent 24%),
        #071321;
}

html[data-theme="dark"] .partner-section {
    background: linear-gradient(180deg, #0a1827, #07111f);
}

html[data-theme="dark"] .home-section-eyebrow {
    border-color: rgba(212, 175, 55, 0.28);
    background: rgba(20, 39, 57, 0.8);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .home-section-title,
html[data-theme="dark"] .innovation-card h4,
html[data-theme="dark"] .benefit-card h4,
html[data-theme="dark"] .partner-card h4 {
    color: #edf6ff !important;
}

html[data-theme="dark"] .home-section-intro,
html[data-theme="dark"] .home-content-section .text-slate-500 {
    color: #a9bac9 !important;
}

html[data-theme="dark"] .innovation-card,
html[data-theme="dark"] .benefit-card,
html[data-theme="dark"] .partner-card {
    border-color: #293d50 !important;
    background: rgba(14, 31, 47, 0.94) !important;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24) !important;
}

html[data-theme="dark"] .innovation-card-kapi .innovation-media {
    border-color: #2a3d50 !important;
    background: #172638 !important;
}

html[data-theme="dark"] .benefit-card li {
    border-color: #2b4053;
    background: rgba(21, 42, 61, 0.92);
}

html[data-theme="dark"] .benefit-card li svg {
    background: #3b3219;
}

html[data-theme="dark"] .partner-icon {
    border-color: #2d4560 !important;
    background: linear-gradient(145deg, #0e2740, #193e64) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .partner-icon svg,
html[data-theme="dark"] .partner-icon i {
    color: #f7d66b !important;
}

html[data-theme="dark"] .bg-amber-50 {
    background-color: rgba(212, 175, 55, 0.12) !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
}

html[data-theme="dark"] .bg-amber-50 h3 {
    color: #edf6ff !important;
}

html[data-theme="dark"] .bg-amber-50 p.text-slate-500 {
    color: #a0aec0 !important;
}

html[data-theme="dark"] .quick-link,
html[data-theme="dark"] .category-link,
html[data-theme="dark"] .section-title-pill {
    border-color: #3a5268 !important;
    color: #edf6ff !important;
    background: #102438 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .quick-link:hover,
html[data-theme="dark"] .category-link:hover {
    border-color: #b8860b !important;
    color: #f7d66b !important;
    background: #183149 !important;
}

html[data-theme="dark"] .news-card,
html[data-theme="dark"] .activity-card,
html[data-theme="dark"] .person-card,
html[data-theme="dark"] .document-group,
html[data-theme="dark"] .document-link {
    border-color: #293d50 !important;
    background: #0f1e2d !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .document-group-button,
html[data-theme="dark"] .document-link {
    color: #dce7f1 !important;
}

html[data-theme="dark"] .document-group-button:hover,
html[data-theme="dark"] .document-link:hover {
    background: #183149 !important;
}

html[data-theme="dark"] .managed-document-notice {
    border-color: #624f1f;
    color: #f2d783;
    background: #2a2414;
}

html[data-theme="dark"] .quick-link,
html[data-theme="dark"] .category-link,
html[data-theme="dark"] .section-title-pill {
    border-color: #3a5268 !important;
    color: #edf6ff !important;
    background: #102438 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .quick-link:hover,
html[data-theme="dark"] .category-link:hover {
    border-color: #b8860b !important;
    color: #f7d66b !important;
    background: #183149 !important;
}

html[data-theme="dark"] .news-card,
html[data-theme="dark"] .activity-card,
html[data-theme="dark"] .person-card,
html[data-theme="dark"] .document-group,
html[data-theme="dark"] .document-link {
    border-color: #293d50 !important;
    background: #0f1e2d !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .document-group-button,
html[data-theme="dark"] .document-link {
    color: #dce7f1 !important;
}

html[data-theme="dark"] .document-group-button:hover,
html[data-theme="dark"] .document-link:hover {
    background: #183149 !important;
}

html[data-theme="dark"] .managed-document-notice {
    border-color: #624f1f;
    color: #f2d783;
    background: #2a2414;
}

html[data-theme="dark"] .site-footer-shell {
    border-color: #25394b !important;
    background: #07111f !important;
}

html[data-theme="dark"] .site-footer-description {
    color: #9fb2c3 !important;
}

html[data-theme="dark"] .site-footer-contact-card {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

html[data-theme="dark"] .site-footer-contact-title {
    color: #e6f1fb !important;
}

html[data-theme="dark"] .site-footer-contact-list {
    color: #dbe7f2 !important;
}

html[data-theme="dark"] .site-footer-contact-item span,
html[data-theme="dark"] .site-footer-contact-item a {
    color: #dbe7f2 !important;
}

html[data-theme="dark"] .site-footer-contact-item a:hover {
    color: #f7d66b !important;
}

html[data-theme="dark"] .site-footer-social-copy {
    color: #94a9be !important;
}

/* Dark Mode: สไตล์ Dark Glassmorphism เนียนตา สบายตา ไม่สว่างโร่ */
html[data-theme="dark"] .site-footer-social-line {
    background: rgba(6, 199, 85, 0.1) !important;
    color: #6ee7b7 !important;
    border-color: rgba(110, 231, 183, 0.25) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .site-footer-social-line:hover,
html[data-theme="dark"] .site-footer-social-line:focus-visible {
    background: rgba(6, 199, 85, 0.22) !important;
    border-color: #6ee7b7 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(6, 199, 85, 0.2) !important;
}

html[data-theme="dark"] .site-footer-social-facebook {
    background: rgba(24, 119, 242, 0.1) !important;
    color: #93c5fd !important;
    border-color: rgba(147, 197, 253, 0.25) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .site-footer-social-facebook:hover,
html[data-theme="dark"] .site-footer-social-facebook:focus-visible {
    background: rgba(24, 119, 242, 0.22) !important;
    border-color: #93c5fd !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(24, 119, 242, 0.2) !important;
}

/* =========================================================
   หน้าคณะผู้ดำเนินงาน (Team Page) & คอมโพเนนต์การ์ดใน Dark Mode
   ========================================================= */
html[data-theme="dark"] .person-card {
    background: #0f1e2d !important;
    border-color: #293d50 !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .person-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.5) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .person-photo-wrap {
    background: #15273b !important;
}

html[data-theme="dark"] .person-card h3 {
    color: #edf6ff !important;
}

html[data-theme="dark"] .role-badge {
    background: rgba(212, 175, 55, 0.15) !important;
    color: #f6d46d !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
}

html[data-theme="dark"] .person-affiliations {
    color: #9fb3c5 !important;
}

html[data-theme="dark"] .person-affiliation-line svg {
    color: #d4af37 !important;
}

html[data-theme="dark"] .code-badge {
    background: rgba(3, 27, 51, 0.95) !important;
    color: #ffffff !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .section-title-pill {
    background: #0f1e2d !important;
    border-color: #d4af37 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .section-title-pill h2 {
    color: #edf6ff !important;
}

html[data-theme="dark"] .category-link {
    background: #0f1e2d !important;
    color: #edf6ff !important;
    border-color: #293d50 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

html[data-theme="dark"] .category-link:hover {
    background: #162c44 !important;
    border-color: #d4af37 !important;
    color: #f4dc87 !important;
    box-shadow: 0 8px 22px rgba(212, 175, 55, 0.22) !important;
}

html[data-theme="dark"] .quick-link {
    background: #0f1e2d !important;
    color: #edf6ff !important;
    border-color: #293d50 !important;
}

html[data-theme="dark"] .quick-link:hover,
html[data-theme="dark"] .quick-link:focus-visible {
    background: #162c44 !important;
    border-color: #d4af37 !important;
    color: #f4dc87 !important;
}

html[data-theme="dark"] .bg-\[\#002D56\] {
    background-color: #0b3d6f !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
}

/* การ์ดข่าวสารและกิจกรรมใน Dark Mode */
html[data-theme="dark"] .news-card,
html[data-theme="dark"] .activity-card,
html[data-theme="dark"] .supervision-card {
    background: #0f1e2d !important;
    border-color: #293d50 !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .news-card:hover,
html[data-theme="dark"] .activity-card:hover,
html[data-theme="dark"] .supervision-card:hover {
    border-color: rgba(212, 175, 55, 0.45) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .card-image,
html[data-theme="dark"] .news-banner-image,
html[data-theme="dark"] .featured-activity-image {
    background: #15273b !important;
}

/* เอกสารประกอบการอบรม (Training Documents) ใน Dark Mode */
html[data-theme="dark"] .document-group {
    background: #0a1726 !important;
    border-color: #293d50 !important;
}

html[data-theme="dark"] .document-group-button {
    color: #edf6ff !important;
}

html[data-theme="dark"] .document-group-button:hover {
    background: #13273e !important;
}

html[data-theme="dark"] .document-link {
    background: #0f2033 !important;
    border-color: #263c50 !important;
    color: #edf6ff !important;
}

html[data-theme="dark"] .document-link:hover {
    background: #172f49 !important;
    border-color: #d4af37 !important;
    color: #f6d46d !important;
}

html[data-theme="dark"] .document-link-note {
    color: #8fa5ba !important;
}

/* ไดอะล็อก/โมดอลข่าวสารใน Dark Mode */
html[data-theme="dark"] .public-news-dialog {
    background: #0d1e30 !important;
    color: #d8e4ef !important;
    box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .public-news-dialog-header {
    border-color: #25394d !important;
}

html[data-theme="dark"] .public-news-dialog-header h2 {
    color: #edf6ff !important;
}

html[data-theme="dark"] .public-news-dialog-close {
    background: #193149 !important;
    color: #cbd7e4 !important;
}

html[data-theme="dark"] .public-news-dialog-close:hover {
    background: #234363 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .public-news-dialog-content {
    color: #c4d5e5 !important;
}

html[data-theme="dark"] .public-news-empty {
    background: #0f1e2d !important;
    border-color: #293d50 !important;
    color: #8fa5ba !important;
}

html[data-theme="dark"] .public-news-notice {
    background: #231e0c !important;
    border-color: #634b0d !important;
    color: #f7df8b !important;
}

/* =========================================================
   หน้าต่างเลือก Dashboard (Dashboard Selector Modal)
   ========================================================= */
.dashboard-selector-dialog {
    width: min(52rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2.5rem);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 1.75rem;
    color: #1e293b;
    background: #ffffff;
    box-shadow: 0 25px 60px rgba(0, 31, 61, 0.35);
    border: 1px solid rgba(212, 175, 55, 0.25);
    animation: dashboardModalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dashboardModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dashboard-selector-dialog::backdrop {
    background: rgba(0, 24, 48, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dashboard-modal-container {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2.5rem);
}

.dashboard-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.75rem 2rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.dashboard-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(184, 134, 11, 0.12);
    color: #b8860b;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.dashboard-modal-title {
    margin: 0;
    color: #002D56;
    font-size: clamp(1.4rem, 3.5vw, 1.85rem);
    font-weight: 800;
    line-height: 1.25;
}

.dashboard-modal-desc {
    margin: 0.4rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.dashboard-modal-close {
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    color: #64748b;
    background: #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dashboard-modal-close:hover {
    color: #0f172a;
    background: #e2e8f0;
    transform: rotate(90deg);
}

.dashboard-modal-grid {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 640px) {
    .dashboard-modal-grid {
        grid-template-columns: 1fr;
        padding: 1.25rem;
        gap: 0.85rem;
    }
    .dashboard-modal-header {
        padding: 1.25rem 1.25rem 1rem;
    }
    .dashboard-modal-footer {
        padding: 1rem 1.25rem !important;
    }
}

.dashboard-card-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 1.25rem;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.dashboard-card-option:hover {
    border-color: #d4af37;
    background: #fffdfa;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 45, 86, 0.1);
}

.dashboard-card-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.dashboard-card-option:hover .dashboard-card-icon {
    transform: scale(1.08);
}

.dashboard-card-body {
    flex: 1;
    min-width: 0;
}

.dashboard-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.dashboard-card-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
}

.badge-public {
    background: #ecfdf5;
    color: #047857;
}

.badge-admin {
    background: #fffbeb;
    color: #b45309;
}

.badge-supervision {
    background: #ecfeff;
    color: #0e7490;
}

.badge-course {
    background: #eef2ff;
    color: #4338ca;
}

.dashboard-card-tag {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

.dashboard-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #002D56;
    line-height: 1.35;
}

.dashboard-card-desc {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
}

.dashboard-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    transition: all 0.2s ease;
}

.dashboard-card-option:hover .dashboard-card-arrow {
    color: #b8860b;
    transform: translateX(3px);
}

.dashboard-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.dashboard-modal-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #64748b;
}

.dashboard-modal-done {
    min-height: 2.4rem;
    padding: 0.5rem 1.25rem;
    border: 0;
    border-radius: 0.75rem;
    background: #002D56;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.dashboard-modal-done:hover {
    background: #064b83;
    transform: translateY(-1px);
}

/* Dark Mode สำหรับ Dashboard Selector Dialog */
html[data-theme="dark"] .dashboard-selector-dialog {
    background: #0d1e30 !important;
    color: #d8e4ef !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
    box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.7) !important;
}

html[data-theme="dark"] .dashboard-modal-header {
    background: linear-gradient(180deg, #0a1726 0%, #0d1e30 100%) !important;
    border-color: #25394d !important;
}

html[data-theme="dark"] .dashboard-modal-title {
    color: #edf6ff !important;
}

html[data-theme="dark"] .dashboard-modal-desc {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .dashboard-modal-close {
    background: #193149 !important;
    color: #cbd7e4 !important;
}

html[data-theme="dark"] .dashboard-modal-close:hover {
    background: #234363 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .dashboard-card-option {
    background: #0f2237 !important;
    border-color: #263e56 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

html[data-theme="dark"] .dashboard-card-option:hover {
    background: #162c44 !important;
    border-color: #d4af37 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .dashboard-card-title {
    color: #edf6ff !important;
}

html[data-theme="dark"] .dashboard-card-icon.bg-blue-50 {
    background: rgba(6, 75, 122, 0.25) !important;
    border-color: rgba(6, 75, 122, 0.5) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .dashboard-card-icon.bg-amber-50 {
    background: rgba(184, 134, 11, 0.22) !important;
    border-color: rgba(212, 175, 55, 0.45) !important;
    color: #f7d66b !important;
}

html[data-theme="dark"] .badge-public {
    background: rgba(4, 120, 87, 0.25) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(4, 120, 87, 0.4) !important;
}

html[data-theme="dark"] .dashboard-card-desc {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .dashboard-card-arrow {
    color: #64748b !important;
}

html[data-theme="dark"] .dashboard-card-option:hover .dashboard-card-arrow {
    color: #f7d66b !important;
}

html[data-theme="dark"] .dashboard-modal-footer {
    background: #0a1726 !important;
    border-color: #25394d !important;
}

html[data-theme="dark"] .dashboard-modal-hint {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .dashboard-modal-done {
    background: #153e66 !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
}

html[data-theme="dark"] .dashboard-modal-done:hover {
    background: #1b4f82 !important;
    border-color: #d4af37 !important;
}

@media (max-width: 640px) {
    .home-content-section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .home-section-heading {
        margin-bottom: 2rem !important;
    }

    .home-hero {
        padding-bottom: 24px;
    }

    .home-hero-stats {
        margin-top: 28px;
    }
}

/* ระยะห่างแนวตั้งร่วมของหน้าสาธารณะ */
.public-site > header:not(.home-hero) {
    padding-top: clamp(3rem, 5vw, 4rem) !important;
    padding-bottom: clamp(3rem, 5vw, 4rem) !important;
}

.public-site > main > section {
    padding-top: clamp(3rem, 4.5vw, 3.5rem) !important;
    padding-bottom: clamp(3rem, 4.5vw, 3.5rem) !important;
}

.public-site > section:not(.home-content-section),
.public-site > main > section:first-child:not([id]) {
    padding-top: 1.75rem !important;
    padding-bottom: 1.75rem !important;
}

.public-site .site-footer-shell {
    padding-top: clamp(3rem, 5vw, 4rem) !important;
    padding-bottom: clamp(3rem, 5vw, 4rem) !important;
}

.public-site .site-footer-copyright {
    margin-top: clamp(2rem, 4vw, 3rem) !important;
    padding-top: 1.5rem !important;
}

@media (max-width: 640px) {
    .public-site > header:not(.home-hero),
    .public-site > main > section,
    .public-site .site-footer-shell {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .public-site > section:not(.home-content-section),
    .public-site > main > section:first-child:not([id]) {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }
}

/* Match team email links to the affiliation text */
.person-email-line a {
    color: inherit;
    font: inherit;
    font-weight: 400;
    text-decoration: none;
}

.person-email-line a:hover,
.person-email-line a:focus-visible {
    color: #B8860B;
    text-decoration: underline;
    text-underline-offset: 3px;
}

html[data-theme="dark"] .person-email-line a {
    color: inherit !important;
}

html[data-theme="dark"] .person-email-line a:hover,
html[data-theme="dark"] .person-email-line a:focus-visible {
    color: #facc15 !important;
}

/* Match team email links to affiliation tone */
.person-affiliation-line a[href^="mailto:"] {
    color: #64748b;
    font: inherit;
    font-weight: 400;
    text-decoration: none;
}

.person-affiliation-line a[href^="mailto:"]:hover,
.person-affiliation-line a[href^="mailto:"]:focus-visible {
    color: #B8860B;
    text-decoration: underline;
    text-underline-offset: 3px;
}

html[data-theme="dark"] .person-affiliation-line a[href^="mailto:"] {
    color: #9fb3c5 !important;
}

html[data-theme="dark"] .person-affiliation-line a[href^="mailto:"]:hover,
html[data-theme="dark"] .person-affiliation-line a[href^="mailto:"]:focus-visible {
    color: #facc15 !important;
}
