/* Global Styles */
        body { font-family: 'Sarabun', sans-serif; background-color: #f8f9fa; color: #333; font-size: 16px; }
        a:hover { text-decoration: none; }

        /* Custom Spacing (BS3 lacks these) */
        .mt-10 { margin-top: 10px; }
        .mt-20 { margin-top: 20px; }
        .mb-20 { margin-bottom: 20px; }
        .p-15 { padding: 15px; }

        /* Top Bar */
        .top-bar { background-color: #002d62; color: white; padding: 8px 0; font-size: 12px; }

        /* Header & Navbar */
        .header-main { background: white; padding: 10px 0; border-bottom: 1px solid #ddd; }
        .navbar-custom { background: white; border: none; margin-bottom: 0; }
        .navbar-custom .nav > li > a { color: #333; position: relative; text-decoration: none; padding-bottom: 8px; }
        .navbar-custom .nav > li > a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px; background: linear-gradient(90deg, #002d62, #0056b3); transition: width 0.3s ease; }
        .navbar-custom .nav > li > a:hover::after,
        .navbar-custom .nav > li.active > a::after { width: 100%; }
        .navbar-custom .nav > li.active > a { color: #002d62; font-weight: bold; background-color: transparent; }
        .navbar-brand-img { height: 60px; float: left; margin-right: 15px; }
        .brand-text b { display: block; font-size: 18px; color: #002d62; }
        .brand-text span { font-size: 12px; color: #666; }

        /* Multi-level Dropdown Menu */
        .navbar-custom .dropdown-submenu { position: relative; }
        .navbar-custom .dropdown-submenu .dropdown-menu { top: 0; left: 100%; margin-top: -6px; margin-left: -1px; border-radius: 0 6px 6px 6px; }
        .navbar-custom .dropdown-submenu:hover .dropdown-menu { display: block; }
        .navbar-custom .dropdown-submenu > a:after { display: block; content: " "; float: right; width: 0; height: 0; border-color: transparent; border-style: solid; border-width: 5px 0 5px 5px; border-left-color: #ccc; margin-top: 5px; margin-right: -10px; }
        .navbar-custom .dropdown-submenu:hover > a:after { border-left-color: #333; }
        .navbar-custom .dropdown-submenu.pull-left { float: none; }
        .navbar-custom .dropdown-submenu.pull-left > .dropdown-menu { left: -100%; margin-left: 10px; border-radius: 6px 0 6px 6px; }

        /* Hero Carousel */
        .carousel-inner img { width: 100%; border-radius: 4px; }
        
        /* Custom Carousel Styling */
        #hero-carousel { border-radius: 8px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.15); border: 1px solid #e0e0e0; }
        #hero-carousel .carousel-inner { border-radius: 8px; }
        #hero-carousel .carousel-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.4) 70%, transparent 100%); padding: 25px 20px 20px 20px; text-align: left; text-shadow: none; }
        #hero-carousel .carousel-content { max-width: 90%; }
        #hero-carousel .carousel-content h3 { font-size: 20px; font-weight: 600; color: white; margin: 0 0 8px 0; line-height: 1.4; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
        #hero-carousel .carousel-content .source { font-size: 13px; color: #ddd; margin: 0 0 15px 0; font-weight: 300; }
        #hero-carousel .feedback-buttons { display: flex; gap: 12px; align-items: center; }
        #hero-carousel .btn-like, #hero-carousel .btn-dislike { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: white; padding: 6px 14px; border-radius: 20px; font-size: 13px; transition: all 0.3s ease; display: flex; align-items: center; gap: 6px; cursor: pointer; }
        #hero-carousel .btn-like:hover, #hero-carousel .btn-dislike:hover { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.4); transform: translateY(-1px); }
        #hero-carousel .btn-like:active, #hero-carousel .btn-dislike:active { transform: translateY(0); }
        #hero-carousel .btn-like i { color: #4CAF50; font-size: 14px; }
        #hero-carousel .btn-dislike i { color: #f44336; font-size: 14px; }
        #hero-carousel .btn-like span, #hero-carousel .btn-dislike span { font-weight: 500; }
        #hero-carousel .carousel-indicators { bottom: 15px; left: 50%; transform: translateX(-50%); margin: 0; background-color: #22222266; padding: 5px 10px; display: flex; align-items: center; justify-content: center; border-radius: 20px; }
        #hero-carousel .carousel-indicators li { background-color: #555; border: none; margin: 0 4px; width: 8px; height: 8px; border-radius: 50%; transition: all 0.3s ease; }
        #hero-carousel .carousel-indicators li.active { background-color: white; border-color: white; width: 25px; height: 8px; border-radius: 10px; transform: scale(1); }
        #hero-carousel .carousel-control { background: none; width: 60px; opacity: 0; transition: opacity 0.3s ease; }
        #hero-carousel:hover .carousel-control { opacity: 0.8; }
        #hero-carousel .carousel-control:hover { opacity: 1; }
        #hero-carousel .carousel-control .glyphicon-chevron-left,
        #hero-carousel .carousel-control .glyphicon-chevron-right { color: white; text-shadow: 0 2px 6px rgba(0,0,0,0.7); font-size: 28px; font-weight: bold; }
        #hero-carousel .carousel-control.left { background: linear-gradient(to right, rgba(0,0,0,0.3), transparent); }
        #hero-carousel .carousel-control.right { background: linear-gradient(to left, rgba(0,0,0,0.3), transparent); }

        /* Carousel Header Logos */
        #hero-carousel .carousel-header { position: absolute; top: 15px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 20px; z-index: 10; }
        #hero-carousel .logo { font-weight: bold; font-size: 14px; color: white; text-shadow: 0 1px 3px rgba(0,0,0,0.8); padding: 5px 10px; background: rgba(0,0,0,0.6); border-radius: 3px; }
        #hero-carousel .left-logo { background: rgba(0,0,0,0.7); border: 1px solid rgba(255,255,255,0.3); }
        #hero-carousel .right-logo { background: rgba(0,0,0,0.7); border: 1px solid rgba(255,255,255,0.3); }

        /* Source with Icon */
        #hero-carousel .source-with-icon { font-size: 13px; color: #ddd; margin: 0 0 15px 0; font-weight: 300; display: flex; align-items: center; gap: 8px; }
        #hero-carousel .source-with-icon i { color: #4CAF50; font-size: 14px; }
        

        /* Quick Links Icons */
        .icon-menu-item { background: white; border-radius: 8px; padding: 15px 5px; text-align: center; margin-bottom: 15px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); transition: 0.3s; border-bottom: 3px solid transparent; }
        .icon-menu-item:hover { transform: translateY(-3px); }
        .icon-menu-item i { font-size: 30px; margin-bottom: 10px; display: block; }
        .icon-menu-item span { font-size: 12px; font-weight: bold; display: block; }

        /* Sidebar */
        .sidebar-box { background: white; border-radius: 4px; margin-bottom: 20px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
        .sidebar-header { background: #f8f9fa; padding: 12px 15px; font-weight: bold; border-left: 4px solid #002d62; border-bottom: 1px solid #eee; }
        .sidebar-menu-item { display: block; padding: 10px 15px; border-bottom: 1px solid #f4f4f4; color: #444; }
        .sidebar-menu-item:hover { background: #f0f7ff; color: #0056b3; }

        .sidebar-menu-item-imgs { display: block; padding: 8px 3px; border-bottom: 1px solid #f4f4f4; color: #444; }
        .sidebar-menu-item-imgs:hover { background: #f0f7ff; color: #0056b3; }

        /* Content Cards */
        .content-card { background: white; border-radius: 5px; padding: 15px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
        .card-title-bar { border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; }
        .title-text { font-size: 16px; font-weight: bold; color: #002d62; }
        .title-text i { margin-right: 8px; }

        /* News List */
        .news-list-item { padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 13px; position: relative; padding-left: 20px; }
        .news-list-item:before { content: "\f105"; font-family: FontAwesome; position: absolute; left: 0; color: #999; }

        .news-feature { position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,0.12); transform: translateY(0); transition: transform 0.25s ease, box-shadow 0.25s ease; }
        .news-feature img { width: 100%; height: 360px; object-fit: cover; display: block; transform: scale(1); transition: transform 0.45s ease; }
        .news-feature-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 55%, rgba(0,0,0,0.85) 100%); color: #fff; }
        .news-badge { display: inline-block; background: #00a8e1; color: #fff; font-size: 12px; font-weight: bold; padding: 4px 10px; border-radius: 16px; margin-bottom: 10px; box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
        .news-feature-title { font-size: 18px; font-weight: bold; line-height: 1.35; margin: 0 0 8px 0; }
        .news-meta { font-size: 12px; color: rgba(255,255,255,0.85); }
        .news-meta i { margin-right: 6px; }

        .news-feature:after { content: "\f105"; font-family: FontAwesome; position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; line-height: 32px; text-align: center; border-radius: 50%; background: rgba(255,255,255,0.18); color: #fff; opacity: 0; transform: translateY(-4px); transition: opacity 0.25s ease, transform 0.25s ease; }
        .news-feature:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,0.16); }
        .news-feature:hover img { transform: scale(1.04); }
        .news-feature:hover:after { opacity: 1; transform: translateY(0); }

        .news-mini-grid { margin-left: -8px; margin-right: -8px; }
        .news-mini-col { padding-left: 8px; padding-right: 8px; margin-bottom: 15px; }
        .news-mini-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,0.08); border: 1px solid #eef0f2; transform: translateY(0); transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
        .news-mini-card img { width: 100%; height: 85px; object-fit: cover; display: block; transform: scale(1); transition: transform 0.45s ease; }
        .news-mini-body { padding: 12px 14px; }
        .news-mini-title { font-size: 14px; font-weight: bold; color: #002d62; margin: 0 0 8px 0; line-height: 1.35; max-height: 38px; overflow: hidden; }
        .news-mini-meta { font-size: 12px; color: #777; }
        .news-mini-meta i { margin-right: 6px; }

        .news-mini-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,0.12); border-color: rgba(0,45,98,0.18); }
        .news-mini-card:hover img { transform: scale(1.04); }

        .news-mini-card:focus-within,
        .news-feature:focus-within { outline: none; box-shadow: 0 0 0 3px rgba(0,45,98,0.18), 0 10px 26px rgba(0,0,0,0.14); }

        /* Footer */
        footer { background: #002147; color: #ccc; padding: 40px 0 20px; margin-top: 30px; }
        .footer-title { color: white; font-weight: bold; margin-bottom: 20px; }
        .stat-box { background: rgba(0,0,0,0.3); padding: 15px; border-radius: 4px; text-align: center; }
        .stat-number { font-size: 24px; color: #ffcc00; font-weight: bold; }

        /* Learning Resources Grid */
        .learning-grid { margin-top: 20px; }
        .learning-card { background: white; border-radius: 8px; padding: 15px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: all 0.3s ease; border: 1px solid #e0e0e0; }
        .learning-card:hover { transform: translateY(-5px); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
        .learning-link { display: block; text-decoration: none; color: #333; }
        .learning-link:hover { text-decoration: none; color: #002d62; }
        .learning-card img { width: 100%; height: 180px; object-fit: cover; border-radius: 5px; margin-bottom: 10px; }
        .learning-card h5 { font-size: 14px; font-weight: bold; margin: 0; line-height: 1.4; color: #002d62; }
        
        /* Filter functionality */
        .learning-item { display: none; }
        .learning-item.show { display: block; }
        .learning-filter-btn { cursor: pointer; }
        .btn-group .btn { margin: 0 5px 10px 0; border-radius: 20px; font-size: 12px; padding: 8px 15px; }
        .btn-group .btn.active { background-color: #002d62; border-color: #002d62; color: white; }

        /* Responsive Fixes for BS3 */
        @media (max-width: 767px) {
            .navbar-brand-img { height: 45px; }
            .brand-text b { font-size: 14px; }
            .icon-menu-item { padding: 10px 2px; }
            .learning-card img { height: 150px; }
            .learning-card h5 { font-size: 12px; }
            .news-feature img { height: 260px; }
            .news-feature-title { font-size: 16px; }
        }

        .ita-section .news-badge { background: #0056b3; }
        .ita-section .news-mini-card:hover { border-color: rgba(0,86,179,0.25); }


        /* ==========================================================================
   OFFICE NEWS CAROUSEL STYLES
   ========================================================================== */

/* 1. Main Container */
#office-news-carousel { 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
    border: 1px solid #e0e0e0; 
    position: relative;
}

#office-news-carousel .carousel-inner { 
    border-radius: 8px; 
}

/* 2. Carousel Caption (แถบดำไล่ระดับด้านล่าง) */
#office-news-carousel .carousel-caption { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.4) 70%, transparent 100%); 
    padding: 25px 20px 20px 20px; 
    text-align: left; 
    text-shadow: none; 
}

#office-news-carousel .carousel-content { 
    max-width: 90%; 
}

#office-news-carousel .carousel-content h3 { 
    font-size: 20px; 
    font-weight: 600; 
    color: white; 
    margin: 0 0 8px 0; 
    line-height: 1.4; 
    text-shadow: 0 1px 3px rgba(0,0,0,0.5); 
}

#office-news-carousel .carousel-content .source { 
    font-size: 13px; 
    color: #ddd; 
    margin: 0 0 15px 0; 
    font-weight: 300; 
}

/* 3. Source with Icon */
#office-news-carousel .source-with-icon { 
    font-size: 13px; 
    color: #ddd; 
    margin: 0 0 15px 0; 
    font-weight: 300; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

#office-news-carousel .source-with-icon i { 
    color: #4CAF50; 
    font-size: 14px; 
}

/* 4. Carousel Indicators (จุดไข่ปลาด้านล่างแบบแคปซูล) */
#office-news-carousel .carousel-indicators { 
    position: absolute;
    bottom: 15px; 
    left: 50%; 
    transform: translateX(-50%); 
    margin: 0; 
    /* พื้นหลังแคปซูลสีน้ำตาลอมเขียว (ตามภาพ) */
    background-color: rgba(140, 120, 40, 0.8); 
    padding: 6px 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 20px; 
    width: auto; 
    border: none;
}

/* จุดที่ไม่ได้เลือก (วงกลมสีเทาเข้ม) */
#office-news-carousel .carousel-indicators li { 
    display: inline-block;
    background-color: #555555; 
    border: none !important; 
    margin: 0 5px; 
    width: 8px; 
    height: 8px; 
    border-radius: 50%; 
    transition: all 0.3s ease; 
}

/* จุดที่ถูกเลือก (วงรีสีขาว) */
#office-news-carousel .carousel-indicators li.active { 
    background-color: #ffffff; 
    border: none !important; 
    margin: 0 5px; 
    width: 24px; 
    height: 8px; 
    border-radius: 10px; 
}

/* 5. Carousel Controls (ปุ่มเลื่อนซ้าย-ขวา) */
#office-news-carousel .carousel-control { 
    background: none; 
    width: 60px; 
    opacity: 0; 
    transition: opacity 0.3s ease; 
}

#office-news-carousel:hover .carousel-control { 
    opacity: 0.8; 
}

#office-news-carousel .carousel-control:hover { 
    opacity: 1; 
}

#office-news-carousel .carousel-control .glyphicon-chevron-left,
#office-news-carousel .carousel-control .glyphicon-chevron-right { 
    color: white; 
    text-shadow: 0 2px 6px rgba(0,0,0,0.7); 
    font-size: 28px; 
    font-weight: bold; 
}

#office-news-carousel .carousel-control.left { 
    background: linear-gradient(to right, rgba(0,0,0,0.3), transparent); 
}

#office-news-carousel .carousel-control.right { 
    background: linear-gradient(to left, rgba(0,0,0,0.3), transparent); 
}