﻿body { background-color: #f4f7f6; font-family: 'Sarabun', sans-serif; }
h2 { color: #17468c; }
.form-container { background: white; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-top: 8px solid #17468c; }
.section-header { border-left: 5px solid #17468c; padding-left: 15px; margin: 30px 0 20px; color: #17468c; font-weight: bold; }
.card-receipt { background-color: #fffdf2; border: 1px dashed #ffc107; }
#loadingOverlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(255,255,255,0.9); z-index:9999; text-align:center; padding-top:20%; }


:root {
    --mu-dark-blue: #17468c;
    --mu-gold: #ffcc00;
}
.camp-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: white;
}
.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.banner-img:hover {
    transform: scale(1.02);
}
.camp-title {
    color: var(--mu-dark-blue);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
}
.camp-subtitle {
    color: #666;
    font-size: 1.4rem;
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}
.camp-subtitle::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: var(--mu-gold);
}
/* คลาสสำหรับปิดเส้นใต้ */
.camp-subtitle.no-underline::after {
    display: none;
}

/* ปรับระยะห่างเพิ่มเติม (ถ้าต้องการให้ตัวบนชิดกับชื่ออังกฤษมากขึ้น) */
.camp-subtitle.no-underline {
    margin-bottom: 5px;
}
.info-badge {
    background: #f8f9fa;
    border-left: 4px solid var(--mu-dark-blue);
    padding: 15px;
    height: 100%;
    border-radius: 0 10px 10px 0;
}
.btn-register {
    background: linear-gradient(135deg, #d9534f 0%, #b52b27 100%);
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    color: white !important;
    box-shadow: 0 4px 15px rgba(217, 83, 79, 0.3);
}
.btn-register:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(217, 83, 79, 0.4);
}
.fb-btn {
    color: #1877f2;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #1877f2;
    padding: 8px 20px;
    border-radius: 8px;
    transition: 0.3s;
}
.fb-btn:hover {
    background: #1877f2;
    color: white;
}


/* กำหนดสีและฟอนต์ของเมนู */
.navbar-nav .nav-link {
    font-size: 0.95rem;
    padding: 12px 14px !important;
    transition: all 0.2s;
}

/* เอฟเฟกต์เมื่อเอาเมาส์ไปชี้เมนู */
.navbar-nav .nav-link:hover {
    background-color: #E0E0E0;
    color: #17468c !important;
}

/* เส้นคั่นระหว่างเมนูสีเทาเข้ม */
@media (min-width: 992px) {
    .border-start-custom {
        border-left: 1px solid #CCCCCC;
    }
}

/* ปรับแต่งเมนูที่กำลังใช้งานอยู่ (Active) ให้มีขีดล่างสีน้ำเงิน */
.navbar-nav .nav-link.active {
    border-bottom: 3px solid #17468c;
}

/* ปรับระยะห่างของเนื้อหาถัดจาก Navbar */
body {
    background-color: #F8F9FA;
}

/* การแสดงผลในมือถือ */
@media (max-width: 768px) {
    header { border-bottom-width: 3px !important; }
    header img[src*="logoSC"] { height: 60px !important; }
    header img[src*="logoTH"] { height: 75px !important; }
    .border-start-custom { border-left: none; border-bottom: 1px solid #CCCCCC; }
}


/* --- โหมดหน้าจอคอมพิวเตอร์และแท็บเล็ต (Desktop & Tablet) --- */
/* เปลี่ยนจาก 992px เป็น 768px */
@media (min-width: 768px) {
    .navbar-nav {
        margin-left: 0;
    }
}

/* --- โหมดหน้าจอมือถือ (Mobile) --- */
/* เปลี่ยนจาก 991px เป็น 767px */
@media (max-width: 767px) {
    /* จัดปุ่ม Hamburger ให้อยู่ตรงกลาง */
    .navbar-mobile-container {
        justify-content: center !important;
    }

    .navbar-toggler {
        margin: 0 auto;
    }

    /* จัดรายการเมนูข้างในให้อยู่ตรงกลาง */
    .navbar-nav {
        text-align: center;
        width: 100%;
        margin-top: 10px;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #DDDDDD;
    }

    /* ลบเส้นคั่นแนวตั้งออกในมือถือ */
    .border-start-custom {
        border-left: none !important;
    }

    /* จัดเส้นใต้เมนู Active ให้สั้นลงและอยู่ตรงกลาง */
    .navbar-nav .nav-link.active {
        display: inline-block;
        border-bottom: 3px solid #17468c;
        width: auto;
    }
}


/* การตั้งค่าโลโก้พื้นฐาน */
.logo-responsive {
    height: auto;
    width: auto;
    transition: all 0.3s ease;
}

/* --- สำหรับมือถือ (Mobile) --- */
@media (max-width: 767px) {
    header {
        padding: 20px 0 !important; /* เพิ่มพื้นที่แนวตั้ง */
    }
    
    .logo-responsive {
        max-height: 70px !important; /* ปรับขนาดให้พอดีหน้าจอเล็ก */
    }

    /* เพิ่มระยะห่างระหว่างโลโก้ตัวบนกับตัวล่าง */
    .header-logo-left {
        margin-bottom: 15px; 
    }
}

/* --- สำหรับคอมพิวเตอร์และแท็บเล็ต (md ขึ้นไป) --- */
@media (min-width: 768px) {
    .logo-responsive {
        max-height: 90px;
    }
}


/* การปรับแต่ง Footer โทนเทาอ่อน มินิมอล */
.footer-sec {
    font-family: 'Sarabun', sans-serif;
    color: #444;
}

.last-update {
    font-size: 0.8rem;
    color: #17468c; /* ใช้สีน้ำเงินเดียวกับโลโก้ให้ดูเป็นชุดเดียวกัน */
    background: #ffffff; /* พื้นขาวบนพื้นเทาอ่อนจะดูหรูมาก */
    padding: 6px 20px;
    border-radius: 50px; /* ทรงแคปซูลดูสมัยใหม่ */
    display: inline-flex;
    align-items: center;
    border: 1px solid #E0E0E0;
    font-weight: 500;
}

.contact-info p {
    line-height: 1.6;
}

/* ปรับแต่งสำหรับมือถือ */
@media (max-width: 767px) {
    .footer-sec .container {
        padding-top: 30px;
        padding-bottom: 30px;
    }
    .contact-info p {
        font-size: 0.75rem;
    }
    .contact-info .fw-bold {
        font-size: 0.85rem !important;
    }
}


/* ปรับแต่ง Dropdown Menu */
.dropdown-menu {
    border-radius: 12px;
    padding: 10px;
    margin-top: 10px !important;
}

.dropdown-item {
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 0.9rem;
    transition: all 5s;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #17468c;
    padding-left: 20px; /* เอฟเฟกต์ขยับเล็กน้อยเมื่อชี้ */
}


html {
    scroll-behavior: smooth;
}

/* แถม: ปรับระยะเยื้อง (Offset) เพื่อไม่ให้หัวข้อโดน Navbar บังตอนเลื่อนลงไป */
[id] {
    scroll-margin-top: 100px; /* ปรับตัวเลขตามความหนาของ Navbar คุณ */
}


/* --- ส่วนสำหรับมือถือ (ต่ำกว่า 768px) --- */
@media (max-width: 767px) {
    /* รีเซ็ตค่า Hover ทั้งหมด เพื่อให้ระบบ Click ของ Bootstrap ทำงาน */
    .nav-item.dropdown .dropdown-menu {
        display: none; /* คืนค่าเริ่มต้นให้ Bootstrap คุมเอง */
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: none !important;
        border: none;
        padding-left: 20px; /* เยื้องเมนูย่อยให้ดูรู้ว่าเป็นเมนูย่อย */
        background-color: #F0F0F0;
    }
    
    /* เมื่อกดแล้ว Bootstrap จะเติม class .show ให้เอง */
    .dropdown-menu.show {
        display: block !important;
    }
}


.psure-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 50px;
    border: 1px solid #e9ecef;
    box-shadow: 0 15px 35px rgba(23, 70, 140, 0.05); /* เงาสีน้ำเงินจางๆ */
}
.psure-accent-title {
    color: #17468c;
    font-weight: 800;
    position: relative;
    margin-bottom: 1.5rem;
}
.psure-accent-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: #FFC107;
    margin-top: 10px;
}
.feature-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}
.feature-icon {
    background: #f0f4f8;
    color: #17468c;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}
.timeline-card {
    background: #17468c;
    color: white;
    padding: 30px;
    border-radius: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.btn-outline-white {
    border: 2px solid white;
    color: white;
    border-radius: 50px;
    padding: 10px 25px;
    transition: all 0.3s;
}
.btn-outline-white:hover {
    background: white;
    color: #17468c;
}


/* 1. ปรับปรุงรอยต่อระหว่าง Section */
.section-divider {
    text-align: center;
    margin: 50px 0 30px;
    position: relative;
}
.section-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #dee2e6;
    z-index: 1;
}
.section-divider span {
    background: #f4f7f6; /* สีเดียวกับ body */
    padding: 0 20px;
    position: relative;
    z-index: 2;
    color: #6c757d;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 3. ปรับปุ่มให้ดูทันสมัยขึ้น */
.btn-outline-secondary {
    border-color: #dee2e6;
    color: #666;
}
.btn-outline-secondary:hover {
    background-color: #17468c;
    border-color: #17468c;
}


/* สไตล์ Timeline แบบเรียงต่อกัน */
.timeline-steps {
    list-style: none;
    padding-left: 20px;
    border-left: 2px dashed rgba(255,255,255,0.3);
    margin: 20px 0;
    text-align: left;
}
.timeline-step-item {
    position: relative;
    padding-bottom: 25px;
    padding-left: 20px;
}
.timeline-step-item::before {
    content: "";
    position: absolute;
    left: -27px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: #FFC107;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(255, 193, 7, 0.2);
}
.timeline-step-item:last-child {
    padding-bottom: 0;
}
.step-date {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    display: block;
    margin-bottom: 2px;
}
.step-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: #fff;
}


/* --- คลังข้อมูลส่วนกลาง --- */
.archive-section-wrapper {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid #e9ecef;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.archive-main-title {
    color: #17468c;
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- การออกแบบปุ่มปี (Year Buttons) --- */
.era-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #AD841F;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 25px 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.era-label::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(to right, #eee, transparent);
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

.btn-archive-year {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 12px;
    color: #444;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-archive-year:hover {
    background: #17468c;
    color: #fff !important;
    border-color: #17468c;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(23, 70, 140, 0.15);
}

.btn-archive-year.qsure-era {
    color: #28a745;
}

.btn-archive-year.qsure-era:hover {
    background: #28a745;
    border-color: #28a745;
}

/* --- การออกแบบภาพบรรยากาศ (Photo Gallery) --- */
.gallery-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    background: #fff;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

.gallery-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 180px;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-card:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
}

.gallery-content {
    padding: 20px;
}

.gallery-title {
    font-weight: 700;
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .archive-section-wrapper {
        padding: 25px;
    }
    .year-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/*//////////// CSS for research page///////////////////////////////*/

/* คอนเทนเนอร์หลักของกลุ่มวิจัย */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.ru-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #eee;
    padding: 30px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.ru-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(23, 70, 140, 0.1);
    border-color: #17468c;
}

/* แถบสีบอกประเภทงานวิจัย */
.ru-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: #AD841F; /* สีเริ่มต้น */
}

/* หัวข้อ RU */
.ru-number {
    font-size: 0.85rem;
    font-weight: 800;
    color: #AD841F;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.ru-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #17468c;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* ป้ายบอกประเภทงานวิจัย */
.ru-type {
    display: inline-block;
    font-size: 0.75rem;
    padding: 3px 12px;
    background: #f0f4f8;
    color: #17468c;
    border-radius: 50px;
    margin-bottom: 15px;
    font-weight: 600;
}

.ru-topics {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* ส่วนรายชื่ออาจารย์ */
.ru-staff {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    font-size: 0.85rem;
}

.staff-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

.staff-list {
    color: #777;
    line-height: 1.5;
}

/* สีพิเศษสำหรับ RU14 Explorative */
.ru-card.explorative::before { background: #0070c0; }
.ru-card.explorative .ru-number { color: #0070c0; }


/*//////////// CSS for program page///////////////////////////////*/

/* --- ส่วนตารางภาพรวม (Weekly Overview) --- */
.schedule-container {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 50px;
}

.table-psure {
    border-collapse: separate;
    border-spacing: 0 10px;
}

.table-psure thead th {
    background-color: #17468c;
    color: white;
    border: none;
    padding: 15px;
    font-weight: 700;
}

.table-psure thead th:first-child { border-radius: 12px 0 0 12px; }
.table-psure thead th:last-child { border-radius: 0 12px 12px 0; }

.table-psure tbody tr {
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.table-psure tbody td {
    padding: 15px;
    vertical-align: middle;
    background: #fff;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.table-psure tbody td:first-child { border-left: 1px solid #eee; border-radius: 12px 0 0 12px; }
.table-psure tbody td:last-child { border-right: 1px solid #eee; border-radius: 0 12px 12px 0; }

/* Badge สำหรับประเภทกิจกรรม */
.event-badge {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}

.bg-meeting { background-color: #fff9c4; color: #827717; border: 1px solid #fbc02d; }
.bg-course { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #81c784; }
.bg-seminar { background-color: #ffebee; color: #c62828; border: 1px solid #ef5350; }
.bg-club { background-color: #e3f2fd; color: #1565c0; border: 1px solid #64b5f6; }


/* --- ปรับ Timeline ให้เล็กลง --- */
.timeline-list {
    position: relative;
    padding: 10px 0; /* ลด Padding บน-ล่าง */
}

.timeline-day-card {
    background: white;
    border-radius: 10px; /* ลดรัศมีมุม */
    padding: 12px 15px; /* ลด Padding ในการ์ดลง 40% */
    margin-bottom: 12px; /* ลดระยะห่างระหว่างการ์ด */
    border-left: 4px solid #d3ebfc;  ลดความหนาเส้นขอบข้าง */
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.day-label {
    font-weight: 700;
    color: #17468c;
    font-size: 1rem; /* ลดขนาดหัวข้อวันลงจาก 1.2rem */
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ปรับ Badge ใน Timeline ให้เล็กลง */
.timeline-day-card .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
}

.timeline-day-card p.small {
    font-size: 0.8rem !important; /* บังคับขนาดตัวอักษรเนื้อหาให้เล็กลง */
    line-height: 1.4;
}

/* ปรับช่องว่าง Column */
.timeline-day-card .border-end {
    border-right: 1px solid #eee !important;
}

@media (max-width: 767px) {
    .timeline-day-card .col-md-6:first-child {
        border-right: none !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
}

.holiday-card {
    border-left-color: #d9534f;
    background-color: #fff5f5;
}


@media (max-width: 767px) {
    /* 1. ซ่อนหัวตาราง (th) เพราะเราจะใช้ data-label แทน */
    .table-psure thead {
        display: none;
    }

    /* 2. บังคับให้แถว (tr) กลายเป็นกล่องการ์ด */
    .table-psure tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #dee2e6;
        border-radius: 15px;
        background: #fff;
        overflow: hidden;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    }

    /* 3. บังคับให้ช่องข้อมูล (td) กลายเป็นแถวแนวตั้ง */
    .table-psure tbody td {
        display: block;
        width: 100% !important;
        text-align: left !important;
        padding: 12px 20px !important;
        border: none !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    /* 4. ช่องแรก (ชื่อวัน) ให้เป็นหัวการ์ดสีเข้ม */
    .table-psure tbody td:first-child {
        background: #17468c !important;
        color: white !important;
        font-weight: bold;
        font-size: 1.1rem;
    }

    /* 5. สร้างหัวข้อเล็กๆ เหนือข้อมูลจาก data-label */
    .table-psure tbody td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        font-weight: 700;
        color: #999;
        margin-bottom: 2px;
        text-transform: uppercase;
    }
}

/* เพิ่มสีแยกตามวัน (Optional: ช่วยให้จำง่ายขึ้น) */
.day-mon { border-left: 6px solid #ffd600 !important; } /* จันทร์ - เหลือง */
.day-tue { border-left: 6px solid #f06292 !important; } /* อังคาร - ชมพู */
.day-wed { border-left: 6px solid #4caf50 !important; } /* พุธ - เขียว */
.day-thu { border-left: 6px solid #ff9800 !important; } /* พฤหัส - ส้ม */
.day-fri { border-left: 6px solid #2196f3 !important; } /* ศุกร์ - ฟ้า */


/*//////////// CSS for organizers page///////////////////////////////*/

/* --- Organizers Section Styles --- */
.organizer-container {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid #e9ecef;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.org-header {
    border-left: 5px solid #17468c;
    padding-left: 15px;
    margin-bottom: 30px;
}

.org-title {
    color: #17468c;
    font-weight: 800;
    margin-bottom: 5px;
}

/* การจัดกลุ่มรายชื่อ */
.staff-group {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.staff-group-title {
    color: #AD841F;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.staff-group-title i {
    font-size: 1.2rem;
}

/* รายชื่อแบบ Grid */
.name-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.name-item {
    padding: 8px 12px;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #444;
    transition: all 0.2s;
}

.name-item:hover {
    border-color: #17468c;
    color: #17468c;
    transform: translateX(5px);
}

/* รายชื่ออาจารย์ต่างมหาวิทยาลัย */
.external-list {
    list-style: none;
    padding: 0;
}

.external-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: white;
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid #eee;
    font-size: 0.95rem;
}

.univ-tag {
    font-size: 0.8rem;
    color: #17468c;
    font-weight: 600;
    background: #e7f0ff;
    padding: 2px 10px;
    border-radius: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .organizer-container { padding: 25px; }
    .external-item { flex-direction: column; gap: 5px; }
    .univ-tag { align-self: flex-start; }
}


/*//////////// CSS for register page///////////////////////////////*/


/* --- Register Page Styles --- */
.register-container {
    background: #ffffff;
    border-radius: 24px;
    padding: 50px;
    border: 1px solid #e9ecef;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
}

/* เน้นส่วนวันปิดรับสมัคร */
.deadline-box {
    background: #fff5f5;
    border: 2px dashed #d9534f;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    margin: 30px 0;
}

.deadline-date {
    font-size: 1.8rem;
    font-weight: 800;
    color: #d9534f;
    display: block;
    margin-top: 5px;
}

/* ปุ่มสมัครออนไลน์ */
.reg-button-wrapper {
    text-align: center;
    margin: 40px 0;
}

.btn-main-register {
    background: linear-gradient(135deg, #17468c 0%, #0d2a54 100%);
    color: white !important;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 20px 50px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(23, 70, 140, 0.3);
}

.btn-main-register:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(23, 70, 140, 0.4);
    background: linear-gradient(135deg, #1d57ad 0%, #17468c 100%);
}

/* สไตล์ปุ่มแก้ไข ( btn-main-edit ) */
.btn-main-edit {
    display: inline-block;
    padding: 15px 30px;
    background-color: #f8f9fa; /* สีพื้นหลังสว่างกว่า */
    color: #17468c;           /* ใช้สีน้ำเงินเดียวกับธีม */
    border: 2px solid #17468c; /* เพิ่มเส้นขอบ */
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s;
    margin-left: 10px;        /* เว้นระยะห่างจากปุ่มแรก */
}

.btn-main-edit:hover {
    background-color: #17468c;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .btn-main-edit {
        margin-left: 0;
        margin-top: 10px;
        display: block; /* บนมือถือให้วางต่อกันแนวตั้ง */
    }
}

/* ส่วนติดต่อสอบถาม */
.contact-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.contact-icon {
    background: #17468c;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* QR Code Section */
.qr-section {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #eee;
    margin-top: 30px;
}

.qr-img {
    max-width: 200px;
    border: 5px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 15px;
}

@media (max-width: 768px) {
    .register-container { padding: 30px 20px; }
    .btn-main-register { font-size: 1.2rem; padding: 15px 30px; width: 100%; }
    .deadline-date { font-size: 1.4rem; }
}


/* ตกแต่งตารางรายชื่อผู้สมัคร */
.applicant-table {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.applicant-table thead th {
    background-color: #17468c !important;
    color: white !important;
    font-weight: 700;
    padding: 15px;
    border: none;
}

.applicant-table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    background: #fff;
    font-size: 0.95rem;
}

/* ปรับแต่งสำหรับมือถือ (Stack Card) */
@media (max-width: 767px) {
    .applicant-table thead { display: none; }
    .applicant-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    }
    .applicant-table tbody td {
        display: block;
        width: 100%;
        text-align: right;
        border: none !important;
        border-bottom: 1px solid #f9f9f9 !important;
        position: relative;
        padding-left: 50% !important;
    }
    .applicant-table tbody td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        text-align: left;
        font-weight: 700;
        color: #17468c;
    }
    .applicant-table tbody td:first-child {
        background: #f8f9fa;
        text-align: center;
        padding-left: 15px !important;
        font-weight: 800;
    }
    .applicant-table tbody td:first-child::before { display: none; }
}



/*//////////// CSS for register_main page///////////////////////////////*/

/* คอนเทนเนอร์หลัก */
.reg-form-wrapper {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    border-top: 10px solid #17468c;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* หัวข้อส่วน (Section Header) */
.reg-section-header {
    background: #f1f4f9;
    color: #17468c;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 10px;
    margin: 35px 0 20px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 5px solid #17468c;
}

.reg-section-header:first-child {
    margin-top: 0;
}

/* ป้ายกำกับและช่องกรอก */
.form-label {
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    width: 100%;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: #17468c;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(23, 70, 140, 0.1);
}

/* ปุ่มบันทึก */
.btn-submit-reg {
    background: linear-gradient(135deg, #17468c 0%, #0d2a54 100%);
    color: #fff;
    border: none;
    padding: 15px 50px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit-reg:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 70, 140, 0.3);
}

.text-danger { color: #d9534f; }
.help-text { font-size: 0.85rem; color: #6c757d; margin-top: 5px; }

@media (max-width: 768px) {
    .reg-form-wrapper { padding: 25px 20px; }
}



/*//////////// CSS for privacy page///////////////////////////////*/

/* Privacy Page Styles */
.privacy-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 50px;
    border: 1px solid #e9ecef;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    line-height: 1.8;
}

.privacy-container h3 {
    color: #17468c;
    font-weight: 800;
    margin-bottom: 25px;
}

.privacy-container h4 {
    color: #17468c;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    border-left: 5px solid #AD841F;
    padding-left: 15px;
}

.privacy-container p, .privacy-container li {
    color: #444;
    text-align: justify;
}

.privacy-table-wrapper {
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.privacy-table thead th {
    background-color: #f8f9fa;
    color: #17468c;
    font-weight: 700;
    border-bottom: 2px solid #dee2e6;
    text-align: center;
}

.contact-section {
    background: #f1f4f9;
    padding: 30px;
    border-radius: 15px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .privacy-container { padding: 30px 20px; }
}