/* =========================================
   TRANG HOME (home.css) - REDESIGN V3 (ADAPTIVE SPACE)
   Phong cách: 
   - Light Mode: "Orbital Dawn" (Bầu khí quyển, sáng, sạch, hiện đại)
   - Dark Mode: "Deep Space" (Vũ trụ sâu, sao, thiên hà)
   ========================================= */

/* --- 1. LAYOUT & CONTAINER --- */
.home-wrapper {
    width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
    color: var(--text-primary, #333);
}

/* --- 2. HERO SECTION SETUP --- */
/* --- 2. HERO SECTION SETUP --- */
.home-hero {
    position: relative;
    padding: 80px 20px 50px 20px;
    display: flex;
    flex-direction: column;
    /* Stack Container and Stats */
    align-items: center;
    /* Center horizontally */
    justify-content: center;
    overflow: hidden;
    min-height: 600px;
    transition: background 0.5s ease;
    /* DEFAULT (LIGHT MODE) BACKGROUND - "Orbital Dawn" */
    background: radial-gradient(circle at 50% 120%, #e0f7fa 0%, #ffffff 60%, #f8f9fa 100%);
    border-radius: 15px;
}

/* ... existing code ... */

/* HERO STATS (Adaptive & Centered) */
.hero-stats {
    display: inline-flex;
    align-items: center;
    margin-top: 50px;
    /* Space from top content */
    gap: 60px;
    /* Wider gaps */
    padding: 20px 40px;
    /* More padding */
    border-radius: 16px;
    min-width: 600px;
    /* Force width */
    justify-content: center;

    /* Light Mode Stats Style */
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center text */
    min-width: 120px;
}

.stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    white-space: nowrap;
    /* Prevent wrap */
    display: block;
}

.stat-separator {
    width: 1px;
    height: 40px;
    background-color: #ddd;
}


/* ... existing dark mode overrides ... */

/* FIX DESKTOP STATS NO-WRAP Overrides */
/* Note: The main .stat-label rule above already handles block + nowrap */

/* RESPONSIVE UPDATES */
@media (max-width: 768px) {
    /* ... existing ... */

    .hero-stats {
        width: 100%;
        min-width: auto;
        /* Reset constraints */
        justify-content: space-around;
        gap: 10px;
        padding: 15px 10px;
        margin-top: 30px;
        flex-wrap: wrap;
        /* Allow wrapping if absolutely needed but try to fit */
    }

    .stat-separator {
        display: none;
    }

    .stat-item {
        min-width: auto;
    }

    .stat-num {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.75rem;
        white-space: normal;
    }

    /* Allow wrap on mobile if very tight */
}

/* --- SPACE BACKGROUND ELEMENTS (ADAPTIVE) --- */
.space-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* LIGHT MODE: Subtle Atmospheric Glows (Blue/Green/Purple) */
/* LIGHT MODE: Subtle Atmospheric Glows (Blue/Green/Purple) */
.nebula-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120vw;
    height: 120vh;
    transform: translate(-50%, -50%);
    filter: blur(80px);
    z-index: 1;
    opacity: 0.6;
    transition: opacity 0.5s, background 0.5s;

    /* Light Mode Gradients: Soft pastel versions of the space colors */
    background:
        radial-gradient(circle at 20% 30%, rgba(111, 66, 193, 0.1) 0%, transparent 40%),
        /* Soft Purple */
        radial-gradient(circle at 80% 80%, rgba(25, 135, 84, 0.1) 0%, transparent 40%),
        /* Soft Green */
        radial-gradient(circle at 50% 50%, rgba(13, 110, 253, 0.05) 0%, transparent 50%);
    /* Soft Blue */
}

/* STARS & TWINKLING (Hidden or subtle in Light Mode) */
.stars,
.twinkling {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.5s;
}

/* PLANET ELEMENTS (Hidden in Light Mode default) */
.planet-container {
    position: absolute;
    top: -10%;
    right: -10%;
    /* Top Right Corner */
    width: 600px;
    height: 600px;
    z-index: 0;
    opacity: 0;
    /* Hidden in Light Mode */
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.planet {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #4facfe 0%, #00f2fe 20%, #000 70%);
    box-shadow: -20px -20px 50px rgba(0, 0, 0, 0.5) inset, 0 0 50px rgba(79, 172, 254, 0.3);
    position: relative;
}

/* --- DARK MODE OVERRIDES (DEEP SPACE HD) --- */
html.dark-mode .home-hero {
    /* HD Galaxy Background from Unsplash */
    background: url('https://images.unsplash.com/photo-1543722530-d2c3201371e7?q=80&w=2600&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    /* Parallax effect */
    position: relative;
    z-index: 1;
}

/* Add an overlay to ensure text is readable on top of the HD image */
html.dark-mode .home-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* 50% Dark Overlay */
    z-index: 0;
}

html.dark-mode .nebula-glow {
    opacity: 0.4;
    /* Tuned down because image is rich */
    mix-blend-mode: overlay;
    background: radial-gradient(circle at 20% 80%, #7000ff 0%, transparent 50%);
}

html.dark-mode .planet-container {
    opacity: 1;
    /* Show Planet */
    animation: floatPlanet 120s linear infinite;
}

@keyframes floatPlanet {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

html.dark-mode .stars {
    opacity: 0.4;
    /* Less intense css stars, rely on image */
}

@keyframes move-twink-back {
    from {
        background-position: 0 0;
    }

    to {
        background-position: -10000px 5000px;
    }
}

@keyframes twinkle-frames {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

/* --- HERO TEXT (ADAPTIVE) --- */
.hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    gap: 50px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

/* Light Mode Text */
.hero-heading {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: #1a1a2e;
    /* Dark Blue/Black for Light Mode */
    transition: color 0.3s;
}

.hero-subtext {
    font-size: 1.15rem;
    color: #555;
    /* Dark Grey */
    margin-bottom: 35px;
    line-height: 1.6;
    transition: color 0.3s;
}

/* Dark Mode Text Override */
html.dark-mode .hero-heading {
    color: #ffffff;
}

html.dark-mode .hero-subtext {
    color: #e0e0e0;
}

/* BADGES & BUTTONS */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;

    /* Adaptive Badge */
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

html.dark-mode .hero-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #20c997;
    border-color: rgba(255, 255, 255, 0.2);
}

.text-gradient {
    /* Adaptive Gradient: Darker Green in Light Mode for contrast */
    background: linear-gradient(135deg, #198754 0%, #17a2b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

html.dark-mode .text-gradient {
    /* Neon Green in Dark Mode */
    background: linear-gradient(135deg, #2ecc71 0%, #00f260 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(46, 204, 113, 0.4));
}

/* BUTTONS */
.btn-home-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: var(--primary-color, #198754);
    color: white;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(25, 135, 84, 0.3);
}

.btn-home-primary:hover {
    background: #157347;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(25, 135, 84, 0.4);
    color: white;
}

html.dark-mode .btn-home-primary {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    box-shadow: 0 0 20px rgba(32, 201, 151, 0.4);
}

.btn-home-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: transparent;
    color: #333;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #ccc;
}

.btn-home-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: #999;
}

html.dark-mode .btn-home-secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

html.dark-mode .btn-home-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

/* HERO STATS (Adaptive) */
.hero-stats {
    display: inline-flex;
    align-items: center;
    margin-top: 120px;
    gap: 30px;
    padding: 15px 25px;
    border-radius: 16px;

    /* Light Mode Stats Style */
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-num {
    font-size: 1.25rem;
    font-weight: 800;
    color: #333;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
}

.stat-separator {
    width: 1px;
    height: 30px;
    background-color: #ddd;
}

html.dark-mode .hero-stats {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

html.dark-mode .stat-num {
    color: #fff;
}

html.dark-mode .stat-label {
    color: #aaa;
}

html.dark-mode .stat-separator {
    background-color: rgba(255, 255, 255, 0.2);
}


/* --- REST OF THE PAGE (UNCHANGED FUNCTIONALITY, JUST STYLE) --- */

/* HERO VISUAL (MOCKUP) */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    perspective: 1000px;
}

.app-card-mockup {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 2;
    border: 1px solid #eee;
    animation: floatCard 6s ease-in-out infinite;
}

html.dark-mode .app-card-mockup {
    background: rgba(20, 20, 30, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0) rotateX(2deg);
    }

    50% {
        transform: translateY(-15px) rotateX(0deg);
    }
}

/* Glass Header */
.card-glass-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

html.dark-mode .card-glass-header {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
}

.dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.8;
}

.dots {
    display: flex;
    gap: 6px;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.address-bar {
    font-size: 0.75rem;
    color: #999;
    background: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

html.dark-mode .address-bar {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
    color: #aaa;
}

/* Mockup Body */
.card-glass-body {
    padding: 20px;
    height: 280px;
    position: relative;
    background: linear-gradient(180deg, #fff 0%, #f0f7ff 100%);
}

html.dark-mode .card-glass-body {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

/* CHART AREA WRAPPER */
.chart-area {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    /* Align chart to bottom */
}

.chart-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}


html.dark-mode .chart-svg {
    filter: drop-shadow(0 0 10px rgba(25, 135, 84, 0.3));
}

/* Badges */
.float-badge {
    position: absolute;
    background: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: bounceBadge 4s infinite ease-in-out;
    border: 1px solid #eee;
}

html.dark-mode .float-badge {
    background: rgba(30, 30, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.badge-1 {
    top: 40px;
    right: -20px;
    animation-delay: 0s;
}

.badge-2 {
    bottom: 40px;
    left: -20px;
    animation-delay: 2s;
}

@keyframes bounceBadge {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.badge-1 .icon-up {
    color: var(--color-success);
    background: rgba(40, 167, 69, 0.1);
    border-radius: 8px;
    padding: 6px;
}

html.dark-mode .badge-1 .icon-up {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.2);
}

.badge-2 .icon-check {
    color: var(--color-warning);
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    padding: 6px;
}

html.dark-mode .badge-2 .icon-check {
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.2);
}

.fb-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
}

html.dark-mode .fb-title {
    color: #fff;
}

.fb-value {
    font-size: 0.85rem;
    color: var(--color-success);
    font-weight: 700;
}

html.dark-mode .fb-value {
    color: #2ecc71;
}

.fb-desc {
    font-size: 0.75rem;
    color: #666;
}

html.dark-mode .fb-desc {
    color: #aaa;
}


/* --- FEATURES SECTION --- */
.features-section {
    padding: 80px 20px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-title-wrapper {
    margin-bottom: 60px;
    text-align: center;
}

.section-title-wrapper h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #111;
}

html.dark-mode .section-title-wrapper h2 {
    color: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* COMPACT FEATURE CARD LAYOUT */
.feature-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 25px 20px;
    /* Reduced padding from 35px 30px */
    text-align: left;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;

    /* Grid Layout for Icon + Title Row */
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 15px;
    row-gap: 10px;
}

html.dark-mode .feature-card {
    background: #1e1e24;
    border-color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0%;
    background: var(--primary-color);
    transition: height 0.3s ease;
}

.feature-card:hover::before {
    height: 100%;
}

.feature-icon {
    width: 42px;
    /* Reduced */
    height: 42px;
    /* Reduced */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;

    grid-row: 1;
    grid-column: 1;
}

.feature-icon .material-symbols-outlined {
    font-size: 24px;
    /* Reduced */
    color: white;
}

.bg-green {
    background: linear-gradient(135deg, #198754, #20c997);
}

.bg-blue {
    background: linear-gradient(135deg, #0d6efd, #0dcaf0);
}

.bg-purple {
    background: linear-gradient(135deg, #6f42c1, #a66efa);
}

.feature-card h3 {
    font-size: 1.15rem;
    /* Slightly reduced from 1.35rem */
    font-weight: 700;
    margin-bottom: 0;
    color: #111;

    grid-row: 1;
    grid-column: 2;
    align-self: center;
    /* Vertically center with icon */
    line-height: 1.2;
}

.feature-card p {
    font-size: 0.95rem;
    /* Slightly reduced */
    color: #666;
    line-height: 1.5;

    grid-row: 2;
    grid-column: 1 / -1;
    /* Span full width */
    margin-top: 5px;
}

html.dark-mode .feature-card h3 {
    color: #eee;
}

.feature-card p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

html.dark-mode .feature-card p {
    color: #aaa;
}


/* --- FOOTER CTA --- */
.footer-cta {
    background: url(https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072&auto=format&fit=crop) no-repeat center center;
    background-size: cover;
    padding: 80px 20px;
    text-align: center;
    margin-top: 60px;
    border-radius: 24px;
    margin-bottom: 60px;
    color: white;
    max-width: 1160px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Ensure overlay if image is too bright */
.footer-cta::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 20, 40, 0.6);
    border-radius: 24px;
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: white;
    font-weight: 800;
}

.cta-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
    color: #e0e0e0;
}

.btn-home-white {
    background: white;
    color: #0f1020;
    font-weight: 700;
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-home-white:hover {
    transform: scale(1.05);
    background: #f8f9fa;
}


/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .home-hero {
        padding-top: 60px;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 60px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-heading {
        font-size: 2.8rem;
    }

    .hero-cta-group {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .home-hero {
        padding: 40px 15px;
        min-height: auto;
    }

    .hero-heading {
        font-size: 2.1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-container {
        gap: 40px;
    }

    /* Fix Planet: Only show in Dark Mode */
    .planet-container {
        width: 180px !important;
        height: 180px !important;
        top: -40px !important;
        right: -40px !important;
        opacity: 0;
        /* Default hidden in mobile light mode */
    }

    html.dark-mode .planet-container {
        opacity: 0.5 !important;
    }

    /* 3. SHOW FLOAT BADGES ON MOBILE */
    .badge-1,
    .badge-2 {
        display: flex !important;
        padding: 6px 10px;
        transform: scale(0.8);
        z-index: 10;
        white-space: nowrap;
        width: auto;
        max-width: 140px;
        /* Limit width */
    }

    .badge-1 {
        top: 15px;
        right: 0px;
    }

    .badge-2 {
        bottom: 15px;
        left: 0px;
    }

    .fb-title {
        font-size: 0.8rem;
    }

    .fb-value {
        font-size: 0.75rem;
    }

    /* Hide desc on mobile if needed, or keep small */
    .fb-desc {
        display: none;
    }

    /* 2. CTA BUTTONS INLINE (ROW) */
    .hero-cta-group {
        flex-direction: row !important;
        width: 100%;
        gap: 10px !important;
        justify-content: center;
    }

    .btn-home-primary,
    .btn-home-secondary {
        width: auto;
        flex: 1;
        padding: 12px 10px;
        font-size: 0.9rem;
        justify-content: center;
        margin: 0 !important;
        white-space: nowrap;
    }

    /* 5. FIX MOBILE STATS (Row with wrap if needed, or scroll) */
    .hero-stats {
        width: 100%;
        justify-content: space-around;
        gap: 10px;
        padding: 15px 10px;
        margin-top: 20px;
    }

    .stat-separator {
        display: none;
    }

    .stat-item {
        align-items: center;
    }

    .stat-num {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.7rem;
        text-align: center;
        white-space: normal;
    }

    /* Allow wrap */

    .space-background {
        position: absolute;
        height: 100%;
    }
}

/* 4. FIX DESKTOP STATS LABEL GLOBAL */
.stat-item {
    display: flex;
    flex-direction: column;
    min-width: 80px;
}

.stat-label {
    display: block;
    margin-top: 4px;
    line-height: 1.2;
}

/* ANIMATIONS */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 5. PORTFOLIO PROCESS SECTION (MODERN CARD FUNNEL) --- */
.process-section {
    padding: 80px 20px 20px 20px;
    background: transparent;
}

html.dark-mode .process-section {
    background: transparent;
}

.modern-process-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-bottom: 20px;
}

/* HEADER NODE (1700 STOCKS) */
.process-header-node {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 2;
    margin-bottom: 0;
}

.process-header-node span {
    font-weight: 800;
    font-size: 1.2rem;
    color: #385d3a;
}

.process-header-node .material-symbols-outlined {
    font-size: 28px;
    color: #70ad47;
}

html.dark-mode .process-header-node {
    background: #1e1e24;
    border-color: #333;
}

html.dark-mode .process-header-node span {
    color: #fff;
}

/* VERTICAL CONNECTORS */
.vertical-line-segment {
    width: 2px;
    height: 40px;
    background: linear-gradient(180deg, #b0cba2 0%, #70ad47 100%);
    position: relative;
    z-index: 0;
}

/* Add a glowing outline node on the line */
.vertical-line-segment::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid #70ad47;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(112, 173, 71, 0.2);
}

html.dark-mode .vertical-line-segment::after {
    background: #121212;
    border-color: #8bc34a;
    box-shadow: 0 0 0 4px rgba(139, 195, 74, 0.2);
}

/* FACTORS GRID (SPLIT) */
.process-factors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.factor-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s;
}

.factor-card:hover {
    transform: translateY(-5px);
    border-color: #70ad47;
}

html.dark-mode .factor-card {
    background: #1e1e24;
    border-color: #333;
}

.factor-icon {
    background: rgba(112, 173, 71, 0.1);
    color: #70ad47;
    padding: 10px;
    border-radius: 12px;
}

.factor-content h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

html.dark-mode .factor-content h4 {
    color: #fff;
}

.factor-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.factor-tags span {
    background: #f5f5f5;
    color: #555;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

html.dark-mode .factor-tags span {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

/* PROCESS STEP CARDS (THE FUNNEL) */
.process-step-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: block;
}

.process-step-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

html.dark-mode .process-step-card {
    background: #1e1e24;
    border-color: #333;
}

/* Card Widths - Funnel Effect */
.step-wide {
    width: 100%;
    max-width: 800px;
}

.step-medium {
    width: 80%;
    max-width: 650px;
}

.step-narrow {
    width: 60%;
    max-width: 500px;
}

/* Step Badge (Top bar of card) */
.step-badge {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    padding: 8px;
    border-bottom: 1px solid #dcebdc;
    letter-spacing: 1px;
}

.step-badge.primary {
    background: #198754;
    color: #fff;
}

html.dark-mode .step-badge {
    background: rgba(46, 125, 50, 0.2);
    color: #8bc34a;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

html.dark-mode .step-badge.primary {
    background: #2e7d32;
    color: #fff;
}

.step-body {
    padding: 25px 30px;
    text-align: center;
}

.step-body h3 {
    margin: 0 0 15px 0;
    font-size: 1.25rem;
    color: #1a1a1a;
    font-weight: 800;
}

html.dark-mode .step-body h3 {
    color: #fff;
}

.step-details {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

html.dark-mode .step-details {
    color: #bbb;
}

.step-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    display: inline-block;
}

.step-details ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.step-details ul li::before {
    content: '•';
    color: #198754;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.mini-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.mini-tags span {
    border: 1px solid #eee;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #666;
    background: #f9f9f9;
}

html.dark-mode .mini-tags span {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
    color: #ccc;
}

/* Active Glow for Final Step */
.active-glow {
    border: 1px solid #70ad47;
    box-shadow: 0 0 20px rgba(112, 173, 71, 0.15);
}

/* FINAL NODE */
.process-final-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    text-align: center;
}

.final-icon {
    background: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    color: #198754;
    border: 2px solid #e8f5e9;
    z-index: 2;
}

html.dark-mode .final-icon {
    background: #1e1e24;
    border-color: #333;
    color: #8bc34a;
}

.final-text h4 {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
}

html.dark-mode .final-text h4 {
    color: #fff;
}

.final-text p {
    font-size: 0.9rem;
    color: #777;
    margin: 5px 0 0 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .process-factors-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .process-step-card.step-wide,
    .process-step-card.step-medium,
    .process-step-card.step-narrow {
        width: 100%;
        max-width: 100%;
    }

    .vertical-line-segment {
        height: 30px;
    }
}

transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-home-white:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-light);
}

/* --- RESPONSIVE UPDATES --- */
@media (max-width: 1200px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-heading {
        font-size: 3.8rem;
    }

    .hero-visual {
        justify-content: center;
    }

    .hero-mockup-img {
        width: 100%;
        max-width: 550px;
    }

    .process-step-card:nth-child(odd),
    .process-step-card:nth-child(even) {
        transform: none;
        text-align: left;
        flex-direction: row;
    }

    .process-step-card::after {
        display: none;
    }

    .modern-process-container::before {
        left: 20px;
        transform: none;
    }

    .fb-1,
    .fb-2 {
        display: none;
    }

    /* Hide badges on small screens to avoid clutter */
}

@media (max-width: 768px) {
    .hero-heading {
        font-size: 3rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 30px;
    }

    .stat-num {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .section-title-wrapper h2 {
        font-size: 2.5rem;
    }

    .cta-content h2 {
        font-size: 2.5rem;
    }
}