*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Sarabun',sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{
    background:
    linear-gradient(rgba(2,18,44,0.88),rgba(2,18,44,0.92)),
    url('https://images.unsplash.com/photo-1520607162513-77705c0f0d4a?q=80&w=1920&auto=format&fit=crop');
    background-size:cover;
    background-attachment:fixed;
    background-position:center;
    color:white;
    overflow-x:hidden;
}

/* เอฟเฟกต์ประกาย */
body::before{
    content:'';
    position:fixed;
    width:100%;
    height:100%;
    background-image: radial-gradient(rgba(255,215,0,0.12) 1px, transparent 1px);
    background-size:40px 40px;
    opacity:0.4;
    z-index:-1;
    animation:stars 25s linear infinite;
}

@keyframes stars{
    from{ transform:translateY(0px); }
    to{ transform:translateY(-300px); }
}

/* ================= TOPBAR ================= */
.topbar{
    width:100%;
    background:#03152d;
    padding:12px 6%;
    text-align:right;
    color:#ffd76a;
    font-size:17px;
    font-weight:600;
    border-bottom:1px solid rgba(255,215,0,0.2);
}

/* ================= BURGER MENU ================= */
/* ซ่อนปุ่ม Burger ในหน้าจอคอมพิวเตอร์ */
.menu-toggle {
    display: none;
    color: #ffd76a;
    font-size: 32px;
    cursor: pointer;
    transition: 0.3s;
}

.menu-toggle:hover {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

/* ================= HEADER ================= */
header{
    width:100%;
    position:sticky;
    top:0;
    z-index:999;
    background:rgba(3,21,45,0.92);
    backdrop-filter:blur(10px);
    border-bottom:1px solid rgba(255,215,0,0.2);
}

.navbar{
    width:100%;
    padding:18px 6%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
}

/* LOGO */
.logo{
    display:flex;
    align-items:center;
    gap:15px;
}

.logo img{
    width:75px;
    height:75px;
    border-radius:50%;
    object-fit:cover;
    /*border:3px solid #ffd76a;*/
    /*background:white;*/
    box-shadow: 0 0 20px rgba(255,215,0,0.5);
}

.logo-text h1{
    font-size:38px;
    color:#ffd76a;
}

.logo-text span{
    color:#dce9ff;
    font-size:16px;
}

/* MENU */
.menu{
    display:flex;
    gap:20px;
    flex-wrap:wrap;
}

.menu a{
    text-decoration:none;
    color:white;
    font-size:18px;
    font-weight:600;
    transition:0.3s;
    padding:10px 12px;
    border-radius:50px;
}

.menu a:hover{
    background:#ffd76a;
    color:#03152d;
    box-shadow: 0 0 20px rgba(255,215,0,0.6);
}

/* ================= HERO & SLIDER ================= */
.hero {
    position: relative; 
    width: 100%;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    overflow: hidden; 
}

.background-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0; 
    transition: opacity 1s ease-in-out; 
}

.slide.active {
    opacity: 1;
}

.background-slider::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
}

.hero-content{
    position: relative;
    z-index: 2; 
    max-width:1200px;
}

.hero-content h2{
    font-size:90px;
    color:#ffd76a;
    margin-bottom:25px;
    text-shadow: 0 0 25px rgba(255,215,0,0.6);
}

.hero-content p{
    font-size:28px;
    line-height:2;
    color:#eef5ff;
}

/* ================= SECTION GLOBALS ================= */
section{
    padding:111px 6% 50px 6%;
}

section.contact{
    padding:50px 6% 50px 6%;
}

.section-title{
    text-align:center;
    margin-bottom:50px;
}

.section-title h2{
    font-size:58px;
    color:#ffd76a;
    text-shadow: 0 0 15px rgba(255,215,0,0.4);
}

.line{
    width:130px;
    height:5px;
    margin:18px auto 0;
    border-radius:50px;
    background: linear-gradient(90deg, #ffd76a, #fff0b3);
    box-shadow: 0 0 20px rgba(255,215,0,0.7);
}

/* ================= SERVICES ================= */
.service-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:40px;
}

.service-link{
    text-decoration:none;
    color:white;
    display:block;
}

/* ชั้นนอก: รับหน้าที่ drop-shadow อย่างเดียว */
/* ชั้นนอก: รับหน้าที่เงาอย่างเดียว */
.hex-wrapper {
    position: relative;
    display: inline-block;
    filter: drop-shadow(4px 8px 12px rgba(0,0,0,0.7));
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* ชั้นล่าง — สีเข้มกว่า จำลองด้านล่างของความหนา */
.hex-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
    background: linear-gradient(145deg, #1a5fd4, #020c20);
    transform: translate(4px, 6px);  /* เลื่อนลงมาด้านหลัง */
    z-index: 0;
}

.hex-wrapper:hover {
    transform: translateY(-12px);
    filter: drop-shadow(10px 14px 18px rgba(0, 0, 0, 0.75));
}

/* ชั้นใน: clip-path + พวก hover อื่นๆ เหมือนเดิม */
.hex-box {
    clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
    background: linear-gradient(
        135deg,
        #1a6bff 0%,       /* มุมซ้ายบน สว่าง */
        #0c3878 40%,      /* กลาง */
        #051c3d 100%      /* มุมขวาล่าง มืด */
    );
    position: relative;
    z-index: 1;           /* อยู่เหนือ ::before */
    min-height: 420px;
    padding: 70px 60px;
    text-align: center;
    overflow: hidden;
    transition: transform 0.4s;
}

.hex-box:hover {
    /* transform: translateY(-12px); */
    /* ลบ box-shadow ออก เพราะย้ายไปอยู่ที่ hex-wrapper แล้ว */
}

.hex-box {
    clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
    background: 
        /* ไฮไลท์แสงซ้ายบน */
        radial-gradient(ellipse at 35% 25%, rgba(255,255,255,0.25) 0%, transparent 50%),
        /* เงาขวาล่าง */
        radial-gradient(ellipse at 70% 80%, rgba(0,0,0,0.4) 0%, transparent 50%),
        /* สีพื้นเดิม */
        linear-gradient(145deg, rgba(12,55,120,0.95), rgba(5,28,61,0.95));

    min-height: 420px;
    padding: 70px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: 0.4s;
}

.hex-box:hover{
    /* transform:translateY(-12px); */
    box-shadow: 0 0 30px rgba(255,215,0,0.25);
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 1))
            drop-shadow(0 0 60px rgba(255, 215, 0, 0.5));
}

.circle-ring {
    width: 135px;
    height: 135px;
    border-radius: 50%;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 28px;
    animation: rotate 10s linear infinite;
    animation-play-state: paused; 
    background: conic-gradient(#ffd76a, #fff0b3, #ffd76a, #fff7d1, #ffd76a);
    box-shadow: 0 0 25px rgba(255,215,0,0.8), 0 0 50px rgba(255,215,0,0.4);
    transition: box-shadow 0.4s ease-in-out;
}

.circle-ring::before{
    content:'';
    position:absolute;
    inset:-15px;
    border-radius:50%;
    background: radial-gradient(circle, rgba(255,215,0,0.4), transparent 70%);
    z-index:-1;
    animation:glow 2s ease-in-out infinite;
}

.circle-inner {
    width: 105px;
    height: 105px;
    background: #082252;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s ease-in-out, background-color 0.4s ease-in-out;
}

.circle-inner i {
    font-size: 48px;
    color: #ffd76a;
    animation: reverse 10s linear infinite;
    animation-play-state: paused; 
    transition: text-shadow 0.4s ease-in-out, color 0.4s ease-in-out;
}

/* Hover Effects */
.hex-box:hover .circle-ring,
.hex-box:hover .circle-inner i {
    animation-play-state: running;
}

.hex-box:hover .circle-inner {
    transform: scale(1.15);
    background: #0c337a; 
}

.hex-box:hover .circle-ring {
    box-shadow: 0 0 35px rgba(255,215,0,1), 0 0 70px rgba(255,215,0,0.6);
}

.hex-box:hover .circle-inner i {
    color: #ffffff; 
    text-shadow: 0 0 15px rgba(255,215,0,0.9), 0 0 30px rgba(255,215,0,0.6);
}

.hex-box h3 {
    font-size: 24px; /* ลดขนาดหัวข้อลงเล็กน้อย เพื่อให้บรรทัดไม่ซ้อนกัน */
    color: #ffd76a;
    margin-bottom: 8px; /* ลดระยะห่างระหว่างหัวข้อกับคำโปรย */
    padding: 0 10px; /* กันไม่ให้ข้อความชนขอบ */
}

.hex-box p {
    font-size: 15px; 
    line-height: 1.6; /* หัวใจสำคัญ: ลดความห่างบรรทัดลง (เดิม 2) ช่วยประหยัดพื้นที่ได้มาก */
    color: #eef5ff;
    padding: 0 20px; /* บีบข้อความซ้าย-ขวาเข้ามา ไม่ให้โดนขอบเฉียงๆ ตัด */
}

@keyframes glow{
    0%{ transform:scale(0.9); opacity:0.6; }
    50%{ transform:scale(1.1); opacity:1; }
    100%{ transform:scale(0.9); opacity:0.6; }
}

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

@keyframes reverse{
    from{ transform:rotate(0deg); }
    to{ transform:rotate(-360deg); }
}

/* ================= NEWS ================= */
.news-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:35px;
}

.news-card{
    background:rgba(255,255,255,0.08);
    backdrop-filter:blur(10px);
    border-radius:30px;
    overflow:hidden;
    transition:0.4s;
    border:1px solid rgba(255,215,0,0.15);
}

.news-card:hover{
    transform:translateY(-10px);
}

.news-card img{
    width:100%;
    height:240px;
    object-fit:cover;
}

.news-content{
    padding:25px;
}

.news-date{
    color:#ffd76a;
    margin-bottom:14px;
}

.news-content h3{
    font-size:27px;
    margin-bottom:14px;
    color:#ffd76a;
}

.news-content p{
    line-height:1.9;
    color:#d7efff;
}

/* ตั้งค่าลิงก์ที่อยู่ด้านในของการ์ดข่าวสาร */
.news-card a {
    text-decoration: none; /* ยกเลิกเส้นใต้ ไม่ว่าจะตอนปกติ ตอนกด หรือหลังกด */
    color: inherit; /* สั่งให้สีของตัวหนังสืออิงตามที่ตั้งค่าไว้ในการ์ด ไม่เปลี่ยนเป็นสีม่วง */
    display: block; /* ทำให้พื้นที่ของลิงก์กางออกเต็มขนาดของการ์ด */
}

/* หากต้องการให้มั่นใจว่าหัวข้อ (h3) หรือข้อความ (p) จะไม่มีเส้นใต้ติดมาด้วย */
.news-card a:hover, 
.news-card a:active, 
.news-card a:visited {
    text-decoration: none;
}

/* ================= MANUAL ================= */
.manual-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

/* เปลี่ยน .manual-card ให้เป็นแท็ก <a> ที่คลิกได้ทั้งกล่อง */
.manual-card {
    display: block; /* ให้ <a> แสดงผลเต็มกล่อง */
    text-decoration: none; /* เอาเส้นใต้ลิงก์ออก */
    background: rgba(255, 255, 255, 0.05); /* พื้นหลังโปร่งแสงนิดๆ */
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.15);
    
    /* ตั้งค่า transition เพื่อความนุ่มนวลเวลาเกิด effect ทุกอย่าง */
    transition: all 0.4s ease-in-out;
}

/* --- เอฟเฟกต์ตอนนำเมาส์ไปชี้ที่กล่อง (Hover) --- */
.manual-card:hover {
    transform: translateY(-15px); /* ยกลอยขึ้นมากกว่าเดิมเล็กน้อย */
    background: rgba(255, 255, 255, 0.12); /* พื้นหลังสว่างขึ้น */
    border-color: rgba(255, 215, 0, 0.6); /* ขอบสว่างขึ้น */
    
    /* เพิ่มเงา 2 ชั้น: เงาดำสร้างมิติ + เงาสีทองเรืองแสง */
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(255, 215, 0, 0.25);
}

/* การตั้งค่าไอคอน */
.manual-card i {
    font-size: 60px;
    color: #ffd76a;
    margin-bottom: 20px;
    transition: transform 0.4s ease, color 0.4s ease, text-shadow 0.4s ease;
}

/* เอฟเฟกต์ของไอคอนเมื่อชี้ที่กล่อง */
.manual-card:hover i {
    transform: scale(1.15); /* ไอคอนเด้งขยายใหญ่ขึ้น */
    color: #ffffff; /* เปลี่ยนเป็นสีขาว */
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8); /* แสงเรืองรองรอบไอคอน */
}

/* การตั้งค่าหัวข้อ */
.manual-card h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #ffd76a;
    transition: color 0.4s ease;
}

/* เอฟเฟกต์หัวข้อและข้อความเมื่อชี้ที่กล่อง */
.manual-card:hover h3 {
    color: #ffffff; /* ตัวหนังสือสว่างขึ้น */
}

.manual-card p {
    line-height: 1.9;
    color: #d7efff;
    transition: color 0.4s ease;
}

.manual-card:hover p {
    color: #ffffff; /* ข้อความอ่านง่ายขึ้นเมื่อ hover */
}

/* ================= BUTTONS ================= */
.more-btn{
    text-align:center;
    margin-top:50px;
}

.more-btn a{
    display:inline-block;
    padding:16px 48px;
    border-radius:50px;
    text-decoration:none;
    color:#03152d;
    background: linear-gradient(145deg, #ffd76a, #fff0b3);
    font-size:21px;
    font-weight:bold;
    transition:0.3s;
}

.more-btn a:hover{
    transform:translateY(-5px);
    box-shadow: 0 0 25px rgba(255,215,0,0.6);
}

/* ================= JOURNAL ================= */
.file-list{
    max-width:1100px;
    margin:auto;
}

.file-item{
    background:rgba(255,255,255,0.08);
    border-radius:25px;
    padding:28px 30px;
    margin-bottom:25px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border:1px solid rgba(255,215,0,0.15);
    transition:0.3s;
}

.file-item:hover{
    transform:scale(1.02);
}

.file-left{
    display:flex;
    align-items:center;
    gap:20px;
}

.file-left i{
    font-size:42px;
    color:#ff6b6b;
}

.file-left span{
    font-size:22px;
}

.download{
    font-size:35px;
    color:#ffd76a;
}

/* ================= CONTACT ================= */
.contact{
    background: linear-gradient(145deg, rgba(3,21,45,0.95), rgba(12,55,120,0.95));
    border-top-left-radius:80px;
    border-top-right-radius:80px;
    text-align:center;
}

.contact-icon{
    font-size:90px;
    color:#ffd76a;
    margin-bottom:30px;
}

.contact h3{
    font-size:42px;
    margin-bottom:20px;
    color:#ffd76a;
}

.contact p{
    font-size:23px;
    line-height:2;
}

/* ================= FOOTER ================= */
footer{
    background:#021126;
    text-align:center;
    padding:35px;
    color:#ffd76a;
    font-size:21px;
    border-top:1px solid rgba(255,215,0,0.2);
}

/* ================= RESPONSIVE ================= */
@media(max-width:1200px){
    .service-grid,
    .news-grid,
    .manual-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:768px){
    .service-grid,
    .news-grid,
    .manual-grid{
        grid-template-columns:1fr;
    }
    .hero-content h2{ font-size:52px; }
    .hero-content p{ font-size:20px; }
    .section-title h2{ font-size:40px; }
    .navbar{ flex-direction:column; gap:20px; }
    .menu{ justify-content:center; }
    
    /* ================= RESPONSIVE ================= */
    @media(max-width: 768px){
        /* แสดงปุ่ม Burger บนมือถือ */
        .menu-toggle {
            display: block;
        }

        /* ปรับเปลี่ยนเมนูให้เป็นแบบ Dropdown */
        .menu {
            flex-direction: column;
            width: 100%;
            background: rgba(3, 21, 45, 0.98); 
            position: absolute;
            top: 100%; 
            left: 0;
            gap: 0;
            
            /* เปลี่ยนมาใช้เทคนิค Fade & Glide เพื่อความลื่นไหล */
            visibility: hidden;
            opacity: 0;
            transform: translateY(-20px); /* ให้เมนูแอบอยู่ด้านบนนิดนึงตอนซ่อน */
            
            /* ใช้ transition กับ opacity และ transform รับรองว่าสมูทแน่นอน */
            transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
            
            /* เพิ่มเงาด้านล่างให้เมนูดูลอยขึ้นมา มีมิติมากขึ้น */
            box-shadow: 0 10px 20px rgba(0,0,0,0.5); 
        }

        /* เมื่อเมนูถูกเปิด */
        .menu.active {
            visibility: visible;
            opacity: 1;
            transform: translateY(0); /* เลื่อนกลับมาตำแหน่งปกติแบบนุ่มนวล */
        }

        /* ปรับแต่งปุ่มลิงก์ในเมนูมือถือ */
        .menu a {
            display: block;
            padding: 15px 20px;
            border-radius: 0; 
            border-bottom: 1px solid rgba(255, 215, 0, 0.1); 
            text-align: center;
        }

        .menu a:hover {
            background: rgba(255, 215, 0, 0.15);
            box-shadow: none; 
        }
    }
}

/* ======================================================= */
/* ====== ส่วนที่เพิ่มเติมเข้ามาสำหรับหน้า JOURNAL (วารสาร) ====== */
/* ======================================================= */

/* ================= PAGE TITLE ================= */

.page-title{

    text-align:center;

    padding:70px 20px 30px;
}

.page-title h1{

    font-size:72px;

    color:#ffd76a;

    margin-bottom:20px;

    text-shadow:
    0 0 20px rgba(255,215,0,0.4);
}

.page-title p{

    font-size:24px;

    color:#eef5ff;

    max-width:900px;

    margin:auto;

    line-height:1.9;
}

/* ================= CONTAINER ================= */

.container{

    width:100%;
    max-width:1200px;

    margin:auto;

    padding:20px;
}

/* ================= SEARCH ================= */

.search-box{

    position:relative;

    margin-bottom:45px;
}

.search-box input{

    width:100%;

    padding:22px 70px 22px 28px;

    border:none;

    border-radius:60px;

    background:
    rgba(255,255,255,0.08);

    backdrop-filter:blur(12px);

    border:1px solid rgba(255,215,0,0.15);

    color:white;

    font-size:20px;

    outline:none;

    transition:0.3s;
}

.search-box input:focus{

    border:1px solid rgba(255,215,0,0.5);

    box-shadow:
    0 0 20px rgba(255,215,0,0.15);
}

.search-box input::placeholder{

    color:#d7e4ff;
}

.search-box i{

    position:absolute;

    right:28px;
    top:50%;

    transform:translateY(-50%);

    color:#ffd76a;

    font-size:24px;
}

/* ================= FILTER ================= */

.filter-buttons{

    display:flex;

    justify-content:center;

    gap:16px;

    flex-wrap:wrap;

    margin-bottom:55px;
}

.filter-btn{

    padding:14px 28px;

    border:none;

    border-radius:50px;

    background:
    rgba(255,255,255,0.08);

    color:white;

    font-size:18px;
    font-weight:700;

    cursor:pointer;

    backdrop-filter:blur(10px);

    border:1px solid rgba(255,215,0,0.15);

    transition:0.3s;
}

.filter-btn:hover,
.filter-btn.active{

    background:
    linear-gradient(
    145deg,
    #ffd76a,
    #fff1a8);

    color:#03152d;

    transform:translateY(-3px);

    box-shadow:
    0 0 18px rgba(255,215,0,0.35);
}

/* ================= DOCUMENT LIST ================= */

.document-list{

    display:flex;
    flex-direction:column;

    gap:28px;
    padding-bottom: 4rem;
}

/* ================= CARD ================= */

.doc-card{

    background:
    rgba(255,255,255,0.08);

    border:1px solid rgba(255,215,0,0.15);

    backdrop-filter:blur(12px);

    border-radius:35px;

    padding:30px 28px;

    display:flex;
    justify-content:space-between;
    align-items:center;

    gap:25px;

    transition:0.35s;

    position:relative;

    overflow:hidden;
}

.doc-card::before{

    content:'';

    position:absolute;

    top:0;
    left:-100%;

    width:100%;
    height:100%;

    background:
    linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.08),
    transparent);

    transition:0.8s;
}

.doc-card:hover::before{

    left:100%;
}

.doc-card:hover{

    transform:translateY(-8px);

    border:1px solid rgba(255,215,0,0.35);

    box-shadow:
    0 0 30px rgba(255,215,0,0.15);
}

.doc-left{

    display:flex;
    align-items:center;

    gap:22px;

    flex:1;
}

.pdf-icon{

    font-size:62px;

    color:#ff6868;

    filter:drop-shadow(0 0 10px rgba(255,80,80,0.4));
}

.doc-text h3{

    font-size:31px;

    margin-bottom:10px;

    color:#ffffff;
}

.doc-meta{

    display:flex;

    gap:20px;

    flex-wrap:wrap;

    color:#ffe48d;

    font-size:16px;
}

/* ================= ACTIONS ================= */

.doc-actions{

    display:flex;

    align-items:center;

    gap:16px;
}

.action-btn{

    width:62px;
    height:62px;

    border:none;

    border-radius:50%;

    cursor:pointer;

    font-size:23px;

    color:#03152d;

    background:
    linear-gradient(
    145deg,
    #ffd76a,
    #fff0b3);

    transition:0.3s;
}

.action-btn:hover{

    transform:scale(1.12);

    box-shadow:
    0 0 18px rgba(255,215,0,0.4);
}

/* ================= DETAIL ================= */

.detail-box{

    margin-top:22px;

    display:none;

    padding:22px;

    border-radius:24px;

    background:
    rgba(255,255,255,0.05);

    border:1px solid rgba(255,215,0,0.12);

    line-height:2;

    color:#eef5ff;
}

.detail-box ul{

    padding-left:20px;
}

/* ================= BUTTON ================= */

.more-section{

    text-align:center;

    margin-top:70px;
}

/* ================= RESPONSIVE (หน้าวารสาร) ================= */

@media(max-width:900px){

    .doc-card{

        flex-direction:column;
        align-items:flex-start;
    }

    .doc-actions{

        width:100%;

        justify-content:flex-end;
    }

    .page-title h1{

        font-size:48px;
    }

    .doc-text h3{

        font-size:24px;
    }
}

@media(max-width:600px){

    .page-title h1{

        font-size:38px;
    }

    .doc-left{

        flex-direction:column;
        align-items:flex-start;
    }

    .pdf-icon{

        font-size:50px;
    }

    .search-box input{

        font-size:16px;
    }

    .filter-btn{

        font-size:16px;
    }
}

/* ========================================================= */
/* ================= PAGINATION (ระบบแบ่งหน้า) ================ */
/* ========================================================= */

/* ลบจุดไข่ปลาและจัดให้อยู่แนวนอนตรงกลาง */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 12px;
    padding: 0;
    margin: 0;
}

/* หน้าตาปุ่มตัวเลขปกติ */
.pagination .page-item .page-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: #eef5ff;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

/* เอฟเฟกต์เวลาเอาเมาส์ชี้ และ หน้าที่กำลังเปิดอยู่ (Active) */
.pagination .page-item.active .page-link,
.pagination .page-item .page-link:hover {
    background: linear-gradient(145deg, #ffd76a, #fff0b3);
    color: #03152d;
    border-color: #ffd76a;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    transform: translateY(-3px);
}

/* ซ่อนปุ่ม Previous/Next ถ้าไปต่อไม่ได้ (Disabled) */
.pagination .page-item.disabled .page-link {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.02);
}

/* ========================================================= */
/* ================= หน้าบุคลากร (STAFF PAGE) ============== */
/* ========================================================= */

/* ================= STAFF HERO ================= */
.staff-hero {
    padding: 100px 6% 50px;
    text-align: center;
}

.staff-hero h2 {
    font-size: 78px;
    color: #ffd76a;
    margin-bottom: 25px;
    text-shadow: 0 0 25px rgba(255,215,0,0.6);
}

.staff-hero p {
    font-size: 25px;
    color: #eef5ff;
    line-height: 2;
    max-width: 1000px;
    margin: auto;
}

/* ================= STAFF SECTION TITLE ================= */
.staff-section-title {
    text-align: center;
    margin: 80px 0 50px;
}

.staff-section-title h3 {
    display: inline-block;
    padding: 18px 55px;
    border-radius: 18px;
    background: linear-gradient(145deg, #0c4f92, #120447);
    font-size: 40px;
    color: white;
    box-shadow: 0 0 25px rgba(0,0,0,0.3);
}

/* ================= BOSS CARD ================= */
.boss-section {
    padding: 0 6%;
}

.boss-card {
    max-width: 700px;
    margin: auto;
    background: linear-gradient(145deg, rgba(5,28,61,0.95), rgba(10,55,115,0.95));
    border-radius: 45px;
    padding: 50px;
    text-align: center;
    border: 2px solid rgba(255,215,0,0.2);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
}

.boss-card::before {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(rgba(255,215,0,0.18), transparent);
    top: -80px;
    right: -80px;
    filter: blur(30px);
}

.boss-img {
    width: 200px;
    height: 200px;
    margin: auto;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid #ffd76a;
    box-shadow: 0 0 25px rgba(255,215,0,0.5);
    margin-bottom: 30px;
}

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

.boss-card h4 {
    font-size: 45px;
    color: #ffd76a;
    margin-bottom: 10px;
}

.boss-position {
    font-size: 24px;
    color: #eef5ff;
    margin-bottom: 18px;
}

.boss-phone {
    font-size: 22px;
    color: #ffd76a;
    margin-bottom: 30px;
}

.detail-btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    background: linear-gradient(145deg, #ffd76a, #fff0b3);
    color: #03152d;
    font-size: 20px;
    font-weight: bold;
    transition: 0.3s;
}

.detail-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(255,215,0,0.5);
}

/* ================= STAFF GRID ================= */
.staff-section {
    padding: 0 6% 80px;
}

.staff-grid {
    display: flex;             /* เปลี่ยนจาก grid เป็น flex */
    flex-wrap: wrap;           /* ให้ขึ้นบรรทัดใหม่เมื่อพื้นที่ไม่พอ */
    justify-content: center;   /* จัดกลางแนวนอน */
    gap: 35px;                 /* ช่องว่างระหว่างการ์ด */
}

.staff-card {
    flex: 0 0 calc(25% - 35px); /* 25% คือ 4 คนต่อแถว หักลบช่องว่าง (gap) */
    background: linear-gradient(145deg, rgba(5,28,61,0.95), rgba(10,55,115,0.95));
    border-radius: 35px;
    padding: 35px 25px;
    text-align: center;
    border: 1px solid rgba(255,215,0,0.2);
    transition: 0.4s;
    position: relative;
    overflow: hidden;
}

.staff-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 0 30px rgba(255,215,0,0.2);
}

.staff-card::before {
    content: '';
    position: absolute;
    width: 400px; 
    height: 400px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.25) 0%, rgba(255, 215, 0, 0) 70%);
    filter: blur(30px);
    top: -140px;
    left: -140px;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.8;
}

.staff-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    margin: auto;
    border: 5px solid #ffd76a;
    box-shadow: 0 0 20px rgba(255,215,0,0.5);
    margin-bottom: 22px;
}

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

.staff-card h4 {
    font-size: 28px;
    color: #ffd76a;
    margin-bottom: 10px;
}

.staff-position {
    font-size: 18px;
    color: #dce9ff;
    margin-bottom: 15px;
}

.staff-phone {
    font-size: 18px;
    color: #ffd76a;
    margin-bottom: 20px;
}

.tag-box {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.tag-box span {
    padding: 8px 14px;
    border-radius: 50px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,215,0,0.2);
    font-size: 14px;
    color: #eef5ff;
}

/* ================= STAFF CONTACT ================= */
.staff-contact {
    margin: 0 6% 80px;
    padding: 70px 40px;
    border-radius: 40px;
    text-align: center;
    background: linear-gradient(145deg, rgba(5,28,61,0.95), rgba(12,55,120,0.95));
    border: 1px solid rgba(255,215,0,0.2);
}

.staff-contact i {
    font-size: 80px;
    color: #ffd76a;
    margin-bottom: 25px;
    display: block;
}

.staff-contact h3 {
    font-size: 45px;
    color: #ffd76a;
    margin-bottom: 20px;
}

.staff-contact p {
    font-size: 23px;
    line-height: 2;
    color: #eef5ff;
}

.staff-tag-box {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ================= BOTTOM BACK ================= */
.bottom-back {
    text-align: center;
    margin-bottom: 80px;
}

.bottom-back a {
    display: inline-block;
    padding: 18px 45px;
    border-radius: 50px;
    text-decoration: none;
    background: linear-gradient(145deg, #ffd76a, #fff0b3);
    color: #03152d;
    font-size: 22px;
    font-weight: bold;
    transition: 0.3s;
}

.bottom-back a:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(255,215,0,0.5);
}

/* ================= STAFF RESPONSIVE ================= */
@media(max-width: 1200px) {
    .staff-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 768px) {
    .staff-hero h2 {
        font-size: 50px;
    }
    .staff-hero p {
        font-size: 20px;
    }
    .staff-section-title h3 {
        font-size: 28px;
        padding: 14px 30px;
    }
    .boss-card h4 {
        font-size: 32px;
    }
    .staff-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 1. จัดการหน้า Staff (หน้าจอคอมปกติ) --- */
.staff-grid {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center; /* จัดการ์ดให้อยู่กึ่งกลางเสมอ */
    gap: 30px;
}

.staff-card {
    flex: 1 1 calc(33.333% - 20px) !important; /* บังคับความกว้างให้อยู่ที่ 3 คอลัมน์ */
    max-width: calc(33.333% - 20px) !important;
    min-width: 280px;
    box-sizing: border-box;
}

.staff-card h4 {
    white-space: nowrap !important; /* บังคับชื่อ-นามสกุล ไม่ให้ขึ้นบรรทัดใหม่ */
    font-size: 22px;
    overflow: hidden;
    text-overflow: ellipsis; /* ใส่ ... หากชื่อยาวเกินกรอบ */
}

/* --- 2. ส่วนของการรองรับหน้าจอมือถือ (Responsive) ---- */
@media(max-width: 768px) {
    footer { font-size: 16px; }
    .contact h3 { font-size: 20px; }
    .contact p { font-size: 16px; }
    .file-left span { font-size: 16px; }
    /* ปรับขนาด Header & Topbar */
    .topbar { text-align: center; font-size: 14px; padding: 10px; }
    .logo img { width: 50px; height: 50px; }
    .logo-text h1 { font-size: 22px; }
    .logo-text span { font-size: 14px; }
    .navbar { padding: 15px 5%; flex-direction: column; gap: 20px; }
    
    /* ตั้งค่าเมนู Burger มือถือให้เลื่อนลงมา */
    .menu-toggle { display: block !important; }
    .menu {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        background: rgba(3, 21, 45, 0.98);
        position: absolute;
        top: 100%;
        left: 0;
        gap: 0;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
        z-index: 9999;
    }
    .menu.active {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }
    .menu a {
        display: block;
        padding: 15px 20px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 215, 0, 0.1);
        text-align: center;
    }
    .menu a:hover { background: rgba(255, 215, 0, 0.15); }

    /* แก้หน้า Document: ให้ช่อง Select ค้นหาหดตัวตามจอมือถือ ไม่ดันจนจอพัง */
    .document-top select { 
        min-width: 100% !important; 
        width: 100%; 
        margin-bottom: 10px; 
    }

    /* แก้หน้า Staff: ให้บุคลากรเรียง 1 แถวแนวตั้งบนจอมือถือ */
    .staff-grid { 
        flex-direction: column;
        align-items: center;
        gap: 20px; 
    }
    .boss-card, .staff-card { 
        flex: unset !important;
        width: 100% !important; 
        max-width: 100% !important; 
        margin: 0 auto; 
    }
    .staff-card h4 { font-size: 18px !important; } /* ลดขนาดชื่อกันล้น */
}