/* =========================================================
   style.css
   สำนักวิชาวิทยาศาสตร์ มหาวิทยาลัยเทคโนโลยีสุรนารี
   Modern & Clean / Academic Style / Responsive
   ========================================================= */

/* ---------- 1. CSS Variables (Design Tokens) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Athiti:wght@300;400;500;600;700&display=swap');

:root {
    --color-primary:   #FF9900;
    --color-secondary: #FF6633;
    --color-accent:    #FF9900;
    --color-bg:        #FFF8E1;
    --color-white:     #FFFFFF;
    --color-text:      #333333;
    --color-text-soft: #6b6459;

    --font-display: "Athiti", sans-serif;
    --font-body: "Athiti", sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;

    --shadow-sm: 0 4px 14px rgba(249, 168, 37, 0.12);
    --shadow-md: 0 10px 30px rgba(251, 140, 0, 0.18);

    --section-padding: 90px;
}

/* ---------- 2. Reset / Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-white);
    overflow-x: clip; /* กัน scrollbar แนวนอน ไม่ทำให้ position: fixed / sticky ของลูกๆ พัง */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-text);
}

a { text-decoration: none; transition: all .25s ease; }

.section-padding { padding: var(--section-padding) 0; }

.section-heading { margin-bottom: 48px; }
.section-heading .section-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-secondary);
    background: rgba(249, 168, 37, .12);
    padding: 6px 18px;
    border-radius: 30px;
    margin-bottom: 14px;
}
.section-heading h2 {
    font-size: 2.2rem;
    position: relative;
}

/* ---------- 3. Top Bar ---------- */
.top-bar {
    background: var(--color-text);
    color: #f2f2f2;
    font-size: .85rem;
    padding: 6px 0;
}
.top-bar-contact span { margin-right: 22px; }
.top-bar-contact i { color: var(--color-accent); margin-right: 6px; }
.top-bar-menu { display: flex; list-style: none; margin: 0; padding: 0; gap: 20px; }
.top-bar-menu a { color: #f2f2f2; }
.top-bar-menu a:hover { color: var(--color-accent); }

/* ---------- 4. Main Navbar ---------- */
.main-navbar {
    background: var(--color-white);
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    padding: 12px 0;
}
.brand-logo { height: 52px; margin-right: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-size: 1.05rem; color: var(--color-text); }
.brand-text small { font-size: .75rem; color: var(--color-text-soft); }

.main-menu { gap: 6px; }
.main-menu .nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text) !important;
    padding: 8px 12px !important;
    border-radius: 30px;
}
.main-menu .nav-link:hover,
.main-menu .nav-link.active {
    color: var(--color-white) !important;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.search-box { position: relative; }
.search-box input {
    border-radius: 30px;
    border: 1px solid #eee0bf;
    padding: 8px 16px;
    background: var(--color-bg);
    min-width: 200px;
}
.search-box input:focus { box-shadow: 0 0 0 .2rem rgba(249,168,37,.25); border-color: var(--color-primary); }
.search-box .btn {
    position: absolute;
    right: 4px; top: 4px; bottom: 4px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    width: 34px;
    padding: 0;
}

/* ---------- 5. Hero Section / Carousel ---------- */
.hero-section .carousel-item { height: 100%; }
.hero-slide {
    min-height: 560px;
    background-size: cover;
    background-position: center;
    background-color: #f2c368;
    display: flex;
    align-items: center;
    position: relative;
}
.hero-overlay { display: none; }
.hero-content { position: relative; z-index: 2; max-width: 680px; color: #fff; }
.hero-title { font-size: 2.6rem; font-weight: 700; margin-bottom: 18px; color: #fff;}
.hero-subtitle { font-size: 1.15rem; margin-bottom: 30px; color: #fdf3da; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-hero-primary, .btn-hero-secondary { 
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-hero-primary {
    background: var(--color-primary);
    color: #fff;
    border: 2px solid var(--color-primary);
}
.btn-hero-primary:hover { background: var(--color-secondary); border-color: var(--color-secondary); color: #fff; }
.btn-hero-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}
.btn-hero-secondary:hover { background: #fff; color: var(--color-secondary); }

.hero-section .carousel-control-prev,
.hero-section .carousel-control-next { width: 5%; }
.hero-section .carousel-indicators [data-bs-target] {
    background-color: var(--color-primary);
    width: 10px; height: 10px; border-radius: 50%;
}

/* ---------- 6. Mission Section ---------- */
.mission-section { background: var(--color-bg); }
.mission-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--color-primary);
}
.mission-icon {
    width: 80px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 18px;
}
.mission-quote {
    margin-top: 40px;
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--color-secondary);
    font-style: italic;
}

/* ---------- 7. Quick Links ---------- */
.quick-link-card {
    display: block;
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 34px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f4e6c3;
    transition: transform .25s ease, box-shadow .25s ease;
    height: 100%;
}
.quick-link-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}
.quick-link-icon {
    width: 66px; height: 66px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem;
}
.quick-link-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.quick-link-card h5 { margin: 0; color: var(--color-text); }

/* ---------- 8. News Cards ---------- */
.news-section { background: var(--color-white); }
.news-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f4e6c3;
}
.news-card-img { position: relative; height: 200px; overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover .news-card-img img { transform: scale(1.08); }
.news-date {
    position: absolute; bottom: 10px; left: 10px;
    background: var(--color-primary);
    color: #fff;
    font-size: .8rem;
    padding: 5px 14px;
    border-radius: 20px;
}
.news-card-body { padding: 22px; }
.news-card-body h5 { font-size: 1.1rem; margin-bottom: 10px; }
.news-card-body p { color: var(--color-text-soft); font-size: .92rem; }
.read-more-link { color: var(--color-secondary); font-weight: 600; }
.read-more-link:hover { color: var(--color-primary); }

.btn-outline-view-all {
    border: 2px solid var(--color-primary);
    color: var(--color-secondary);
    padding: 10px 30px;
    border-radius: 30px;
    font-weight: 600;
}
.btn-outline-view-all:hover { background: var(--color-primary); color: #fff; }

/* ---------- 9. Programs Section & Level Filter Bar ---------- */
.programs-section { background: var(--color-bg); }

/* ปรับให้แถบฟิลเตอร์ลอยติดบนสุดตลอดเวลา */
.level-filter-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--color-white);
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    padding: 14px 0;
}
.level-filter-bar .filter-btn {
    font-size: 1rem;
    padding: 11px 34px;
}
.level-filter-bar .filter-btn.active {
    box-shadow: var(--shadow-sm);
}

.level-filter-spacer {
    height: 70px;
}

/* กำหนดระยะกันชน scroll-margin-top เพื่อไม่ให้แถบฟิลเตอร์บังหัวข้อ */
.level-section {
    scroll-margin-top: 90px;
    padding: 70px 0;
}
.level-section:nth-of-type(even) { background: #f8f9fa; }
.level-section .section-heading h2 { margin-bottom: 6px; }
.level-section .section-heading .level-count {
    display: inline-block;
    background: var(--color-white);
    border: 1px solid #e4e4e4;
    color: var(--color-secondary);
    font-weight: 600;
    font-size: .85rem;
    padding: 4px 16px;
    border-radius: 30px;
    margin-top: 10px;
}

.filter-btn {
    border: none;
    background: var(--color-white);
    padding: 9px 24px;
    border-radius: 30px;
    margin: 4px;
    font-weight: 500;
    color: var(--color-text);
    border: 1px solid #f4e6c3;
}
.filter-btn.active, .filter-btn:hover {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
}
.program-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.program-icon {
    font-size: 2rem;
    color: var(--color-secondary);
    margin-bottom: 14px;
}
.program-badges { margin-top: 14px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.badge-level {
    background: var(--color-bg);
    color: var(--color-secondary);
    font-size: .75rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}
.program-item.hide-item { display: none; }

/* ---------- 10. Events Section ---------- */
.event-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f4e6c3;
}
.event-card-img { height: 180px; overflow: hidden; }
.event-card-img img { width: 100%; height: 100%; object-fit: cover; }
.event-card-body { padding: 20px; }
.event-date-badge {
    color: var(--color-secondary);
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: 8px;
}
.event-location { color: var(--color-text-soft); font-size: .88rem; }

/* ---------- 11. Statistics ---------- */
.statistics-section {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
}
.counter-card i { font-size: 2.2rem; margin-bottom: 12px; color: #fff; opacity: .9; }
.counter-card h3 { color: #fff; font-size: 2.4rem; font-weight: 700; margin: 6px 0; }
.counter-card p { color: rgba(255,255,255,.9); margin: 0; font-weight: 500; }

/* ---------- 12. Footer ---------- */
.site-footer {
    background: #2b2317;
    color: #d9d0bd;
    padding: 70px 0 20px;
}
.footer-title { color: #fff; font-size: 1.05rem; margin-bottom: 18px; }
.footer-text { color: #c9bfa8; font-size: .92rem; }
.footer-contact-list, .footer-link-list { list-style: none; padding: 0; margin: 0; }
.footer-contact-list li { margin-bottom: 12px; font-size: .9rem; }
.footer-contact-list i { color: var(--color-accent); margin-right: 8px; width: 16px; }
.footer-link-list li { margin-bottom: 10px; }
.footer-link-list a { color: #c9bfa8; font-size: .9rem; }
.footer-link-list a:hover { color: var(--color-accent); }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: var(--color-primary); }
.map-placeholder {
    background: rgba(255,255,255,.06);
    border: 1px dashed rgba(255,255,255,.25);
    border-radius: var(--radius-md);
    height: 140px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #b8ac8f;
    gap: 8px;
}
.footer-divider { border-color: rgba(255,255,255,.1); margin: 40px 0 20px; }
.footer-bottom { color: #9c9179; font-size: .85rem; }

/* ---------- 13. Back To Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    display: none;
    align-items: center; justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 999;
}
.back-to-top.show { display: flex; }
.back-to-top:hover { background: var(--color-secondary); }

/* ---------- 14. Generic Page Banner (about/news/programs/contact) ---------- */
.page-banner {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    padding: 60px 0 30px;
}
.page-banner h1 { color: #fff; margin-bottom: 10px; }
.page-banner .breadcrumb { margin: 0; }
.page-banner .breadcrumb a { color: #fff; opacity: .85; }
.page-banner .breadcrumb-item.active { color: #fff8e1; }
.page-banner .breadcrumb-item + .breadcrumb-item::before { color: #fff; opacity: .6; }

.contact-form .form-label { font-weight: 500; }
.contact-form .form-control { border-radius: var(--radius-sm); padding: 10px 14px; }
.contact-form .form-control:focus { border-color: var(--color-primary); box-shadow: 0 0 0 .2rem rgba(249,168,37,.2); }
.contact-page-list li { margin-bottom: 16px; font-size: .95rem; color: var(--color-text-soft); }
.contact-page-list i { color: var(--color-secondary); margin-right: 10px; width: 18px; }

/* ---------- Executive Section ---------- */
.executive-section {
    background-color: var(--color-white);
}

.executive-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 40px;
    width: 100%;
    margin-top: 20px;
}

.executive-image {
    width: 100%;
    height: 600px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    order: 2;
}

.executive-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.executive-content-box {
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: -10px 15px 40px rgba(0, 0, 0, 0.05);
    border-right: 5px solid var(--color-secondary);
    order: 1;
    margin-right: -80px;
    position: relative;
    z-index: 5;
}

.exec-subtitle {
    display: inline-block;
    font-size: 0.95rem;
    color: var(--color-secondary);
    font-weight: 600;
    margin-bottom: 6px;
}

.exec-title {
    font-size: 1.8rem;
    color: var(--color-text);
    margin-bottom: 20px;
}

.exec-text-wrapper {
    max-height: none; 
    overflow-y: visible;
}

.exec-text {
    font-size: 0.95rem;
    color: var(--color-text-soft);
    line-height: 1.7;
    margin-bottom: 12px;
    text-indent: 30px;
    text-align: justify;
}

.exec-footer-profile {
    border-top: 1px solid #f1e7cf;
    padding-top: 15px;
}

.exec-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}

.exec-position {
    font-size: 0.85rem;
    color: var(--color-secondary);
    margin-bottom: 15px;
}

.btn-exec-more {
    background: var(--color-secondary);
    color: var(--color-white) !important;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.btn-exec-more:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ---------- Vision / Mission Section ---------- */
.vision-mission-section {
    display: grid;
    grid-template-columns: 1.2fr 1.6fr 1.6fr;
    min-height: 550px;
    width: 100%;
    font-family: "Athiti", sans-serif;
}

.vm-col {
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.vm-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.vision-box {
    background: #e66f3b;
    color: #fff;
}

.vision-box .vm-desc {
    font-size: 1.1rem;
    line-height: 1.7;
    font-family: "Athiti", sans-serif;
}

.vm-col.image-box {
    padding: 0;
    overflow: hidden;
    min-height: 550px;
}

.image-box img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.mission-box {
    background: #fdf2e9;
    color: #2d3748;
}

.mission-box .vm-title {
    color: #e66f3b;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 25px;
}

.mission-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mission-num {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e66f3b;
    border-bottom: 2px solid #e66f3b;
    width: 35px;
    padding-bottom: 2px;
}

.mission-item p {
    margin: 0;
    line-height: 1.6;
}

/* ---------- Core Values Section (SC-SMILE) ---------- */
.values-image-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.values-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.values-image-wrapper::after {
    content: '';
    position: absolute;
    top: 20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--color-primary);
    border-radius: var(--radius-md);
    z-index: -1;
}

.sc-smile-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.smile-item {
    display: flex;
    gap: 20px;
    align-items: center;
    background: var(--color-white);
    padding: 15px 25px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.smile-item:hover {
    transform: translateX(8px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.smile-letter {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-white);
    font-size: 1.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.smile-text h5 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.smile-text p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-soft);
}

/* ---------- Programs Red Section ---------- */
.programs-red-section {
    background-color: #f8fafc !important;
    padding: 60px 0;
}

.program-red-line {
    width: 60px;
    height: 4px;
    background-color: #000000;
    margin: 0 auto 20px;
    border-radius: 2px;
    opacity: 0.7;
}

.exact-red-card {
    background: #ffffff !important;
    border: none !important;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.exact-red-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.red-img-wrapper {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
}

.red-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.red-card-body {
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.red-card-title {
    color: #fa2803 !important;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.red-card-desc {
    color: rgba(0, 0, 0, 0.75) !important;
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 20px;
    flex-grow: 1;
}

.red-card-footer {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.btn-red-link {
    background: #a1231a !important;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.btn-red-link:hover {
    background: #ffffff !important;
    color: #b72d24 !important;
}

/* ---------- Navbar Dropdown (หลักสูตร / งานวิจัย) ---------- */
.main-menu .dropdown-menu {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 10px;
    margin-top: 10px;
}
.main-menu .dropdown-item {
    border-radius: 8px;
    padding: 9px 14px;
    font-size: .92rem;
    color: var(--color-text);
}
.main-menu .dropdown-item:hover,
.main-menu .dropdown-item:focus {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
}
.main-menu .nav-link.dropdown-toggle::after { vertical-align: 2px; }

/* ---------- Level Cards ---------- */
.level-card {
    display: block;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f4e6c3;
    text-decoration: none;
    color: var(--color-text);
    height: 100%;
    transition: transform .25s ease, box-shadow .25s ease;
}
.level-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    color: var(--color-text);
}
.level-card-icon {
    width: 80px; height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
}
.level-card h4 { margin-bottom: 12px; }
.level-card p { color: var(--color-text-soft); font-size: .92rem; margin-bottom: 18px; }
.level-card-link { color: var(--color-secondary); font-weight: 600; }

/* ---------- Doctoral Block Layout ---------- */
.doctoral-block {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f4e6c3;
    margin-bottom: 28px;
}
.doctoral-block-img { height: 100%; min-height: 220px; }
.doctoral-block-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doctoral-block-body { padding: 30px; }
.doctoral-block-body h4 { margin-bottom: 12px; }
.doctoral-advisor { color: var(--color-text-soft); font-size: .9rem; }

/* ---------- Department Detail Page ---------- */
.dept-hero { background-size: cover; background-position: center; }
.dept-cover { border-radius: var(--radius-md); overflow: hidden; }
.dept-cover img { width: 100%; max-height: 340px; object-fit: cover; display: block; }
.dept-list { list-style: none; padding: 0; margin: 0 0 8px; }
.dept-list li { padding: 8px 0; border-bottom: 1px dashed #f0e2bd; color: var(--color-text-soft); }
.dept-list li:last-child { border-bottom: none; }
.dept-list i { width: 22px; }

.faculty-mini-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}
.faculty-mini-card img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }

/* ---------- Faculty Full Card ---------- */
.ffc-card {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
.ffc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md, 0 10px 24px rgba(0,0,0,.08)); }

.ffc-photo { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: var(--color-bg); }
.ffc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ffc-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }

.ffc-name-th { font-size: 1.05rem; font-weight: 700; color: var(--color-primary); margin-bottom: 2px; }
.ffc-name-en { font-size: .82rem; color: var(--color-text-soft); margin-bottom: 8px; }

.ffc-position {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--color-secondary);
    background: rgba(249, 168, 37, .12);
    border-radius: 999px;
    padding: 3px 12px;
    margin-bottom: 12px;
    width: fit-content;
}

.ffc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: .82rem;
    color: var(--color-text-soft);
    border-top: 1px solid #f0e2bd;
    padding-top: 8px;
    margin-top: 8px;
}
.ffc-row i { width: 16px; color: var(--color-secondary); }

.ffc-block { margin-top: 10px; }
.ffc-block strong {
    display: block;
    font-size: .76rem;
    color: var(--color-primary);
    margin-bottom: 3px;
}
.ffc-block p, .ffc-clamp {
    font-size: .8rem;
    color: var(--color-text-soft);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ffc-pub-list { list-style: disc; padding-left: 16px; margin: 0; font-size: .78rem; color: var(--color-text-soft); }
.ffc-pub-list li { margin-bottom: 2px; }
.ffc-pub-more { font-size: .74rem; color: var(--color-secondary); font-weight: 600; }

.ffc-more-link {
    margin-top: auto;
    padding-top: 14px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--color-secondary);
    text-decoration: none;
}
.ffc-more-link i { margin-left: 4px; font-size: .72rem; }
.ffc-more-link:hover { text-decoration: underline; }

.dept-sidebar {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f4e6c3;
    position: sticky;
    top: 100px;
}
.dept-sidebar h5 { font-size: 1rem; margin-bottom: 14px; }
.dept-download-list { list-style: none; padding: 0; margin: 0; }
.dept-download-list li { margin-bottom: 10px; }
.dept-download-list a { color: var(--color-text); font-size: .9rem; }
.dept-download-list a:hover { color: var(--color-secondary); }
.dept-download-list i { color: var(--color-secondary); margin-right: 8px; }

/* ---------- Research Topic Cards ---------- */
.research-topic-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f4e6c3;
}
.research-topic-img { height: 170px; overflow: hidden; }
.research-topic-img img { width: 100%; height: 100%; object-fit: cover; }
.research-topic-body { padding: 22px; text-align: center; }
.research-topic-icon {
    width: 56px; height: 56px;
    margin: -46px auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    border: 4px solid #fff;
    box-shadow: var(--shadow-sm);
}

/* ---------- Research Item Cards ---------- */
.research-search-form .form-control,
.research-search-form .form-select {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}
.research-item-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f4e6c3;
}
.research-item-img { position: relative; height: 160px; overflow: hidden; }
.research-item-img img { width: 100%; height: 100%; object-fit: cover; }
.research-item-category {
    position: absolute; top: 10px; right: 10px;
    background: var(--color-primary);
    color: #fff;
    font-size: .75rem;
    padding: 4px 12px;
    border-radius: 20px;
}
.research-item-body { padding: 18px; }
.research-item-body h6 { margin-bottom: 8px; }

/* ---------- Pagination ---------- */
.pagination .page-link { color: var(--color-secondary); border-color: #f4e6c3; }
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-color: var(--color-primary);
}

/* ---------- Personnel Page ---------- */
.person-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f4e6c3;
    color: var(--color-text);
    transition: transform .25s ease, box-shadow .25s ease;
}
.person-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); color: var(--color-text); }
.person-card-img { aspect-ratio: 1 / 1; height: auto; overflow: hidden; position: relative; }
.person-card-img img { width: 100%; height: 100%; object-fit: cover; }
.person-card-body { padding: 14px 16px; text-align: center; }
.person-card-body h6 { margin-bottom: 4px; }

.person-detail-photo { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.person-detail-photo img { width: 100%; display: block; object-fit: cover; }

.person-card-type {
    position: absolute; top: 8px; right: 8px;
    background: var(--color-primary);
    color: #fff;
    font-size: .72rem;
    padding: 3px 10px;
    border-radius: 20px;
}

.person-vertical-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #f4e6c3;
    padding: 40px;
}
.pv-photo {
    width: 200px; height: 200px;
    margin: 0 auto 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 4px solid var(--color-bg);
    box-shadow: var(--shadow-sm);
}
.pv-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-header { text-align: center; margin-bottom: 24px; }
.pv-name-en { color: var(--color-text-soft); font-size: .95rem; margin-bottom: 10px; }
.pv-row {
    padding: 18px 0;
    border-top: 1px dashed #f0e2bd;
}
.pv-row:first-of-type { border-top: 1px solid #f0e2bd; }
.pv-label {
    color: var(--color-secondary);
    font-size: .95rem;
    margin-bottom: 10px;
    font-family: var(--font-display);
}
.pv-label i { width: 20px; }

.person-custom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 101, 36, 0.08) !important;
    border-color: rgba(255, 101, 36, 0.15) !important;
}
.btn-custom-more:hover {
    background: #e55319 !important;
    box-shadow: 0 4px 12px rgba(255, 101, 36, 0.4) !important;
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 1024px) {
    .vision-mission-section { grid-template-columns: 1fr; }
    .image-box { order: -1; min-height: 300px; }
    .mission-grid { grid-template-columns: 1fr; }
    .vm-col { padding: 40px 25px; }
    .vm-col.image-box { padding: 0; }
}

@media (max-width: 991.98px) {
    :root { --section-padding: 60px; }
    .hero-title { font-size: 2rem; }
    .hero-slide { min-height: 460px; }
    .search-box { margin-top: 14px; width: 100%; }
    .search-box input { width: 100%; }
    .main-menu { text-align: center; }
    
    .executive-container { grid-template-columns: 1fr; gap: 0; }
    .executive-image { order: 1; height: 450px; }
    .executive-content-box {
        order: 2; width: 95%; margin: -50px auto 0;
        padding: 30px 20px; border-right: none;
        border-top: 5px solid var(--color-secondary);
    }
    
    .values-image-wrapper { margin-bottom: 20px; }
    .values-image-wrapper::after { display: none; }
    
    .red-img-wrapper { height: 200px; }
    .dept-sidebar { position: static; margin-top: 30px; }
}

@media (max-width: 767.98px) {
    .page-banner-photo { min-height: 220px; }
    .ffc-body { padding: 14px 14px 16px; }
}

@media (max-width: 575.98px) {
    .hero-title { font-size: 1.6rem; }
    .hero-buttons { flex-direction: column; }
    .section-heading h2 { font-size: 1.6rem; }
    .person-vertical-card { padding: 26px 20px; }
    .pv-photo { width: 160px; height: 160px; }
}

/* CC4 */
:root {
    --color-orange: #e55319;
}

.text-orange {
    color: var(--color-orange);
}

/* ตกแต่งส่วน Section หลัก */
.cc-section {
    padding: 70px 0;
}

/* พื้นหลังสีเทาอ่อน + เส้นขอบบน-ล่างสำหรับแบ่ง Section ให้เห็นชัดเจน */
.bg-light-section {
    background-color: #f8f9fa; /* สีเทาอ่อนนุ่มตา */
    border-top: 1px solid #e9ecef; /* เส้นแบ่งโซนด้านบน */
    border-bottom: 1px solid #e9ecef; /* เส้นแบ่งโซนด้านล่าง */
}

/* รายการย่อย */
.cc-item {
    padding: 10px;
}

/* วงกลมไอคอนขอบส้ม */
.cc-icon-circle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 3px solid var(--color-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff; /* พื้นหลังวงกลมเป็นสีขาวให้ลอยเด่นจากพื้นเทา */
    transition: all 0.3s ease;
}

.cc-icon-circle i {
    font-size: 24px;
    color: var(--color-orange);
}

/* Hover Effect */
.cc-item:hover .cc-icon-circle {
    background-color: var(--color-orange);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(217, 107, 39, 0.25);
}

.cc-item:hover .cc-icon-circle i {
    color: #ffffff;
}

.cc-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-orange);
    margin-bottom: 8px;
    line-height: 1.3;
}

.cc-desc {
    font-size: 0.92rem;
    color: #555555;
    line-height: 1.6;
    margin-bottom: 0;
}
