/**
 * KBBET Main Stylesheet
 * Aesthetic: Modern, Clean, Professional with Coral & Deep Teal accent
 * Typography: Lexend (primary), JetBrains Mono (code)
 */

/* ========================================
   CSS Variables
======================================== */
:root {
    /* Primary Colors - KBBET Red Palette (High Contrast) */
    --color-primary: #e11d48;        /* main red */
    --color-primary-dark: #b91c1c;   /* darker red for hover */
    --color-primary-light: #fecaca;  /* soft red background */
    --color-secondary: #0f172a;      /* deep navy for contrast sections */
    --color-secondary-dark: #020617;
    --color-secondary-light: #1d4ed8;
    
    /* Accent Colors */
    --color-accent: #FFD93D;
    --color-accent-muted: #FFF3CD;
    
    /* Neutral Colors */
    --color-bg: #0f172a;             /* dark background for better contrast */
    --color-bg-alt: #111827;
    --color-bg-dark: #020617;
    --color-surface: #FFFFFF;
    --color-surface-elevated: #FFFFFF;
    
    /* Text Colors */
    --color-text: #f9fafb;
    --color-text-secondary: #e5e7eb;
    --color-text-muted: #9ca3af;
    --color-text-inverse: #111827;
    
    /* Border & Shadow */
    --color-border: rgba(148, 163, 184, 0.4);
    --color-border-light: rgba(148, 163, 184, 0.25);
    --shadow-sm: 0 1px 3px rgba(15,23,42,0.35);
    --shadow-md: 0 4px 14px rgba(15,23,42,0.45);
    --shadow-lg: 0 12px 40px rgba(15,23,42,0.55);
    --shadow-xl: 0 24px 60px rgba(15,23,42,0.6);
    
    /* Typography */
    --font-primary: 'Lexend', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    
    /* Container */
    --container-max: 1200px;
    --container-narrow: 800px;
}

/* ========================================
   Reset & Base
======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background: radial-gradient(circle at top, #1f2937 0, #020617 55%, #000000 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 91, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(13, 115, 119, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    pointer-events: none;
    z-index: -1;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

ul, ol {
    list-style-position: inside;
}

/* ========================================
   Typography
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--space-md);
}

.lead {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    font-weight: 300;
}

/* ========================================
   Container
======================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: var(--container-narrow);
}

/* ========================================
   App Download Bar
======================================== */
.app-bar {
    background: linear-gradient(135deg, var(--color-primary-dark), #7f1d1d);
    color: var(--color-text);
    padding: var(--space-sm) 0;
    display: none; /* Hidden on desktop by default */
}

.app-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.app-bar-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.app-bar-icon,
.app-bar-emoji {
    width: 32px;
    height: 32px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.app-bar-text {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    line-height: 1.3;
}

.app-bar-text strong {
    font-size: 0.875rem;
    color: var(--color-accent);
}

.app-bar-text span {
    opacity: 0.9;
}

.btn-app-download {
    background: var(--color-accent);
    color: #111827;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-app-download:hover {
    background: #fbbf24;
    color: #111827;
}

/* ========================================
   Header
======================================== */
.site-header {
    background: linear-gradient(90deg, #020617 0%, #111827 40%, #111827 60%, #020617 100%);
    border-bottom: 1px solid rgba(248, 250, 252, 0.06);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: transparent;
}

/* Spacer for fixed header */
body {
    padding-top: 70px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    gap: var(--space-lg);
    position: relative;
}

/* Header Right Side */
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Header Auth Buttons */
.header-auth {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-auth {
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-auth-register {
    background: var(--color-primary);
    color: #f9fafb;
}

.btn-auth-register:hover {
    background: var(--color-primary-dark);
    color: white;
}
.btn-auth-tt {
    background: var(--color-primary);
    color: #f9fafb;
}

.btn-auth-tt:hover {
    background: var(--color-primary-dark);
    color: white;
}
.btn-auth-login {
    background: rgba(15,23,42,0.8);
    color: #e5e7eb;
    border: 1px solid rgba(248,250,252,0.08);
}

.btn-auth-login:hover {
    border-color: var(--color-primary);
    color: #f9fafb;
}

/* Search Toggle Button */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-toggle:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.search-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.search-modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    margin: 0 var(--space-lg);
    transform: translateY(-20px) scale(0.95);
    transition: transform var(--transition-base);
    overflow: hidden;
}

.search-modal.is-open .search-modal-content {
    transform: translateY(0) scale(1);
}

.search-modal-header {
    border-bottom: 1px solid var(--color-border-light);
}

.search-form {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    gap: var(--space-md);
}

.search-icon {
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.125rem;
    font-family: var(--font-primary);
    color: var(--color-text);
    outline: none;
}

.search-input::placeholder {
    color: var(--color-text-muted);
}

.search-close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-bg-alt);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-close:hover {
    background: var(--color-primary);
    color: white;
}

.search-modal-body {
    padding: var(--space-lg);
    max-height: 50vh;
    overflow-y: auto;
}

.search-hint {
    color: var(--color-text-muted);
    text-align: center;
    padding: var(--space-lg) 0;
}

.search-popular {
    margin-top: var(--space-lg);
}

.search-popular h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.search-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--color-bg-alt);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.search-tag:hover {
    background: var(--color-primary);
    color: white;
}

/* Search Results */
.search-results {
    list-style: none;
}

.search-result-item {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.search-result-item:hover {
    background: var(--color-bg-alt);
}

.search-result-item a {
    text-decoration: none;
    color: var(--color-text);
}

.search-result-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.search-result-excerpt {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-text);
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
    color: var(--color-text);
}

.logo-image {
    height: 40px;
    width: auto;
}

.logo-text {
    background: linear-gradient(135deg, var(--color-primary), #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: var(--space-xs);
    list-style: none;
}

.nav-link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: #e5e7eb;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: #f9fafb;
    background: rgba(239, 68, 68, 0.12);
}

.nav-link.active {
    color: #f9fafb;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* ========================================
   Hero Section
======================================== */
.hero {
    padding: 0; /* sẽ được thay bằng homepage-hero */
}

/* ========================================
   Homepage Hero (mới)
======================================== */
.homepage-hero {
    padding: calc(var(--space-3xl) + 1rem) 0 var(--space-3xl);
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(248, 113, 113, 0.25), transparent 55%),
                radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.18), transparent 55%);
}

.homepage-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
    gap: var(--space-2xl);
}

.hero-content {
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.homepage-hero-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(248, 250, 252, 0.06);
    border: 1px solid rgba(248, 113, 113, 0.7);
    color: #fecaca;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
}

.hero-badge::before {
    content: 'KBBET';
    font-weight: 800;
    font-size: 0.85rem;
    color: #fb7185;
}

.hero h1 {
    margin-bottom: var(--space-lg);
}

.hero h1 span {
    color: var(--color-primary);
}

.hero-description {
    font-size: 1.1rem;
    color: #e5e7eb;
    margin-bottom: var(--space-xl);
    max-width: 640px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-md);
}

/* Hero Image */
.hero-image-wrapper {
    margin: 0;
    max-width: 420px;
}

.hero-image {
    width: 100%;
    border-radius: 999px;
    box-shadow: 0 24px 80px rgba(15,23,42,0.85);
    border: 2px solid rgba(248, 250, 252, 0.08);
}

.hero-actions {
    justify-content: flex-start;
}

.homepage-hero-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.homepage-hero-list li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: #e5e7eb;
}

.homepage-hero-list span {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fecaca;
}

.homepage-hero-aside {
    align-self: center;
}

.homepage-hero-aside-card {
    background: radial-gradient(circle at top, rgba(15,23,42,0.9), rgba(15,23,42,0.98));
    border-radius: 20px;
    padding: var(--space-xl);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-lg);
}

.homepage-hero-aside-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9ca3af;
    margin-bottom: var(--space-sm);
}

.homepage-hero-aside h2 {
    margin: 0 0 var(--space-md);
    font-size: 1.4rem;
}

.homepage-hero-aside p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.homepage-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.homepage-hero-stat {
    flex: 1 1 120px;
}

.homepage-hero-stat strong {
    display: block;
    font-size: 1.2rem;
    color: #fecaca;
}

.homepage-hero-stat span {
    font-size: 0.8rem;
    color: #9ca3af;
}

.homepage-hero-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.homepage-hero-links a {
    color: #e5e7eb;
}

.homepage-hero-links a:hover {
    color: var(--color-accent);
}

/* Hero Fullwidth with Background Image */
.hero-fullwidth {
    position: relative;
    min-height: 450px;
    padding: var(--space-3xl) 0;
    text-align: left;
    background-color: #0d1b2a;
    background-size: contain;
    background-position: left center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        115deg,
        rgba(13, 27, 42, 0) 0%,
        rgba(13, 27, 42, 0) 55%,
        rgba(13, 27, 42, 0.9) 60%,
        rgba(13, 27, 42, 1) 65%,
        rgba(13, 27, 42, 1) 100%
    );
    z-index: 1;
}

.hero-fullwidth .container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
}

.hero-content-right {
    max-width: 420px;
    padding: var(--space-xl);
    padding-right: 0;
    margin-right: -2rem;
    color: var(--color-text-inverse);
}

.hero-promo-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.promo-icon {
    font-size: 1.5rem;
}

.promo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.promo-text strong {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.promo-text span {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-fullwidth .hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--space-sm);
    line-height: 1.15;
}

.hero-fullwidth .hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: var(--space-xl);
}

.hero-fullwidth .hero-actions {
    justify-content: flex-start;
}

.hero-fullwidth .btn-large {
    padding: var(--space-md) var(--space-2xl);
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    border-radius: var(--radius-md);
}

.hero-fullwidth .btn-large:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Steps Section */
.steps-section {
    background: var(--color-bg-dark);
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.step-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: #fff;
}

.step-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255,255,255,0.9);
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f59e0b;
    margin-bottom: 0.25rem;
}

.step-desc {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

/* Responsive Hero Fullwidth */
@media (max-width: 992px) {
    .hero-fullwidth {
        min-height: auto;
        padding: var(--space-2xl) 0;
        background-size: cover;
        background-position: center center;
    }
    
    .hero-overlay {
        background: rgba(13, 27, 42, 0.85);
    }
    
    .hero-fullwidth .container {
        justify-content: center;
    }
    
    .hero-content-right {
        text-align: center;
        max-width: 100%;
        background: transparent;
        backdrop-filter: none;
    }
    
    .hero-fullwidth .hero-actions {
        justify-content: center;
    }
    
    .hero-promo-badge {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 576px) {
    .hero-fullwidth {
        padding: var(--space-xl) 0;
    }
    
    .hero-content-right {
        padding: var(--space-md);
    }
    
    .hero-fullwidth .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-fullwidth .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .step-card {
        padding: var(--space-md);
        background: rgba(255,255,255,0.05);
        border-radius: var(--radius-md);
    }
}

/* ========================================
   Buttons
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #f9fafb;
    box-shadow: 0 4px 16px rgba(248, 113, 113, 0.45);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(248, 113, 113, 0.6);
    color: #f9fafb;
}

.btn-secondary {
    background: rgba(15,23,42,0.95);
    color: #e5e7eb;
    border: 1px solid rgba(148,163,184,0.5);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: #f9fafb;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #f9fafb;
}

/* ========================================
   Sections
======================================== */
.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

.section-subtitle {
    display: inline-block;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

/* Homepage topics section (3 cards dưới hero) */
.section-home-topics .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section-home-topics .card {
    background: rgba(15,23,42,0.95);
    border-radius: 18px;
}

.section-home-topics .card-title {
    font-size: 1.1rem;
}

.section-home-topics .btn {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.85rem;
}

/* ========================================
   Cards
======================================== */
.card {
    background: radial-gradient(circle at top left, rgba(248, 113, 113, 0.08), rgba(15, 23, 42, 0.95));
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(148, 163, 184, 0.35);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: var(--space-lg);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.card-title a {
    color: #f9fafb;
}

.card-title a:hover {
    color: var(--color-accent);
}

.card-excerpt {
    color: #e5e7eb;
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

/* ========================================
   Featured Posts
======================================== */
.featured-posts {
    background: var(--color-bg-alt);
}

/* ========================================
   Reviews Slider
======================================== */
.section-reviews {
    background: radial-gradient(circle at top, rgba(15,23,42,1), rgba(15,23,42,0.96));
}

.reviews-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.reviews-viewport {
    overflow: hidden;
    flex: 1;
}

.reviews-track {
    display: flex;
    gap: var(--space-lg);
    transition: transform var(--transition-base);
}

.review-card {
    background: rgba(15,23,42,0.95);
    border-radius: 18px;
    padding: var(--space-lg);
    border: 1px solid rgba(148,163,184,0.4);
    box-shadow: var(--shadow-md);
    max-width: 360px;
    min-width: 0;
    flex: 1 0 0;
}

.review-text {
    font-size: 0.95rem;
    color: #e5e7eb;
    margin-bottom: var(--space-md);
}

.review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #9ca3af;
}

.review-score {
    font-weight: 600;
    color: var(--color-accent);
}

.reviews-nav {
    background: rgba(15,23,42,0.9);
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.6);
    color: #e5e7eb;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition-fast);
}

.reviews-nav:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* ========================================
   Page Header
======================================== */
.page-header {
    padding: var(--space-3xl) 0 var(--space-2xl);
    text-align: center;
    background: linear-gradient(135deg, #020617 0%, #111827 60%, #1f2937 100%);
    border-bottom: 1px solid var(--color-border-light);
}

.page-header h1 {
    margin-bottom: var(--space-md);
}

.page-header .lead {
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    list-style: none;
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    color: var(--color-text-muted);
}

.breadcrumb-item a {
    color: var(--color-text-secondary);
}

.breadcrumb-item a:hover {
    color: var(--color-primary);
}

.breadcrumb-item.active {
    color: var(--color-text-muted);
}

/* ========================================
   Content
======================================== */
.content {
    padding: var(--space-2xl) 0;
}

.content-body {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.content-body h2 {
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border-light);
}

.content-body h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.content-body ul, 
.content-body ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-lg);
}

.content-body li {
    margin-bottom: var(--space-sm);
}

.content-body figure {
    margin: var(--space-xl) 0;
}

.content-body figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
}

/* ========================================
   Post Layout (mới)
======================================== */
.post-layout {
    padding: var(--space-3xl) 0;
}

.post-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 0.9fr);
    gap: var(--space-2xl);
    align-items: flex-start;
}

.post-main {
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 1));
    border-radius: 24px;
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.post-main .content-body {
    max-width: 100%;
    margin: 0;
}

.post-aside {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.post-aside-card {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 18px;
    padding: var(--space-lg);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
}

.post-aside-card h3 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9ca3af;
    margin-bottom: var(--space-sm);
}

.post-aside-card strong {
    color: #e5e7eb;
}

.post-aside-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-aside-list li {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: 0.4rem;
    color: var(--color-text-secondary);
}

.post-related {
    margin-top: var(--space-3xl);
}

.post-related-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.post-related-item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    padding: var(--space-md);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.post-related-thumb {
    width: 80px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.post-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-related-content h4 {
    margin-bottom: 0.25rem;
    font-size: 0.98rem;
}

.post-related-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* ========================================
   Post
======================================== */
.post-header {
    padding: var(--space-2xl) 0;
}

.post-cover {
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.post-cover img {
    width: 100%;
    aspect-ratio: 21/9;
    object-fit: cover;
}

.post-image {
    margin: var(--space-xl) 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-image img {
    width: 100%;
}

/* ========================================
   Contact Form
======================================== */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

.contact-info h3 {
    margin-bottom: var(--space-md);
}

.contact-info p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.contact-details {
    list-style: none;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.contact-details li:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    font-size: 1.25rem;
}

.contact-form {
    background: var(--color-surface);
    color: var(--color-text-inverse);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border-light);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--color-text-inverse);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    border-radius: var(--radius-sm);
    background: #f9fafb;
    color: var(--color-text-inverse);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 91, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* ========================================
   Keyword Page
======================================== */
.keyword-hero {
    text-align: center;
    padding: var(--space-3xl) 0;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    color: var(--color-text-inverse);
}

.keyword-hero h1 {
    color: #ffffff;
}

.keyword-tag {
    display: inline-block;
    background: rgb(255 255 255);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

/* ========================================
   Footer
======================================== */
.site-footer {
    background: var(--color-bg-dark);
    color: #f9fafb; /* luôn dùng chữ sáng cho footer để tương phản tốt */
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: auto;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.footer-column {
    min-width: 0;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f9fafb;
    margin-bottom: var(--space-lg);
    position: relative;
    padding-bottom: var(--space-sm);
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: #e5e7eb;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: var(--space-sm);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(248, 250, 252, 0.08);
}

.copyright {
    color: #d1d5db;
    font-size: 0.9rem;
    margin: 0;
}

/* ========================================
   FAQ Section
======================================== */
.faq-section {
    margin-top: var(--space-2xl);
}

.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.faq-question {
    padding: var(--space-lg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--color-text-inverse);
}

.faq-question:hover {
    background: var(--color-bg-alt);
}

.faq-answer {
    padding: 0 var(--space-lg) var(--space-lg);
    color: #374151; /* chữ đậm hơn trên nền trắng để tương phản tốt */
}

/* ========================================
   Utilities
======================================== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-muted);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1024px) {
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-section {
        grid-template-columns: 1fr;
    }
    
    .hero-image-wrapper {
        max-width: 320px;
    }
}

@media (max-width: 768px) {
    :root {
        --space-3xl: 3rem;
    }
    
    /* Show App Bar on mobile */
    .app-bar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
    }
    
    /* Adjust header position when app-bar is visible */
    .site-header {
        top: 48px;
    }
    
    /* Adjust body padding for app-bar + header */
    body {
        padding-top: 118px;
    }
    
    /* Adjust header for mobile */
    .header-inner {
        gap: var(--space-sm);
    }
    
    .logo-image {
        height: 32px;
    }
    
    /* Header right on mobile */
    .header-right {
        gap: var(--space-xs);
    }
    
    /* Keep auth buttons visible on mobile but smaller */
    .header-auth {
        display: flex;
    }
    
    .btn-auth {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-surface);
        padding: var(--space-md);
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--color-border);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all var(--transition-base);
    }
    
    .main-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-link {
        padding: var(--space-md);
        font-size: 1.1rem;
        border-bottom: 1px solid var(--color-border-light);
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .hamburger span:nth-child(1) {
        transform: rotate(0);
    }
    
    .hamburger span:nth-child(2) {
        opacity: 1;
    }
    
    .hamburger span:nth-child(3) {
        transform: rotate(0);
    }
    
    .mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Homepage hero mobile layout */
    .homepage-hero {
        padding: var(--space-2xl) 0 var(--space-2xl);
    }

    .homepage-hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .hero-description {
        font-size: 1rem;
    }

    .homepage-hero-list {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
    }

    .homepage-hero-aside-card {
        padding: var(--space-lg);
    }

    .homepage-hero-aside h2 {
        font-size: 1.1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .section-home-topics .card {
        border-radius: 14px;
    }

    .card-content {
        padding: var(--space-md);
    }

    .card-title {
        font-size: 1.05rem;
    }

    .card-excerpt {
        font-size: 0.85rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
    }

    .section-reviews .reviews-slider {
        flex-direction: column;
        align-items: stretch;
    }

    .section-reviews .reviews-nav {
        align-self: center;
    }

    .section-reviews .review-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --space-lg: 1rem;
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
}

/* ========================================
   Print Styles
======================================== */
@media print {
    .site-header,
    .site-footer,
    .mobile-menu-toggle {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: 100%;
    }
}

