/* RESET & GENERAL STYLES */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-image: url('../image/background.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    font-family: 'Be Vietnam Pro', sans-serif;
    color: #333;
    display: flex;
    justify-content: center;
    padding: 20px 10px;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* HEADER BANNER */
.blog-header-banner {
    background-color: #e2f7ed;
    border: 2px solid #cceee0;
    border-radius: 20px;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-text {
    text-align: center;
}

.main-title {
    font-family: 'Pixelify Sans', cursive, sans-serif;
    color: #438b74;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1;
}

.subtitle {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 0.95rem;
    font-style: italic;
    color: #275238;
    margin-top: 4px;
}

.note-icon {
    width: 150px;
    height: auto;
    object-fit: contain;
}

/* TOP LAYOUT GRID (2 COLUMNS) */
.top-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
}

.left-col, .right-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* SIDEBAR NAVIGATION */
.nav-box {
    background-color: #f7ffe9;
    border-radius: 20px;
    padding: 15px 10px;
    border: 2px solid #e1f5d6;
    text-align: center;
}

.decor-bunnies {
    width: 85%;
    margin: 5px auto;
    display: block;
}

.sidebar-nav ul, .sidebar-nav li {
    list-style: none !important;
    padding-left: 0;
    margin-left: 0;
}

.sidebar-nav ul {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.sidebar-nav ul::-webkit-scrollbar { width: 6px; }
.sidebar-nav ul::-webkit-scrollbar-thumb { background: #5d9e79; border-radius: 10px; }

.sidebar-nav li { margin: 8px 0; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 15px 8px 20px;
    gap: 10px;
    background: #e5f9d3;
    border: 2px solid #99d28e;
    border-radius: 15px;
    color: #275238;
    font-family: 'Pixelify Sans', cursive, sans-serif;
    font-size: 1.2rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: #cbf2b1;
    transform: translateY(-2px);
}

.nav-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* SEARCH BAR */
.search-box {
    background: #f7ffe9;
    border: 2px solid #e1f5d6;
    border-radius: 25px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-style: italic;
    font-size: 0.9rem;
    color: #275238;
    text-align: center;
}

.search-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    cursor: pointer;
}

/* BOTTOM FULL WIDTH SECTION */
.bottom-full-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.section-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.pink-title-bar {
    background: #fde8e8;
    border: 2px solid #f9d5d5;
    border-radius: 12px;
    padding: 8px 15px;
    font-family: 'Pixelify Sans', cursive, sans-serif;
    color: #275238;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}

.pink-title-bar.small-bar {
    width: 110px;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    width: 100%;
}

.arrow-btn {
    background: #fde8e8;
    border: 1.5px solid #f9d5d5;
    color: #834343;
    border-radius: 10px;
    width: 24px;
    height: 42px;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.arrow-btn:hover {
    background: #f8c8c8;
    transform: scale(1.05);
}

/* BLOG CARD COMMON */
.blog-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.blog-card:hover {
    transform: translateY(-3px);
}

/* PHÓNG TỎ CHIỀU CAO KHUNG ẢNH BÀI VIẾT (CHUẨN TỶ LỆ DÀI NHƯ HÌNH MẪU) */
.blog-img-box {
    width: 100%;
    height: 125px; /* Tăng từ 95px lên 125px cho vuông vắn xinh xắn */
    background-color: #c4c4c4;
    overflow: hidden;
}

.blog-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.blog-title-bar {
    background-color: #ebfada;
    color: #275238;
    font-family: 'Pixelify Sans', cursive, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    padding: 6px 4px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    border: 1px solid #d8f2c3;
    border-top: none;
}

/* GRIDS BÀI VIẾT */
.grid-cards-2 {
    display: flex;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 5px;
}
.grid-cards-2 .blog-card { width: calc(50% - 6px); }

.grid-cards-4 {
    display: flex;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 5px;
}
.grid-cards-4 .blog-card { width: calc(25% - 9px); }

/* LƯỚI PHÂN TRANG 3 CỘT X 3 HÀNG (9 Ô) */
.grid-cards-3-paginated {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
}

.grid-cards-2::-webkit-scrollbar,
.grid-cards-4::-webkit-scrollbar {
    display: none;
}

/* CATEGORY BUTTONS (1 HÀNG KÉO CUỘN NGANG) */
.category-buttons-scroll {
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 6px;
    width: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.category-buttons-scroll::-webkit-scrollbar {
    display: none;
}
.category-buttons-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cat-btn {
    background: #fde8e8;
    border: 1.5px solid #f9d5d5;
    border-radius: 12px;
    padding: 6px 16px;
    font-family: 'Pixelify Sans', cursive, sans-serif;
    font-size: 0.95rem;
    color: #275238;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cat-btn:hover, .cat-btn.active {
    background: #f8c8c8;
    transform: translateY(-2px);
}

/* PAGINATION NÚT TRÒN CUTE */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.page-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #438b74;
    border: none;
    color: #ffffff;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.page-num.active, .page-num:hover {
    background: #cbf2b1;
    color: #275238;
}

/* RESPONSIVE CHO DI ĐỘNG */
@media (max-width: 768px) {
    .top-layout {
        grid-template-columns: 1fr;
    }
    .grid-cards-3-paginated {
        grid-template-columns: repeat(2, 1fr);
    }
}