/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(17, 24, 39, 0.75);
    --border-light: rgba(255, 255, 255, 0.08);
    --text-primary: #e2e8f0; /* Màu chữ trắng xám giúp dịu mắt trên nền tối */
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --primary-gradient: linear-gradient(135deg, #6366f1, #4f46e5);
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    
    --success-gradient: linear-gradient(135deg, #10b981, #059669);
    --success-color: #10b981;
    
    --warning-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    --warning-color: #f59e0b;
    
    --danger-gradient: linear-gradient(135deg, #ef4444, #dc2626);
    --danger-color: #ef4444;

    --font-montserrat: 'Montserrat', sans-serif;
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Typography Utility Classes */
.font-montserrat {
    font-family: var(--font-montserrat) !important;
}
.font-inter {
    font-family: var(--font-inter) !important;
}
/* Fallback for obsolete outfit class references */
.font-montserrat {
    font-family: var(--font-montserrat) !important;
}

/* Global Reset & Body */
body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-inter);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 0px !important;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
}

p {
    line-height: 1.65; /* Thoáng hơn cho nền tối */
}

h1, .title-bai-viet {
    font-family: var(--font-montserrat);
    font-weight: 700;       /* Rất đậm để tạo điểm nhấn */
    letter-spacing: -0.02em; /* Thu hẹp khoảng cách chữ một chút */
    line-height: 1.3;
}

h2, .muc-lon {
    font-family: var(--font-montserrat);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 1.5rem;
    line-height: 1.4;
}

h3, h4, h5, h6, .sidebar-box-title {
    font-family: var(--font-montserrat);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Header & Navbar Customization */
.navbar {
    background-color: rgba(11, 15, 25, 0.8) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
    z-index: 1050 !important;
}

.navbar .container {
    position: relative !important;
}

.navbar-nav .dropdown-mega-li {
    position: static !important;
}

.navbar-brand {
    font-family: var(--font-montserrat);
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #818cf8, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 14px; /* Giảm nhẹ về 14px chuẩn UI */
    padding: 0.5rem 0.65rem !important;
    transition: all 0.2s ease;
    border-radius: 8px;
    white-space: nowrap;
    letter-spacing: 0.01em; /* Giãn nhẹ chữ ra dễ đọc ở size nhỏ */
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary) !important;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Container spacing */
.container {
    max-width: 1200px;
}

/* Premium Card (Glassmorphism) */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.25);
}

/* Action Button Gradients */
.btn-gradient-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-family: var(--font-montserrat);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.4);
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.6);
    filter: brightness(1.1);
    color: white;
}

.btn-gradient-success {
    background: var(--success-gradient);
    border: none;
    color: white;
    font-family: var(--font-montserrat);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.4);
}

.btn-gradient-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.6);
    filter: brightness(1.1);
    color: white;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-family: var(--font-montserrat);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* Interactive Wizard Styling */
.wizard-step-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wizard-badge {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.wizard-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.wizard-option-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.9rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-weight: 500;
}

.wizard-option-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.wizard-option-card.selected {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--primary-color);
    color: #818cf8;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

/* Wizard Recommendation Output */
.recommendation-output {
    margin-top: 2rem;
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.highlight-box {
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border-left: 4px solid;
}

.info-box {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.warning-box {
    background: rgba(245, 158, 11, 0.06);
    border-color: var(--warning-color);
    color: var(--text-primary);
}

.danger-box {
    background: rgba(239, 68, 68, 0.06);
    border-color: var(--danger-color);
    color: var(--text-primary);
}

.success-box {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--success-color);
    color: var(--text-primary);
}

/* Specs Table style */
.specs-table {
    width: 100%;
    margin-top: 1rem;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--border-light);
}

.specs-table td {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.specs-table td:first-child {
    font-weight: 600;
    color: var(--text-secondary);
    width: 35%;
}

/* Custom Lists (Pros & Cons) */
.pros-list, .cons-list {
    list-style: none;
    padding-left: 0;
}

.pros-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
}

.pros-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.cons-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
}

.cons-list li::before {
    content: "✗";
    position: absolute;
    left: 0;
    color: var(--danger-color);
    font-weight: bold;
}

/* ═══════════════════════════════════════════════
   FOOTER: FULL DESIGN SYSTEM
   ═══════════════════════════════════════════════ */

/* Remove default margin-top on body since footer manages its own spacing */
.site-footer {
    background-color: #04060c;
    margin-top: 5rem;
    font-family: var(--font-inter);
}

/* ── CTA STRIP (TOP BAR) ── */
.footer-cta-strip {
    background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(16,185,129,0.08) 100%);
    border-top: 1px solid rgba(99,102,241,0.25);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 1.75rem 0;
}

.footer-cta-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.footer-cta-title {
    font-family: var(--font-montserrat);
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.footer-cta-sub {
    font-size: 0.85rem;
    color: #cbd5e1; /* Tăng độ sáng chữ phụ để dễ đọc trên nền tối */
}

/* ── MAIN CONTENT AREA ── */
.footer-main {
    padding: 3.5rem 0 2.5rem;
    border-bottom: 1px solid var(--border-light);
}

.footer-brand-logo {
    font-family: var(--font-montserrat);
    font-weight: 800;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #818cf8, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.footer-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

/* ── SECTION LABELS ── */
.footer-section-label {
    font-family: var(--font-montserrat);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #818cf8;
    margin-bottom: 0.9rem;
    border-bottom: 1px solid rgba(99,102,241,0.15);
    padding-bottom: 0.5rem;
}

/* ── TRUST BADGES ── */
.footer-trust-badges {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.815rem;
    color: var(--text-secondary);
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s ease;
}

.trust-badge:hover {
    background: rgba(99,102,241,0.06);
    border-color: rgba(99,102,241,0.2);
    color: var(--text-primary);
}

.trust-badge-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ── AI SYSTEM TAGS ── */
.footer-ai-system {
    margin-top: 0.5rem;
}

.footer-ai-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ai-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6366f1;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 20px;
    padding: 0.25rem 0.65rem;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.ai-tag:hover {
    background: rgba(99,102,241,0.2);
    color: #818cf8;
}

/* ── FOOTER NAVIGATION LINKS ── */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem;
}

.footer-links li {
    margin-bottom: 0.45rem;
}

.footer-links a {
    font-size: 0.84rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    line-height: 1.5;
}

.footer-links a:hover {
    color: #a5b4fc;
    transform: translateX(3px);
}

/* ── AFFILIATE NOTICE ── */
.footer-affiliate-notice {
    background: rgba(245,158,11,0.04);
    border: 1px solid rgba(245,158,11,0.15);
    border-radius: 10px;
    padding: 0.9rem 1rem;
}

.footer-affiliate-text {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.footer-affiliate-text strong {
    color: #fbbf24;
}

/* ── HOW IT WORKS STRIP ── */
.footer-how-it-works {
    background: rgba(255,255,255,0.015);
    border-bottom: 1px solid var(--border-light);
    padding: 2rem 0;
}

.how-step {
    padding: 0.5rem;
}

.how-step-icon {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.how-step-title {
    font-family: var(--font-montserrat);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.how-step-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ── BOTTOM BAR ── */
.footer-bottom {
    padding: 1.25rem 0;
    background: rgba(0,0,0,0.2);
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-bottom-links {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #818cf8;
}

.footer-dot {
    color: rgba(255,255,255,0.15);
}

.footer-built-by {
    text-align: right;
}

.built-tag {
    font-size: 0.72rem;
    color: rgba(99,102,241,0.5);
    font-family: var(--font-montserrat);
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .footer-main {
        padding: 2.5rem 0 2rem;
    }

    .footer-bottom-links {
        justify-content: center;
    }

    .footer-built-by {
        text-align: center;
    }

    .footer-copyright {
        display: block;
        text-align: center;
    }
}

/* ── ADDITIONAL FOOTER STYLES ── */
.footer-operator-info {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.9rem 1rem;
}

.footer-disclaimer-bottom {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.6;
    opacity: 0.85;
}

.footer-disclaimer-bottom strong {
    color: var(--text-secondary);
}

.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #10b981 100%);
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* SEO Article Styles */
.article-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-content {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #e5e7eb;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #fff;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.35rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #f3f4f6;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    overflow: hidden;
}

.article-content th, .article-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    font-size: 0.95rem;
}

.article-content th {
    background: rgba(99, 102, 241, 0.08);
    font-family: var(--font-montserrat);
    font-weight: 600;
}

/* Compare Matrix Table */
.compare-matrix-table {
    width: 100%;
    margin-top: 2rem;
}

.compare-matrix-table th {
    font-family: var(--font-montserrat);
    font-size: 1.2rem;
    padding: 1rem;
    text-align: center;
}

.compare-matrix-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}

.metric-bar-container {
    background: rgba(255, 255, 255, 0.05);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.metric-bar {
    height: 100%;
    border-radius: 5px;
}

.metric-bar.side-a {
    background: linear-gradient(90deg, #6366f1, #818cf8);
}

.metric-bar.side-b {
    background: linear-gradient(90deg, #10b981, #34d399);
}

/* Category Badge Link */
.badge-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.badge-tag:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

/* Taxonomy visual nodes */
.tax-node {
    border-left: 2px dashed rgba(255, 255, 255, 0.15);
    padding-left: 1.5rem;
    margin-left: 0.75rem;
}

.tax-leaf {
    position: relative;
    padding: 0.35rem 0;
}

.tax-leaf::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: 50%;
    width: 1rem;
    border-top: 2px dashed rgba(255, 255, 255, 0.15);
}

.search-box-container {
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
}

.search-box-input {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-primary) !important;
    border-radius: 12px !important;
    padding: 0.8rem 1.2rem !important;
    padding-left: 2.75rem !important;
    font-family: var(--font-inter);
}

.search-box-input:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3) !important;
}

/* Mega Menu Custom Styling */
.dropdown-menu-mega {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    top: 100% !important;
    margin-top: 0.25rem !important;
    padding: 1.5rem !important;
    border-radius: 16px !important;
    background: rgba(17, 24, 39, 0.98) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
    z-index: 2000 !important;
}

.dropdown-menu-mega-md {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    top: 100% !important;
    margin-top: 0.25rem !important;
    padding: 1.5rem !important;
    border-radius: 16px !important;
    background: rgba(17, 24, 39, 0.98) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
    z-index: 2000 !important;
}

.dropdown-mega-title {
    font-family: var(--font-montserrat);
    font-size: 0.85rem;
    font-weight: 700;
    color: #818cf8;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.03em;
}

.dropdown-mega-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.35rem 0;
    display: block;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-mega-item:hover {
    color: var(--text-primary) !important;
    transform: translateX(4px);
    background: transparent !important;
}

.dropdown-mega-item::before {
    content: "•";
    color: rgba(99, 102, 241, 0.6);
    margin-right: 0.4rem;
}

/* Selected state for wizard option tags */
.btn-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border-color: #6366f1 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4) !important;
}

.btn-indigo:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
}