/* =========================
   การตั้งค่าพื้นฐาน (คงเดิม)
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', 'Sarabun', sans-serif;
}

body {
    background-color: #f4f9fc;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================
   ส่วนหัวเว็บไซต์ ปรับปรุงให้มีรายละเอียดใต้ชื่อ
   ========================= */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 10px 0 5px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.header-top {
    width: 100%;
    display: flex;
    justify-content: center; /* จัดให้กึ่งกลางหน้าจอคอมพิวเตอร์ */
    align-items: center;
    position: relative;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 15px; /* ระยะห่างระหว่างรูปและกล่องข้อความ */
}

.logo img {
    height: 65px; /* เพิ่มความสูงรูปเล็กน้อยเพื่อให้รับกับข้อความ 2 บรรทัด */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* 💡 สไตล์กล่องข้อมูลข้อความจัดเรียงในแนวตั้ง */
.logo-info {
    display: flex;
    flex-direction: column;
    text-align: left; /* จัดข้อความชิดซ้าย */
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #2b7a9c;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-bottom: 4px;
    white-space: nowrap;
}

/* 💡 สไตล์ตัวหนังสือบรรทัดย่อย (เลขทะเบียน/สาขา) */
.logo-subtext {
    font-size: 13px;
    color: #6b7280; /* สีเทาซอฟต์ เพื่อไม่ให้แย่งความเด่นจากชื่อหลัก */
    font-weight: 400;
    white-space: nowrap;
}

.logo a:hover img {
    transform: scale(1.02);
}

/* แถวล่าง: เมนูหลัก */
.nav-menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

.nav-menu ul li {
    margin: 0 15px;
    position: relative;
}

.nav-menu ul li a {
    text-decoration: none;
    color: #4b6584;
    font-weight: 500;
    display: block;
    padding: 10px 5px;
    transition: color 0.3s ease;
}

.nav-menu ul li a:hover,
.nav-menu ul li a.active {
    color: #2b7a9c;
}

.arrow {
    font-size: 10px;
    margin-left: 4px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 10px 0;
    z-index: 120;
}

.dropdown-menu li { margin: 0 !important; }
.dropdown-menu li a { padding: 10px 20px; color: #4b5563; text-align: left; }
.dropdown-menu li a:hover { background-color: #f0f9ff; color: #0284c7; }

@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

/* ปุ่ม Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 150;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #2b7a9c;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 130;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active { opacity: 1; visibility: visible; }

/* ==========================================
   โครงสร้างระบบสไลเดอร์รูปภาพ (Slider)
   ========================================== */
.slider-container { position: relative; width: 100%; height: 480px; overflow: hidden; background-color: #e0f2fe; }
.slider { width: 100%; height: 100%; position: relative; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: opacity 0.8s ease-in-out, visibility 0.8s; z-index: 1; }
.slide.active { opacity: 1; visibility: visible; z-index: 2; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
 /*
.slide-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: #0369a1; z-index: 3; background-color: rgba(255, 255, 255, 0.85); padding: 35px 50px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); backdrop-filter: blur(5px); width: 85%; max-width: 700px; }
*/
.slide-content h2 { font-size: 32px; margin-bottom: 12px; font-weight: 700; }
.slide-content p { font-size: 16px; margin-bottom: 25px; color: #0c4a6e; }

.btn-primary { background-color: #0284c7; color: #ffffff; padding: 12px 30px; border-radius: 50px; text-decoration: none; font-weight: 600; display: inline-block; transition: background-color 0.3s ease; }
.btn-primary:hover { background-color: #0369a1; }

.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(255, 255, 255, 0.6); color: #0284c7; border: none; width: 45px; height: 45px; border-radius: 50%; font-size: 18px; cursor: pointer; z-index: 10; transition: all 0.3s ease; display: flex; justify-content: center; align-items: center; }
.slider-btn:hover { background-color: #0284c7; color: #ffffff; }
.prev { left: 20px; }
.next { right: 20px; }
/**/
.slider-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; gap: 10px; }
.dot { width: 12px; height: 12px; background-color: rgba(255, 255, 255, 0.5); border: 1px solid #0284c7; border-radius: 50%; cursor: pointer; transition: all 0.3s ease; }
.dot.active, .dot:hover { background-color: #0284c7; width: 25px; border-radius: 10px; }

/* =========================
   ส่วนเนื้อหาด้านล่าง & Footer
   ========================= */
.content-section { display: flex; justify-content: space-between; gap: 20px; margin: 40px auto 50px auto; }
.card { background-color: #ffffff; padding: 30px 20px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); flex: 1; text-align: center; transition: transform 0.3s ease; }
.card:hover { transform: translateY(-5px); }
.card h3 { color: #0284c7; margin-bottom: 15px; font-size: 20px; }
.card p { color: #4b5563; font-size: 14px; }
footer { background-color: #0284c7; color: #ffffff; text-align: center; padding: 20px 0; }

/* ==========================================
   ส่วนควบคุมเมนูบนหน้าจอมือถือ (Responsive)
   ========================================== */
@media (max-width: 768px) {
    header { padding: 10px 0; }
    .header-container { flex-direction: row; justify-content: space-between; gap: 0; }
    .header-top { justify-content: space-between; }
    
    /* 💡 ปรับสเกลข้อมูลบนมือถือให้เล็กลง กระชับ ไม่ล้นเบียดปุ่มเมนู */
    .logo img { height: 45px; }
    .logo-text { font-size: 16px; margin-bottom: 2px; }
    .logo-subtext { font-size: 10px; }

    .slider-container { height: 320px; }
    .slide-content { padding: 20px; width: 90%; }
    .slide-content h2 { font-size: 20px; margin-bottom: 8px; }
    .slide-content p { font-size: 13px; margin-bottom: 15px; }
    .btn-primary { padding: 8px 20px; font-size: 14px; }
    .slider-btn { width: 35px; height: 35px; font-size: 14px; }

    .menu-toggle { display: flex; }
    .menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .nav-menu {
        position: fixed; top: 0; right: -280px; width: 280px; height: 100vh;
        background-color: #ffffff; box-shadow: -4px 0 15px rgba(0,0,0,0.1);
        z-index: 140; transition: right 0.3s ease-in-out; padding-top: 80px;
    }
    .nav-menu.active { right: 0; }
    .nav-menu ul { flex-direction: column; justify-content: flex-start; }
    .nav-menu ul li { margin: 0; width: 100%; }
    .nav-menu ul li a { padding: 15px 25px; border-bottom: 1px solid #f0f7ff; text-align: left; }

    .nav-menu .dropdown-menu {
        position: static; opacity: 1; visibility: visible; box-shadow: none;
        background-color: #f8fafc; max-height: 0; overflow: hidden; transform: none; padding: 0; transition: max-height 0.3s ease-out;
    }
    .dropdown.open .dropdown-menu { max-height: 250px; }
    .dropdown.open .arrow { transform: rotate(180deg); }
    .nav-menu .dropdown-menu li a { padding-left: 40px; }

    .content-section { flex-direction: column; margin-top: 20px; }

    
}



/* ==========================================
   💡 สไตล์หน้าแกลเลอรีรูปภาพ (Gallery Page)
   ========================================== */

/* แถบหัวข้อหน้าย่อย (Page Title) */
.page-title-bar {
    background-color: #e0f2fe; /* ฟ้าอ่อนซอฟต์ */
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid #bae6fd;
}

.page-title-bar h2 {
    font-size: 28px;
    color: #0369a1;
    font-weight: 600;
    margin-bottom: 8px;
}

.page-title-bar p {
    font-size: 15px;
    color: #0c4a6e;
}

/* หน้าเนื้อหาแกลเลอรี */
.gallery-section {
    margin: 50px auto 80px auto;
}

/* จัดตำแหน่งภาพเป็นตารางกริด (เริ่มต้น 3 หรือ 4 คอลัมน์บนจอคอม) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* แสดง 3 ภาพต่อแถว */
    gap: 25px; /* ระยะห่างระหว่างภาพ */
}

/* ตัวกล่องการ์ดภาพ */
.gallery-item {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(2,132,199,0.1);
}

/* กล่องควบคุมขนาดสัดส่วนภาพ */
.gallery-img-box {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.gallery-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* บังคับภาพให้ตัดพอดีกรอบ ไม่เบี้ยว */
    transition: transform 0.5s ease;
}

/* ลูกเล่นซูมภาพเล็กน้อยเวลาชี้เมาส์ */
.gallery-item:hover .gallery-img-box img {
    transform: scale(1.06);
}

/* รายละเอียดคำอธิบายใต้ภาพ */
.gallery-desc {
    padding: 15px;
}

.gallery-desc h3 {
    font-size: 15px;
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
    
    /* ย่อหัวข้อไม่ให้เกิน 1 บรรทัด */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-desc span {
    font-size: 12px;
    color: #94a3b8;
}

/* ==========================================
   ส่วนควบคุมแกลเลอรีบนหน้าจอมือถือ (Responsive)
   ========================================== */
@media (max-width: 1024px) {
    /* หน้าจอแท็บเล็ตแสดง 2 คอลัมน์ */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    /* หน้าจอมือถือเล็กปรับรูปภาพให้เหมาะสม */
    .gallery-grid {
        grid-template-columns: 1fr; /* แสดงแถวละ 1 ภาพเต็มหน้าจอ */
        gap: 15px;
    }
    
    .gallery-img-box {
        height: 180px;
    }
    
    .page-title-bar {
        padding: 30px 0;
    }
    
    .page-title-bar h2 {
        font-size: 22px;
    }
}


/* ==========================================
   💡 สไตล์หน้าโครงสร้างบุคลากร (Personnel Structure)
   ========================================== */
.structure-section {
    margin: 40px auto 80px auto;
}

/* แถวการจัดวางกลุ่มตำแหน่ง */
.structure-row {
    margin-bottom: 50px;
    text-align: center;
}

/* หัวข้อระบุระดับชั้นการบริหาร */
.tier-title {
    font-size: 18px;
    color: #0284c7;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
    font-weight: 600;
}

/* เส้นใต้หัวข้อสั้นๆ สวยงาม */
.tier-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: #bae6fd;
    border-radius: 2px;
}

/* พื้นฐานโครงกริดทีมงาน */
.team-grid {
    display: grid;
    gap: 30px;
    justify-content: center;
}

/* การควบคุมจำนวนคอลัมน์ตามระดับชั้นการบริหาร (Desktop) */
.team-grid.tier-1 {
    grid-template-columns: minmax(250px, 320px); /* วางการ์ดเดียวขนาดเด่น */
}

.team-grid.tier-2 {
    grid-template-columns: repeat(2, minmax(250px, 320px)); /* วาง 2 การ์ดเรียงคู่ */
}

.team-grid.tier-3 {
    grid-template-columns: repeat(3, minmax(220px, 300px)); /* วาง 3 การ์ดเรียงแถว */
}

/* ตัวการ์ดข้อมูลบุคลากร */
.member-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border: 1px solid #e0f2fe;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(2,132,199,0.08);
}

/* กรอบตัดรูปภาพวงกลม/กึ่งเหลี่ยมมน เพื่อความน่าเชื่อถือ */
.member-img {
    width: 140px;
    height: 140px;
    margin: 25px auto 15px auto;
    border-radius: 50%; /* ปรับรูปเป็นวงกลมสากล */
    overflow: hidden;
    border: 4px solid #f0fdf4;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    background-color: #e0f2fe; /* สีพื้นหลังกรณีภาพยังไม่โหลด */
}

.member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ข้อมูลชื่อและตำแหน่งภายในการ์ด */
.member-info {
    padding: 0 20px 25px 20px;
}

.member-info h3 {
    font-size: 16px;
    color: #1e293b;
    margin-bottom: 6px;
    font-weight: 600;
}

/* สีข้อความตำแหน่งระบุชัดเจนด้วยโทนสีฟ้าเด่น */
.member-info .position {
    font-size: 13px;
    color: #0284c7;
    font-weight: 500;
}

/* ==========================================
   ส่วนควบคุมโครงสร้างบุคลากรบนมือถือ (Responsive)
   ========================================== */
@media (max-width: 992px) {
    /* หน้าจอแท็บเล็ตบีบขยับกลุ่มระดับ 3 ลงมาแถวละ 2 คอลัมน์ */
    .team-grid.tier-3 {
        grid-template-columns: repeat(2, minmax(220px, 300px));
    }
}

@media (max-width: 768px) {
    /* หน้าจอมือถือยุบสเกลทุกอย่างให้เรียงแถวเดี่ยวตอนลึก */
    .team-grid.tier-2, 
    .team-grid.tier-3 {
        grid-template-columns: minmax(240px, 300px);
        gap: 20px;
    }
    
    .structure-section {
        margin: 30px auto 60px auto;
    }
    
    .structure-row {
        margin-bottom: 35px;
    }
    
    .member-img {
        width: 120px;
        height: 120px;
        margin: 20px auto 12px auto;
    }
}


/* ==========================================
   💡 สไตล์หน้าประกาศข่าวสาร (News Page List)
   ========================================== */
.news-page-section {
    margin: 40px auto 80px auto;
}

/* กลุ่มแถบปุ่มกดเลือกหมวดหมู่ข่าว */
.news-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 35px;
    border-bottom: 2px solid #e0f2fe;
    padding-bottom: 15px;
    flex-wrap: wrap; /* ป้องกันปุ่มล้นหน้าจอเมื่อดูบนมือถือ */
}

.tab-btn {
    background-color: #ffffff;
    border: 1px solid #bae6fd;
    color: #4b6584;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover,
.tab-btn.active {
    background-color: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 4px 10px rgba(2,132,199,0.15);
}

/* กล่องรายการฟีดข่าวสารแนวนอน */
.news-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.news-list-item {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 22px 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.news-list-item:hover {
    transform: translateX(4px); /* สไลด์ขวาเล็กน้อยเวลาวางเมาส์ชี้ */
    border-color: #bae6fd;
}

/* ข้อมูลระบุรายละเอียดประเภทข่าวและวันที่ */
.news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-tag {
    font-size: 13px;
    color: #94a3b8;
}

/* พื้นที่ชื่อลิงก์ข่าวเนื้อหา */
.news-title-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.news-link {
    font-size: 18px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.news-link:hover {
    color: #0284c7;
}

.news-excerpt {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

/* ส่วนควบคุมระบบแถบเปลี่ยนเลขหน้าหน้าเว็บ (Pagination) */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.page-link {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    color: #4b6584;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover:not(.disabled) {
    background-color: #f0f9ff;
    color: #0284c7;
    border-color: #bae6fd;
}

.page-link.active {
    background-color: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.page-link.disabled {
    color: #cbd5e1;
    background-color: #f8fafc;
    cursor: not-allowed;
}

/* ==========================================
   ส่วนควบคุมการแสดงผลบนหน้าจอมือถือ (Responsive)
   ========================================== */
@media (max-width: 768px) {
    .news-tabs {
        gap: 6px;
        margin-bottom: 25px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .news-list-item {
        padding: 18px;
        gap: 10px;
    }
    
    .news-link {
        font-size: 15px;
    }
    
    .news-excerpt {
        font-size: 13px;
    }
    
    .page-link {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* ==========================================
   💡 สไตล์หน้าดาวน์โหลดเอกสาร (Document Downloads)
   ========================================== */
.download-page-section {
    margin: 40px auto 80px auto;
}

/* กล่องแยกกลุ่มหมวดหมู่เอกสาร */
.download-group {
    margin-bottom: 40px;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    border: 1px solid #e0f2fe;
}

/* แถบหัวข้อประจำกลุ่มเอกสาร */
.group-title {
    background-color: #f0f9ff; /* สีฟ้าอ่อนซอฟต์ */
    padding: 15px 25px;
    border-bottom: 1px solid #bae6fd;
}

.group-title h3 {
    font-size: 16px;
    color: #0369a1;
    font-weight: 600;
}

/* ควบคุมการแสดงผลตารางให้รองรับมือถือ (Responsive Table Scroll) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* โครงสร้างตารางหลัก */
.download-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.download-table th,
.download-table td {
    padding: 16px 25px;
    font-size: 14px;
    border-bottom: 1px solid #f0f7ff;
}

/* สีพื้นหัวข้อตาราง */
.download-table th {
    background-color: #ffffff;
    color: #4b6584;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    border-bottom: 2px solid #bae6fd;
}

/* สลับแถวตารางแบบไฮไลท์สีอ่อนๆ */
.download-table tbody tr:nth-child(even) {
    background-color: #fdfefe;
}

.download-table tbody tr:hover {
    background-color: #f4f9fc; /* ไฮไลท์สีฟ้าสว่างเมื่อเมาส์ชี้ */
}

/* ตัวช่วยจัดสไตล์ข้อความย่อย */
.text-center { text-align: center !important; }
.color-gray { color: #94a3b8; }
.file-icon { margin-right: 6px; font-size: 16px; }

/* 💡 สไตล์ปุ่มดาวน์โหลด (Download Button) */
.btn-download {
    display: inline-block;
    background-color: #0284c7;
    color: #ffffff;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid #0284c7;
}

.btn-download:hover {
    background-color: #0369a1;
    border-color: #0369a1;
    box-shadow: 0 2px 6px rgba(2,132,199,0.2);
}

/* ==========================================
   ส่วนควบคุมหน้าดาวน์โหลดบนหน้าจอมือถือ (Responsive)
   ========================================== */
@media (max-width: 768px) {
    .download-table th,
    .download-table td {
        padding: 12px 15px; /* ลดระยะขอบตารางลงบนจอเล็ก */
        font-size: 13px;
    }
    
    .btn-download {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .download-page-section {
        margin: 25px auto 60px auto;
    }
}

/* ==========================================
   💡 สไตล์หน้าประกาศอัตราดอกเบี้ย (Interest Rates)
   ========================================== */
.rates-page-section {
    margin: 40px auto 80px auto;
}

/* กล่องแจ้งประกาศวันมีผลบังคับใช้งาน */
.alert-info-box {
    background-color: #f0f9ff;
    border-left: 5px solid #0284c7;
    padding: 16px 20px;
    border-radius: 4px 8px 8px 4px;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(2,132,199,0.02);
}

.alert-icon {
    font-size: 20px;
}

.alert-info-box p {
    font-size: 14px;
    color: #0369a1;
    margin: 0;
    line-height: 1.5;
}

/* จุดเน้นสีหัวข้อตารางฝั่งดอกเบี้ยเงินฝาก (สีฟ้าสดใส) */
.highlight-th {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border-bottom: 2px solid #0284c7 !important;
}

/* จุดเน้นสีหัวข้อตารางฝั่งดอกเบี้ยเงินกู้ (สีฟ้าน้ำทะเลลึก) */
.highlight-th-loan {
    background-color: #f0fdf4 !important; /* เลือกคุมธีมสีเขียว/ฟ้าอ่อนซอฟต์สบายใจ */
    color: #166534 !important;
    border-bottom: 2px solid #22c55e !important;
}

/* คลาสช่วยควบคุมฟอนต์ตัวหนาและเน้นรหัสสีหลัก */
.text-bold {
    font-weight: 700;
    font-size: 15px;
}

.color-primary {
    color: #0284c7; /* สีดอกเบี้ยเงินฝากใหม่ */
}

.color-loan {
    color: #15803d; /* สีดอกเบี้ยเงินกู้ใหม่ (ใช้โทนสีเขียวสลับเพื่อสื่อความหมายดอกเบี้ยลดลง) */
}

/* ==========================================
   ส่วนควบคุมการแสดงผลเพิ่มเติมบนหน้าจอมือถือ
   ========================================== */
@media (max-width: 768px) {
    .alert-info-box {
        padding: 12px 15px;
        align-items: flex-start; /* บนมือถือให้ไอคอนอยู่ชิดขอบบน */
    }
    
    .alert-info-box p {
        font-size: 13px;
    }
    
    .rates-page-section {
        margin: 25px auto 60px auto;
    }
}

/* ==========================================
   💡 สไตล์หน้ากราฟแสดงผลและแดชบอร์ดสถิติ (Charts Dashboard)
   ========================================== */
.charts-page-section {
    margin: 40px auto 80px auto;
}

/* 1. กล่องสรุปข้อมูลตัวเลขด่วน (Stat Cards Layout) */
.stat-cards-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background-color: #ffffff;
    flex: 1;
    padding: 22px 25px;
    border-radius: 12px;
    border: 1px solid #e0f2fe;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-card h4 {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #0369a1; /* สีตัวเลขหลักโทนฟ้าเข้มเด่น */
    line-height: 1.2;
}

.stat-trend {
    font-size: 12px;
    font-weight: 600;
}

.trend-up {
    color: #166534; /* สีเขียวบอกเปอร์เซ็นต์ที่ขยับเติบโตขึ้น */
}

/* 2. กล่องควบคุมตารางจัดวางกราฟ (Charts Layout Grid) */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* แบ่งครึ่งฝั่งละ 1 กราฟเรียงกัน */
    gap: 30px;
}

.chart-box {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.chart-header {
    border-left: 4px solid #0284c7;
    padding-left: 10px;
    margin-bottom: 25px;
}

.chart-header h3 {
    font-size: 16px;
    color: #1e293b;
    font-weight: 600;
}

/* กล่องบังคับสัดส่วนเพื่อป้องกันไม่ให้แคนวาสขยายตัวจนหน้าเว็บเพี้ยน */
.chart-wrapper {
    position: relative;
    width: 100%;
    height: 300px; /* ระบุความสูงคงที่ของพื้นที่กราฟวิเคราะห์ */
}

/* ==========================================
   ส่วนควบคุมระบบกราฟแดชบอร์ดบนหน้าจอมือถือ (Responsive)
   ========================================== */
@media (max-width: 992px) {
    /* หน้าจอขนาดกลาง ยุบตัวกราฟให้เรียงต่อเป็นแนวดิ่งตอนลึก */
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* หน้าจอมือถือเล็ก ยุบกล่องสรุปตัวเลขให้อยู่แถวตั้งแนวดิ่งเดี่ยว */
    .stat-cards-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .chart-box {
        padding: 18px;
    }
    
    .chart-wrapper {
        height: 250px; /* ลดความสูงของพื้นที่กราฟลงเล็กน้อยเพื่อให้พอดีจอมือถือ */
    }
    
    .charts-page-section {
        margin: 25px auto 60px auto;
    }
}


