/*
==============================================
BẢO NGUYÊN SOFT - ULTRA MODERN IT THEME
==============================================
*/

@import url('https://cdn.jsdelivr.net/npm/tailwindcss@4.2.2/index.min.css');


:root {
    --bg-main: #f8fafc; /* Slate 50 - Nền chính hơi ngả xám rất nhẹ */
    --bg-surface: #ffffff; /* Nền trắng tinh cho các thẻ Card */
    --primary-blue: #2563eb; /* Blue 600 - Xanh dương đậm chuẩn doanh nghiệp */
    --primary-hover: #1d4ed8; /* Blue 700 */
    --text-heading: #0f172a; /* Slate 900 - Đen nhám sang trọng */
    --text-body: #475569; /* Slate 600 - Xám ghi dễ đọc */
    --border-light: #e2e8f0; /* Slate 200 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Nền họa tiết lưới (Grid Pattern) rất mờ cho Hero Section */
.bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ============================================
   TYPOGRAPHY & BUTTONS
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 8px; /* Bo góc nhẹ nhàng thay vì bo tròn xoe */
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.2); /* Đổ bóng màu xanh nhạt */
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-heading);
    border: 1px solid var(--border-light);
    background-color: #ffffff;
}

.btn-outline:hover {
    border-color: var(--text-body);
    background-color: var(--bg-main);
    transform: translateY(-2px);
}

/* ============================================
   CARDS (SERVICES, PROJECTS)
   ============================================ */
.saas-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02); /* Bóng siêu mỏng mặc định */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.saas-card:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    /* Bóng đổ tỏa đều, mềm mại mang phong cách Apple/Stripe */
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.08), 0 10px 20px -5px rgba(15, 23, 42, 0.04);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: #eff6ff; /* Nền xanh rất nhạt */
    color: var(--primary-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.saas-card:hover .icon-wrapper {
    transform: scale(1.05);
}

/* ============================================
   PROJECT CARDS
   ============================================ */
.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.08);
}

.project-img-container {
    width: 100%;
    height: 240px;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
}

.project-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img-container img {
    transform: scale(1.03);
}

.project-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #eff6ff;
    color: var(--primary-blue);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   SECTIONS & LAYOUT
   ============================================ */
.section-padding {
    padding: 6rem 1.5rem;
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: #eff6ff;
    color: var(--primary-blue);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 1rem;
}

/* ============================================
   HEADER & FOOTER (LIGHT MODE)
   ============================================ */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: fixed;
    top: 0; width: 100%; z-index: 50;
    transition: all 0.3s;
}

.nav-links a {
    color: var(--text-body);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

/* Ghi đè lại màu sắc cho thẻ link trong Footer Light Mode */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #475569; /* slate-600 */
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #2563eb; /* blue-600 */
    transform: translateX(5px);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================================
   HEADER & NAVIGATION (KHÓA CỨNG GIAO DIỆN)
   ============================================ */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0;
    height: 80px; /* Cố định chiều cao Header */
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.nav-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- XỬ LÝ LOGO --- */
.site-branding {
    display: flex;
    align-items: center;
}

.site-branding img, 
.custom-logo {
    max-height: 45px !important; /* Giới hạn chiều cao Logo không bao giờ tràn */
    width: auto !important;
    object-fit: contain;
}

/* --- XỬ LÝ MENU NGANG --- */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem; /* Khoảng cách giữa các mục menu */
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #475569; /* Slate-600 */
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
    display: inline-block;
}

.nav-links a:hover {
    color: #2563eb; /* Blue-600 */
}

/* Xử lý riêng nếu bạn có tạo mục Menu dạng nút bấm (Thêm class "menu-button" vào thẻ li trong WP) */
.nav-links li.menu-button a {
    background-color: #2563eb;
    color: #ffffff;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.nav-links li.menu-button a:hover {
    background-color: #1d4ed8;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ============================================
   PAGINATION (PHÂN TRANG - LIGHT MODE)
   ============================================ */
.custom-pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.custom-pagination .screen-reader-text {
    display: none; /* Ẩn chữ "Điều hướng bài viết" mặc định của WP */
}

.custom-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #475569; /* slate-600 */
    background-color: #f8fafc; /* slate-50 */
    border: 1px solid #e2e8f0; /* slate-200 */
    transition: all 0.2s ease;
    text-decoration: none;
}

.custom-pagination .page-numbers:hover {
    background-color: #eff6ff; /* blue-50 */
    color: #2563eb; /* blue-600 */
    border-color: #bfdbfe; /* blue-200 */
}

.custom-pagination .page-numbers.current {
    background-color: #2563eb; /* blue-600 */
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.custom-pagination .dots {
    border: none;
    background: transparent;
    pointer-events: none;
}

/* ============================================
   NỘI DUNG TRANG & BÀI VIẾT (TYPOGRAPHY)
   ============================================ */
.entry-content {
    color: #475569; /* text-slate-600 */
    line-height: 1.8;
    font-size: 1.1rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content p:last-child {
    margin-bottom: 0;
}

/* Định dạng các thẻ Heading */
.entry-content h2, 
.entry-content h3, 
.entry-content h4, 
.entry-content h5 {
    color: #0f172a; /* text-slate-900 */
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.entry-content h2 {
    font-size: 1.875rem; /* 30px */
    border-left: 4px solid #2563eb; /* Nhấn viền xanh bên trái chuẩn doanh nghiệp */
    padding-left: 1rem;
}

.entry-content h3 {
    font-size: 1.5rem; /* 24px */
}

/* Định dạng Danh sách (List) */
.entry-content ul, 
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry-content ul {
    list-style-type: disc;
}

.entry-content ol {
    list-style-type: decimal;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

/* Định dạng Link */
.entry-content a {
    color: #2563eb; /* text-blue-600 */
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

.entry-content a:hover {
    border-bottom-color: #2563eb;
}

/* Định dạng Trích dẫn (Blockquote) */
.entry-content blockquote {
    border-left: 4px solid #cbd5e1; /* border-slate-300 */
    padding: 1.5rem;
    font-style: italic;
    color: #64748b; /* text-slate-500 */
    margin: 2rem 0;
    background: #f8fafc; /* bg-slate-50 */
    border-radius: 0 0.75rem 0.75rem 0;
}

/* Định dạng Hình ảnh trong bài viết */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.entry-content figure {
    margin: 2rem 0;
}

.entry-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ============================================
   SINGLE POST: CATEGORY & TAGS (LIGHT MODE)
   ============================================ */
.entry-category a {
    display: inline-block;
    padding: 0.25rem 1rem;
    background-color: #eff6ff; /* blue-50 */
    color: #2563eb; /* blue-600 */
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px; /* bo tròn hoàn toàn */
    text-decoration: none;
    transition: all 0.2s ease;
}

.entry-category a:hover {
    background-color: #2563eb;
    color: #ffffff;
}

.entry-tags a {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background-color: #f8fafc; /* slate-50 */
    color: #64748b; /* slate-500 */
    border: 1px solid #e2e8f0; /* slate-200 */
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.entry-tags a:hover {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

/* ============================================
   COMMENTS SECTION (LIGHT MODE)
   ============================================ */
#comments {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.comments-title, 
.comment-reply-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a; /* slate-900 */
    margin-bottom: 2rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1rem;
}

/* Danh sách bình luận */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem;
}

.comment-list > li {
    margin-bottom: 2rem;
}

.comment-body {
    background: #f8fafc; /* slate-50 */
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
}

.comment-author .avatar {
    float: left;
    margin-right: 1rem;
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.comment-author .fn {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.05rem;
    font-style: normal;
}

.comment-meta {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.comment-meta a {
    color: #94a3b8;
    text-decoration: none;
}

.comment-content {
    color: #475569;
    line-height: 1.6;
    clear: both;
    padding-top: 0.5rem;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.comment-reply-link:hover {
    text-decoration: underline;
}

/* Form bình luận */
.comment-form label {
    display: block;
    color: #475569;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: #f8fafc !important; /* Đè lại nền đen ở bản cũ */
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0.5rem !important;
    font-family: inherit;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none !important;
    border-color: #2563eb !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.form-submit .submit {
    background-color: #2563eb !important;
    background-image: none !important;
    color: white !important;
    padding: 0.75rem 2rem !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2) !important;
}

.form-submit .submit:hover {
    background-color: #1d4ed8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3) !important;
}

/* ============================================
   FIX WORDPRESS ADMIN BAR OVERLAP
   ============================================ */
/* Màn hình máy tính: Admin bar cao 32px */
body.admin-bar .site-header {
    top: 32px !important;
}

/* Màn hình điện thoại/Tablet nhỏ: Admin bar cao 46px */
@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px !important;
    }
}