<style>
.header-index {
    position: relative;
    z-index: 10;
    background: transparent;
}

/* Tầng 1: Top bar */
.header-index .top-bar {
    background: rgba(0, 40, 100, 0.88);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.header-index .logo-khu {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-index .logo-khu img {
    height: 38px;
    width: 38px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
}
.header-index .ten-thuong-hieu {
    display: flex;
    flex-direction: column;
}
.header-index .ten-thuong-hieu strong {
    font-size: 17px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}
.header-index .ten-thuong-hieu span {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}
.header-index .tai-khoan-khu {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #fff;
}
.header-index .tai-khoan-khu a { color: #fff; text-decoration: none; }
.header-index .nut-vi {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff !important;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}
.header-index .nut-vi:hover { background: rgba(255,255,255,0.25); }
.header-index .nut-dang-nhap {
    background: #fff;
    color: #0056b3 !important;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    transition: 0.2s;
}
.header-index .nut-dang-nhap:hover { background: #e8f0fe; }
.header-index .nut-thoat {
    color: rgba(255,255,255,0.6) !important;
    font-size: 12px;
}

/* Tầng 2: Navigation */
.header-index .nav-bar {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 0 20px;
}
.header-index .nav-bar a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 16px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.header-index .nav-bar a:hover,
.header-index .nav-bar a.active {
    color: #fff;
    border-bottom-color: #fff;
    background: rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
    .header-index .nav-bar { display: none; }
    .header-index .top-bar { padding: 8px 15px; }
    .header-index .ten-thuong-hieu strong { font-size: 14px; }
}
</style>

<header class="header-index">
    <div class="top-bar">
        <div class="logo-khu">
            <img src="images/icon.png" alt="Logo">
            <div class="ten-thuong-hieu">
                <strong>Cộng đồng Nghệ thuật Sư phạm TW</strong>
                <span>Xây dựng và phát huy các giá trị nghệ thuật dân tộc</span>
            </div>
        </div>
        <div class="tai-khoan-khu">
            <?php if(isset($_SESSION['nguoi_dung_id'])): ?>
                <a href="vi-thanh-vien.php" class="nut-vi">💳 <?php echo number_format($so_du_vi, 0, ',', '.'); ?> ₫</a>
                <span>Chào, <a href="ho-so-ca-nhan.php"><strong><?php echo $_SESSION['ho_ten']; ?></strong></a></span>
                <a href="dang-xuat.php" class="nut-thoat">(Thoát)</a>
            <?php else: ?>
                <a href="dang-nhap.php" class="nut-dang-nhap">Đăng nhập</a>
            <?php endif; ?>
        </div>
    </div>
    <nav class="nav-bar">
        <a href="index.php" class="active">🏠 Trang chủ</a>
        <a href="tin-su-kien.php">📰 Tin tức</a>
        <a href="am-nhac.php">🎤 Ca múa nhạc</a>
        <a href="hoi-hoa.php">🎨 Hội họa</a>
        <a href="gian-hang.php">🛍️ Gian hàng</a>
        <a href="thong-bao-su-kien.php">📢 Thông báo</a>
        <a href="lien-he.php">📩 Liên hệ</a>
    </nav>
</header>
