/* theme-3 — UI dựa trên web-3 (nền sáng bo tròn mềm + section tối xen kẽ, amber + teal) */
:root {
    --deep-navy: #0f172a;
    --slate-800: #1e293b;
    --surface-white: #ffffff;
    --surface-light: #f8fafc;
    --accent-gold: #f0a500;
    --accent-amber: #d97706;
    --accent-teal: #0d9488;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-elevated: 0 10px 25px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.04);
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
* { box-sizing: border-box; }
body {
    background: var(--surface-light);
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
.text-white-75 { color: rgba(255, 255, 255, .8); }
.text-white-50 { color: rgba(255, 255, 255, .65); }
.bg-glass { background: rgba(255, 255, 255, .06); backdrop-filter: blur(12px); }
.bg-deep { background: var(--deep-navy); }
.bg-cta { background: #1e3a8a; }

/* ===== Header (navy + pill nav) ===== */
.navbar-modern {
    background: var(--deep-navy);
    padding: 0.4rem 0;
    border-bottom: 2px solid rgba(240, 165, 0, 0.3);
    z-index: 1030;
}
.navbar-modern .navbar-brand img { max-height: 44px; object-fit: contain; }
.navbar-modern .nav-link {
    color: #cbd5e1 !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.55rem 0.9rem !important;
    border-radius: 8px;
    transition: var(--transition-smooth);
}
.navbar-modern .nav-link:hover { color: #fff !important; background: rgba(255, 255, 255, 0.08); }
.navbar-modern .nav-link.active {
    color: #fff !important;
    background: rgba(240, 165, 0, 0.18);
    font-weight: 700;
}
.navbar-modern .btn-register {
    background-color: var(--accent-amber);
    border: none;
    color: #0f172a !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.5rem 1.8rem;
    text-decoration: none;
    transition: 0.3s;
}
.navbar-modern .btn-register:hover { background-color: #b45309; }
.navbar-modern .btn-login {
    color: #cbd5e1;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.5rem 1.4rem;
    font-weight: 500;
    text-decoration: none;
    transition: 0.3s;
}
.navbar-modern .btn-login:hover { color: #fff; border-color: #cbd5e1; }

/* ===== Breadcrumb ===== */
.breadcrumb-nav { background: #fff; border-bottom: 1px solid var(--border-light); }

/* ===== Hero ===== */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    min-height: 72vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero-section .hero-accent { color: #fbbf24; }
.hero-section .hero-img { max-height: 400px; border-radius: var(--radius-md); }

/* ===== Card bài viết (bo tròn mềm) ===== */
.card-soft {
    display: flex;
    flex-direction: column;
    background: var(--surface-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    height: 100%;
}
.card-soft:hover { transform: translateY(-5px); box-shadow: var(--shadow-elevated); }
.card-soft .card-img-wrap { height: 200px; overflow: hidden; position: relative; }
.card-soft .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card-soft:hover .card-img-wrap img { transform: scale(1.04); }
.card-soft .card-body { padding: 1.25rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.card-soft .card-body h2 a, .card-soft .card-body h3 a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
}
.card-soft .card-body h2 a:hover, .card-soft .card-body h3 a:hover { color: var(--accent-amber); }
.card-soft .meta-info {
    margin-top: auto;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
@media (max-width: 768px) {
    .card-soft .card-img-wrap { height: 160px; }
}

/* ===== Panel trắng bo tròn ===== */
.panel-soft {
    background: var(--surface-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

/* ===== Feature box viền vuông (section sáng) ===== */
.feature-box {
    background: var(--surface-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}
.feature-box:hover { box-shadow: var(--shadow-elevated); }

/* ===== Sidebar hot ===== */
.sidebar-hot-card {
    background: var(--surface-white);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 1.2rem;
}
.sidebar-hot-card .hot-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
}
.sidebar-hot-card .hot-item:last-child { border-bottom: none; }
.sidebar-hot-card .hot-item:hover {
    background: var(--surface-light);
    border-radius: 8px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.sidebar-hot-card .hot-img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}
.sidebar-hot-card .hot-info h3, .sidebar-hot-card .hot-info h4 {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-hot-card .hot-info .date { font-size: 0.7rem; color: var(--text-muted); }
.sticky-sidebar { position: sticky; top: 90px; }

/* ===== Nội dung bài viết ===== */
.content-box { line-height: 1.9; }
.content-box img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.badge-category {
    background: rgba(240, 165, 0, 0.15);
    color: var(--accent-amber);
    border-radius: 30px;
    padding: 0.3rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}
.badge-category:hover { background: var(--accent-amber); color: #fff; }

/* ===== Timeline ảnh tròn ===== */
.timeline-circle {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-card);
}
.timeline-circle img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Phân trang ===== */
.pagination .page-link {
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin: 0 3px;
}
.pagination .page-link:hover { color: var(--accent-amber); background: var(--surface-light); }
.pagination .page-item.active .page-link {
    background: var(--accent-amber);
    border-color: var(--accent-amber);
    color: #fff;
}

/* ===== Form ===== */
.theme3-form .form-control {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    padding: 0.75rem 1rem;
}
.theme3-form .form-control:focus {
    border-color: var(--accent-amber);
    box-shadow: 0 0 0 0.2rem rgba(240, 165, 0, 0.12);
}
.btn-amber {
    background-color: var(--accent-amber);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.7rem 2.2rem;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
}
.btn-amber:hover { background-color: #b45309; color: #fff; }
.btn-outline-soft {
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: 0.7rem 2.2rem;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
    background: var(--surface-white);
}
.btn-outline-soft:hover { border-color: var(--accent-amber); color: var(--accent-amber); }

/* ===== Footer ===== */
.footer-official {
    background-color: var(--deep-navy);
    color: #94a3b8;
    border-top: 4px solid var(--accent-amber);
}
.footer-official h6 { color: #f1f5f9; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.footer-official a { color: #94a3b8; text-decoration: none; }
.footer-official a:hover { color: #fbbf24; }
.footer-official .footer-bottom { border-top: 1px solid #1e293b; color: #64748b; }

/* ===== Back to top ===== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #1e3a8a;
    color: #fff;
    border: none;
    display: none;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

/* ===== App/glass page (port từ web-3) ===== */
:root {
    --accent: #fdbb2d;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.08);
}
.hero-glass, .glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}
.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.8rem;
}
.btn-download {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.25s;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3); }
.timeline-item { position: relative; padding-left: 32px; margin-bottom: 2rem; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(253, 187, 45, 0.2);
}
.timeline-item::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 28px;
    width: 2px;
    height: calc(100% - 22px);
    background: rgba(255, 255, 255, 0.12);
}
.qr-tab-content { min-height: 280px; }

/* ===== Biến nền tối (port từ web-3 index/app) ===== */
:root {
    --color-primary: #1e3a8a;
    --color-accent: #d97706;
    --color-dark: #0f172a;
    --color-light: #f8fafc;
    --primary: #1a2a6c;
    --secondary: #b21f1f;
    --dark-bg: #0a0f1a;
}
/* Trang app: nền tối chữ sáng như web-3/app (body #000/#fff) */
.app-dark { background-color: #000; color: #fff; }
.app-dark .text-secondary { color: #94a3b8 !important; }
.app-dark .text-muted { color: #94a3b8 !important; }
.app-dark a:not(.btn):not(.accordion-button) { color: #cbd5e1; }
.app-dark .accordion-button { color: #fff; }
