/* ============================================================
   KreditKAZ — Redesign 2026 (V6)
   Premium fintech · conversion-first · hero calculator
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@600;700&display=swap');

/* --- Reset & Tokens --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Brand */
    --blue: #2563EB;
    --blue-dark: #1D4ED8;
    --blue-deep: #16368F;
    --blue-50: #EFF4FF;
    --blue-100: #DBE7FF;
    --green: #16A34A;
    --green-dark: #15803D;
    --green-50: #EAFAF0;
    --amber: #F59E0B;
    --red: #E5484D;

    /* Neutrals */
    --navy: #0F1D40;
    --slate: #46536E;
    --muted: #7C879E;
    --line: #E6EBF4;
    --line-soft: #EEF2F9;
    --bg: #F6F8FC;
    --bg-blue: #F2F6FF;
    --white: #FFFFFF;

    /* Compat with main.js slider */
    --primary: #2563EB;
    --gray-300: #DCE3EF;

    /* Legacy aliases (page <style> blocks) */
    --dark: var(--navy);
    --dark-2: var(--blue-deep);
    --gray-900: var(--navy);
    --gray-700: var(--slate);
    --gray-500: var(--muted);
    --gray-200: var(--line);
    --gray-100: var(--bg);
    --primary-dark: var(--blue-dark);
    --primary-light: var(--blue-50);
    --secondary: var(--green);
    --secondary-dark: var(--green-dark);
    --accent: var(--amber);
    --radius-sm: var(--r-sm);
    --radius-md: var(--r-md);
    --radius-lg: var(--r-lg);
    --radius-xl: var(--r-xl);
    --shadow-sm: var(--sh-sm);
    --shadow-md: var(--sh-md);
    --shadow-lg: var(--sh-lg);
    --shadow-xl: var(--sh-xl);

    /* Effects */
    --grad-green: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
    --grad-blue: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    --gradient: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    --sh-xs: 0 1px 2px rgba(15,29,64,0.05);
    --sh-sm: 0 2px 8px rgba(15,29,64,0.06);
    --sh-md: 0 8px 24px rgba(15,29,64,0.08);
    --sh-lg: 0 16px 44px rgba(15,29,64,0.12);
    --sh-xl: 0 30px 80px rgba(15,29,64,0.16);

    --r-sm: 12px;
    --r-md: 16px;
    --r-lg: 20px;
    --r-xl: 28px;
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
    font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--navy);
    background: var(--white);
    line-height: 1.65;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }

a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; color: var(--navy); }

.text-gradient {
    background: linear-gradient(100deg, #2563EB 10%, #38BDF8 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============ Buttons ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 17px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    line-height: 1.3;
    font-family: inherit;
    white-space: nowrap;
}

/* money CTA — green */
.btn-primary {
    background: var(--grad-green);
    color: #fff;
    box-shadow: 0 8px 20px rgba(22,163,74,0.30), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(22,163,74,0.40), inset 0 1px 0 rgba(255,255,255,0.25);
    color: #fff;
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
    background: var(--white);
    color: var(--navy);
    border: 1.5px solid var(--line);
    box-shadow: var(--sh-xs);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.btn-white {
    background: var(--white);
    color: var(--blue-dark);
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(6,16,42,0.25);
}
.btn-white:hover { transform: translateY(-2px); color: var(--blue-deep); box-shadow: 0 14px 32px rgba(6,16,42,0.3); }

.btn-nav {
    background: var(--grad-green);
    color: #fff;
    padding: 11px 22px;
    font-size: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(22,163,74,0.28);
}
.btn-nav:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(22,163,74,0.36); }

.btn-lg { padding: 17px 36px; font-size: 18px; border-radius: 16px; }
.btn-block { width: 100%; }

.btn-offer {
    background: var(--grad-green);
    color: #fff;
    padding: 14px 30px;
    font-size: 17px;
    font-weight: 800;
    border-radius: 14px;
    width: 100%;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 6px 18px rgba(22,163,74,0.28);
}
.btn-offer:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(22,163,74,0.38);
    color: #fff;
}

/* ============ Navbar ============ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line-soft);
    transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: var(--sh-sm); }

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    gap: 20px;
}

.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
/* Coin logomark (SVG background) — ký tự ₸ trong HTML được ẩn bằng font-size:0 */
.logo-icon {
    display: inline-block;
    width: 42px; height: 42px;
    font-size: 0;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23A78BFA'/%3E%3Cstop offset='1' stop-color='%237C3AED'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='22' cy='22' r='21' fill='url(%23g)'/%3E%3Ccircle cx='22' cy='22' r='17' fill='none' stroke='%23fff' stroke-opacity='0.35' stroke-width='1.5'/%3E%3Ctext x='22' y='31' font-family='Space Grotesk, Arial, sans-serif' font-size='24' font-weight='700' fill='%23fff' text-anchor='middle'%3E₸%3C/text%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 4px 12px rgba(124,58,237,0.32);
}
.logo-text { font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; font-family: 'Space Grotesk', 'Manrope', sans-serif; }
.logo-highlight { color: var(--blue); }

.nav-links { display: flex; list-style: none; gap: 26px; }
.nav-links a { color: var(--slate); font-weight: 600; font-size: 16px; }
.nav-links a:hover { color: var(--blue); }
.nav-links a.active { color: var(--blue); }

.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span {
    display: block; width: 24px; height: 2.5px;
    background: var(--navy); border-radius: 2px; transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============ Breadcrumb & Page header ============ */
.breadcrumb { padding: 100px 0 0; background: var(--bg-blue); }
/* Khi breadcrumb đứng ngay trước page-hero -> bỏ khoảng thừa, gộp nền liền mạch */
.breadcrumb:has(+ .page-hero) { padding: 92px 0 0; }
.breadcrumb-list {
    display: flex; align-items: center; gap: 8px;
    list-style: none; font-size: 14.5px; color: var(--muted);
    padding: 14px 0 0; flex-wrap: wrap;
}
.breadcrumb-list a { color: var(--muted); }
.breadcrumb-list a:hover { color: var(--blue); }
.breadcrumb-list .separator { color: var(--gray-300); }
.breadcrumb-list .current { color: var(--navy); font-weight: 600; }

.page-header {
    padding: 28px 0 52px;
    background: var(--bg-blue);
    border-bottom: 1px solid var(--line-soft);
}
.page-header h1 {
    font-size: 38px; font-weight: 800;
    margin-bottom: 14px;
}
.page-header p {
    font-size: 19px; color: var(--slate);
    max-width: 720px; line-height: 1.7;
}

/* ============ Hero (home) ============ */
.hero {
    position: relative;
    padding: 140px 0 90px;
    background:
        radial-gradient(720px 460px at 88% -10%, rgba(59,130,246,0.14), transparent 62%),
        radial-gradient(560px 420px at -8% 108%, rgba(34,197,94,0.10), transparent 60%),
        linear-gradient(180deg, #EFF4FF 0%, #F9FBFF 55%, #FFFFFF 100%);
    overflow: hidden;
}
.hero .container {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px;
    background: var(--white);
    color: var(--blue-dark);
    border: 1px solid var(--blue-100);
    border-radius: 999px;
    font-size: 15.5px; font-weight: 700;
    box-shadow: var(--sh-sm);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 50px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 18px;
}
.hero-subtitle {
    font-size: 20px;
    color: var(--slate);
    margin-bottom: 26px;
    line-height: 1.7;
    max-width: 520px;
}

/* checklist bullets */
.hero-bullets { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.hero-bullets li {
    display: flex; align-items: center; gap: 12px;
    font-size: 15.5px; font-weight: 600; color: var(--navy);
}
.hero-bullets li::before {
    content: '✓';
    flex-shrink: 0;
    width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--green-50);
    color: var(--green);
    border-radius: 50%;
    font-size: 15px; font-weight: 800;
}

.hero-stats { display: flex; gap: 0; margin-bottom: 8px; }
.stat { display: flex; flex-direction: column; padding: 0 28px; border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; border-left: none; }
.stat-number { font-size: 28px; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.stat-label { font-size: 15.5px; color: var(--muted); font-weight: 500; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* --- Hero calculator card --- */
.hero-visual { display: flex; justify-content: flex-end; align-items: center; }

.hero-calc {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border-radius: var(--r-xl);
    border: 1px solid rgba(230,235,244,0.9);
    padding: 34px 32px 28px;
    box-shadow: var(--sh-xl);
}
.hero-calc-badge {
    position: absolute;
    top: -15px; right: 26px;
    padding: 7px 18px;
    background: var(--grad-green);
    color: #fff;
    border-radius: 999px;
    font-size: 15px; font-weight: 800;
    box-shadow: 0 8px 20px rgba(22,163,74,0.35);
}
.hero-calc-title {
    font-size: 21px; font-weight: 800;
    margin-bottom: 24px;
}

/* ============ Calculator controls (shared) ============ */
.calc-row { margin-bottom: 24px; }
.calc-label {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 12px; font-weight: 600; color: var(--slate); font-size: 14.5px;
}
.calc-value { font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%; height: 8px;
    border-radius: 999px; outline: none;
    background: linear-gradient(to right, var(--primary) 50%, var(--gray-300) 50%);
    cursor: pointer;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--white);
    border: 7px solid var(--blue);
    cursor: grab;
    box-shadow: 0 3px 10px rgba(37,99,235,0.35);
    transition: transform 0.15s;
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.12); }
.slider::-webkit-slider-thumb:active { cursor: grabbing; }
.slider::-moz-range-thumb {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--white); border: 7px solid var(--blue);
    cursor: grab; box-shadow: 0 3px 10px rgba(37,99,235,0.35);
}

.calc-range {
    display: flex; justify-content: space-between;
    margin-top: 8px; font-size: 14.5px; color: var(--muted); font-weight: 500;
}

.calc-summary {
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
    padding: 18px 20px;
    margin-bottom: 20px;
}
.calc-summary-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; font-size: 14.5px; color: var(--slate);
}
.calc-summary-row span:last-child { font-weight: 700; color: var(--navy); }
.calc-summary-row.highlight {
    border-top: 1px dashed var(--gray-300);
    margin-top: 8px; padding-top: 14px;
    font-size: 15.5px; font-weight: 700; color: var(--navy);
}
.calc-summary-row.highlight span:last-child { color: var(--green); font-size: 24px; font-weight: 800; }
.calc-note {
    text-align: center; margin-top: 14px;
    font-size: 14.5px; color: var(--muted); line-height: 1.6;
}

/* standalone calculator section (inner pages) */
.calculator-section { padding: 80px 0; background: var(--bg); }
.calculator-card {
    max-width: 620px; margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-xl);
    padding: 40px;
    box-shadow: var(--sh-lg);
}

/* ============ Trust bar ============ */
.trust-bar { padding: 22px 0; background: var(--white); border-bottom: 1px solid var(--line-soft); }
.trust-items { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.trust-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 15.5px; font-weight: 700; color: var(--slate);
    background: var(--bg);
    border: 1px solid var(--line-soft);
    padding: 10px 18px;
    border-radius: 999px;
}
.trust-icon { font-size: 19px; }

/* ============ Definition (GEO) ============ */
.definition-section { padding: 64px 0; background: var(--white); }
.definition-card {
    max-width: 920px; margin: 0 auto;
    background: linear-gradient(135deg, #F2F6FF 0%, #F8FAFF 100%);
    border: 1px solid #E1E9FA;
    border-radius: var(--r-xl);
    padding: 40px 44px;
}
.definition-card h2 { font-size: 27px; font-weight: 800; margin-bottom: 14px; }
.definition-lead { font-size: 16.5px; color: var(--slate); line-height: 1.8; margin-bottom: 26px; }
.definition-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.def-stat {
    text-align: center; padding: 20px 14px;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xs);
}
.def-stat-num { display: block; font-size: 21px; font-weight: 800; color: var(--blue); margin-bottom: 4px; letter-spacing: -0.01em; }
.def-stat-label { font-size: 15px; color: var(--muted); }

/* ============ Section headers ============ */
.section-header { text-align: center; margin-bottom: 52px; }
.section-header h2 { font-size: 34px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.025em; }
.section-header p { font-size: 16.5px; color: var(--muted); }

/* ============ Loan types ============ */
.loan-types { padding: 88px 0; background: var(--bg); }
.loan-types-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.loan-type-card {
    display: block; padding: 30px 28px;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    text-decoration: none; color: var(--navy);
    transition: all 0.25s;
    box-shadow: var(--sh-xs);
}
.loan-type-card:hover {
    border-color: var(--blue-100);
    transform: translateY(-5px);
    box-shadow: var(--sh-lg);
    color: var(--navy);
}
.lt-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px;
    background: var(--blue-50);
    border-radius: 16px;
    font-size: 29px;
    margin-bottom: 18px;
}
.loan-type-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.loan-type-card p { font-size: 16px; color: var(--muted); line-height: 1.65; margin-bottom: 14px; }
.lt-link { font-size: 16px; font-weight: 700; color: var(--blue); }

/* ============ Form modal ============ */
.form-modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 2000;
    background: rgba(10,18,42,0.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center; justify-content: center;
    padding: 24px; overflow-y: auto;
    opacity: 0; transition: opacity 0.3s ease;
    scrollbar-width: none;              /* Firefox: ẩn thanh cuộn */
    -ms-overflow-style: none;           /* IE/Edge cũ */
}
.form-modal-overlay::-webkit-scrollbar { display: none; }  /* Chrome/Safari */
.form-modal-overlay.active { display: flex; opacity: 1; }
.form-modal-overlay.fade-in { opacity: 1; }

.form-modal {
    position: relative; width: 100%; max-width: 470px;
    background: var(--white);
    border-radius: 24px;
    padding: 38px 34px 30px;
    box-shadow: 0 40px 100px rgba(6,16,42,0.4);
    transform: translateY(28px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
    max-height: 92vh; overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.form-modal::-webkit-scrollbar { display: none; }
.form-modal-overlay.fade-in .form-modal { transform: translateY(0) scale(1); }

.form-modal-close {
    position: absolute; top: 14px; right: 14px;
    background: var(--bg); border: none;
    font-size: 24px; color: var(--muted);
    cursor: pointer; line-height: 1;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}
.form-modal-close:hover { background: var(--line); color: var(--navy); }

.form-modal-header { text-align: center; margin-bottom: 26px; }
.form-modal-header h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.form-modal-header p { font-size: 14.5px; color: var(--muted); }

/* legacy form section (inner pages) */
.form-section { padding: 80px 0; background: var(--bg); }
.form-card {
    max-width: 520px; margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-xl);
    padding: 40px;
    box-shadow: var(--sh-lg);
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 15.5px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    font-size: 15.5px; font-family: inherit;
    transition: all 0.2s;
    color: var(--navy); background: var(--white);
}
.form-group input::placeholder { color: #A9B2C5; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
.form-group input.error { border-color: var(--red); }
.form-error { display: none; color: var(--red); font-size: 15px; margin-top: 6px; font-weight: 500; }
.form-group input.error ~ .form-error { display: block; }

.phone-input { display: flex; align-items: stretch; }
.phone-prefix {
    display: flex; align-items: center; padding: 0 16px;
    background: var(--bg);
    border: 1.5px solid var(--line); border-right: none;
    border-radius: 12px 0 0 12px;
    font-weight: 700; color: var(--slate); font-size: 15.5px;
}
.phone-input input { border-radius: 0 12px 12px 0; }

.form-consent { margin-bottom: 22px; }
.checkbox-label {
    display: flex; align-items: flex-start; gap: 12px;
    cursor: pointer; font-size: 15.5px; color: var(--slate); line-height: 1.55;
}
.checkbox-label input[type="checkbox"] { display: none; }
.checkmark {
    flex-shrink: 0; width: 22px; height: 22px;
    border: 2px solid var(--gray-300); border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; margin-top: 1px;
    background: var(--white);
}
.checkbox-label input:checked + .checkmark { background: var(--green); border-color: var(--green); }
.checkbox-label input:checked + .checkmark::after { content: '✓'; color: #fff; font-size: 15px; font-weight: 800; }
.form-safe { text-align: center; margin-top: 16px; font-size: 14.5px; color: var(--muted); font-weight: 500; }

/* ============ Loading ============ */
.loading-screen {
    display: none; padding: 130px 0 80px; min-height: 100vh;
    background: linear-gradient(180deg, #EFF4FF 0%, #FFFFFF 100%);
    align-items: center; justify-content: center;
}
.loading-screen.active { display: flex; }

.loading-card {
    max-width: 480px; margin: 0 auto; text-align: center;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: var(--sh-lg);
}
.loading-spinner { margin-bottom: 30px; display: flex; justify-content: center; }
.spinner {
    position: relative;
    width: 96px; height: 96px;
    display: flex; align-items: center; justify-content: center;
}
/* Vòng xoay (chỉ viền xoay, số ở giữa đứng yên) */
.spinner::before {
    content: '';
    position: absolute; inset: 0;
    border: 6px solid var(--blue-50);
    border-top-color: var(--blue);
    border-right-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
/* Số đếm ngược ở giữa */
.spinner-count {
    position: relative; z-index: 1;
    font-size: 38px; font-weight: 800;
    color: var(--blue);
    letter-spacing: -0.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    animation: countPop 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes countPop {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.12); opacity: 0.85; }
}

.loading-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.loading-card p { color: var(--muted); font-size: 15.5px; margin-bottom: 30px; }

.loading-progress { width: 100%; height: 8px; background: var(--bg); border-radius: 999px; margin-bottom: 30px; overflow: hidden; }
.progress-bar { width: 0%; height: 100%; background: var(--grad-green); border-radius: 999px; transition: width 0.5s ease; }

.loading-steps { display: flex; flex-direction: column; gap: 15px; text-align: left; }
.loading-step { display: flex; align-items: center; gap: 12px; font-size: 17px; color: var(--muted); transition: all 0.3s; }
.loading-step.active { color: var(--blue); font-weight: 700; }
.loading-step.done { color: var(--green); font-weight: 600; }
.step-icon {
    flex-shrink: 0; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 16px;
    background: var(--bg);
}
.loading-step.active .step-icon { background: var(--blue-50); color: var(--blue); }
.loading-step.done .step-icon { background: var(--green-50); color: var(--green); }

/* ============ Offers ============ */
.offers-section {
    display: none; padding: 130px 0 90px;
    background: linear-gradient(180deg, #EFF4FF 0%, #FFFFFF 100%);
}
.offers-section.active { display: block; }

.offers-badge {
    display: inline-block; padding: 9px 22px;
    background: var(--green-50); color: var(--green-dark);
    border: 1px solid rgba(22,163,74,0.2);
    border-radius: 999px;
    font-size: 17px; font-weight: 800; margin-bottom: 14px;
}
.offers-grid { display: grid; grid-template-columns: 1fr; gap: 22px; max-width: 720px; margin: 0 auto; }

/* ===== Offer card — thiết kế lại: sạch, có cấu trúc rõ ràng ===== */
.offer-card {
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--sh-sm);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
}
.offer-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--blue-100); }
.offer-card.featured {
    border: 2px solid var(--green);
    box-shadow: 0 12px 40px rgba(22,163,74,0.14);
}
.offer-card.featured::before {
    content: 'Лучшее предложение';
    position: absolute; top: -12px; left: 22px;
    padding: 5px 16px;
    background: var(--grad-green); color: #fff;
    border-radius: 999px;
    font-size: 12px; font-weight: 800; letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(22,163,74,0.32);
}

/* --- Header: logo + tên/usp + amount --- */
.offer-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
}
.offer-logo {
    width: 88px; height: 56px;
    background: var(--white);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    border: 1px solid var(--line);
    flex-shrink: 0;
    padding: 7px 9px;
}
.offer-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.offer-logo-ph {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    background: var(--gradient, linear-gradient(135deg,#7C3AED,#A855F7));
    color: #fff; font-weight: 800; font-size: 24px; border-radius: 8px;
}
.offer-headinfo { min-width: 0; }
.offer-info h3 { font-size: 20px; font-weight: 800; margin: 0 0 4px; line-height: 1.2; }
.offer-usp {
    display: block;
    font-size: 13.5px; font-weight: 600; color: var(--slate);
    line-height: 1.35;
}
.offer-amount {
    text-align: right; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: flex-end;
    line-height: 1.1;
}
.offer-amount .amt-label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.offer-amount strong { font-size: 24px; color: var(--green); font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }

/* --- Details: lưới chỉ số nền nhạt --- */
.offer-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line-soft);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    overflow: hidden;
}
.offer-detail {
    display: flex; flex-direction: column; gap: 3px;
    padding: 10px 12px;
    background: var(--bg-blue, #F6F5FF);
}
.offer-detail-label { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.offer-detail-value { font-size: 14px; font-weight: 800; color: var(--navy); }

.promo-chip {
    display: inline-flex; align-items: center; gap: 7px;
    align-self: flex-start;
    padding: 7px 14px;
    border: 1.5px dashed var(--green);
    background: var(--green-50);
    color: var(--green-dark);
    border-radius: 10px;
    font-size: 14px; font-weight: 800;
    letter-spacing: 0.02em;
}
.promo-chip .ico { color: var(--green); }

/* --- CTA nổi bật full-width --- */
.offer-action { display: flex; }
.btn-offer {
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 15px 24px;
    background: var(--grad-green);
    color: #fff;
    border-radius: 13px;
    font-size: 16px; font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(22,163,74,0.28);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.btn-offer:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(22,163,74,0.36); filter: brightness(1.04); }

/* --- Perks --- */
.offer-perks {
    list-style: none;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 9px 20px;
    margin: 0;
    padding: 16px 2px 2px;
    border-top: 1px solid var(--line-soft);
}
.offer-perks li {
    display: inline-flex; align-items: flex-start; gap: 8px;
    font-size: 13.5px; font-weight: 600; color: var(--slate);
    line-height: 1.35;
}
.offer-perks .ico { color: var(--green); width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

.offer-note {
    font-size: 11px; color: var(--muted); text-align: center;
    line-height: 1.4; margin-top: 2px;
}

/* ============ How it works ============ */
.how-it-works { padding: 88px 0; background: var(--white); }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step-card {
    text-align: center; padding: 36px 20px 30px;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    position: relative;
    transition: all 0.25s;
    box-shadow: var(--sh-xs);
}
.step-card:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: var(--blue-100); }
.step-number {
    position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
    width: 34px; height: 34px;
    background: var(--grad-blue); color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 16px;
    box-shadow: 0 6px 14px rgba(37,99,235,0.35);
}
.step-icon-big { font-size: 38px; margin-bottom: 16px; }
.step-card h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 8px; }
.step-card p { font-size: 15.5px; color: var(--muted); line-height: 1.65; }

/* ============ Why us ============ */
.why-us { padding: 88px 0; background: var(--bg); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    padding: 30px 28px;
    transition: all 0.25s;
    box-shadow: var(--sh-xs);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: var(--blue-100); }
.feature-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 54px; height: 54px;
    background: var(--blue-50);
    border-radius: 15px;
    font-size: 27px;
    margin-bottom: 18px;
}
.feature-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; color: var(--slate); line-height: 1.65; }

/* ============ FAQ ============ */
.faq-section { padding: 64px 0; background: var(--white); }
/* Nhiều faq-section liên tiếp (trang FAQ) -> bỏ padding kép giữa chúng */
.faq-section + .faq-section { padding-top: 0; }
.faq-list { max-width: 740px; margin: 0 auto; }
/* Tiêu đề nhóm FAQ thẳng lề với danh sách (cùng max-width, căn giữa) */
.faq-section > .container > h2 {
    max-width: 740px;
    margin: 0 auto 20px;
    font-size: 26px; font-weight: 800;
}
.faq-category-title { font-size: 23px; font-weight: 800; margin: 34px 0 16px; }
.faq-category-title:first-child { margin-top: 0; }
.faq-item {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.25s;
    background: var(--white);
}
.faq-item:hover { border-color: var(--blue-100); }
.faq-item.active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }
.faq-question {
    width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 19px 22px;
    background: none; border: none; cursor: pointer;
    font-size: 15.5px; font-weight: 700; color: var(--navy);
    text-align: left; font-family: inherit;
}
.faq-question:hover { color: var(--blue); }
.faq-toggle {
    flex-shrink: 0;
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--blue-50);
    border-radius: 50%;
    font-size: 20px; color: var(--blue);
    transition: transform 0.3s;
}
.faq-item.active .faq-toggle { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.active .faq-answer { max-height: 500px; }
.faq-answer p { padding: 0 22px 20px; font-size: 14.5px; color: var(--slate); line-height: 1.75; }
.faq-more { text-align: center; margin-top: 32px; }

/* ============ CTA ============ */
.cta-section { padding: 88px 0; background: var(--white); }
.cta-card {
    position: relative;
    text-align: center;
    background:
        radial-gradient(480px 300px at 85% 0%, rgba(59,130,246,0.35), transparent 60%),
        radial-gradient(420px 280px at 10% 110%, rgba(34,197,94,0.25), transparent 60%),
        var(--navy);
    border-radius: var(--r-xl);
    padding: 64px 40px;
    color: #fff;
    overflow: hidden;
}
.cta-card h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; color: #fff; letter-spacing: -0.025em; }
.cta-card p { font-size: 19px; margin-bottom: 32px; color: rgba(255,255,255,0.75); }

/* ============ Content pages ============ */
.content-section { padding: 60px 0; background: var(--white); }
.content-section + .content-section { padding-top: 0; }

.content-body { max-width: 800px; margin: 0 auto; }
.content-body h2 { font-size: 29px; font-weight: 800; margin: 42px 0 16px; letter-spacing: -0.02em; }
.content-body h3 { font-size: 22px; font-weight: 800; margin: 32px 0 12px; }
.content-body p { font-size: 18px; color: var(--slate); line-height: 1.85; margin-bottom: 16px; }
.content-body ul, .content-body ol { margin: 16px 0 16px 24px; }
.content-body li { font-size: 18px; color: var(--slate); line-height: 1.85; margin-bottom: 8px; }
.content-body strong { color: var(--navy); }

/* ============ Tables (MFO) ============ */
.table-wrapper {
    overflow-x: auto;
    margin: 26px 0;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
}
.mfo-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}
.mfo-table thead { background: #F1F5FB; }
.mfo-table th {
    padding: 14px 16px; text-align: left;
    font-size: 12px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--slate);
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
}
.mfo-table td {
    padding: 20px 18px; font-size: 15.5px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--slate);
    vertical-align: middle;
    font-weight: 600;
}
.mfo-table tbody tr:last-child td { border-bottom: none; }
.mfo-table tbody tr:nth-child(even) { background: #FAFCFF; }
.mfo-table tbody tr { transition: background 0.2s, box-shadow 0.2s; }
.mfo-table tbody tr:hover { background: var(--blue-50); }
.mfo-table .highlight-cell { color: var(--green); font-weight: 800; }
.mfo-table .mfo-name { font-weight: 800; color: var(--navy); }
.mfo-table a.btn, .mfo-table .btn {
    padding: 9px 18px; font-size: 15px; border-radius: 10px;
}

/* ============ Info cards ============ */
.info-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 26px 0; }
.info-card {
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
    border-left: 4px solid var(--blue);
}
.info-card.success { border-left-color: var(--green); }
.info-card.warning { border-left-color: var(--amber); }
.info-card h4 { font-size: 15.5px; font-weight: 800; margin-bottom: 8px; }
.info-card p { font-size: 16px; color: var(--slate); line-height: 1.65; margin: 0; }

/* ============ Blog ============ */
.blog-section { padding: 60px 0; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.blog-card {
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-xs);
    transition: all 0.25s;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: var(--blue-100); }
.blog-card-img {
    height: 170px;
    background:
        radial-gradient(300px 200px at 80% 0%, rgba(59,130,246,0.4), transparent 65%),
        linear-gradient(135deg, #1D4ED8 0%, #16368F 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 46px;
}
.blog-card-body { padding: 22px 24px 24px; }
.blog-card-tag {
    display: inline-block; padding: 4px 12px;
    background: var(--blue-50); color: var(--blue-dark);
    border-radius: 999px;
    font-size: 12px; font-weight: 700; margin-bottom: 12px;
}
.blog-card-body h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 8px; line-height: 1.4; }
.blog-card-body h3 a { color: var(--navy); }
.blog-card-body h3 a:hover { color: var(--blue); }
.blog-card-body p { font-size: 16px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.blog-card-meta { display: flex; gap: 16px; font-size: 14.5px; color: var(--muted); }

/* ============ Contact ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.contact-info-card {
    padding: 32px;
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
}
.contact-info-item { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-info-item:last-child { margin-bottom: 0; }
.contact-info-icon { font-size: 26px; flex-shrink: 0; }
.contact-info-item h4 { font-size: 15.5px; font-weight: 800; margin-bottom: 4px; }
.contact-info-item p { font-size: 16px; color: var(--slate); margin: 0; }

/* ============ Stats row ============ */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 40px 0; }
.stat-card {
    text-align: center; padding: 30px 20px;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-xs);
}
.stat-card .stat-number { font-size: 32px; font-weight: 800; color: var(--blue); display: block; margin-bottom: 4px; letter-spacing: -0.02em; }
.stat-card .stat-label { font-size: 15.5px; color: var(--muted); }

/* ============ Footer ============ */
.footer { padding: 64px 0 0; background: var(--navy); color: rgba(255,255,255,0.66); }
.footer-grid {
    display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
    gap: 36px; padding-bottom: 44px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.footer-brand p { margin-top: 16px; font-size: 16px; line-height: 1.7; }
.footer-brand .logo-text { color: #fff; }
.footer-links h4 { color: #fff; font-size: 17px; font-weight: 800; margin-bottom: 16px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.60); font-size: 16px; }
.footer-links a:hover { color: #fff; }

.footer-disclaimer { padding: 24px 0; border-bottom: 1px solid rgba(255,255,255,0.10); }
.footer-disclaimer p { font-size: 12px; line-height: 1.7; color: rgba(255,255,255,0.38); }

.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding: 22px 0; font-size: 15.5px;
}
.footer-bottom a { color: rgba(255,255,255,0.60); }
.footer-bottom a:hover { color: #fff; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
    .hero { padding: 120px 0 70px; }
    .hero .container { grid-template-columns: 1fr; gap: 44px; }
    .hero-visual { justify-content: center; }
    .hero-calc { max-width: 480px; }
    .hero h1 { font-size: 40px; }
    .steps-grid { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .loan-types-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .definition-stats { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; position: absolute; top: 76px; left: 0; right: 0;
        background: var(--white); flex-direction: column; padding: 24px;
        gap: 16px; box-shadow: var(--sh-lg); border-top: 1px solid var(--line-soft);
    }
    .nav-links.active { display: flex; }
    .btn-nav { display: none; }
    .hamburger { display: flex; }

    /* Nút dài không được ép ngang: cho xuống dòng, không vượt màn hình */
    .btn { white-space: normal; text-align: center; max-width: 100%; }
    .btn-lg { padding: 15px 24px; font-size: 16px; }

    .hero { padding: 96px 0 48px; }
    .hero h1 { font-size: 32px; line-height: 1.12; margin-bottom: 14px; }
    .hero-subtitle { font-size: 17px; margin-bottom: 22px; }
    .hero-bullets { gap: 10px; margin-bottom: 26px; }
    .hero-bullets li { font-size: 14.5px; align-items: flex-start; }

    /* Badge hero: gọn hơn, không chiếm 3 dòng */
    .hero-badge {
        font-size: 13px; padding: 7px 14px; gap: 6px;
        margin-bottom: 20px; line-height: 1.35;
        align-items: flex-start; text-align: left;
    }
    .hero-badge .ico { flex-shrink: 0; margin-top: 1px; }

    /* 3 stat -> lưới 3 cột đều nhau, bỏ gạch lệch, gọn gàng */
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin: 4px 0 8px;
    }
    .stat {
        padding: 14px 10px;
        border-left: none;
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 12px;
        align-items: center;
        text-align: center;
    }
    .stat:first-child { padding-left: 10px; }
    .stat-number { font-size: 17px; white-space: nowrap; letter-spacing: -0.03em; }
    .stat-label { font-size: 11.5px; line-height: 1.3; }
    .hero-calc { padding: 30px 22px 24px; }

    .section-header h2 { font-size: 28px; }
    .page-header h1 { font-size: 30px; }

    .calculator-card, .form-card { padding: 28px 20px; }
    .calc-value { font-size: 21px; }

    .steps-grid { grid-template-columns: 1fr; gap: 34px; }
    .features-grid { grid-template-columns: 1fr; }
    .loan-types-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .info-cards { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }

    /* Offer card mobile: head giữ logo+tên, amount xuống hàng riêng gọn */
    .offer-card { padding: 18px; gap: 16px; }
    .offer-head { grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 10px 14px; }
    .offer-amount {
        grid-column: 1 / -1;
        flex-direction: row; align-items: baseline; justify-content: flex-start;
        gap: 8px; text-align: left;
        padding-top: 10px; border-top: 1px solid var(--line-soft);
    }
    .offer-amount .amt-label { font-size: 13px; }
    .offer-amount strong { font-size: 22px; }
    .offer-details { grid-template-columns: repeat(2, 1fr); }
    .offer-perks { grid-template-columns: 1fr; }
    .offer-logo { width: 76px; height: 48px; }

    /* Trust items: mỗi pill 1 hàng full-width, căn giữa cho đều (không lệch 1+2+1) */
    .trust-items { flex-direction: column; align-items: stretch; gap: 10px; }
    .trust-item {
        font-size: 14.5px; padding: 12px 18px;
        justify-content: center;
    }

    /* "Сумма к возврату": số + ₸ không vỡ dòng; nếu chật -> label trên / value dưới */
    .calc-summary-row.highlight {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .calc-summary-row.highlight span:last-child {
        white-space: nowrap;
        font-size: 26px;
        align-self: flex-start;
    }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

    .loading-card { padding: 34px 24px; }
    .content-body h2 { font-size: 24px; }
    .cta-card { padding: 48px 24px; }
    .cta-card h2 { font-size: 27px; }
    .definition-card { padding: 30px 24px; }

    /* Giảm padding dọc section trên mobile để bớt khoảng trống lớn */
    .calculator-section, .form-section { padding: 48px 0; }
    .definition-section { padding: 44px 0; }
    .loan-types, .how-it-works, .why-us, .faq-section, .cta-section { padding: 48px 0; }
    .comparison-section, .stats-section, .requirements-section,
    .pros-cons-section, .info-section, .table-section,
    .methodology-section, .values-section, .company-section { padding: 44px 0; }
    .content-section, .blog-section { padding: 40px 0; }
    /* Tiêu đề section nhỏ lại + khoảng cách dưới gọn hơn */
    .section-header { margin-bottom: 28px; }
    .section-header h2 { font-size: 26px; line-height: 1.25; }
    .section-header p { font-size: 15px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 29px; }
    .hero-stats { flex-direction: row; }
    .stats-row { grid-template-columns: 1fr; }
    .hero-calc-badge { right: 16px; }
}

/* ============ Animations ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease forwards; }
/* Trạng thái chờ reveal (chỉ được thêm bởi JS khi IntersectionObserver sẵn sàng).
   Không JS -> class này không tồn tại -> card hiện bình thường. */
.pre-reveal { opacity: 0; }
/* Tôn trọng người dùng tắt animation */
@media (prefers-reduced-motion: reduce) {
    .pre-reveal { opacity: 1 !important; }
    .fade-in-up { animation: none !important; }
}

/* ============ States: loading / offers ============ */
body.show-loading .hero,
body.show-loading .trust-bar,
body.show-loading .definition-section,
body.show-loading .calculator-section,
body.show-loading .loan-types,
body.show-loading .how-it-works,
body.show-loading .why-us,
body.show-loading .faq-section,
body.show-loading .cta-section,
body.show-loading .footer { display: none; }
body.show-loading .form-modal-overlay { display: none !important; }
/* Ẩn thanh cuộn khi đang loading (không còn scrollbar bên phải) */
body.show-loading { overflow: hidden; }
body.show-loading::-webkit-scrollbar { display: none; }
html:has(body.show-loading) { scrollbar-width: none; }

body.show-offers .hero,
body.show-offers .trust-bar,
body.show-offers .definition-section,
body.show-offers .calculator-section,
body.show-offers .loan-types,
body.show-offers .how-it-works,
body.show-offers .why-us,
body.show-offers .faq-section,
body.show-offers .cta-section { display: none; }
body.show-offers .footer { display: block; }
body.show-offers .form-modal-overlay { display: none !important; }


/* ============================================================
   APPLIED THEME — L5 App Bento (violet, glass calc, pill buttons)
   ============================================================ */
/* ============================================================
   L5 — App Bento (Stripe/Linear style)
   Hero panel bo tròn tím · calculator GLASS · nút pill ·
   steps watermark số to · features bento · Violet palette
   ============================================================ */
:root {
    --blue: #7C3AED;
    --blue-dark: #6D28D9;
    --blue-deep: #4C1D95;
    --blue-50: #F5F3FF;
    --blue-100: #E4DAFB;

    --green: #10B981;
    --green-dark: #059669;
    --green-50: #ECFDF5;

    --navy: #1A1033;
    --slate: #4E4468;
    --muted: #8B819F;
    --line: #E9E4F5;
    --line-soft: #F0EDF9;
    --bg: #F7F5FC;
    --bg-blue: #F3EFFB;

    --primary: #7C3AED;
    --gray-300: #DDD6EE;

    --grad-green: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
    --grad-blue: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
    --gradient: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

/* --- Pill buttons everywhere --- */
.btn, .btn-lg, .btn-nav, .btn-offer { border-radius: 999px; }

.text-gradient {
    background: linear-gradient(100deg, #C4B5FD 10%, #67E8F9 90%);
    -webkit-background-clip: text;
    background-clip: text;
}
/* --- Hero: rounded app panel --- */
.hero {
    background: #fff;
    padding: 100px 0 48px;
    overflow: visible;
}
.hero .container {
    background:
        radial-gradient(640px 420px at 85% -8%, rgba(139,92,246,0.55), transparent 62%),
        radial-gradient(480px 380px at 2% 105%, rgba(34,211,238,0.25), transparent 58%),
        #2E1065;
    border-radius: 40px;
    padding: 60px 56px;
    max-width: 1180px;
}
.hero h1 { color: #fff; }
.hero-subtitle { color: rgba(255,255,255,0.75); }
.hero-badge {
    background: rgba(255,255,255,0.10);
    color: #C4B5FD;
    border-color: rgba(255,255,255,0.18);
    box-shadow: none;
}
.hero-bullets li { color: rgba(255,255,255,0.92); }
.hero-bullets li::before { background: rgba(52,211,153,0.18); color: #6EE7B7; }
.hero .stat { border-left-color: rgba(255,255,255,0.15); }
.hero .stat-number { color: #fff; }
.hero .stat-label { color: rgba(255,255,255,0.55); }

/* Hero landing (chỉ có nội dung, không có visual bên phải) -> 1 cột, căn giữa cân đối */
.hero-inner .container {
    display: block;
    padding: 64px 56px;
}
.hero-inner .hero-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}
.hero-inner .hero-badge { margin-left: auto; margin-right: auto; }
.hero-inner .hero-subtitle { margin-left: auto; margin-right: auto; }
.hero-inner .hero-cta { justify-content: center; }

/* --- Calculator: glassmorphism inside panel --- */
.hero-calc {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255,255,255,0.20);
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    /* scoped slider colors (main.js reads these vars) */
    --primary: #A78BFA;
    --gray-300: rgba(255,255,255,0.25);
}
.hero-calc-badge { box-shadow: 0 8px 20px rgba(16,185,129,0.45); }
.hero-calc-title { color: #fff; }
.hero-calc .calc-label { color: rgba(255,255,255,0.65); }
.hero-calc .calc-value { color: #fff; }
.hero-calc .calc-range { color: rgba(255,255,255,0.45); }
.hero-calc .slider::-webkit-slider-thumb {
    border-color: #A78BFA;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}
.hero-calc .slider::-moz-range-thumb { border-color: #A78BFA; }
.hero-calc .calc-summary {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.14);
}
.hero-calc .calc-summary-row { color: rgba(255,255,255,0.70); }
.hero-calc .calc-summary-row span:last-child { color: #fff; }
.hero-calc .calc-summary-row.highlight { border-top-color: rgba(255,255,255,0.25); color: #fff; }
.hero-calc .calc-summary-row.highlight span:last-child { color: #6EE7B7; }
.hero-calc .calc-note { color: rgba(255,255,255,0.50); }

/* --- Trust bar --- */
.trust-bar { border-bottom: none; padding: 10px 0 34px; }
.trust-item { border-radius: 999px; }

/* --- Rounded cards everywhere --- */
.loan-type-card, .feature-card, .step-card, .blog-card, .offer-card,
.definition-card, .calculator-card, .loading-card { border-radius: 24px; }
.faq-item { border-radius: 18px; }
.form-modal { border-radius: 28px; }

/* --- Steps: watermark numbers --- */
.step-card {
    text-align: left;
    padding: 30px 28px 26px;
    overflow: hidden;
    background: var(--bg);
    border: none;
}
.step-number {
    position: absolute;
    top: -6px; right: 10px; left: auto;
    transform: none;
    background: none;
    box-shadow: none;
    color: #E4DAFB;
    font-size: 78px;
    font-weight: 800;
    width: auto; height: auto;
    z-index: 0;
    letter-spacing: -0.04em;
}
.step-icon-big { position: relative; z-index: 1; font-size: 32px; }
.step-card h3, .step-card p { position: relative; z-index: 1; }

/* --- Features: bento (first tile wide) --- */
.features-grid { grid-template-columns: repeat(3, 1fr); }
.feature-card:first-child {
    grid-column: span 2;
    background: linear-gradient(135deg, #F5F3FF 0%, #FDF4FF 100%);
    border-color: #E4DAFB;
}
.feature-card:first-child h3 { font-size: 22px; }
.feature-card:first-child p { font-size: 15.5px; max-width: 480px; }
.feature-icon { border-radius: 16px; }

/* --- CTA: rounded violet panel --- */
.cta-card {
    border-radius: 40px;
    background:
        radial-gradient(480px 300px at 85% 0%, rgba(139,92,246,0.55), transparent 60%),
        radial-gradient(420px 280px at 10% 110%, rgba(34,211,238,0.25), transparent 60%),
        #2E1065;
}
.btn-white { color: #6D28D9; }
.btn-white:hover { color: #4C1D95; }

/* --- Table: violet header --- */
.mfo-table thead { background: #F5F3FF; }
.mfo-table th { color: #6D28D9; }
.mfo-table tbody tr:hover { background: #F5F3FF; }

.footer { background: #1A1033; }

.blog-card-img {
    background:
        radial-gradient(300px 200px at 80% 0%, rgba(196,181,253,0.45), transparent 65%),
        linear-gradient(135deg, #6D28D9 0%, #2E1065 100%);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero .container { padding: 44px 32px; border-radius: 32px; }
}
@media (max-width: 768px) {
    .hero { padding: 92px 12px 32px; }
    .hero .container { padding: 36px 22px; border-radius: 26px; }
    .features-grid { grid-template-columns: 1fr; }
    .feature-card:first-child { grid-column: span 1; }
}


/* ============================================================
   SVG Icon System (replaces emoji)
   ============================================================ */
.ico {
    width: 1em; height: 1em;
    display: inline-block;
    vertical-align: -0.125em;
    flex-shrink: 0;
}
.ico-green { color: var(--green); }
.ico-red { color: var(--red); }
.ico-amber { color: var(--amber); }

/* icon colors inside containers */
.lt-icon, .feature-icon, .step-icon-big,
.trust-icon, .contact-info-icon { color: var(--blue); }
.blog-card-img { color: rgba(255,255,255,0.92); }
.hero-calc-badge .ico, .offers-badge .ico,
.hero-badge .ico { vertical-align: -0.15em; }
.loading-step .ico { width: 15px; height: 15px; }
.ico-spin { animation: spin 0.9s linear infinite; }

/* table cells: icon + text alignment */
.mfo-table td .ico { vertical-align: -0.18em; margin-right: 2px; }


/* ============ Partner rows in MFO tables ============ */
.mfo-table td.mfo-name { text-align: center; vertical-align: middle; }
.mfo-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    width: 100%;
    font-weight: 800;
    color: var(--navy) !important;
    text-decoration: none;
}
.mfo-brand:hover { color: var(--blue) !important; }
.mfo-brand .mfo-logo-img {
    height: 48px; width: auto; max-width: 110px;
    object-fit: contain;
    border-radius: 11px;
    background: #fff;
    padding: 5px 8px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.08);
    flex-shrink: 0;
}
/* Placeholder chữ cái đầu cho МФО không có logo */
.mfo-logo-ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: 11px;
    background: var(--gradient, linear-gradient(135deg, #7C3AED, #A855F7));
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
    box-shadow: 0 2px 6px rgba(124,58,237,0.28);
    flex-shrink: 0;
}
.mfo-nolink {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    width: 100%;
    font-weight: 800;
    color: var(--navy);
}

.mfo-table tbody tr.partner-row {
    background: linear-gradient(90deg, rgba(124,58,237,0.06) 0%, rgba(245,243,255,0.35) 45%, transparent 100%);
}
.mfo-table tbody tr.partner-row:nth-child(even) {
    background: linear-gradient(90deg, rgba(124,58,237,0.06) 0%, rgba(245,243,255,0.35) 45%, transparent 100%);
}
.mfo-table tbody tr.partner-row:hover {
    background: linear-gradient(90deg, rgba(124,58,237,0.12) 0%, rgba(245,243,255,0.5) 55%, rgba(255,255,255,0.4) 100%);
    box-shadow: inset 0 0 0 100vw rgba(124,58,237,0.02);
}
.mfo-table tbody tr.partner-row td:first-child { border-left: 3px solid var(--primary, #7C3AED); }
/* Hàng "Рекомендуем" (có badge recommended) — nổi bật hơn */
.mfo-table tbody tr.partner-row:has(.mfo-recommended-badge) td:first-child {
    border-left: 4px solid var(--green);
}

@media (max-width: 768px) {
    /* ===== Bảng offer МФО -> card dọc trên mobile (dùng data-label) ===== */
    .mfo-table { min-width: 0; border-collapse: separate; }
    .mfo-table thead { display: none; }               /* ẩn header, dùng data-label thay */
    .mfo-table, .mfo-table tbody, .mfo-table tr, .mfo-table td { display: block; width: 100%; }
    .mfo-table tbody tr {
        margin: 0 0 16px;
        border: 1px solid var(--line);
        border-radius: 14px;
        overflow: hidden;
        background: var(--white);
        box-shadow: var(--sh-xs);
    }
    .mfo-table tbody tr:nth-child(even) { background: var(--white); }
    .mfo-table tbody tr.partner-row {
        background: linear-gradient(180deg, var(--blue-50) 0%, transparent 60%);
        border-color: var(--blue);
        border-left: 3px solid var(--blue);
    }
    .mfo-table tbody tr.partner-row td:first-child { border-left: none; }
    /* Ô tên МФО = header của thẻ */
    .mfo-table td.mfo-name {
        text-align: center;
        padding: 18px 16px 14px;
        border-bottom: 1px solid var(--line-soft);
        background: rgba(124,58,237,0.03);
    }
    .mfo-table td.mfo-name::before { display: none; }
    .mfo-brand, .mfo-nolink { width: 100%; }
    /* Các ô còn lại: label trái / giá trị phải */
    .mfo-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
        text-align: right;
        padding: 11px 16px;
        font-size: 15px;
        border-bottom: 1px solid var(--line-soft);
    }
    .mfo-table td:last-child { border-bottom: none; }
    .mfo-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--slate);
        text-align: left;
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }
    /* Ô CTA: nút full-width */
    .mfo-table td.mfo-cta-cell {
        justify-content: center;
        padding: 14px 16px;
        background: var(--bg-blue);
    }
    .mfo-table td.mfo-cta-cell::before { display: none; }
    .mfo-table td.mfo-cta-cell .mfo-cta,
    .mfo-table td.mfo-cta-cell .btn-apply {
        width: 100%; text-align: center; padding: 12px; font-size: 15px;
    }
    /* Ô nội dung dài (đặc điểm/особенность) -> label trên, value dưới, full-width */
    .mfo-table td.mfo-feature {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 4px;
    }
    .mfo-table td.mfo-feature::before { text-align: left; }

    /* ===== Bảng thuộc tính 2 cột (Параметр|Значение): GIỮ dạng bảng, KHÔNG chuyển card ===== */
    .mfo-table--kv, .mfo-table--kv tbody { display: table; width: 100%; }
    .mfo-table--kv tr { display: table-row; }
    .mfo-table--kv thead { display: none; }
    .mfo-table--kv tr { margin: 0; border: none; border-radius: 0; box-shadow: none; }
    .mfo-table--kv tbody tr { border-bottom: 1px solid var(--line-soft); background: transparent; }
    .mfo-table--kv td {
        display: table-cell;
        width: auto;
        text-align: left;
        justify-content: flex-start;
        padding: 11px 12px;
        font-size: 14.5px;
        border-bottom: none;
    }
    .mfo-table--kv td::before { display: none; }        /* không lặp label */
    .mfo-table--kv td:first-child { width: 44%; color: var(--navy); }
    .mfo-table--kv td:last-child { text-align: right; color: var(--slate); }

    .mfo-brand .mfo-logo-img { height: 44px; max-width: 110px; }
    .mfo-logo-ph { width: 48px; height: 48px; font-size: 20px; }
}

/* ============================================================
   Legacy inner-page sections (loan pages compatibility)
   ============================================================ */
.page-hero {
    padding: 28px 0 52px;
    background:
        radial-gradient(560px 300px at 90% 0%, rgba(139,92,246,0.12), transparent 60%),
        var(--bg-blue);
    border-bottom: 1px solid var(--line-soft);
}
/* Nếu page-hero KHÔNG có breadcrumb trước nó -> cần padding-top lớn để tránh navbar */
.page-hero:not(.breadcrumb + .page-hero) { padding-top: 116px; }
/* Section đầu tiên ngay sau page-hero: giảm top padding để không cách quá xa */
.page-hero + section { padding-top: 48px; }

/* Badge nhỏ trên tiêu đề (đồng bộ toàn site) */
.page-hero-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 15px;
    background: var(--white);
    color: var(--blue-deep, #6D28D9);
    border: 1px solid var(--blue-100, #E9E5FF);
    border-radius: 999px;
    font-size: 13.5px; font-weight: 700;
    box-shadow: var(--sh-xs);
    margin-bottom: 18px;
}
.page-hero-badge .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green); flex-shrink: 0;
}

.page-hero h1 {
    font-size: 40px; font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.12;
    margin-bottom: 16px;
    max-width: 860px;
}
.page-hero .hero-subtitle {
    font-size: 18px; color: var(--slate);
    max-width: 720px; line-height: 1.7;
    margin-bottom: 0;
}

.comparison-section, .stats-section, .requirements-section,
.pros-cons-section, .info-section, .table-section,
.methodology-section, .values-section, .company-section { padding: 64px 0; }
.stats-section, .pros-cons-section { background: var(--bg); }

/* Requirements */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}
.requirement-card {
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    padding: 28px;
    box-shadow: var(--sh-xs);
}
.requirement-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 14px; }

.requirements-list, .risks-list {
    list-style: none;
    margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}

/* Risk items (div, không phải li) — thẻ có spacing rõ + gạch cảnh báo */
.risks-list { gap: 16px; }
.risk-item {
    position: relative;
    padding: 18px 20px 18px 22px;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--amber);
    border-radius: 0 12px 12px 0;
    box-shadow: var(--sh-xs);
}
.risk-item h3 {
    font-size: 17px; font-weight: 800; color: var(--navy);
    margin: 0 0 8px;
}
.risk-item p {
    font-size: 14.5px; color: var(--slate); line-height: 1.7; margin: 0;
}
.risk-advice {
    margin-top: 20px;
    padding: 18px 22px;
    background: var(--blue-50);
    border-radius: 12px;
    border-left: 4px solid var(--blue);
}
.risk-advice p { font-size: 14.5px; color: var(--navy); line-height: 1.7; margin: 0; }
.risk-advice strong { color: var(--blue-deep); }
.requirements-list li, .risks-list li {
    position: relative;
    padding-left: 26px;
    font-size: 14.5px; color: var(--slate); line-height: 1.65;
}
.requirements-list li::before {
    content: '✓';
    position: absolute; left: 0; top: 0;
    color: var(--green); font-weight: 800;
}
.risks-list li::before {
    content: '!';
    position: absolute; left: 4px; top: 0;
    color: var(--amber); font-weight: 800;
}

/* Pros / Cons */
.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}
.pros-card, .cons-card {
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    padding: 28px;
    box-shadow: var(--sh-xs);
}
.pros-card { border-top: 4px solid var(--green); }
.cons-card { border-top: 4px solid var(--red); }
.pros-card h3, .cons-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 14px; }
.pros-list, .cons-list { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pros-list li, .cons-list li {
    display: flex; gap: 10px; align-items: flex-start;
    font-size: 14.5px; color: var(--slate); line-height: 1.65;
}
.pros-icon, .cons-icon {
    flex-shrink: 0;
    width: 20px; height: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 15px; font-weight: 800;
    margin-top: 2px;
}
.pros-icon { background: var(--green-50); color: var(--green); }
.cons-icon { background: #FDECEC; color: var(--red); }

/* Table badges (replaces old inline styles) */
.mfo-badge {
    display: inline-block;
    padding: 2px 10px;
    background: #B45309;
    color: #fff;
    font-size: 11px; font-weight: 800;
    border-radius: 999px;
    vertical-align: middle;
    white-space: nowrap;
}
.mfo-badge-green { background: var(--green-dark); }

@media (max-width: 768px) {
    .page-hero { padding: 24px 0 40px; }
    .page-hero:not(.breadcrumb + .page-hero) { padding-top: 100px; }
    .page-hero h1 { font-size: 28px; }
    .page-hero .hero-subtitle { font-size: 16px; }
    .page-hero-badge { font-size: 12.5px; padding: 6px 13px; margin-bottom: 14px; }
    .breadcrumb:has(+ .page-hero) { padding-top: 88px; }
    .pros-cons-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Article & content presentation upgrades
   ============================================================ */

/* Reading progress bar */
.read-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #8B5CF6, #10B981);
    z-index: 1100;
    transition: width 0.1s linear;
}

/* Article meta chips */
.article-meta {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-top: 4px;
}
.meta-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 15px; font-weight: 600; color: var(--slate);
    box-shadow: var(--sh-xs);
}
.meta-chip .ico { color: var(--blue); width: 14px; height: 14px; }
.meta-chip.tag { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-dark); }

/* Lead paragraph */
.content-body > p:first-child {
    font-size: 20px;
    line-height: 1.8;
    color: var(--navy);
    padding: 22px 26px;
    background: linear-gradient(135deg, var(--blue-50) 0%, rgba(255,255,255,0) 90%);
    border-left: 4px solid var(--blue);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    margin-bottom: 28px;
}

/* Bảng offer trong bài viết (blog) — phân bổ cột hợp lý, cột số không vỡ dòng */
.content-body .mfo-table { table-layout: auto; }
.content-body .mfo-table th,
.content-body .mfo-table td { padding-left: 10px; padding-right: 10px; }
/* Cột số liệu: không vỡ dòng, giữ gọn */
.content-body .mfo-table td.highlight-cell,
.content-body .mfo-table td[data-label="Макс. сумма"],
.content-body .mfo-table td[data-label="Макс. срок"],
.content-body .mfo-table td[data-label="Сумма"],
.content-body .mfo-table td[data-label="Срок"],
.content-body .mfo-table td[data-label="Время решения"],
.content-body .mfo-table td[data-label="Одобрение"] { white-space: nowrap; }
/* Cột Условия / đặc điểm: rộng, cho phép xuống dòng gọn */
.content-body .mfo-table td[data-label="Условия"],
.content-body .mfo-table td[data-label="Особенность"] {
    min-width: 138px;
    line-height: 1.45;
    white-space: normal;
}
/* Nút CTA trong bảng blog gọn hơn để vừa khung */
.content-body .mfo-table .mfo-cta { padding: 10px 16px; }

/* Headings with accent */
.content-body h2 {
    position: relative;
    padding-bottom: 12px;
    margin: 48px 0 18px;
}
.content-body h2::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 48px; height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--blue), var(--green));
}
/* Không hiện gạch trang trí cho h2 trong CTA card (căn giữa, nền tối) */
.content-body .cta-card h2 { padding-bottom: 0; }
.content-body .cta-card h2::after { display: none; }
/* CTA trong bài viết: chữ trắng rõ trên nền tối (đè .content-body p màu xám) */
.content-body .cta-card p { color: rgba(255,255,255,0.82); font-size: 19px; }
.content-body .cta-card h2 { color: #fff; }
.content-body h3 { color: var(--blue-deep); }

/* Lists: custom markers */
.content-body ul { list-style: none; margin-left: 0; }
.content-body ul > li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
}
.content-body ul > li::before {
    content: '';
    position: absolute;
    left: 4px; top: 0.62em;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--blue);
    opacity: 0.85;
}
.content-body ol {
    list-style: none;
    counter-reset: item;
    margin-left: 0;
}
.content-body ol > li {
    position: relative;
    counter-increment: item;
    padding-left: 40px;
    margin-bottom: 12px;
}
.content-body ol > li::before {
    content: counter(item);
    position: absolute;
    left: 0; top: 0.1em;
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    background: var(--blue-50);
    color: var(--blue-dark);
    border-radius: 50%;
    font-size: 15px; font-weight: 800;
}

/* Inline links in articles */
.content-body p a, .content-body li a {
    font-weight: 600;
    border-bottom: 1.5px solid var(--blue-100);
    transition: border-color 0.2s;
}
.content-body p a:hover, .content-body li a:hover { border-bottom-color: var(--blue); }

/* Blockquote / callout */
.content-body blockquote {
    margin: 24px 0;
    padding: 20px 26px;
    background: var(--bg);
    border-left: 4px solid var(--green);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    font-size: 15.5px; color: var(--slate); line-height: 1.75;
}

/* Auto table of contents */
.toc-box {
    margin: 28px 0 36px;
    padding: 24px 28px;
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
}
.toc-box-title {
    display: flex; align-items: center; gap: 9px;
    font-size: 17px; font-weight: 800; color: var(--navy);
    margin-bottom: 14px;
}
.toc-box-title .ico { color: var(--blue); }
.toc-list { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.toc-list li { padding: 0; margin: 0; }
.toc-list li::before { display: none; }
.toc-list a {
    display: inline-flex; align-items: baseline; gap: 10px;
    font-size: 14.5px; font-weight: 600; color: var(--slate);
    border-bottom: none;
}
.toc-list a:hover { color: var(--blue); }
.toc-num {
    flex-shrink: 0;
    font-size: 12px; font-weight: 800;
    color: var(--blue);
}

@media (max-width: 768px) {
    .content-body > p:first-child { font-size: 18px; padding: 18px 20px; }
    .toc-box { padding: 20px; }
}

/* Required field marker */
.form-group label .req {
    color: var(--red);
    font-weight: 800;
    margin-left: 2px;
}

/* ============ Table CTA button (offer tables) ============ */
.mfo-table .btn-apply,
.mfo-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--grad-green);
    color: #fff;
    padding: 11px 22px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(22,163,74,0.28);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.mfo-cta:hover { filter: brightness(1.05); }
.mfo-table .btn-apply:hover,
.mfo-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(22,163,74,0.38);
    color: #fff;
}
.mfo-table td.mfo-cta-cell { text-align: center; white-space: nowrap; }
/* Non-partner rows: muted CTA (no affiliate link) */
.mfo-cta.mfo-cta-muted {
    background: var(--bg);
    color: var(--muted);
    box-shadow: none;
    cursor: default;
    font-weight: 600;
}
.mfo-cta.mfo-cta-muted:hover { transform: none; box-shadow: none; color: var(--muted); }

/* ============================================================
   Grid tiêu chí/bước: hàng cuối lẻ ô -> căn giữa (flex wrap center)
   Áp cho features/steps/requirements/values... — KHÔNG áp blog-grid
   (blog/offers là danh sách, lệch trái là chuẩn).
   ============================================================ */
.features-grid,
.requirements-grid,
.values-grid,
.choose-grid,
.steps-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
}
.features-grid > *,
.choose-grid > *,
.requirements-grid > *,
.values-grid > * {
    flex: 1 1 280px;
    max-width: 360px;
}
/* Khóa số ô mỗi hàng theo TỔNG số ô để không rơi lẻ (như 3+1). */
/* 4 ô -> 2 + 2 (chẵn thì 2 cột) */
.features-grid:has(> :nth-child(4):last-child) > *,
.choose-grid:has(> :nth-child(4):last-child) > *,
.requirements-grid:has(> :nth-child(4):last-child) > *,
.values-grid:has(> :nth-child(4):last-child) > * {
    flex: 0 1 calc((100% - 22px) / 2);
    max-width: none;
}
/* 5 ô -> 3 + 2 ; 6 ô -> 3 + 3 */
.features-grid:has(> :nth-child(5)) > *,
.choose-grid:has(> :nth-child(5)) > *,
.requirements-grid:has(> :nth-child(5)) > *,
.values-grid:has(> :nth-child(5)) > * {
    flex: 0 1 calc((100% - 2 * 22px) / 3);
    max-width: none;
}
/* 7-8 ô -> 4 mỗi hàng */
.features-grid:has(> :nth-child(7)) > *,
.choose-grid:has(> :nth-child(7)) > *,
.requirements-grid:has(> :nth-child(7)) > *,
.values-grid:has(> :nth-child(7)) > * {
    flex: 0 1 calc((100% - 3 * 22px) / 4);
    max-width: none;
}

/* Steps (quy trình): khóa số ô mỗi hàng theo TỔNG số ô để không rơi lẻ.
   Mặc định (≤4 ô): tất cả trên 1 hàng. */
.steps-grid > * { flex: 1 1 200px; max-width: 300px; }

/* 5 ô -> 3 trên + 2 dưới: mỗi ô ~ (100% - gaps)/3 */
.steps-grid:has(> :nth-child(5):last-child) > * {
    flex: 0 1 calc((100% - 2 * 22px) / 3);
    max-width: none;
}
/* 6 ô -> 3 + 3 */
.steps-grid:has(> :nth-child(6):last-child) > * {
    flex: 0 1 calc((100% - 2 * 22px) / 3);
    max-width: none;
}
/* 7-8 ô -> 4 mỗi hàng */
.steps-grid:has(> :nth-child(7)) > * {
    flex: 0 1 calc((100% - 3 * 22px) / 4);
    max-width: none;
}

@media (max-width: 768px) {
    .features-grid > *,
    .requirements-grid > *,
    .values-grid > *,
    .choose-grid > *,
    .steps-grid > *,
    .steps-grid:has(> :nth-child(5):last-child) > *,
    .steps-grid:has(> :nth-child(6):last-child) > *,
    .steps-grid:has(> :nth-child(7)) > *,
    .features-grid:has(> :nth-child(4):last-child) > *,
    .choose-grid:has(> :nth-child(4):last-child) > *,
    .requirements-grid:has(> :nth-child(4):last-child) > *,
    .values-grid:has(> :nth-child(4):last-child) > *,
    .features-grid:has(> :nth-child(5)) > *,
    .choose-grid:has(> :nth-child(5)) > *,
    .requirements-grid:has(> :nth-child(5)) > *,
    .values-grid:has(> :nth-child(5)) > *,
    .features-grid:has(> :nth-child(7)) > *,
    .choose-grid:has(> :nth-child(7)) > *,
    .requirements-grid:has(> :nth-child(7)) > *,
    .values-grid:has(> :nth-child(7)) > * { flex: 1 1 100%; max-width: 100%; }
}
/* Tablet: 2 ô/hàng cho gọn */
@media (min-width: 769px) and (max-width: 1024px) {
    .steps-grid > *,
    .steps-grid:has(> :nth-child(5):last-child) > *,
    .steps-grid:has(> :nth-child(6):last-child) > *,
    .steps-grid:has(> :nth-child(7)) > *,
    .features-grid:has(> :nth-child(5)) > *,
    .choose-grid:has(> :nth-child(5)) > *,
    .requirements-grid:has(> :nth-child(5)) > *,
    .values-grid:has(> :nth-child(5)) > *,
    .features-grid:has(> :nth-child(7)) > *,
    .choose-grid:has(> :nth-child(7)) > *,
    .requirements-grid:has(> :nth-child(7)) > *,
    .values-grid:has(> :nth-child(7)) > * {
        flex: 0 1 calc((100% - 22px) / 2);
        max-width: none;
    }
}

/* ============ Answer-first box (AEO/GEO) ============ */
.answer-box { background: var(--blue-50, #EEF2FF); border-left: 4px solid var(--blue, #2563EB); border-radius: 0 12px 12px 0; padding: 18px 22px; margin: 20px 0 26px; }
.answer-box p { font-size: 17px; line-height: 1.7; color: var(--navy, #0F172A); margin: 0; font-weight: 500; }
@media (max-width: 768px){ .answer-box{ padding: 14px 16px; } .answer-box p{ font-size: 15.5px; } }
