﻿/* --- 1. FONTS & VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --primary: #ec4899; /* Hồng đậm (Pink-500) */
    --primary-light: #fce7f3; /* Hồng nhạt (Pink-100) */
    --teal: #14b8a6; /* Xanh cổ vịt (Teal-500) */
    --teal-light: #ccfbf1; /* Xanh nhạt */
    --orange: #f97316; /* Cam (Orange-500) */
    --orange-light: #ffedd5; /* Cam nhạt */
    --dark: #1f2937; /* Xám đen */
    --gray: #6b7280; /* Xám ghi */
    --radius: 1.5rem; /* Bo góc lớn (24px) */
}

body {
    font-family: 'Quicksand', sans-serif;
    color: var(--dark);
    background-color: #fffafb; /* Nền hồng phấn cực nhẹ */
}

h1, h2, h3, h4, h5, .font-serif {
    font-family: 'Playfair Display', serif;
}

/* --- 2. HEADER & NAV --- */
.navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

.nav-link {
    font-weight: 600;
    color: var(--gray) !important;
    position: relative;
    padding: 0.5rem 1rem !important;
}

    .nav-link:hover, .nav-link.active {
        color: var(--primary) !important;
    }

    /* Hiệu ứng gạch chân khi hover */
    .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: var(--primary);
        transition: width 0.3s;
    }

    .nav-link:hover::after {
        width: 100%;
    }

/* --- 3. BUTTONS (Ghi đè Bootstrap) --- */
.btn {
    border-radius: 50px; /* Bo tròn viên thuốc */
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s;
}

.btn-primary-custom {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.3);
}

    .btn-primary-custom:hover {
        background-color: #db2777; /* Pink-600 */
        color: white;
        transform: translateY(-2px);
    }

.btn-outline-custom {
    border: 2px solid #fbcfe8;
    color: var(--primary);
    background: transparent;
}

    .btn-outline-custom:hover {
        background-color: #fff1f2;
        color: var(--primary);
    }

/* --- 4. HERO SECTION --- */
.hero-section {
    background: linear-gradient(135deg, #fff5f6 0%, #e0f2f1 100%);
    padding-top: 100px; /* Tránh header che */
    padding-bottom: 80px;
    overflow: hidden;
}

.hero-tag {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero-img-wrapper {
    position: relative;
}
/* Trang trí nền sau ảnh */
.blob-1 {
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    background-color: var(--teal-light);
    border-radius: 50%;
    z-index: -1;
    filter: blur(20px);
}

.blob-2 {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background-color: var(--primary-light);
    border-radius: 50%;
    z-index: -1;
    filter: blur(30px);
}

/* --- 5. CARDS (CATEGORY & BLOG) --- */
.card-custom {
    border: none;
    border-radius: var(--radius); /* Bo góc 24px */
    transition: all 0.3s ease;
}

    .card-custom:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    }

/* Màu riêng cho từng loại thẻ */
.card-pink {
    background-color: #fff1f2;
}

    .card-pink:hover {
        background-color: #fce7f3;
    }

    .card-pink .icon-box {
        color: var(--primary);
    }

.card-teal {
    background-color: #f0fdfa;
}

    .card-teal:hover {
        background-color: #ccfbf1;
    }

    .card-teal .icon-box {
        color: var(--teal);
    }

.card-orange {
    background-color: #fff7ed;
}

    .card-orange:hover {
        background-color: #ffedd5;
    }

    .card-orange .icon-box {
        color: var(--orange);
    }

.icon-box {
    width: 60px;
    height: 60px;
    background-color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.blog-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0; /* Bo 2 góc trên */
}

/* --- 6. FOOTER --- */
footer {
    background-color: #111827; /* Gray-900 */
    color: #9ca3af; /* Gray-400 */
    padding-top: 4rem;
    padding-bottom: 2rem;
}

    footer h5 {
        color: white;
        margin-bottom: 1.5rem;
    }

    footer a {
        color: #9ca3af;
        text-decoration: none;
        transition: 0.3s;
    }

        footer a:hover {
            color: var(--primary);
            padding-left: 5px;
        }

/* =========================================
   SMART ADMIN SIDEBAR
   ========================================= */
:root {
    --sb-width: 260px;
    --sb-mini: 70px;
    --sb-bg: #1e293b;
    --sb-text: #94a3b8;
    --sb-active: #ec4899;
}

/* Sidebar mặc định thu nhỏ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sb-mini); /* Mặc định nhỏ */
    background: var(--sb-bg);
    color: var(--sb-text);
    transition: width 0.3s ease;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

    /* Khi Ghim hoặc Hover -> Mở rộng */
    .sidebar.pinned,
    .sidebar:hover {
        width: var(--sb-width);
    }

/* Header Logo */
.sidebar-header {
    height: 64px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
    padding-left: 0;
}

.brand-icon {
    min-width: var(--sb-mini);
    text-align: center;
    font-size: 1.5rem;
    color: var(--sb-active);
}

.brand-text {
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.sidebar.pinned .brand-text, .sidebar:hover .brand-text {
    opacity: 1;
}

/* Nút Ghim (Toggle) */
.btn-pin {
    margin-left: auto;
    margin-right: 10px;
    background: none;
    border: none;
    color: white;
    opacity: 0;
    transition: 0.2s;
    cursor: pointer;
}

.sidebar.pinned .btn-pin, .sidebar:hover .btn-pin {
    opacity: 1;
}

/* ====================================================
   FIX MÀU ICON ADMIN (LÀM SÁNG MENU)
   ==================================================== */

/* 1. Trạng thái bình thường: Icon màu Trắng tinh, Chữ màu Xám sáng */
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8) !important; /* Chữ sáng 80% */
}

    .sidebar .nav-link i {
        color: #ffffff !important; /* ICON TRẮNG TINH 100% */
        text-shadow: 0 0 5px rgba(0,0,0,0.5); /* Thêm bóng nhẹ cho nổi */
        font-size: 1.3rem; /* Tăng kích thước nhẹ */
    }

    /* 2. Trạng thái Đang chọn (Active) hoặc Rê chuột (Hover) */
    .sidebar .nav-link:hover,
    .sidebar .nav-link.active {
        background: rgba(255, 255, 255, 0.1) !important; /* Nền sáng nhẹ */
        color: #ffffff !important; /* Chữ trắng */
    }

        .sidebar .nav-link.active i,
        .sidebar .nav-link:hover i {
            color: #ec4899 !important; /* Icon chuyển sang MÀU HỒNG khi chọn */
        }

/* 3. Header & Nút Ghim */
.sidebar-header .brand-text {
    color: #ffffff !important; /* Tên Admin trắng tinh */
}

.btn-toggle {
    color: rgba(255,255,255,0.7) !important;
}

    .btn-toggle:hover {
        color: #ffffff !important;
    }

/* Main Content co giãn */
.main-content {
    margin-left: var(--sb-mini); /* Mặc định cách lề nhỏ */
    padding: 20px;
    transition: margin-left 0.3s ease;
}

    .main-content.pinned {
        margin-left: var(--sb-width);
    }
/* --- FIX MENU DROPDOWN --- */

/* 1. Tắt mũi tên tam giác mặc định của Bootstrap (để ta dùng icon đẹp hơn) */
.dropdown-toggle::after {
    display: none !important;
}

/* 2. Căn chỉnh chữ và icon nằm ngang hàng */
.nav-link {
    display: flex !important;
    align-items: center;
    gap: 6px; /* Khoảng cách giữa chữ và mũi tên */
}

    /* 3. Chỉnh icon mũi tên nhỏ lại và màu nhạt hơn chút cho tinh tế */
    .nav-link i.fa-chevron-down,
    .nav-link i.fa-angle-down {
        font-size: 0.75rem; /* Icon nhỏ */
        opacity: 0.6;
        margin-top: 2px; /* Căn chỉnh nhẹ xuống dưới */
    }

/* 4. Hiệu ứng xoay mũi tên khi menu mở (Optional - cho xịn) */
.dropdown.show .nav-link i {
    transform: rotate(180deg);
    transition: transform 0.3s;
}
/* =========================================
   MOBILE BOTTOM NAVIGATION (APP BAR)
   ========================================= */
/* 1. Khung chứa thanh menu */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px; /* Chiều cao cố định */
    background-color: #ffffff;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05); /* Bóng mờ nhẹ phía trên */
    border-top: 1px solid #fce7f3; /* Viền hồng nhạt */

    display: flex;
    justify-content: space-around; /* Chia đều khoảng cách các nút */
    align-items: center;
    z-index: 9999 !important; /* Luôn nằm trên cùng */
    padding-bottom: env(safe-area-inset-bottom); /* Fix cho iPhone tai thỏ */
}

    /* 2. Định dạng từng nút (Item) */
    .mobile-nav .nav-item {
        display: flex;
        flex-direction: column; /* Icon nằm trên, chữ nằm dưới */
        align-items: center;
        justify-content: left;
        text-decoration: none !important; /* QUAN TRỌNG: Bỏ gạch chân link */
        color: #94a3b8; /* Màu xám mặc định (chưa active) */
        font-size: 11px;
        font-weight: 600;
        width: 100%; /* Để vùng bấm rộng ra */
        height: 100%;
        transition: all 0.3s ease;
    }

        /* 3. Định dạng Icon trong nút */
        .mobile-nav .nav-item i {
            font-size: 22px; /* Kích thước icon to rõ */
            margin-bottom: 4px;
        }

        /* 4. Trạng thái đang chọn (Active) */
        .mobile-nav .nav-item.active {
            color: #ec4899 !important; /* Màu hồng chủ đạo */
        }

        .mobile-nav .nav-item:hover {
            background-color: #fff1f2; /* Hiệu ứng nền nhẹ khi bấm */
            color: #ec4899;
        }

/* 5. Nút tròn to ở giữa (Floating Action Button) */
.fab-wrapper {
    position: relative;
    top: -25px; /* Đẩy nổi lên trên thanh menu */
}

.fab-button {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); /* Màu gradient đẹp */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4); /* Bóng đổ hồng */
    border: 4px solid #ffffff; /* Viền trắng cắt nền */
    font-size: 24px;
    transition: transform 0.2s;
}

    .fab-button:active {
        transform: scale(0.95); /* Hiệu ứng nhấn xuống */
    }

/* 6. Đẩy nội dung web lên để không bị menu che mất */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px !important;
    }
    /* Ẩn footer to của PC đi cho đỡ rối */
    /*footer {
        display: none;
    }*/
}