/* === CÀI ĐẶT CHUNG === */
body {
    background-color: #fff;
    font-family: 'Roboto', sans-serif;
    color: #333;
}
.pb-2 { padding-top: .5rem !important; }

/* === HEADER === */
.site-header {
    padding: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-bottom: 1px solid #eee;
}
.site-header a {
    text-decoration: none;
}
.header-logo img {
    width: auto;
    max-width: 100%;
    height: auto;
}

/* === NÚT LOGIN / ACCOUNT === */
.header-actions .btn, .btn-login, .btn-account {
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    transition: all 0.2s;
}
.btn-login, .header-actions .btn-login {
    background-color: #e63900;
    border: 2px solid #e63900;
    color: #fff !important;
}
.btn-login:hover, .header-actions .btn-login:hover {
    background-color: #c03000;
    border-color: #c03000;
}
.btn-account, .header-actions .btn-account {
    background-color: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.5);
    color: #fff;
}
.btn-account:hover, .header-actions .btn-account:hover {
    background-color: #fff;
    color: #ff4d00 !important;
}

/* === MEGA MENU === */
.nav-item.dropdown { position: static; }

.dropdown-menu {
    border: none;
    box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.15);
    border-radius: 0.25rem;
    padding: 0.5rem 0;
    min-width: 250px;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background-color: #fff;
}

.dropdown-menu .dropdown-item {
    padding: 0.5rem 1rem;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    text-transform: uppercase;
    line-height: 30px;
}
.dropdown-menu .dropdown-item:hover {
    background-color: #f5f5f5;
    color: #ff4d00;
}

.dropdown-submenu { position: relative; }

.dropdown-submenu > .submenu {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 0.1rem;
    display: none;
    min-width: 200px;
    background-color: #fff;
    border-radius: 0.25rem;
    box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.15);
    padding: 0.5rem 0;
    z-index: 1001;
}

/* Mega menu grid layout */
.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
}
.mega-menu-content .dropdown-header {
    font-weight: bold;
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
.mega-menu-content .dropdown-submenu {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.mega-menu-content .dropdown-submenu li {
    margin-bottom: 0.5rem;
}
.mega-menu-content .dropdown-item {
    padding: 0.35rem 0;
    color: #555;
    font-weight: 500;
    background: transparent !important;
    display: block;
    transition: all 0.2s;
}
.mega-menu-content .dropdown-item:hover {
    color: #ff4d00;
    padding-left: 5px;
}

/* === MOBILE MENU === */
.mobile-menu .btn {
    background: transparent;
    border: none;
    padding: 0.75rem 0;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu a {
    font-weight: 500;
    text-decoration: none;
}
.mobile-menu .submenu a {
    font-size: 16px;
    line-height: 30px;
}
.mobile-menu .submenu {
    transition: all 0.3s ease;
}
.mobile-menu .toggle-submenu {
    all: unset;
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 0;
    font-size: 18px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
}
.mobile-menu-item i.fa-chevron-right,
.mobile-menu-item i.fa-chevron-down {
    transition: transform 0.3s ease;
}
.mobile-menu-item.open i.fa-chevron-right {
    transform: rotate(90deg);
}

/* === OFFCANVAS RESPONSIVE === */
@media (max-width: 991.98px) {
    .offcanvas-body ul li a {
        color: #333;
        text-decoration: none;
        padding: 0.5rem 0;
        font-size: 18px;
        font-weight: 500;
    }
    .offcanvas-body ul ul {
        padding-left: 1rem;
    }
    .offcanvas-start {
        max-width: 100vw;
        width: 100%;
        overflow-x: hidden;
    }
    .offcanvas .offcanvas-body {
        overflow-x: hidden;
    }
    .offcanvas .mobile-menu {
        padding-left: 0;
        margin: 0;
    }
}

/* === GRID HIỂN THỊ DOWNLOAD (6 cột) === */
.masonry-grid:after {
    content: '';
    display: block;
    clear: both;
}
.grid-item {
    width: calc((100% - 5 * 15px) / 6);
    margin-bottom: 15px;
    float: left;
}
.photo-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.photo-item__link { display: block; }
.photo-item__image {
    width: 100%;
    height: auto;
    display: block;
	padding: 10px;
}
.photo-item__caption {
    padding: 12px;
    text-align: center;
}
.photo-item__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.photo-item__title a {
    text-decoration: none;
    color: #333;
}
.photo-item__meta {
    font-size: 0.875rem;
    color: #666;
}

/* === GRID BÀI VIẾT NỔI BẬT === */
.custom-post-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    width: 100vw;
    padding: 0 20px;
    margin-left: calc(-50vw + 50%);
    box-sizing: border-box;
}
.custom-post-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.custom-post-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.custom-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.custom-post-thumb-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
}
.custom-post-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    transition: transform 0.3s;
}
.custom-post-card:hover .custom-post-thumb {
    transform: scale(1.05);
}
.custom-post-title {
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: #222;
    background: #fff;
    margin: 0;
    line-height: 1.4;
}

.badge.bg-secondary {
    background-color: #6c757d;
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
    border-radius: 4px;
}


/* === POST NỘI DUNG === */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}
.breadcrumb {padding-top:20px !important; padding-bottom: 20px !important;}
.text-primary {padding-top: 20px !important;
    padding-bottom: 20px !important;
    background: #FFF;
    box-shadow: var(--bs-box-shadow-sm) !important;
    border-radius: 10px;color: #000000 !important;}
	
	
.search-bar-wrapper {padding-right: 20px; padding-left: 20px;}

/* Gợi ý dành cho bạn - Giao diện Card */
.suggestion-card {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 180px; /* Bạn có thể điều chỉnh chiều cao này */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.suggestion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(122, 77, 241, 0.3);
}

.suggestion-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Đảm bảo ảnh lấp đầy card */
    transition: transform 0.4s ease;
}

.suggestion-card:hover .suggestion-card__image {
    transform: scale(1.05); /* Hiệu ứng zoom nhẹ khi hover */
}

.suggestion-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 60%);
}

.suggestion-card__title {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    margin: 0;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 2;
}
/* === RESPONSIVE GRID === */
@media (max-width: 1200px) {
    .grid-item { width: calc((100% - 4 * 15px) / 5); }
}
@media (max-width: 992px) {
    .grid-item { width: calc((100% - 3 * 15px) / 4); }
}
@media (max-width: 768px) {
    .grid-item { width: calc((100% - 2 * 15px) / 3); }
}
@media (max-width: 576px) {
    .grid-item { width: calc((100% - 1 * 15px) / 2); }
}
@media (max-width: 1199px) {
    .custom-post-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 767px) {
    .custom-post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .custom-post-grid {
        grid-template-columns: 1fr;
    }
}
