/* ================= BIẾN CSS CHUNG ================= */
:root {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border-color: #e2e8f0;
}

/* ================= RESET & BASE ================= */
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ================= HEADER ================= */
.site-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 5%;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    margin-left: 20px;
    transition: color 0.2s;
}

.header-links a:hover {
    color: var(--primary);
}

/* ================= FOOTER ================= */
.site-footer {
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}

/* ================= HERO SECTION (Giới thiệu) ================= */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
}

.hero h1 {
    font-size: 2.5rem;
    color: #0f172a;
    margin: 0 0 10px 0;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0;
}

/* ================= LAYOUT GRID CHÍNH (Trang Chủ) ================= */
.container {
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 60px;
    width: 100%;
    box-sizing: border-box;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* ================= CARD BÀI VIẾT ================= */
.post-card {
    background: var(--bg-surface);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.08);
    border-color: #bfdbfe;
}

.post-card h3 {
    margin: 0 0 8px 0;
    color: #0f172a;
    font-size: 1.3rem;
    line-height: 1.4;
}

.post-card .date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: block;
}

.tags-container {
    margin-bottom: 15px;
}

.tag {
    background: #eff6ff;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 8px;
    display: inline-block;
}

.post-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.post-card a.read-more-btn {
    display: inline-block;
    text-decoration: none;
    color: var(--primary);
    background: #eff6ff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    align-self: flex-start;
}

.post-card a.read-more-btn:hover {
    background: var(--primary);
    color: white;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 2rem;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
