:root {
    /* Ghi đè biến Bootstrap */
    --bs-body-font-family: 'Nunito', sans-serif;
    --bs-body-bg: #F5F8F7;
    --bs-body-color: #0B1F3A;
    --bs-primary: #0891A8;
    --bs-primary-rgb: 8, 145, 168;
    --bs-danger: #FF6B4A;
    --bs-warning: #FFB238;
    --bs-dark: #0B1F3A;

    /* Biến tùy chỉnh: Đồng bộ tất cả về Nunito */
    --font-display: 'Nunito', sans-serif;
    --font-mono: 'Nunito', sans-serif;

    --flow-deep: #066476;
    --flow-tint: #E4F4F3;
    --ink-soft: #51637A;
    --ink-faint: #8496AB;
    --panel: #FFFFFF;
    --line: #DDE5E4;
    --deep-panel: #132C4E;
}

body {
    font-family: var(--bs-body-font-family);
    
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    
}

.font-mono {
    font-family: var(--font-mono);
    
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--flow-deep);
    font-weight: 600;
    margin-bottom: 18px;
    
}

.eyebrow::before {
    content: "";
    width: 18px;
    height: 1.5px;
    background: var(--bs-primary);
    display: inline-block;
}

/* Navbar Scrolling Effect */
header.nav {
    transition: padding 0.35s ease, background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    padding: 22px 0;
    border-bottom: 1px solid transparent;
}

header.nav.scrolled {
    padding: 14px 0;
    background: rgba(245, 248, 247, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px -18px rgba(11, 31, 58, 0.25);
}

.btn-flow {
    background: var(--bs-primary);
    color: #fff;
}

.btn-flow:hover {
    background: var(--flow-deep);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -12px rgba(8, 145, 168, 0.6);
}

/* Hero Background & Text */
.hero-section {
    position: relative;
    padding: 160px 0 96px;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(700px 420px at 82% -6%, rgba(8, 145, 168, 0.10), transparent 60%),
        radial-gradient(500px 400px at 100% 40%, rgba(255, 107, 74, 0.07), transparent 60%);
    pointer-events: none;
}

.hero-title em {
    
    color: var(--flow-deep);
    background: linear-gradient(180deg, transparent 62%, var(--flow-tint) 62%);
}

/* Animation Utilities */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* SVG & Visual Elements */
.pipe {
    fill: none;
    stroke: #B9CBCE;
    stroke-width: 3;
}

.pipe-flow {
    fill: none;
    stroke: var(--bs-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 9 11;
    animation: flowmove 1.6s linear infinite;
}

@keyframes flowmove {
    to {
        stroke-dashoffset: -40;
    }
}

.node {
    stroke: #fff;
    stroke-width: 2.5;
}

.node-pulse {
    animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        r: 6;
    }
    50% {
        r: 8;
    }
}

.hv-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bs-primary);
    display: inline-block;
    animation: blink 1.8s ease-in-out infinite;
    margin-right: 6px;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Custom Layout Fixes */
.hv-canvas {
    background: linear-gradient(var(--line) 1px, transparent 1px) 0 0/28px 28px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0/28px 28px, #FBFDFC;
    border-radius: 10px 10px 0 0;
}

.wf-num {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid #28466B;
    background: var(--deep-panel);
    display: flex;
    align-items: center;
    justify-content: center;
}

.workflow-bg {
    background-color: var(--bs-dark);
    color: #fff;
    position: relative;
}

.workflow-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 300px at 10% 0%, rgba(8, 145, 168, 0.18), transparent 60%);
    pointer-events: none;
}

.chart-bars .bar {
    flex: 1;
    background: linear-gradient(180deg, var(--bs-primary), var(--flow-deep));
    border-radius: 3px 3px 0 0;
}

.cta-band {
    background: var(--bs-dark);
    border-radius: 22px;
    position: relative;
    overflow: hidden;
}

.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(500px 260px at 50% 0%, rgba(8, 145, 168, 0.28), transparent 65%);
}

.logo-lg img {
    height: 35px;
}
/* ===================== AUTH MODAL (Đăng nhập / Đăng ký) ===================== */
.auth-modal .modal-dialog {
    max-width: 452px;
}

.auth-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 28px 70px -26px rgba(11, 31, 58, 0.45);
    overflow: hidden;
}

.auth-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    padding: 8px;
    border-radius: 8px;
    opacity: 0.45;
}

/* .auth-close:hover {
    opacity: 0.9;
    background: #F1F4F4;
} */

.auth-body {
    padding: 30px 32px 28px;
    background: var(--panel);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink-soft);
}

.auth-logo img {
    height: 26px;
}

.auth-title {
    text-align: center;
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--bs-dark);
    margin-bottom: 6px;
}

.auth-sub {
    text-align: center;
    font-size: 0.875rem;
    color: var(--ink-faint);
    margin-bottom: 22px;
}

/* Nút OAuth */
.auth-oauth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bs-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-oauth-btn:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 8px 18px -14px rgba(8, 145, 168, 0.8);
    transform: translateY(-1px);
}

/* Dải phân cách "hoặc" */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0 18px;
    color: var(--ink-faint);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* Trường nhập liệu */
.auth-field {
    margin-bottom: 15px;
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.auth-label {
    display: block;
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--bs-dark);
    margin-bottom: 6px;
}

.auth-optional,
.auth-link-sm {
    font-size: 0.76rem;
    color: var(--ink-faint);
    text-decoration: none;
}

.auth-link-sm:hover {
    color: var(--flow-deep);
    text-decoration: underline;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 0.9rem;
    color: var(--bs-dark);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: #A9B6C4;
}

.auth-input:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 168, 0.14);
}

.auth-input-wrap .auth-input {
    padding-right: 42px;
}

.auth-eye {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--ink-faint);
    padding: 4px;
    line-height: 0;
}

.auth-eye:hover,
.auth-eye.is-on {
    color: var(--bs-primary);
}

/* Checkbox điều khoản */
.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 4px 0 18px;
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.auth-check .form-check-input {
    margin-top: 2px;
    flex: 0 0 auto;
}

.auth-check .form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.auth-check a {
    color: var(--flow-deep);
    text-decoration: underline;
}

/* Nút gửi */
.auth-submit {
    width: 100%;
    padding: 11px 16px;
    border: 0;
    border-radius: 9px;
    background: var(--bs-dark);
    color: #fff;
    font-weight: 700;
    font-size: 0.93rem;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-submit span {
    font-size: 0.7rem;
    margin-left: 6px;
    opacity: 0.85;
}

.auth-submit:hover {
    background: var(--deep-panel);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -16px rgba(11, 31, 58, 0.7);
}

/* Chân popup - chuyển tab */
.auth-foot {
    padding: 15px;
    text-align: center;
    background: #F7F9F9;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.auth-switch {
    border: 0;
    background: transparent;
    padding: 0 2px;
    font-weight: 700;
    color: var(--bs-dark);
}

.auth-switch:hover {
    color: var(--flow-deep);
    text-decoration: underline;
}

@media (max-width: 420px) {
    .auth-body {
        padding: 26px 20px 24px;
    }

    .auth-oauth,
    .auth-row {
        grid-template-columns: 1fr;
    }
}

/* ===================== TIN TỨC / BÀI VIẾT ===================== */
.page-header {
    padding: 130px 0 20px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 320px at 88% -10%, rgba(8, 145, 168, 0.10), transparent 60%);
    pointer-events: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-soft);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.chip:hover {
    color: var(--flow-deep);
    border-color: var(--bs-primary);
}

.chip.active {
    background: var(--bs-dark);
    border-color: var(--bs-dark);
    color: #fff;
}

.cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: var(--flow-tint);
    color: var(--flow-deep);
}

.cat-badge.cat-product {
    background: rgba(255, 178, 56, 0.16);
    color: #95660B;
}

.cat-badge.cat-case {
    background: rgba(255, 107, 74, 0.13);
    color: #C44A30;
}

.cat-badge.cat-event {
    background: rgba(11, 31, 58, 0.08);
    color: var(--bs-dark);
}

.news-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--panel);
    height: 100%;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.news-card:hover {
    box-shadow: 0 22px 44px -28px rgba(11, 31, 58, 0.35);
    transform: translateY(-3px);
    border-color: #CFDEDD;
}

.news-cover {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--hv-a, var(--flow-tint));
    background-image:
        linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.55)),
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: auto, 22px 22px, 22px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-cover svg {
    position: relative;
    z-index: 1;
}

.news-cover.cv-1 { --hv-a: #E4F4F3; }
.news-cover.cv-2 { --hv-a: #FDEEE9; }
.news-cover.cv-3 { --hv-a: #FFF6E4; }
.news-cover.cv-4 { --hv-a: #EAF0FA; }

.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-faint);
    font-size: 0.8rem;
}

.news-meta .dotsep::before {
    content: "•";
    margin-right: 8px;
    color: var(--ink-faint);
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bs-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex: 0 0 auto;
}

.author-avatar.lg {
    width: 52px;
    height: 52px;
    font-size: 0.95rem;
}

.toc-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    padding: 20px;
}

.toc-link {
    display: block;
    padding: 7px 0;
    font-size: 0.86rem;
    color: var(--ink-soft);
    text-decoration: none;
    border-left: 2px solid var(--line);
    padding-left: 14px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.toc-link:hover,
.toc-link.active {
    color: var(--flow-deep);
    border-left-color: var(--bs-primary);
    font-weight: 700;
}

.share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    background: #fff;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.share-btn:hover {
    color: var(--flow-deep);
    border-color: var(--bs-primary);
}

.article-prose {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #223349;
}

.article-prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.4rem;
    margin-bottom: 1rem;
    scroll-margin-top: 110px;
}

.article-prose h3 {
    font-size: 1.18rem;
    font-weight: 700;
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    scroll-margin-top: 110px;
}

.article-prose p {
    margin-bottom: 1.2rem;
}

.article-prose ul,
.article-prose ol {
    margin-bottom: 1.2rem;
    padding-left: 1.3rem;
}

.article-prose li {
    margin-bottom: 0.5rem;
}

.article-callout {
    border-left: 3px solid var(--bs-primary);
    background: var(--flow-tint);
    border-radius: 0 12px 12px 0;
    padding: 18px 22px;
    margin: 1.8rem 0;
    font-size: 0.98rem;
    color: var(--bs-dark);
}

.article-figure {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    margin: 1.8rem 0;
}

.article-figure figcaption {
    padding: 12px 18px;
    font-size: 0.82rem;
    color: var(--ink-faint);
    border-top: 1px solid var(--line);
    background: #FBFDFC;
}

.pagi-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    background: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}

.pagi-btn.active {
    background: var(--bs-dark);
    border-color: var(--bs-dark);
    color: #fff;
}

.pagi-btn:hover:not(.active) {
    border-color: var(--bs-primary);
    color: var(--flow-deep);
}

.search-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-pill svg {
    color: var(--ink-faint);
    flex: 0 0 auto;
}

.search-pill input {
    border: 0;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 0.92rem;
    color: var(--bs-dark);
}

.search-pill input::placeholder {
    color: var(--ink-faint);
}

.search-pill:focus-within {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 168, 0.14);
}

.search-clear {
    border: 0;
    background: transparent;
    color: var(--ink-faint);
    padding: 2px;
    line-height: 0;
    flex: 0 0 auto;
}

.search-clear:hover {
    color: var(--flow-deep);
}

/* Ẩn nút "x" mặc định của Chrome/Edge cho input[type=search] để dùng nút tùy chỉnh */
.search-pill input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

.dropdown-menu .dropdown-item {
    color: #212529;
    background-color: transparent;
}

    .dropdown-menu .dropdown-item:hover {
        color: #212529;
        background-color: #c6ccd2;
    }

    .dropdown-menu .dropdown-item:focus {
        color: #212529;
        background-color: #c6ccd2;
    }

    .dropdown-menu .dropdown-item:active {
        color: #212529;
        background-color: #c6ccd2;
    }


/* =========================================================
   MOBILE NAVBAR
========================================================= */

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #212529;
    font-size: 25px;
    padding: 0;
}

    .mobile-menu-btn:hover {
        background: #f1f3f5;
        border-radius: 8px;
    }


/* MOBILE ICON BUTTON */

.mobile-icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    color: #212529;
    text-decoration: none;
    font-size: 18px;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

    .mobile-icon-btn:hover {
        background: #f5f6f8;
        border-color: #ced4da;
    }


/* MOBILE TRIAL */

.mobile-trial-btn {
    background: #212529;
    border-color: #212529;
    color: #fff;
}

    .mobile-trial-btn:hover {
        background: #000;
        border-color: #000;
        color: #fff;
    }


/* =========================================================
   MOBILE OFFCANVAS
========================================================= */

.mobile-menu {
    width: min(320px, 85vw);
    border: 0;
    box-shadow: 8px 0 30px rgba(0, 0, 0, .08);
}


    /* HEADER */

    .mobile-menu .offcanvas-header {
        padding: 20px;
        border-bottom: 1px solid #eee;
    }

.mobile-menu-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #212529;
    font-weight: 600;
    font-size: 15px;
}

    .mobile-menu-brand .logo-lg {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .mobile-menu-brand .logo-lg img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }


/* BODY */

.mobile-menu .offcanvas-body {
    padding: 16px;
}


/* MENU */

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background-color .15s ease, color .15s ease;
}

    .mobile-nav-item i {
        width: 22px;
        text-align: center;
        font-size: 17px;
    }

    .mobile-nav-item:hover {
        background: #f1f3f5;
        color: #212529;
    }

    .mobile-nav-item:active {
        background: #e9ecef;
    }


/* DIVIDER */

.mobile-menu-divider {
    height: 1px;
    background: #e9ecef;
    margin: 18px 4px;
}


/* =========================================================
   MOBILE BREAKPOINT
========================================================= */

@media (max-width: 1199.98px) {

    #siteNav .container {
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .brand-name {
        display: none;
    }

    #siteNav .navbar-brand {
        margin-right: auto;
        margin-left: 8px;
    }

    #siteNav .logo-lg {
        width: 38px;
        height: 38px;
    }

        #siteNav .logo-lg img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

    .desktop-menu {
        display: none !important;
    }

    .trial-btn {
        display: none !important;
    }

    .navbar-actions {
        margin-left: auto;
    }
}


/* SMALL MOBILE */

@media (max-width: 575.98px) {

    #siteNav .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .mobile-menu-btn,
    .mobile-icon-btn {
        width: 38px;
        height: 38px;
    }

    #siteNav .logo-lg {
        width: 36px;
        height: 36px;
    }

    .navbar-actions {
        gap: 5px !important;
    }
}