/* Variables */
:root {
    --brand-dark: #193652; /* Màu xanh đen của logo */
    --brand-green: #37533f; /* Màu xanh lá cây đậm của nút active/float */
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
     --font-family-source-sans-pro: "Source Sans Pro", sans-serif;
}

/* Global Styles */
body {

    background-color: #ffffff;
    font-family: var(--font-family-source-sans-pro);
    color: var(--text-main);
    /* Các thuộc tính reset mặc định (nếu cần) */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ghi đè lại font của Bootstrap (nếu Bootstrap đang ép dùng font khác) */
h1, h2, h3, h4, h5, h6, .nav-link, .btn {
    font-family: var(--font-family-source-sans-pro);
}
/* Header & Navbar */
.site-header {
    background-color: white;
}

.text-primary-dark {
    color: var(--brand-dark);
}

.navbar-nav .nav-link {
    color: var(--text-main);
    font-weight: 500;
    font-size: 15px;
    padding: 1.5rem 1rem !important;
}

.navbar-nav .nav-item.active {
    border-bottom: 3px solid var(--brand-green); /* Đường gạch dưới menu đang chọn */
}

.navbar-nav .nav-item.active .nav-link {
    font-weight: 600;
    font-style: bold;
    color: var(--brand-dark);
}

.header-icons .btn-icon {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: transparent;
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.header-icons .btn-icon:hover {
    background: #f8f9fa;
    color: var(--brand-dark);
}
/* Header & Navbar */
.site-header {
    background-color: white;
    z-index: 1050; /* Đảm bảo Menu luôn nằm trên cùng, đè lên ảnh và nút lơ lửng */
}

/* Class này để hiệu ứng hiện shadow được mượt mà */
.transition-header {
    transition: box-shadow 0.3s ease; 
}

/* Class này sẽ được JS tự động thêm vào khi cuộn trang */
.header-scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Bóng mờ nhẹ */
    border-bottom: none !important; /* Bỏ viền dưới đi cho đẹp khi đã có bóng */
}
/* Hero Section */
.hero-section {
    position: relative;
    height: 280px; /* Chiều cao banner */
    /* Dùng ảnh pattern hoặc hoa/lá làm background */
    background-size: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Lớp phủ đen trong suốt để nổi bật chữ */
}

.hero-title {
    font-size: 2.5rem;
    letter-spacing: 1px;
    z-index: 1;
}

/* Content Container */
.content-container {
    max-width: 1100px;
}

/* Search and Filter Area */
.search-filter-wrapper {
    width: 100%;
}

/* Styling cho thanh Search */
.custom-search {
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background-color: white;
}

.custom-search .form-control {
    border: none;
    box-shadow: none;
    background: transparent;
    padding-left: 20px;
    height: 48px; /* Chiều cao cố định cho đẹp */
}

.custom-search .search-btn {
    background: #f4f5f7; /* Màu nền xám nhạt cho nút kính lúp */
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Styling cho Nút Dropdown Filter */
.filter-btn {
    border: 1px solid var(--border-color);
    background-color: white;
    height: 50px; /* Bằng với thanh search */
    padding: 0 20px;
    min-width: 100px;
}

.filter-btn:hover, .filter-btn:focus, .filter-btn:active {
    background-color: white !important;
    border-color: #ccc !important;
    box-shadow: none !important;
}

/* Hiệu ứng xoay mũi tên khi mở menu */
.filter-btn .dropdown-icon {
    transition: transform 0.3s ease;
}
.filter-btn.show .dropdown-icon {
    transform: rotate(180deg);
}

/* Styling cho Bảng chọn xổ xuống (Dropdown Menu) */
.custom-dropdown .dropdown-menu {
    border-radius: 12px; /* Bo góc mềm mại giống thiết kế */
    min-width: 180px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}

.custom-dropdown .dropdown-item {
    padding: 10px 20px;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.2s;
}

/* Xóa màu xanh dương mặc định của Bootstrap khi focus/active */
.custom-dropdown .dropdown-item.active, 
.custom-dropdown .dropdown-item:active {
    background-color: transparent;
    color: var(--text-main);
}

/* Thêm màu nền xám nhạt khi hover vào các dòng */
.custom-dropdown .dropdown-item:hover {
    background-color: #f8f9fa; 
}

/* News List */
.news-item .img-wrapper {
    height: 240px;
}

.news-item .img-wrapper img {
    transition: transform 0.3s ease;
}

.news-item:hover .img-wrapper img {
    transform: scale(1.05); /* Hiệu ứng zoom nhẹ khi hover */
}

.news-title {
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--brand-dark);
}

.news-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Giới hạn 4 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: var(--brand-green) !important;
}

.social-share a {
    color: #a0a0a0;
    margin-left: 15px;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.social-share a:hover {
    color: var(--brand-dark);
}

/* Pagination */
.pagination .page-link {
    color: var(--text-main);
    border: none;
    border-radius: 4px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background-color: var(--brand-green);
    color: white;
}

.pagination .page-link:hover:not(.disabled .page-link) {
    background-color: #f0f0f0;
}

/* Floating Action Button (FAB) */
.floating-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: var(--brand-green);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1000;
    transition: transform 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
}

.floating-btn:hover {
    background-color: #2b4232;
    color: white;
    transform: translateY(-5px);
}

/* Responsive adjustments */
/* Responsive adjustments (Thay thế đoạn ở cuối file style.css) */
@media (max-width: 767px) {
    /* Chuyển thanh kẻ dưới menu thành kẻ dọc bên trái trên mobile */
    .navbar-nav .nav-item.active {
        border-bottom: none;
        border-left: 3px solid var(--brand-green);
        background-color: #f8f9fa; /* Hightlight nhẹ background */
    }
    
    /* Chỉnh chữ banner nhỏ lại và căn giữa */
    .hero-title {
        font-size: 1.8rem;
        text-align: center;
    }
    
    /* Thu gọn chiều cao ảnh bài viết trên mobile để không bị quá to */
    .news-item .img-wrapper {
        height: 200px; 
    }
    
    /* Thêm khoảng cách giữa thanh Search và cục Filter khi bị rớt dòng xếp dọc */
    .search-filter-row > div:first-child {
        margin-bottom: 1rem !important;
    }
    
    /* Thu nhỏ nút Email góc phải */
    .floating-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

footer{
    margin-top: 60px;
    background-color: #212529;
    padding: 5px 20px;
}
footer .contai p{
    margin: 0;
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
}
.post-tags-container .tag-label{
    margin-bottom: 10px;
}
/* --- MOBILE RESPONSIVE (Màn hình điện thoại) --- */
@media (max-width: 768px) {
    
    /* Các code khác của mobile giữ nguyên... */

    /* Thêm đoạn này để ẩn nút */
    .header-actions {
        display: none !important;
    }

}

/* =========================================
   SINGLE POST (Chi tiết bài viết)
   ========================================= */

/* Tiêu đề trang chi tiết */
.post-title {
    font-size: 1.8rem;
    line-height: 1.3;
    color: #000;
}

/* Định dạng chữ trong nội dung */
.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

/* Các thẻ p (đoạn văn) */
.post-content p {
    margin-bottom: 1.5rem;
}

/* Các thẻ Heading (Tiêu đề phụ) do người dùng tạo */
.post-content h2, 
.post-content h3, 
.post-content h4 {
    font-weight: 700;
    color: #000;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 20px ;
}

/* Hình ảnh trong bài viết (Tự động full cột) */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem 0; /* Khoảng cách trên dưới ảnh */
}

/* Căn giữa caption của ảnh nếu có */
.post-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
}

/* Định dạng danh sách dạng chấm (ul li) */
.post-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}
.post-content ul li {
    margin-bottom: 0.8rem;
    position: relative;
}

/* Định dạng liên hệ chữ đậm (Contact) */
.post-content p strong, 
.post-content p b {
    color: #000;
}

.post-content p{
    margin-bottom: 9px;
    color: #040b13;
}

/* --- Các nút Share mạng xã hội giống hình --- */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.btn-facebook { background-color: #0866FF; }
.btn-linkedin { background-color: #0A66C2; }
.btn-x { background-color: #000000; }

/* ==========================================================
   1. HIỆU ỨNG ZOOM ẢNH KHI HOVER VÀO BÀI VIẾT
   Áp dụng cho cả trang News Page (.news-item) và Single (.recent-news-card)
   ========================================================== */

/* Trạng thái mặc định của ảnh: Thêm transition để hiệu ứng mượt mà */
.news-item .img-wrapper img,
.recent-news-card .img-wrapper img {
    transition: transform 0.5s ease-in-out;
}

/* Khi hover vào toàn bộ khối bài viết (article), ảnh bên trong sẽ to lên 10% */
.news-item:hover .img-wrapper img,
.recent-news-card:hover .img-wrapper img {
    transform: scale(1.1);
}

/* ==========================================================
   2. HIỆU ỨNG DI CHUYỂN MŨI TÊN "READ MORE" KHI HOVER
   ========================================================== */

/* Trạng thái mặc định của icon mũi tên */
.read-more i {
    transition: transform 0.3s ease-in-out;
    display: inline-block; /* Bắt buộc để sử dụng thuộc tính transform */
}

/* Khi hover vào nút Read More, đẩy mũi tên dịch sang phải 6px */
.read-more:hover i {
    transform: translateX(6px);
}

/* (Tuỳ chọn) Đổi màu chữ Read More đậm lên một chút khi hover cho đẹp */
.read-more:hover {
    color: #000 !important; /* Đen đậm hơn text-muted */
}