/* ===== Theme Variables ===== */
:root {
    --purple-900: #2d1155;
    --purple-800: #3d1a78;
    --purple-700: #4a1575;
    --purple-600: #6b3fa0;
    --purple-100: #f3e8ff;
    --purple-50: #faf5ff;
    --yellow-600: #d97706;
    --yellow-500: #f59e0b;
    --yellow-400: #fbbf24;
    --yellow-100: #fef3c7;

    --bs-warning: #f59e0b;
    --bs-warning-rgb: 245, 158, 11;

    --font-body: 'Prompt', system-ui, 'Segoe UI', Tahoma, sans-serif;
    --font-heading: 'Prompt', system-ui, 'Segoe UI', Tahoma, sans-serif;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe, embed { max-width: 100%; height: auto; }
table { max-width: 100%; }
pre, code { white-space: pre-wrap; word-break: break-word; }

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: #374151;
    background: #fff;
    line-height: 1.7;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }

.text-purple { color: var(--purple-700) !important; }
.bg-purple { background: var(--purple-700) !important; }

.btn-purple {
    background: var(--purple-700);
    color: #fff;
    border: none;
}
.btn-purple:hover, .btn-purple:focus {
    background: var(--purple-800);
    color: #fff;
}

.btn-warning {
    background: var(--yellow-500);
    border-color: var(--yellow-500);
    color: var(--purple-900);
    font-weight: 600;
}
.btn-warning:hover, .btn-warning:focus {
    background: var(--yellow-400);
    border-color: var(--yellow-400);
    color: var(--purple-900);
}
.btn-outline-warning {
    color: var(--yellow-600);
    border-color: var(--yellow-500);
}
.btn-outline-warning:hover {
    background: var(--yellow-500);
    border-color: var(--yellow-500);
    color: var(--purple-900);
}

/* ===== Top Bar ===== */
.top-bar {
    background: linear-gradient(90deg, var(--purple-800), var(--purple-700));
    color: #fff;
    font-size: 13px;
}
.top-bar i { color: var(--yellow-400); }
.top-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 12px;
    text-decoration: none;
    transition: .3s;
}
.top-social a:hover {
    background: var(--yellow-500);
    color: var(--purple-900);
    transform: translateY(-2px);
}

/* ===== Navbar ===== */
.main-navbar {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    padding: 0.5rem 0;
    border-bottom: 3px solid var(--yellow-500);
}
.main-navbar .navbar-brand {
    padding: 0.25rem 0;
    flex-shrink: 0;
    margin-right: 0.75rem;
}
.brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(107,61,159,.2));
    flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--purple-700);
    font-family: var(--font-heading);
    white-space: nowrap;
}
.brand-eng {
    font-size: 11px;
    color: var(--yellow-600);
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.main-navbar .nav-link {
    color: #374151 !important;
    font-weight: 500;
    font-size: 13.5px;
    padding: 8px 10px !important;
    border-radius: 8px;
    transition: color .25s, background .25s;
    white-space: nowrap;
}
.main-navbar .nav-link i { margin-right: 4px !important; font-size: 13px; }
.main-navbar .nav-link:hover,
.main-navbar .nav-item.show > .nav-link {
    color: var(--purple-700) !important;
    background: var(--purple-50);
}
/* เมนูแนวนอนเริ่มที่ >=1200px (navbar-expand-xl) — กระชับให้พอดี container ไม่ทับชื่อ */
@media (min-width: 1200px) {
    .main-navbar .nav-link { font-size: 13px; padding: 8px 9px !important; }
    .main-navbar .nav-link i { margin-right: 3px !important; }
}
@media (min-width: 1400px) {
    .main-navbar .nav-link { font-size: 14px; padding: 9px 12px !important; }
    .main-navbar .nav-link i { margin-right: 4px !important; }
    .brand-name { font-size: 19px; }
}
.main-navbar .dropdown-menu {
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
    border-top: 3px solid var(--yellow-500);
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 4px;
}
.main-navbar .dropdown-item {
    padding: 10px 18px;
    font-size: 14px;
    color: #374151;
    transition: .2s;
}
.main-navbar .dropdown-item:hover {
    background: var(--purple-50);
    color: var(--purple-700);
    padding-left: 24px;
}
.navbar-toggler {
    border-color: var(--purple-600);
}
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(107,61,159,.25); }

/* ===== Hero Carousel ===== */
.hero-carousel .carousel-item {
    height: 560px;
    background-size: cover;
    background-position: center;
}
/* legacy slide-1/2/3 — เก็บไว้เผื่อ fallback */
.hero-carousel .carousel-item.slide-1 {
    background-image: linear-gradient(135deg, rgba(74,21,117,.75), rgba(107,61,159,.55)), url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?auto=format&fit=crop&w=1920&q=80');
}
.hero-carousel .carousel-item.slide-2 {
    background-image: linear-gradient(135deg, rgba(245,158,11,.55), rgba(74,21,117,.75)), url('https://images.unsplash.com/photo-1580582932707-520aed937b7b?auto=format&fit=crop&w=1920&q=80');
}
.hero-carousel .carousel-item.slide-3 {
    background-image: linear-gradient(135deg, rgba(74,21,117,.70), rgba(245,158,11,.45)), url('https://images.unsplash.com/photo-1509062522246-3755977927d7?auto=format&fit=crop&w=1920&q=80');
}

/* DB-driven slides: รูปอยู่ใน inline style — overlay ใช้ ::before ทับอีกชั้น */
.hero-carousel .hero-slide {
    background-color: #4a1575;
    background-size: cover;
    background-position: center;
    position: relative;
}
.hero-carousel .hero-slide::before {
    content: '';
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 1;
}
.hero-carousel .hero-slide .hero-content { position: absolute; inset: 0; z-index: 2; }
.hero-carousel .hero-slide.overlay-purple::before { background: linear-gradient(135deg, rgba(74,21,117,.78), rgba(107,61,159,.55)); }
.hero-carousel .hero-slide.overlay-gold::before   { background: linear-gradient(135deg, rgba(74,21,117,.72), rgba(245,158,11,.50)); }
.hero-carousel .hero-slide.overlay-dark::before   { background: linear-gradient(135deg, rgba(0,0,0,.70), rgba(0,0,0,.40)); }
.hero-carousel .hero-slide.overlay-mix::before    { background: linear-gradient(135deg, rgba(245,158,11,.55), rgba(74,21,117,.78)); }
/* fallback ถ้าไม่มีรูปพื้นหลังเลย ให้ใช้สี solid ของ overlay */
.hero-carousel .hero-slide:not([style*="background-image"]).overlay-purple { background: linear-gradient(135deg, #4a1575, #6b3fa0); }
.hero-carousel .hero-slide:not([style*="background-image"]).overlay-gold   { background: linear-gradient(135deg, #4a1575, #f59e0b); }
.hero-carousel .hero-slide:not([style*="background-image"]).overlay-dark   { background: linear-gradient(135deg, #1f2937, #374151); }
.hero-carousel .hero-slide:not([style*="background-image"]).overlay-mix    { background: linear-gradient(135deg, #f59e0b, #4a1575); }
.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 60px;
    max-width: 1280px;
    margin: 0 auto;
}
.hero-content h2 { text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.hero-content p { max-width: 620px; text-shadow: 0 1px 4px rgba(0,0,0,.3); }

.badge-tag {
    display: inline-block;
    padding: 6px 18px;
    background: var(--yellow-500);
    color: var(--purple-900);
    font-weight: 600;
    font-size: 13px;
    border-radius: 50px;
    letter-spacing: .5px;
    width: fit-content;
}

.carousel-control-prev, .carousel-control-next {
    width: 60px;
    opacity: .8;
}
.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: rgba(0,0,0,.35);
    padding: 22px;
    border-radius: 50%;
    background-size: 45%;
}
.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50%;
    border: 0 !important;
    opacity: .5;
    background-color: #fff !important;
    margin: 0 5px !important;
}
.carousel-indicators .active {
    width: 36px !important;
    border-radius: 6px;
    opacity: 1;
    background-color: var(--yellow-500) !important;
}

/* ===== Sections ===== */
.section-py { padding: 80px 0; }
.section-title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 700;
    color: var(--purple-700);
}
.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--purple-600), var(--yellow-500));
    border-radius: 2px;
    margin-top: 14px;
}
.eyebrow {
    display: inline-block;
    padding: 5px 16px;
    background: var(--yellow-100);
    color: var(--yellow-600);
    font-weight: 600;
    font-size: 12px;
    border-radius: 50px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.eyebrow.light {
    background: rgba(255,255,255,.2);
    color: var(--yellow-400);
}

/* ===== Quick Links ===== */
.quick-links-section {
    margin-top: -60px;
    position: relative;
    z-index: 10;
    padding-bottom: 20px;
}
.quick-panel {
    background: #fff;
    border-top: 4px solid var(--yellow-500);
}
.quick-card {
    color: #374151;
    border: 2px solid transparent;
    transition: .3s;
}
.quick-card:hover {
    background: var(--purple-50);
    border-color: var(--purple-600);
    transform: translateY(-6px);
    color: var(--purple-700);
}
.quick-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-600), var(--purple-800));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: .3s;
}
.quick-card:hover .quick-icon {
    background: linear-gradient(135deg, var(--yellow-500), var(--yellow-600));
    transform: scale(1.08) rotate(-6deg);
}
.quick-card h6 {
    color: var(--purple-800);
    font-weight: 600;
    font-size: 15px;
}

/* ===== About ===== */
.about-image img { aspect-ratio: 4/3; object-fit: cover; }
.about-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: linear-gradient(135deg, var(--yellow-500), var(--yellow-600));
    color: var(--purple-900);
    padding: 18px 24px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0,0,0,.15);
    text-align: center;
}
.badge-num {
    font-size: 32px;
    font-family: var(--font-heading);
    line-height: 1;
}
.stat-num {
    font-size: 30px;
    font-weight: 800;
    color: var(--yellow-600);
    font-family: var(--font-heading);
    line-height: 1;
}

/* Vision/Mission */
.vmv-card {
    background: #fff;
    border-bottom: 4px solid var(--purple-600);
    transition: .3s;
}
.vmv-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0,0,0,.08) !important; }
.vmv-card.featured {
    background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
    color: #fff;
    border-bottom-color: var(--yellow-500);
}
.vmv-card.featured h4 { color: #fff !important; }
.vmv-icon {
    width: 70px; height: 70px;
    border-radius: 50%;
    background: var(--purple-100);
    color: var(--purple-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.vmv-card.featured .vmv-icon {
    background: var(--yellow-500);
    color: var(--purple-900);
}

/* ===== Director ===== */
.director-section {
    background: linear-gradient(135deg, var(--purple-800), var(--purple-600));
    overflow: hidden;
}
.director-section::before, .director-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: var(--yellow-500);
    opacity: .08;
    z-index: 0;
}
.director-section::before {
    top: -100px; right: -100px;
    width: 400px; height: 400px;
}
.director-section::after {
    bottom: -80px; left: -80px;
    width: 300px; height: 300px;
}
.director-section > .container { z-index: 2; }
.director-card { border-top: 5px solid var(--yellow-500); }
.photo-frame {
    width: 140px; height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-100), var(--yellow-100));
    color: var(--purple-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    border: 4px solid var(--yellow-500);
}

/* ===== News ===== */
.news-card { transition: .3s; }
.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 36px rgba(0,0,0,.12) !important;
}
.news-image-wrap { aspect-ratio: 16/10; overflow: hidden; }
.news-image-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.news-card:hover .news-image-wrap img { transform: scale(1.08); }
.news-category {
    position: absolute;
    top: 14px; left: 14px;
    padding: 5px 14px;
    background: var(--yellow-500);
    color: var(--purple-900);
    font-size: 12px;
    font-weight: 600;
    border-radius: 50px;
    letter-spacing: .3px;
}
.news-card .card-title a:hover { color: var(--yellow-600) !important; }
.read-more {
    color: var(--purple-700);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: .3s;
}
.read-more:hover {
    color: var(--yellow-600);
    gap: 10px;
}

/* ===== Subject Groups ===== */
.subject-card {
    border: 2px solid transparent;
    transition: .3s;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.subject-card:hover {
    border-color: var(--yellow-500);
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0,0,0,.1);
}
.subject-icon {
    width: 70px; height: 70px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--purple-600), var(--purple-800));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: .3s;
}
.subject-card:hover .subject-icon {
    background: linear-gradient(135deg, var(--yellow-500), var(--yellow-600));
    transform: rotate(-8deg) scale(1.05);
    color: var(--purple-900);
}

/* ===== Admin ===== */
.admin-card {
    border-left: 4px solid var(--yellow-500);
    transition: .3s;
}
.admin-card:hover {
    transform: translateX(6px);
    box-shadow: 0 14px 28px rgba(0,0,0,.1) !important;
    border-left-color: var(--purple-600);
}
.admin-icon {
    width: 56px; height: 56px;
    border-radius: 12px;
    background: var(--purple-100);
    color: var(--purple-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: .3s;
}
.admin-card:hover .admin-icon {
    background: var(--yellow-500);
    color: var(--purple-900);
}

/* ===== Services ===== */
.services-section {
    background: linear-gradient(135deg, var(--purple-900), var(--purple-700));
    position: relative;
    overflow: hidden;
}
.services-section::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(var(--yellow-500) 0%, transparent 70%);
    opacity: .1;
}
.service-card {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    transition: .3s;
    backdrop-filter: blur(10px);
}
.service-card:hover {
    background: var(--yellow-500);
    color: var(--purple-900);
    border-color: var(--yellow-500);
    transform: translateY(-5px);
}
.service-card i {
    font-size: 34px;
    color: var(--yellow-400);
    transition: .3s;
}
.service-card:hover i, .service-card:hover h6 { color: var(--purple-900) !important; }
.service-card span { font-size: 12px; opacity: .85; }

/* ===== Contact ===== */
.contact-item { transition: .3s; }
.contact-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 14px rgba(0,0,0,.08) !important;
}
.contact-icon {
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--purple-600), var(--purple-800));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* ===== Footer ===== */
.main-footer {
    background: linear-gradient(135deg, var(--purple-900), var(--purple-800));
}
.footer-title {
    color: #fff;
    font-size: 16px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    position: relative;
    font-weight: 600;
}
.footer-title::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 36px; height: 3px;
    background: var(--yellow-500);
    border-radius: 2px;
}
.footer-list li { margin-bottom: 8px; }
.footer-list a {
    color: rgba(255,255,255,.7);
    font-size: 14px;
    text-decoration: none;
    transition: .3s;
}
.footer-list a:hover {
    color: var(--yellow-400);
    padding-left: 6px;
}
.footer-social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: .3s;
}
.footer-social a:hover {
    background: var(--yellow-500);
    color: var(--purple-900);
    transform: translateY(-3px);
}
.footer-bottom {
    background: rgba(0,0,0,.25);
    margin: 0 -12px;
    font-size: 13px;
    color: rgba(255,255,255,.7);
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 46px; height: 46px;
    background: var(--purple-700);
    color: #fff !important;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0,0,0,.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: .3s;
    z-index: 999;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover {
    background: var(--yellow-500);
    color: var(--purple-900) !important;
    transform: translateY(-4px);
}

/* ===== Responsive ===== */
/* เมนูยุบเป็นแฮมเบอร์เกอร์จนถึง 1199px → จัดเป็นการ์ดสีขาว */
@media (max-width: 1199.98px) {
    .main-navbar .navbar-collapse {
        background: #fff;
        margin-top: 10px;
        padding: 10px;
        border-radius: 10px;
        box-shadow: 0 6px 14px rgba(0,0,0,.08);
    }
    .main-navbar .nav-link { font-size: 15px; padding: 10px 14px !important; }
    .main-navbar .dropdown-menu { box-shadow: none; border-top: 0; padding: 0 0 0 12px; }
}
@media (max-width: 991px) {
    .hero-carousel .carousel-item { height: 500px; }
    .brand-name { font-size: 17px; }
    .brand-eng { font-size: 10px; }
    .brand-logo { width: 50px; height: 50px; }
}
@media (max-width: 768px) {
    .section-py { padding: 60px 0; }
    .hero-carousel .carousel-item { height: 460px; }
    .hero-content { padding-top: 40px; }
    .about-badge { bottom: -15px; right: -10px; padding: 14px 18px; }
    .badge-num { font-size: 24px; }
    .stat-num { font-size: 22px; }
    .top-bar { font-size: 12px; }
    .top-info { gap: .5rem !important; }
}
@media (max-width: 480px) {
    .hero-carousel .carousel-item { height: 420px; }
    .brand-name { font-size: 15px; }
    .brand-eng { display: none; }
    .top-info { flex-direction: column; gap: 2px !important; }
}

/* ===== Page Banner ===== */
.page-banner {
    background: linear-gradient(135deg, var(--purple-900) 0%, var(--purple-700) 60%, var(--purple-600) 100%);
    position: relative;
    padding: 70px 0 50px;
    overflow: hidden;
}
.page-banner::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(251,191,36,.18), transparent 55%),
                radial-gradient(circle at 80% 70%, rgba(255,255,255,.08), transparent 50%);
    pointer-events: none;
}
.page-banner .container { position: relative; z-index: 2; }
.page-banner .banner-icon {
    width: 64px; height: 64px;
    background: var(--yellow-500);
    color: var(--purple-900);
    display: flex; align-items: center; justify-content: center;
    border-radius: 18px;
    font-size: 28px;
    box-shadow: 0 8px 22px rgba(245,158,11,.4);
    flex-shrink: 0;
}
.breadcrumb-light .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }
.breadcrumb-light .breadcrumb-item.active { color: rgba(255,255,255,.85); }

/* ===== Contact icons (admins / teachers cards) ===== */
.teacher-contact { display: flex; justify-content: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.teacher-contact a {
    width: 30px; height: 30px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--purple-50, #faf5ff);
    color: var(--purple-700, #4a1575);
    transition: all .2s;
    font-size: 13px;
    text-decoration: none;
}
.teacher-contact a:hover {
    background: var(--purple-700, #4a1575);
    color: #fff;
    transform: translateY(-2px);
}

/* ===== Person Card (admins / teachers) ===== */
.person-card { transition: transform .3s ease, box-shadow .3s ease; }
.person-card:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(74,21,117,.18) !important; }
.person-photo-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, var(--purple-50), #fff);
}
.person-photo { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .4s ease; }
.person-card:hover .person-photo { transform: scale(1.05); }

.director-feature {
    background: linear-gradient(135deg, #fff 0%, var(--purple-50) 100%);
    border-left: 6px solid var(--yellow-500);
}
.director-portrait {
    width: 260px; height: 260px;
    object-fit: cover;
    object-position: top center;
    border-radius: 18px;
    border: 5px solid var(--yellow-500);
    box-shadow: 0 10px 28px rgba(74,21,117,.25);
}

.dept-badge {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    font-size: 22px;
    flex-shrink: 0;
}

/* ===== News Detail / Sidebar ===== */
.sidebar-box {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
    border: 1px solid rgba(74,21,117,.06);
}
.sidebar-title {
    color: var(--purple-700);
    font-weight: 700;
    border-bottom: 2px solid var(--yellow-500);
    padding-bottom: 10px;
    margin-bottom: 14px;
}
.sidebar-list { margin: 0; }
.sidebar-list li { border-bottom: 1px dashed #e5d8f0; }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a {
    display: block;
    padding: 10px 4px;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    transition: color .2s, padding-left .2s;
}
.sidebar-list a:hover, .sidebar-list a.active {
    color: var(--purple-700);
    padding-left: 8px;
    font-weight: 600;
}

.recent-news-item { transition: background .2s; padding: 6px; border-radius: 8px; }
.recent-news-item:hover { background: var(--purple-50); }
.recent-thumb {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.news-detail img { border-radius: 0; }
.news-content p { margin-bottom: 1rem; line-height: 1.9; }

.pagination .page-link {
    color: var(--purple-700);
    border: 1px solid #e5d8f0;
}
.pagination .page-link:hover { background: var(--purple-50); color: var(--purple-800); }
.pagination .page-item.active .page-link {
    background: var(--purple-700);
    border-color: var(--purple-700);
    color: #fff;
}

/* ===== Nav active ===== */
.main-navbar .nav-link.active {
    color: var(--yellow-500) !important;
    font-weight: 600;
}

/* ===== Responsive Banner ===== */
@media (max-width: 768px) {
    .page-banner { padding: 48px 0 32px; }
    .page-banner .banner-icon { width: 52px; height: 52px; font-size: 22px; }
    .director-portrait { width: 200px; height: 200px; border-radius: 14px; }
}

/* ===== Helpers (Alumni / Committee / ITA) ===== */
.bg-purple-soft {
    background: rgba(74, 21, 117, 0.08);
    color: var(--purple-700);
}
.btn-outline-purple {
    border: 1px solid var(--purple-700);
    color: var(--purple-700);
    background: transparent;
}
.btn-outline-purple:hover, .btn-outline-purple:focus {
    background: var(--purple-700);
    color: #fff;
}

/* ===== Alumni Stats Section (also used by committee / ita) ===== */
.alumni-stats-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #faf5ff 0%, #fff 100%);
}
.alumni-stat {
    background: #fff;
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(74, 21, 117, 0.06);
    border: 1px solid rgba(74, 21, 117, 0.06);
    height: 100%;
    transition: transform .25s ease, box-shadow .25s ease;
}
.alumni-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(74, 21, 117, 0.12);
}
.alumni-stat-icon {
    width: 56px; height: 56px;
    margin: 0 auto 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.alumni-stat-num {
    font-size: 28px;
    font-weight: 700;
    color: var(--purple-700);
    line-height: 1.1;
}
.alumni-stat-label {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* ===== Alumni Year Cards ===== */
.alumni-year-card {
    display: block;
    background: #fff;
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(74, 21, 117, 0.06);
    border: 2px solid transparent;
    color: var(--purple-700);
    transition: all .25s ease;
    height: 100%;
}
.alumni-year-card:hover {
    transform: translateY(-4px);
    border-color: var(--yellow-500);
    box-shadow: 0 12px 28px rgba(74, 21, 117, 0.14);
    color: var(--purple-700);
}
.alumni-year-card .ay-year {
    font-size: 16px;
    font-weight: 600;
    color: var(--purple-700);
    margin-bottom: 8px;
}
.alumni-year-card .ay-count {
    font-size: 32px;
    font-weight: 700;
    color: var(--yellow-500);
    line-height: 1;
}
.alumni-year-card .ay-label {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* ===== Alumni Featured Cards ===== */
.alumni-featured-card {
    transition: transform .25s ease, box-shadow .25s ease;
}
.alumni-featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(74, 21, 117, 0.14) !important;
}
.alumni-featured-photo {
    width: 110px; height: 110px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--yellow-500);
    box-shadow: 0 6px 16px rgba(74, 21, 117, 0.18);
}

/* ===== Alumni Member Cards (alumni-year.php) ===== */
.alumni-member-card {
    transition: transform .25s ease, box-shadow .25s ease;
}
.alumni-member-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(74, 21, 117, 0.12) !important;
}
.alumni-member-photo {
    width: 72px; height: 72px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--purple-50);
}
.min-w-0 { min-width: 0; }

/* ===== ITA ===== */
.ita-feature {
    background: linear-gradient(135deg, #fff 0%, var(--purple-50) 100%);
    border-left: 6px solid var(--yellow-500);
}
.ita-cover-img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 12px;
}
.ita-score-big {
    padding: 30px 20px;
}
.ita-score-big .ita-score-num {
    font-size: 64px;
    font-weight: 700;
    color: var(--purple-700);
    line-height: 1;
}
.ita-score-big .ita-score-label {
    color: #6b7280;
    font-size: 14px;
    margin-top: 4px;
}
.ita-year-card {
    transition: transform .25s ease, box-shadow .25s ease;
    overflow: hidden;
}
.ita-year-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(74, 21, 117, 0.14) !important;
}
.ita-year-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.ita-year-num {
    font-size: 24px;
    font-weight: 700;
    color: var(--purple-700);
    line-height: 1;
}
.ita-score-row .ita-score-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--yellow-500);
}
.ita-levels-info {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 12px rgba(74, 21, 117, 0.06);
}

@media (max-width: 768px) {
    .alumni-stat-num { font-size: 22px; }
    .alumni-featured-photo { width: 90px; height: 90px; }
    .ita-score-big .ita-score-num { font-size: 48px; }
    .ita-year-num { font-size: 20px; }
}

/* ===== ITA Accordion & Indicator Boxes ===== */
.ita-accordion .accordion-item {
    border: none;
    background: transparent;
    margin-bottom: 12px;
}
.ita-accordion .accordion-button {
    background: #fff;
    border-radius: 12px !important;
    box-shadow: 0 2px 6px rgba(74, 21, 117, 0.06);
    font-weight: 500;
    color: var(--purple-700);
}
.ita-accordion .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--purple-50), #fff);
    color: var(--purple-700);
    box-shadow: 0 4px 14px rgba(74, 21, 117, 0.12);
}
.ita-accordion .accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}
.ita-accordion .accordion-body {
    background: #fff;
    border-radius: 0 0 12px 12px;
    margin-top: -8px;
    padding: 28px 24px 24px;
    box-shadow: 0 6px 18px rgba(74, 21, 117, 0.06);
}
.ita-acc-year {
    font-size: 22px;
    font-weight: 700;
    color: var(--purple-700);
}
.ita-acc-score {
    font-size: 22px;
    font-weight: 700;
    color: var(--yellow-500);
}
.ita-indicator-box {
    background: #faf5ff;
    border: 1px solid rgba(74, 21, 117, 0.08);
    border-radius: 10px;
    padding: 14px;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}
.ita-indicator-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 21, 117, 0.1);
}
.ita-ind-no {
    display: inline-block;
    background: var(--purple-700);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
}
.ita-ind-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--purple-800);
    line-height: 1.35;
}
.ita-ind-score {
    font-size: 18px;
    font-weight: 700;
    color: var(--yellow-500);
    line-height: 1;
}

@media (max-width: 576px) {
    .ita-acc-year, .ita-acc-score { font-size: 18px; }
    .ita-accordion .accordion-body { padding: 18px 14px; }
}

/* ===================== Content Pages (ข้อมูลพื้นฐาน / นโยบาย) ===================== */

/* Dropdown ที่กว้างขึ้นเพื่อรองรับชื่อเมนูยาว */
.dropdown-menu-wide {
    min-width: 300px;
    max-height: 75vh;
    overflow-y: auto;
}
.dropdown-menu-wide .dropdown-item { white-space: normal; padding: 9px 18px; font-size: 15px; }
.dropdown-menu-wide .dropdown-item:hover,
.dropdown-menu-wide .dropdown-item:focus {
    background: var(--purple-50, #faf5ff);
    color: var(--purple-700);
}
.dropdown-menu-wide .dropdown-item i { color: var(--purple-600); }

/* Info card (หน้ารายการข้อมูลพื้นฐาน) */
.info-card {
    background: #fff;
    border-radius: 14px;
    padding: 26px 22px 22px;
    box-shadow: 0 2px 12px rgba(74, 21, 117, 0.06);
    border: 1px solid #eeeaf5;
    transition: all .25s;
    display: flex;
    flex-direction: column;
    color: inherit;
}
.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(74, 21, 117, 0.15);
    border-color: var(--purple-600);
    color: inherit;
}
.info-card-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--purple-600), var(--purple-700));
    color: var(--yellow-400);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}
.info-card-title {
    color: var(--purple-700);
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}
.info-card-subtitle {
    font-size: 13px; color: #6b7280; margin-bottom: 12px;
}
.info-card-summary {
    font-size: 14px; color: #4b5563; line-height: 1.6; flex-grow: 1;
}
.info-card-more {
    display: inline-block;
    color: var(--purple-700);
    font-weight: 600; font-size: 14px;
    margin-top: 10px;
}
.info-card:hover .info-card-more { color: var(--yellow-500); }

/* Policy item (หน้ารายการระเบียบ / นโยบาย) */
.policy-item {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
    border-left: 4px solid var(--purple-600);
    color: inherit;
    transition: all .2s;
}
.policy-item:hover {
    transform: translateX(4px);
    border-left-color: var(--yellow-500);
    box-shadow: 0 6px 18px rgba(74, 21, 117, 0.12);
    color: inherit;
}
.policy-item-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    background: var(--purple-50, #faf5ff);
    color: var(--purple-700);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.policy-item-no {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--yellow-500);
    font-weight: 700;
    margin-bottom: 2px;
}
.policy-item-title {
    color: var(--purple-700);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.35;
}
.policy-item-summary { font-size: 13.5px; color: #6b7280; line-height: 1.55; }
.policy-item-arrow { color: var(--purple-600); font-size: 13px; opacity: .5; }
.policy-item:hover .policy-item-arrow { color: var(--yellow-500); opacity: 1; }

/* Page detail content */
.page-content { font-size: 15.5px; line-height: 1.85; color: #374151; }
.page-content p { margin-bottom: 12px; }
.page-content h5 {
    border-left: 4px solid var(--yellow-500);
    padding-left: 12px;
    font-size: 17px;
}

