:root {
    /* Light Mode */
    --bg-color: #f4f7fc;
    --text-color: #333;
    --text-muted-color: #6c757d;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --shadow-color: rgba(0, 0, 0, 0.05);
    --accent-color-1: #0d6efd;
    --accent-color-2: #0a58ca;
    --accent-gradient: linear-gradient(45deg, #0d6efd, #0a58ca);
    --accent-shadow: rgba(13, 110, 253, 0.3);
    --section-bg-darker: #ffffff;
}

body.dark-mode {
    /* Dark Mode */
    --bg-color: #0c0f14;
    --text-color: #e0e0e0;
    --text-muted-color: #888;
    --card-bg: #1a1e25;
    --border-color: #2a2e35;
    --navbar-bg: rgba(12, 15, 20, 0.85);
    --shadow-color: rgba(0, 0, 0, 0.2);
    --accent-color-1: #00f2fe;
    --accent-color-2: #4facfe;
    --accent-gradient: linear-gradient(45deg, #00f2fe, #4facfe);
    --accent-shadow: rgba(0, 242, 254, 0.25);
    --section-bg-darker: #12151a;
}

/* 1. GLOBAL & TYPOGRAPHY */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 20px; /* Compact font size */
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-color);
}

p {
    color: var(--text-muted-color);
    font-size: 0.95rem;
    line-height: 1.7;
}

section {
    padding: 5rem 0;
    overflow: hidden;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-title p {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-muted-color);
}

/* 2. CUSTOM PARALLELOGRAM BUTTON */
.btn-skew {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    background: var(--accent-gradient);
    padding: 10px 30px;
    margin: 5px;
    border-radius: 8px;
    transform: skewX(-15deg);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    box-shadow: 0 4px 15px var(--accent-shadow);
    position: relative;
}

.btn-skew span {
    display: inline-block;
    transform: skewX(15deg); /* Un-skew the text */
    position: relative;
    z-index: 2;
}

.btn-skew:hover {
    transform: skewX(-15deg) scale(1.05);
    box-shadow: 0 8px 25px var(--accent-shadow);
    color: #fff;
}

/* Secondary Button Style */
.btn-skew.btn-secondary {
    background: var(--card-bg);
    color: var(--accent-color-1);
    border: 2px solid var(--accent-color-1);
    box-shadow: none;
}

.btn-skew.btn-secondary:hover {
     background: var(--accent-gradient);
     color: #fff;
     border-color: transparent;
}

.btn-skew.btn-sm {
    padding: 5px 15px;
    font-size: 0.8rem;
}

/* 3. NAVBAR */
.navbar {
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-color);
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    margin: 0 0.5rem;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color-1) !important;
}

.form-check-label {
    color: var(--text-color);
    cursor: pointer;
}

/* 4. HERO SECTION */
.hero-section {
    min-height: 100vh;
    padding-top: 80px; /* Navbar height */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--section-bg-darker);
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.hero-content h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text-muted-color);
}

/* Animated Text */
.animated-text-wrapper {
    display: inline-block;
    position: relative;
    height: 40px; /* Giữ nguyên chiều cao này cho animation */
    width: 280px; /* <-- THÊM CÁI NÀY (Bạn có thể chỉnh 280px to/nhỏ cho vừa ý) */
    vertical-align: top;
}

.animated-text {
    color: var(--accent-color-1);
    font-weight: 600;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.animated-text.active {
    opacity: 1;
    transform: translateY(0);
}

.animated-text.exit {
    opacity: 0;
    transform: translateY(-100%);
}

.hero-content .trust-badges {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-content .trust-badges li {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted-color);
}

.hero-content .trust-badges li i {
    color: #28a745; /* Green check */
    margin-right: 5px;
}

/* CSS 3D Server Illustration */
.hero-illustration {
    perspective: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
}

.server-stack {
    position: relative;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.server-unit {
    width: 250px;
    height: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    position: relative;
    margin-bottom: 15px;
    border-radius: 4px;
    transform: rotateX(-15deg) rotateY(25deg);
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px var(--shadow-color);
}

/* Server faces */
.server-unit::before, .server-unit::after {
    content: '';
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

/* Top face */
.server-unit::before {
    width: 100%;
    height: 15px; /* "depth" */
    top: -15px;
    left: 0;
    transform-origin: bottom;
    transform: rotateX(90deg);
    background: #ccc;
    body.dark-mode & { background: #333; }
    border-radius: 4px 4px 0 0;
}

/* Side face */
.server-unit::after {
    width: 15px; /* "depth" */
    height: 100%;
    top: 0;
    left: -15px;
    transform-origin: right;
    transform: rotateY(-90deg);
    background: #e0e0e0;
    body.dark-mode & { background: #444; }
    border-radius: 4px 0 0 4px;
}

/* Blinking Lights */
.server-leds {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 6px;
}

.led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #555;
    animation: blink 1.5s infinite;
}
.led.green { background-color: #28a745; animation-delay: 0s; }
.led.yellow { background-color: #ffc107; animation-delay: 0.5s; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Floating Social Icons */
.social-icon {
    position: absolute;
    font-size: 1.8rem;
    color: var(--accent-color-1);
    opacity: 0.5;
    animation: float-icon 8s ease-in-out infinite;
}
.social-icon.i-fb { top: 0; left: 10%; animation-delay: 0s; }
.social-icon.i-tk { top: 20%; right: 5%; animation-delay: -2s; }
.social-icon.i-yt { bottom: 10%; left: 5%; animation-delay: -4s; }
.social-icon.i-ig { bottom: 0; right: 15%; animation-delay: -6s; }
.social-icon.i-tg { top: 50%; left: -5%; animation-delay: -1s; }

@keyframes float-icon {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-25px) scale(1.1); }
    100% { transform: translateY(0px) scale(1); }
}

/* 5. SERVICES SECTION */
.services-section {
    background-color: var(--section-bg-darker);
}

/* Custom Bootstrap Tabs */
.services-section .nav-tabs {
    border-bottom: 2px solid var(--border-color);
    justify-content: center;
    margin-bottom: 2rem;
}

.services-section .nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted-color);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    margin: 0 0.25rem;
}

.services-section .nav-tabs .nav-link.active {
    color: var(--accent-color-1);
    border-bottom-color: var(--accent-color-1);
    background-color: transparent;
}

.service-table {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow-color);
}

.service-table .table {
    margin-bottom: 0;
    color: var(--text-color);
    font-size: 0.9rem;
}

.service-table th {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-weight: 600;
    padding: 1rem;
}

.service-table td {
    vertical-align: middle;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.service-table td:first-child {
    font-weight: 600;
}

/* 6. TIERS SECTION (ƯU ĐÃI) */
.tier-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 20px var(--shadow-color);
}

.tier-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px var(--shadow-color);
}

.tier-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color-1);
}

.tier-card .description {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    min-height: 40px;
}

.tier-card .benefits-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
}

.tier-card .benefits-list li {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.tier-card .benefits-list li i {
    color: var(--accent-color-1);
    margin-right: 10px;
    font-weight: bold;
}

.tier-card .discount {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 1.5rem 0;
}
.tier-card .discount span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted-color);
}

/* Highlight popular card */
.tier-card.popular {
    border: 2px solid var(--accent-color-1);
    transform: scale(1.05);
    position: relative;
    z-index: 2;
}

.tier-card.popular .badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gradient);
    font-size: 0.8rem;
    padding: 0.5em 1em;
    border-radius: 20px;
}

@media (max-width: 991.98px) {
    .tier-card.popular {
        transform: scale(1); /* No scale on tablet/mobile */
    }
}

/* 7. TESTIMONIALS SECTION */
.testimonials-section {
    background-color: var(--section-bg-darker);
}

.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 5px 20px var(--shadow-color);
    margin: 1rem; /* Margin for carousel spacing */
}

.testimonial-card .stars {
    color: #ffc107; /* Yellow stars */
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.testimonial-card .review-text {
    font-style: italic;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.testimonial-card .author-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.testimonial-card .author-role {
    font-size: 0.85rem;
    color: var(--text-muted-color);
}

.testimonials-section .carousel-indicators [data-bs-target] {
    background-color: var(--accent-color-1);
    opacity: 0.5;
}
.testimonials-section .carousel-indicators .active {
    opacity: 1;
}

.testimonials-section .carousel-control-prev-icon,
.testimonials-section .carousel-control-next-icon {
    filter: invert(1);
    /* A bit of a hack for dark mode, but Bootstrap's icons are tricky */
}

body.dark-mode .testimonials-section .carousel-control-prev-icon,
body.dark-mode .testimonials-section .carousel-control-next-icon {
     filter: none;
}


/* 8. FINAL CTA SECTION */
.cta-section {
    background: var(--accent-gradient);
    color: #fff;
    padding: 6rem 0;
}

.cta-section h2, .cta-section p {
    color: #fff;
}

.cta-section h2 {
    font-size: 2.5rem;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn-skew {
    transform: skewX(-15deg); /* Re-apply base skew */
    background: #fff;
    color: var(--accent-color-2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.cta-section .btn-skew:hover {
    transform: skewX(-15deg) scale(1.05);
    background: #fff;
    color: var(--accent-color-1);
}

.cta-section .btn-secondary {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    box-shadow: none;
}
.cta-section .btn-secondary:hover {
    background: #fff;
    color: var(--accent-color-2);
}

.trust-elements {
    margin-top: 3rem;
}

.trust-element {
    text-align: center;
    color: #fff;
}

.trust-element i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.trust-element h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

/* 9. FOOTER */
.footer {
    background-color: var(--section-bg-darker);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.footer .footer-links {
    margin-bottom: 1rem;
}

.footer .footer-links a {
    text-decoration: none;
    color: var(--text-muted-color);
    margin: 0 1rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer .footer-links a:hover {
    color: var(--accent-color-1);
}

.footer .copyright {
    font-size: 0.85rem;
    color: var(--text-muted-color);
    margin: 0;
}

/* 10. SCROLL ANIMATION */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 11. RESPONSIVE ADJUSTMENTS */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
        padding-top: 120px;
        text-align: center;
    }
    .hero-illustration {
        margin-top: 4rem;
        min-height: 300px;
    }
    .server-unit {
        width: 200px;
    }
    .hero-content .trust-badges {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    body { font-size: 14px; }
    h1 { font-size: 2.2rem; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content h2 { font-size: 1.2rem; }
    
    .section-title h2 { font-size: 1.8rem; }
    
    .services-section .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .tier-card {
        margin-bottom: 2rem;
    }
    
    .cta-section h2 { font-size: 1.8rem; }
    
    .trust-element {
        margin-bottom: 2rem;
    }
    
    .footer .footer-links a {
        display: block;
        margin: 0.5rem 0;
    }
}
/* 4.5. FLOW / STEPS SECTION – QUY TRÌNH SỬ DỤNG */
.flow-section {
    background-color: var(--bg-color);
    position: relative;
}

.flow-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0 1rem;
}

/* Đường trục giữa uốn lượn (zigzag cảm giác) */
.flow-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    background: linear-gradient(
        180deg,
        var(--accent-color-1),
        var(--accent-color-2)
    );
    opacity: 0.18;
    border-radius: 999px;
}

.flow-item {
    position: relative;
    margin: 3rem 0;
    opacity: 0.25;
    transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.flow-card {
    background-color: var(--card-bg);
    border-radius: 18px;
    padding: 1.6rem 1.8rem;
    box-shadow: 0 8px 25px var(--shadow-color);
    max-width: 360px;
    position: relative;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}

.flow-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color-1);
    margin-bottom: 0.3rem;
}

.flow-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.flow-card p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Thứ tự zíc zắc trái – phải */
.flow-item:nth-child(odd) .flow-card {
    margin-right: auto;
    margin-left: 0;
    text-align: right;
}

.flow-item:nth-child(even) .flow-card {
    margin-left: auto;
    margin-right: 0;
    text-align: left;
}

/* Vòng tròn số bước ở giữa – như giọt nước chảy dọc theo trục */
.flow-step-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--section-bg-darker);
    border: 2px solid var(--accent-color-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-color-1);
    z-index: 2;
    box-shadow: 0 0 0 5px var(--bg-color);
    transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.flow-step-circle span {
    position: relative;
}

/* Khi bước ACTIVE – nước chảy tới từng mục */
.flow-item.active {
    opacity: 1;
    transform: translateY(0);
}

.flow-item.active .flow-card {
    border-color: transparent;
    box-shadow: 0 16px 40px var(--accent-shadow);
    transform: translateY(-6px);
}

.flow-item.active .flow-step-circle {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 0 7px var(--accent-shadow);
    transform: translate(-50%, -50%) scale(1.05);
}

/* Hiệu ứng lượn sóng sau khi chạy hết 4 bước */
@keyframes wave-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.45);
    }
    100% {
        box-shadow: 0 0 0 12px rgba(13, 110, 253, 0);
    }
}

.flow-section.wave-animation .flow-item .flow-card {
    animation: wave-bounce 2.4s ease-in-out infinite;
}

.flow-section.wave-animation .flow-item:nth-child(2) .flow-card {
    animation-delay: 0.2s;
}

.flow-section.wave-animation .flow-item:nth-child(3) .flow-card {
    animation-delay: 0.4s;
}

.flow-section.wave-animation .flow-item:nth-child(4) .flow-card {
    animation-delay: 0.6s;
}

.flow-section.wave-animation .flow-step-circle {
    animation: pulse-ring 2.8s ease-out infinite;
}

/* RESPONSIVE CHO MOBILE – đưa line về bên trái */
@media (max-width: 767.98px) {
    .flow-timeline::before {
        left: 20px;
        transform: translateX(0);
    }

    .flow-step-circle {
        left: 20px;
        transform: translate(-50%, -50%);
        width: 40px;
        height: 40px;
    }

    .flow-item:nth-child(odd) .flow-card,
    .flow-item:nth-child(even) .flow-card {
        margin: 0 0 0 55px;
        text-align: left;
    }
}