
        /* ส่วนของ CSS สำหรับตกแต่ง */
        body {
            font-family: 'Kanit', sans-serif;
            margin: 0;
            padding: 0;
            color: #333;
        }

        /* 1. Header & Navigation */
        header {
            background-color: #ffffff;
            padding: 1rem 5%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .logo {
            /*font-size: 1.5rem;*/
            font-size: 2.0rem;
            font-weight: 600;
            /*color: #003366;*/ /* สีน้ำเงินเข้มแบบทางการ */
            color: #3c66ff;
        }

        nav a {
            text-decoration: none;
            color: #333;
            margin-left: 20px;
            transition: 0.3s;
        }

        nav a:hover {
            color: #003366;
        }

/* 2. Hero Section — สัดส่วนแบนเนอร์ ~2:1 ปรับตามจอ */
.hero {
    position: relative;
    width: min(100% - 40px, 1280px);
    max-width: 1280px;
    margin: 20px auto;
    aspect-ratio: 2 / 1;
    height: auto;
    min-height: 160px;
    max-height: 640px;
    overflow: hidden;
    display: block;
    color: white;
    border-radius: 15px;
    background: #001a33;
    box-sizing: border-box;
    touch-action: pan-y;
}

.hero-track {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    pointer-events: none;
}

.hero .slide.active {
    opacity: 1;
    z-index: 2;
}

.hero .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 26, 51, 0.45);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, opacity 0.2s ease;
    opacity: 0.85;
    padding: 0;
}

.hero-nav:hover,
.hero-nav:focus-visible {
    background: rgba(0, 43, 107, 0.85);
    opacity: 1;
    outline: 2px solid #ffcc00;
    outline-offset: 2px;
}

.hero-prev { left: 12px; }
.hero-next { right: 12px; }

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.hero-dot {
    pointer-events: auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dot.is-active {
    background: #ffcc00;
    border-color: #ffcc00;
    transform: scale(1.15);
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

@media screen and (max-width: 900px) {
    .hero {
        width: calc(100% - 24px);
        margin: 12px auto;
        border-radius: 12px;
        max-height: none;
    }

    .hero-nav {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .hero-prev { left: 8px; }
    .hero-next { right: 8px; }

    .hero-dots { bottom: 10px; }
}

@media screen and (max-width: 600px) {
    .hero {
        /* มือถือ: ยังใกล้ 2:1 แต่สูงขึ้นเล็กน้อยให้อ่านรูปชัด */
        aspect-ratio: 16 / 9;
        width: calc(100% - 16px);
        margin: 10px auto;
        border-radius: 10px;
        min-height: 140px;
    }

    .hero-nav {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        background: rgba(0, 26, 51, 0.55);
    }

    .hero-dot {
        width: 9px;
        height: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero .slide {
        transition: none;
    }
}

        .btn-primary {
            background-color: #ffcc00; /* สีเหลืองทองตัดกับน้ำเงิน */
            color: #003366;
            padding: 12px 30px;
            border-radius: 5px;
            text-decoration: none;
            font-weight: 600;
            transition: 0.3s;
        }

        .btn-primary:hover {
            background-color: #fff;
        }

                /* 3. News Section */
        .news-container {
            padding: 50px 5%;
            background-color: #f9f9f9;
        }

        .section-title {
            text-align: center;
            margin-bottom: 40px;
            color: #003366;
            font-size: 2rem;
        }

        /* การจัดเรียงการ์ดแบบ Responsive Grid */
        .news-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
        }

        .news-card {
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            transition: transform 0.3s;
        }

        .news-card:hover {
            transform: translateY(-10px); /* เอฟเฟกต์ยกตัวขึ้นเวลาเอาเมาส์วาง */
        }

        .news-card img {
            width: 100%;
            height: 200px;
            object-fit: cover;
        }

        .news-content {
            padding: 20px;
        }

        .news-content h3 {
            margin: 0 0 10px 0;
            font-size: 1.2rem;
            color: #003366;
        }

        .news-content p {
            font-size: 0.9rem;
            color: #666;
            line-height: 1.6;
        }

        .news-content a {
            display: inline-block;
            margin-top: 15px;
            color: #003366;
            text-decoration: none;
            font-weight: 600;
        }

/* สไตล์สำหรับ Dropdown */
.dropdown {
    display: inline-block;
    position: relative;
}

/* start dropdown - menu */
.dropdown-content {
    display: none; /* ซ่อนไว้ก่อน */
    position: absolute;
    background-color: white;
    min-width: 190px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 2000;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    display: block;
    margin: 0;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: #003366;
}

/* แสดงเมนูเมื่อเอาเมาส์ไปวาง */
.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content-1 {
    display: none; /* ซ่อนไว้ก่อน */
    position: absolute;
    background-color: white;
    min-width: 330px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 2000;
}

.dropdown-content-1 a {
    color: #333;
    padding: 12px 16px;
    display: block;
    margin: 0;
    font-size: 0.9rem;
}
.dropdown-content-1 a:hover {
    background-color: #f1f1f1;
    color: #003366;
}

.dropdown:hover .dropdown-content-1 {
    display: block;
}

/* */
.dropdown-content-2 {
    display: none; /* ซ่อนไว้ก่อน */
    position: absolute;
    background-color: white;
    min-width: 260px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 2000;
}

.dropdown-content-2 a {
    color: #333;
    padding: 12px 16px;
    display: block;
    margin: 0;
    font-size: 0.9rem;
}
.dropdown-content-2 a:hover {
    background-color: #f1f1f1;
    color: #003366;
}

.dropdown:hover .dropdown-content-2 {
    display: block;
}

/* */

.dropdown-content-3 {
    display: none; /* ซ่อนไว้ก่อน */
    position: absolute;
    background-color: white;
    min-width: 290px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 2000;
}

.dropdown-content-3 a {
    color: #333;
    padding: 12px 16px;
    display: block;
    margin: 0;
    font-size: 0.9rem;
}
.dropdown-content-3 a:hover {
    background-color: #f1f1f1;
    color: #003366;
}

.dropdown:hover .dropdown-content-3 {
    display: block;
}

/* */
.dropdown-content-4 {
    display: none; /* ซ่อนไว้ก่อน */
    position: absolute;
    background-color: white;
    min-width: 230px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 2000;
}

.dropdown-content-4 a {
    color: #333;
    padding: 12px 16px;
    display: block;
    margin: 0;
    font-size: 0.9rem;
}
.dropdown-content-4 a:hover {
    background-color: #f1f1f1;
    color: #003366;
}

.dropdown:hover .dropdown-content-4 {
    display: block;
}
/* */

/* ปุ่ม Hamburger */
.menu-toggle {
    display: none; /* ซ่อนไว้ในหน้าจอคอม */
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    width: 25px;
    background-color: #003366;
    margin-bottom: 4px;
    border-radius: 2px;
}

/* เมื่อหน้าจอเล็กกว่า 1100px (แท็บเล็ต / มือถือ) — รายละเอียดหลักอยู่ใน style-modern.css */
@media screen and (max-width: 1100px) {
    .menu-toggle {
        display: flex; /* แสดงปุ่ม 3 ขีด */
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        text-align: left;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    nav.active {
        display: flex;
    }

    .dropdown-content,
    .dropdown-content-1,
    .dropdown-content-2,
    .dropdown-content-3,
    .dropdown-content-4 {
        position: static;
        box-shadow: none;
    }

    .dropdown.active .dropdown-content,
    .dropdown.active .dropdown-content-1,
    .dropdown.active .dropdown-content-2,
    .dropdown.active .dropdown-content-3,
    .dropdown.active .dropdown-content-4 {
        display: block !important;
    }
}

.contact-section {
    padding: 50px 5%;
    background-color: #fff;
    text-align: center;
}

.map-responsive {
    overflow: hidden;
    padding-bottom: 40%; /* อัตราส่วนความสูงของแผนที่ */
    position: relative;
    height: 0;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.map-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}

/* ปรับความสูงแผนที่เมื่อดูในมือถือ */
@media screen and (max-width: 768px) {
    .map-responsive {
        padding-bottom: 70%; 
    }
}


.main-footer {
    background-color: #002244;
    color: white;
    padding: 40px 5% 20px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.footer-logo {
    flex-shrink: 0;
    display: block;
    line-height: 0;
}

.footer-logo img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    display: block;
}

.footer-brand-text .footer-url {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 4px;
}

.footer-brand-text h3 {
    margin: 0 0 6px;
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.footer-brand-text .footer-sub {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.92;
    line-height: 1.5;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.28);
    margin-bottom: 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
    gap: 28px 32px;
    margin-bottom: 30px;
}

.footer-col h4 {
    color: #ffcc00;
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 700;
}

.footer-heading-spaced {
    margin-top: 22px !important;
}

.footer-blurb,
.footer-motto {
    margin: 0 0 14px;
    font-size: 0.92rem;
    line-height: 1.7;
    opacity: 0.95;
}

.footer-motto {
    font-weight: 500;
    color: #fff8d6;
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-list li {
    position: relative;
    padding-left: 14px;
    margin-bottom: 6px;
    line-height: 1.55;
}

.footer-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
}

.footer-list a,
.footer-contact a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-list a:hover,
.footer-contact a:hover {
    text-decoration: underline;
}

.footer-contact p {
    margin: 0 0 8px;
    font-size: 0.92rem;
    line-height: 1.7;
}

.footer-contact-name {
    font-weight: 600;
    margin-bottom: 10px !important;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.8rem;
    color: #ccc;
}

.footer-bottom p {
    margin: 4px 0;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .footer-brand {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .footer-brand-text h3 {
        font-size: 1.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.info-card {
    background: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid #003366; /* เส้นขอบด้านซ้ายเป็นสีประจำโรงเรียน */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 0 8px 8px 0;
}

.info-card h3 {
    color: #003366;
    margin-top: 0;
}

.info-card ul {
    padding-left: 20px;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.staff-card {
    background: white;
    text-align: center;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.staff-card:hover {
    transform: translateY(-5px);
}

.staff-img-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%; /* ทำรูปวงกลม */
    overflow: hidden;
    border: 3px solid #003366;
}

.staff-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* บังคับรูปให้พอดีกรอบ ไม่เบี้ยว */
}

.staff-info h4 {
    margin: 10px 0 5px;
    color: #003366;
}

.staff-info p {
    color: #666;
    font-size: 0.9rem;
}

/* จัดวางผู้อำนวยการให้อยู่กึ่งกลาง */
.executive-top {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

/* ปรับให้การ์ดผู้อำนวยการใหญ่ขึ้นเล็กน้อย */
.staff-card.leader {
    max-width: 300px;
    border: 2px solid #ffcc00; /* เพิ่มขอบสีทองให้ดูเด่น */
}

.staff-card.leader .staff-img-container {
    width: 160px; /* ใหญ่กว่ารูปปกติ */
    height: 160px;
}

.staff-card.leader h4 {
    font-size: 1.0rem;
}

.position {
    font-weight: 600;
    color: #003366;
}

/* ส่วนของรองฯ ให้เรียง Grid ตามปกติ */
/*
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}
*/
.staff-grid {
    display: grid;
    /* ปรับเป็น 200px เพื่อให้ 4 กล่อง (800px+) พอดีกับหน้าจอทั่วไป */
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); 
    gap: 20px; /* ลดระยะห่างระหว่างกล่องลงเล็กน้อย */
    justify-content: center; /* สั่งให้กล่องทั้งหมดอยู่กึ่งกลางหน้าจอ */
    
}

.content-section {
    padding-bottom: 80px; /* เพิ่มระยะห่างด้านล่างก่อนถึง Footer */
    min-height: 60vh;    /* ช่วยดัน Footer ลงไปในกรณีที่เนื้อหาในหน้านั้นมีน้อย */
}

.activity-section {
    padding: 50px 0 16px;
    background-color: #fcfcfc;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.activity-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-10px);
}

.activity-img {
    position: relative;
    height: 200px;
}

.activity-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.date-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #003366;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.activity-info {
    padding: 20px;
}

.activity-info h3 {
    font-size: 1.1rem;
    color: #003366;
    margin-bottom: 10px;
}

.activity-info p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    color: #ffcc00;
    font-weight: 600;
    text-decoration: none;
}

/* การจัดหน้าแกลเลอรี่ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding-bottom: 60px;
}

.gallery-item {
    position: relative;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* เอฟเฟกต์ตอนเอาเมาส์วาง (ขยายรูปเล็กน้อย) */
.gallery-item:hover img {
    transform: scale(1.1);
}

/* แถบสีดำจาง ๆ พร้อมชื่อกิจกรรม */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex;
    align-items: flex-end;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: white;
    font-size: 1rem;
    font-weight: 400;
}

/* Container สำหรับเนื้อหาข่าว (บีบให้แคบลงเพื่อให้อ่านง่ายขึ้น) */
.container-small {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
}

.breadcrumb a {
    text-decoration: none;
    color: #003366;
}

.detail-title {
    color: #003366;
    line-height: 1.4;
    margin-bottom: 10px;
}

.detail-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.detail-main-img img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.detail-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.detail-content h3 {
    margin-top: 40px;
    color: #003366;
}

.detail-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.detail-gallery img {
    width: 100%;
    border-radius: 8px;
}

.detail-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-back {
    padding: 10px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
}

.btn-back:hover {
    background: #003366;
    color: white;
}

/* ส่วนตัวกรองหมวดหมู่ */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid #003366;
    background: transparent;
    color: #003366;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
    transition: 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: #003366;
    color: white;
}

/* ส่วนเลขหน้า Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 50px;
}

.page-link {
    padding: 8px 15px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    transition: 0.3s;
}

.page-link.active {
    background: #003366;
    color: white;
    border-color: #003366;
}

.page-link:hover:not(.active) {
    background: #f0f0f0;
}

.announcement-section {
    padding: 16px 0 16px;
    background-color: #ffffff;
}

.announcement-list {
    max-width: 900px;
    margin: 0 auto;
}

.announcement-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
    transition: 0.3s;
}

.announcement-item:hover {
    background-color: #f8f9fa;
    padding-left: 30px; /* เอฟเฟกต์เลื่อนขวาเล็กน้อยเมื่อเอาเมาส์วาง */
}

/* สีพิเศษสำหรับประกาศด่วน */
.announcement-item.urgent {
    border-left: 5px solid #d9534f; /* สีแดงประกาศด่วน */
}

.announce-date {
    background: #003366;
    color: white;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    min-width: 60px;
    margin-right: 25px;
}

.announce-date .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
}

.announce-date .month {
    font-size: 0.8rem;
}

.announce-text {
    flex-grow: 1;
}

.announce-text .category {
    font-size: 0.8rem;
    color: #003366;
    font-weight: 600;
    text-transform: uppercase;
}

.announce-text h3 {
    margin: 5px 0;
    font-size: 1.2rem;
    color: #333;
}

.announce-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #777;
}

.announce-arrow {
    font-size: 1.2rem;
    color: #ccc;
    margin-left: 20px;
}

.btn-outline {
    display: inline-block;
    padding: 10px 25px;
    border: 2px solid #003366;
    color: #003366;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-outline:hover {
    background: #003366;
    color: white;
}

.announce-article {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.article-header {
    margin-bottom: 20px;
}

.badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.badge.urgent { background-color: #d9534f; }

.article-title {
    color: #003366;
    margin: 15px 0;
    line-height: 1.4;
}

.article-meta {
    color: #888;
    font-size: 0.9rem;
}

.article-body {
    margin-top: 30px;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #444;
}

.attachment-box {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px dashed #003366;
    border-radius: 8px;
}

.btn-download-file {
    display: inline-block;
    margin-top: 10px;
    color: #003366;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #003366;
    padding: 8px 16px;
    border-radius: 5px;
}

.btn-download-file:hover {
    background: #003366;
    color: white;
}

.btn-print {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
}

.btn-print:hover { background: #5a6268; }

/* ส่วนค้นหาประกาศ */
.search-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.search-filter input {
    padding: 10px;
    width: 300px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Kanit', sans-serif;
}

.search-filter select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Kanit', sans-serif;
}

/* ปรับ List ให้กว้างขึ้นในหน้ารวม */
.full-list {
    max-width: 100% !important; /* ให้ใช้ความกว้างของ Container หลัก */
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.announcement-item:last-child {
    border-bottom: none;
}

.procurement-section {
    padding: 16px 0;
    background-color: #f8f9fa;
    overflow-x: hidden;
    max-width: 100%;
}

.procurement-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

.procurement-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.procurement-table th, .procurement-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.procurement-table th {
    background-color: #003366;
    color: white;
    font-weight: 400;
}

.project-name {
    color: #333;
    font-weight: 500;
}

/* ตกแต่งสถานะ (Badge) */
.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;    
}

.status-badge.open { background: #e8f5e9; color: #2e7d32; }
.status-badge.close { background: #fff3e0; color: #ef0000; }
.status-badge.winner { background: #fff3e0; color: #ef6c00; }

.btn-icon {
    text-decoration: none;
    color: #003366;
    font-weight: 600;
}

.btn-icon:hover { text-decoration: underline; }

/* ส่วนตัวกรองในหน้าจัดซื้อจัดจ้าง */
.procure-filter {
    margin-bottom: 30px;
}

.search-box {
    margin-bottom: 20px;
    text-align: center;
}

.search-box input {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-family: 'Kanit', sans-serif;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 15px;
    border: 1px solid #003366;
    background: white;
    color: #003366;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
    transition: 0.3s;
}

.tab-btn.active, .tab-btn:hover {
    background: #003366;
    color: white;
}

/* ปุ่มดาวน์โหลดในตาราง */
.btn-download {
    color: #003366;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-download:hover {
    text-decoration: underline;
}

/* สไตล์สถานะเพิ่มเติม */
.status-badge.plan { background: #e3f2fd; color: #1565c0; } /* สำหรับแผนการจัดซื้อ */

.job-section {
    padding: 16px 0 50px;
    background-color: #ffffff;
}

.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.job-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.job-card:hover {
    border-color: #003366;
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
}

.job-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.job-badge-close {
    display: inline-block;
    background: #e8f5e9;
    color: #d30202;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.job-card h3 {
    color: #003366;
    margin: 0 0 10px 0;
    font-size: 1.25rem;
}

.job-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.job-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.job-count {
    font-weight: 600;
    color: #333;
}

.btn-read {
    color: #003366;
    text-decoration: none;
    font-weight: 600;
}

.job-detail-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.job-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 25px;
    margin-bottom: 30px;
}

.job-title {
    color: #003366;
    margin: 15px 0;
}

.job-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.job-body h3 {
    color: #003366;
    margin-top: 30px;
    border-left: 4px solid #ffcc00;
    padding-left: 15px;
}

.job-body ul {
    padding-left: 20px;
    line-height: 2;
}

.download-section {
    margin-top: 40px;
    padding: 20px;
    background: #eef2f7;
    border-radius: 8px;
}

.download-list {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.download-item {
    background: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    color: #003366;
    border: 1px solid #003366;
    font-weight: 600;
    transition: 0.3s;
}

.download-item:hover {
    background: #003366;
    color: white;
}

.job-footer-btns {
    margin-top: 50px;
    display: flex;
    gap: 15px;
}

.btn-apply {
    background: #003366;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
}

/* ส่วนรายการงานในหน้ารวม */
.all-jobs-list {
    margin-top: 30px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.job-list-item {
    display: flex;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #eee;
    gap: 20px;
}

.job-list-item:last-child {
    border-bottom: none;
}

/* สไตล์สถานะงาน */
.job-status-tag {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 90px;
    text-align: center;
}

.job-status-tag.open { background: #e8f5e9; color: #2e7d32; }
.job-status-tag.close { background: #ffebee; color: #c62828; }

.job-main-info {
    flex-grow: 1;
}

.job-main-info h3 {
    margin: 0 0 5px 0;
    color: #003366;
    font-size: 1.2rem;
}

.job-main-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.job-date-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.job-date-info span {
    font-size: 0.85rem;
    color: #888;
}

.btn-outline-small {
    padding: 6px 15px;
    border: 1px solid #003366;
    color: #003366;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.btn-outline-small:hover {
    background: #003366;
    color: white;
}

.btn-outline-small.gray {
    border-color: #999;
    color: #666;
}

/* ปรับแต่งสำหรับมือถือ */
@media screen and (max-width: 768px) {
    .job-list-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .job-date-info {
        text-align: left;
        width: 100%;
    }

    /* ตารางจัดซื้อ-จัดจ้าง: เปลี่ยนเป็นการ์ดแนวตั้ง ไม่ล้นจอ */
    .procurement-section .container,
    .procurement-section .container-wide {
        max-width: 100% !important;
        width: 100%;
        padding-left: 4%;
        padding-right: 4%;
        box-sizing: border-box;
    }

    .procurement-table-wrapper {
        overflow: visible;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .procurement-table {
        min-width: 0 !important;
        width: 100% !important;
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0 12px;
    }

    .procurement-table thead {
        display: none;
    }

    .procurement-table tbody {
        display: block;
        width: 100%;
    }

    .procurement-table tr {
        display: block;
        width: 100%;
        background: #fff;
        border: 1px solid #e8edf5;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 43, 107, 0.06);
        margin: 0 0 12px;
        padding: 12px 14px;
        box-sizing: border-box;
    }

    .procurement-table td {
        display: block;
        width: 100% !important;
        max-width: 100%;
        padding: 8px 0 !important;
        border-bottom: 1px solid #f0f3f8;
        text-align: left !important;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
        box-sizing: border-box;
    }

    .procurement-table td:last-child {
        border-bottom: none;
        padding-bottom: 0 !important;
    }

    .procurement-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        color: #6b7a99;
        margin-bottom: 4px;
    }

    .procurement-table td.project-name {
        font-size: 0.95rem;
        line-height: 1.45;
    }

    .procurement-table .status-badge,
    .procurement-table .btn-icon {
        display: inline-block;
        max-width: 100%;
    }
}
