/* ============================================
   Features Section
   ============================================ */

.features-section {
    position: relative;
    padding: 0;
    overflow: hidden; /* Clip anything outside section bounds */
    height: 100vh; /* Full viewport height */
    background: var(--bg-surface-primary, #0B0A15);
    z-index: 1; /* Above fixed particles background */
}

/* Features Section Top Left Background Image */
.features-section .features-top-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/resources/images/home_new/sales-top-bg.png');
    background-size: contain;
    background-position: top left;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Features Section Bottom Right Background Image */
.features-section .features-bottom-image {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: url('/resources/images/home_new/sales-bottom-bg.png');
    background-size: contain;
    background-position: bottom right;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.features-container {
    position: relative;
    z-index: 1;
    max-width: 1440px; /* Match header container width */
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-24, 24px); /* Match header container padding */
    overflow: hidden; /* Clip content outside bounds - prevents card overflow */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Header - starts in normal flow, moves under cards during scroll */
.features-header {
    position: absolute;
    top: 110px; /* Match Figma: top-[92px] */
    left: 50%;
    transform-origin: top center; /* Scale from top center when shrinking */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-32, 32px); /* Match Figma: gap-[var(--spacing/32,32px)] */
    text-align: center;
    z-index: 1; /* Will be behind cards */
    width: 100%;
    max-width: 1440px; /* Match header container width */
    padding: 0 var(--spacing-24, 24px); /* Match header container padding */
    /* Initial state: normal flow at top, fully visible */
    opacity: 1;
    /* GSAP handles all transforms (xPercent, y, scale) via JavaScript */
    /* The is-behind-cards class is used to track state for styling/accessibility */
    transition: none; /* GSAP handles all animations, no CSS transitions needed */
}

/* Class indicator for when header is behind cards (used for state tracking) */
/* GSAP handles the actual scale transform */
.features-header.is-behind-cards {
    /* State class - actual transform is handled by GSAP */
}

.features-tag {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.features-tag svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    display: block;
}

.features-tag span {
    font-family: var(--font-family-inter-tight, "Inter Tight", sans-serif);
    font-weight: var(--font-weight-medium, 500);
    font-size: var(--font-size-text-s, 14px);
    line-height: var(--font-line-height-text-s, 21px);
    letter-spacing: var(--font-letter-spacing-text-s, 0.1px);
    background: linear-gradient(138.91deg, #ffbfb5 22.107%, #c4b5ff 55.634%, #b5bfff 84.734%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.features-title {
    font-family: var(--font-family-inter-tight, "Inter Tight", sans-serif);
    font-weight: var(--font-weight-medium, 500);
    font-size: 56px; /* Match Figma: text-[56px] */
    line-height: 64px; /* Match Figma: leading-[64px] */
    letter-spacing: 0.196px; /* Match Figma: tracking-[0.196px] */
    background: linear-gradient(-85.457deg, var(--Colors-Violet-900, #413778) 7.456%, var(--fg-primary-rest, #EBEBEE) 71.69%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 822px; /* Match Figma: w-[822px] */
    max-width: 100%;
}

.features-subtitle a {
    color: var(--Colors-Violet-300, #c4b5ff);
    text-decoration: none;
    transition: color 0.2s ease;
}

.features-subtitle a:hover {
    color: var(--Colors-Peach-300, #ffbfb5);
    text-decoration: underline;
}

.features-subtitle {
    font-family: var(--font-family-inter-tight, "Inter Tight", sans-serif);
    font-weight: var(--font-weight-regular, 400);
    font-size: var(--font-size-h2, 20px);
    line-height: var(--font-line-height-h1, 24px);
    letter-spacing: var(--font-letter-spacing-h2, 0.2px);
    color: var(--fg-primary-rest, #d4d4de);
    text-align: center;
    margin: 0;
    max-width: 650px;
    position: absolute;
    top: 225px; /* Match Figma: top-[313px] - 221px below header (92px + header height ~92px) */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    padding: 0 clamp(24px, 4vw, 154px);
    z-index: 1;
    /* Initial state: visible below title */
    opacity: 1;
}

/* Feature Cards Wrapper - positioned absolutely for scroll behavior */
/* Safe top offset calculation (fixed to prevent drift):
   - Header top: 110px
   - Tag height: ~18px
   - Gap: 32px
   - Title height: 2 lines × 64px = 128px
   - Header bottom: 110px + 18px + 32px + 128px = 288px
   - Subtitle top: 225px (positioned absolutely, below header)
   - Subtitle height: 2 lines × 24px = 48px
   - Subtitle bottom: 225px + 48px = 273px
   - Safe padding: 32px
   - Minimum safe offset: 273px + 32px = 305px
   - At 1800px: clamp(350px, 22vw, 450px) = 396px (22vw = 396px)
   - Use fixed 400px to match 1800px behavior and prevent upward drift on smaller screens
   - This ensures consistent spacing from header/text block across all widths (1800px down to 768px)
*/
.features-cards-wrapper {
    position: absolute;
    top: 450px; /* Fixed offset: increased spacing for more safe distance, prevents upward drift */
    left: 0; /* Start from container left */
    width: 100%;
    max-width: 1132px;
    padding: 0;
    z-index: 10; /* Higher than title - cards always on top */
    pointer-events: none; /* Allow clicks to pass through when needed */
    min-height: 1500px; /* Space for all cards */
    /* Ensure wrapper doesn't cause horizontal overflow */
    box-sizing: border-box;
    overflow: visible; /* Allow cards to be positioned, but container clips them */
}

.features-cards {
    position: relative;
    width: 100%;
    min-height: 1500px;
    pointer-events: auto; /* Re-enable clicks on cards */
}

.feature-card {
    position: absolute;
    width: 368px;
    min-height: 332px;
    padding: var(--spacing-40, 40px);
    border-radius: 24px;
    background: linear-gradient(180deg, var(--Colors-Base-White-5, rgba(235, 235, 238, 0.05)) 0%, var(--Colors-Base-White-1, rgba(235, 235, 238, 0.01)) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0px 4px 24px 0px var(--Colors-Base-Black-80, rgba(11, 10, 21, 0.8));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    z-index: 10; /* Higher than title */
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease; /* Smooth transitions, no layout shift */
    box-sizing: border-box; /* Ensure padding is included in width calculation */
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(11, 10, 21, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    transform: translateZ(0);
    z-index: -1;
    pointer-events: none;
    border-radius: 24px;
}

/* Card positions based on Figma design - Desktop */
/* Figma positions: cards wrapper is at left-[154px] top-[145px] */
/* Card positions are relative to the wrapper */
.feature-card[data-card-index="0"] {
    /* Boost Revenue - left-[338px] top-[145px] relative to viewport */
    /* Relative to wrapper (154px, 145px): left = 338 - 154 = 184px, top = 145 - 145 = 0px */
    left: 314px;
    top: 0px;
}

/* Background image for first card - styled like hero section */
.feature-card[data-card-index="0"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/resources/images/home_new/sales-card-1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    border-radius: 24px;
}

.feature-card[data-card-index="1"] {
    /* Fund Your Event - left-[918px] top-[459px] relative to viewport */
    /* Relative to wrapper: left = 918 - 154 = 764px, top = 459 - 145 = 314px */
    left: 894px;
    top: 314px;
}

/* Background image for second card */
.feature-card[data-card-index="1"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/resources/images/home_new/sales-card-2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    border-radius: 24px;
}

.feature-card[data-card-index="2"] {
    /* Maximize Order Values - positioned at far left, aligned with section left offset */
    /* Relative to wrapper: left = 0px (far left), top = 777 - 145 = 632px */
    left: 130px;
    top: 632px;
}

/* Background image for third card */
.feature-card[data-card-index="2"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/resources/images/home_new/sales-card-3.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    border-radius: 24px;
}

.feature-card[data-card-index="3"] {
    /* Enhance Security - left-[736px] top-[1093px] relative to viewport */
    /* Relative to wrapper: left = 736 - 154 = 582px, top = 1093 - 145 = 948px */
    left: 712px;
    top: 948px;
}

/* Background image for fourth card */
.feature-card[data-card-index="3"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/resources/images/home_new/sales-card-4.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    border-radius: 24px;
}

.feature-card-highlight {
    border-color: var(--Colors-Violet-500, #786ee5);
}

/* Ensure no layout shifts on hover */
.feature-card:hover,
.feature-card:focus,
.feature-card:active {
    /* Only visual changes, no layout shifts */
    border-color: rgba(255, 255, 255, 0.15) !important; /* Override any highlight class */
    box-shadow: 0px 6px 32px 0px var(--Colors-Base-Black-80, rgba(11, 10, 21, 0.9));
    /* No transform, no position changes */
}

.feature-card-icon {
    width: 56px;
    height: 56px;
    border: 1px solid var(--Colors-Violet-300-12, rgba(196, 181, 255, 0.12));
    border-radius: var(--roundings-round, 999px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    margin-bottom: 16px;
}

.feature-card-icon svg {
    width: 24px;
    height: 24px;
    display: block;
    color: var(--fg-primary-rest, #d4d4de);
    fill: currentColor;
}

.feature-card-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-16, 16px);
    position: relative;
    z-index: 2;
}

.feature-card-title {
    font-family: var(--font-family-inter-tight, "Inter Tight", sans-serif);
    font-weight: var(--font-weight-medium, 500);
    font-size: var(--font-size-h2, 24px);
    line-height: var(--font-line-height-h1, 32px);
    letter-spacing: var(--font-letter-spacing-h2, 0.6px);
    color: var(--fg-primary-rest, #ebebee);
    margin: 0;
}

.feature-card-description {
    font-family: var(--font-family-inter-tight, "Inter Tight", sans-serif);
    font-weight: var(--font-weight-regular, 400);
    font-size: var(--font-size-text-m, 16px);
    line-height: var(--font-line-height-text-m, 24px);
    letter-spacing: var(--font-letter-spacing-text-m, 0.1px);
    color: var(--fg-primary-rest, #d4d4de);
    opacity: 0.8;
    margin: 0;
}

.feature-card-bg {
    position: absolute;
    left: -199px;
    top: -124px;
    width: 698.457px;
    height: 579.228px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjk4IiBoZWlnaHQ9IjU3OSIgdmlld0JveD0iMCAwIDY5OCA1NzkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PC9zdmc+');
    opacity: 0.1;
    pointer-events: none;
    transform: rotate(180deg) scaleY(-1);
    z-index: 1;
}

/* Footer Section */
.features-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-64, 64px); /* Match Figma: gap-[var(--spacing/64,64px)] between divider and content */
    width: 100%;
    max-width: 1132px;
    position: absolute;
    top: 450px; /* Match Figma: top-[503px] - final anchored position directly under header */
    left: 50%;
    transform: translateX(-50%);
    padding: 0 clamp(24px, 4vw, 154px);
    z-index: 15; /* Above cards when they exit */
    opacity: 0; /* Start hidden, will slide up from below via JS */
    /* Initial y position will be set by JS to start below */
}

/* Divider - 4px height, full width */
/* Match Figma: h-[4px] content-stretch flex flex-col items-center justify-center */
.features-divider {
    width: 100%;
    height: 4px;
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Divider line - subtle gradient line matching design */
.features-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.08) 80%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateY(-50%);
}

/* Footer Content Container - wraps buttons and details */
.features-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px; /* Match Figma: gap-[40px] between buttons and details */
    width: 100%;
    flex-shrink: 0;
}

.features-buttons {
    display: flex;
    gap: var(--spacing-32, 32px); /* Match Figma: gap-[var(--spacing/32,32px)] */
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.features-details {
    display: flex;
    gap: 40px; /* Match Figma: gap-[40px] */
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

.features-detail-item {
    display: flex;
    gap: var(--spacing-8, 8px);
    align-items: center;
    justify-content: center;
}

.features-detail-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: block;
    color: var(--fg-primary-rest, #d4d4de);
    fill: currentColor;
}

.features-detail-item span {
    font-family: var(--font-family-inter-tight, "Inter Tight", sans-serif);
    font-weight: var(--font-weight-regular, 400);
    font-size: var(--font-size-text-m, 16px);
    line-height: var(--font-line-height-text-m, 24px);
    letter-spacing: var(--font-letter-spacing-text-m, 0.1px);
    color: var(--fg-primary-rest, #d4d4de);
}

/* Responsive - Desktop down to 768px: Scroll behavior works unchanged */
/* Cards can scale down and spacing can reduce, but scroll logic stays the same */
/* All cards must stay within viewport bounds - no horizontal overflow */
@media (max-width: 1300px) and (min-width: 768px) {
    /* Allow cards to scale down responsively while maintaining scroll behavior */
    /* Card width scales down, ensuring it fits within container */
    .feature-card {
        width: clamp(280px, 28vw, 368px); /* Scale down from 368px, smaller min for tighter screens */
    }
    
    /* Container padding reduces on smaller screens to give more room for cards */
    .features-container {
        padding: 0 clamp(16px, 3vw, 154px); /* Reduce padding on smaller screens */
    }
    
    /* Cards wrapper maintains fixed top offset to prevent drift */
    /* Same increased safe distance as desktop - no viewport scaling */
    /* Add 24px left inset on iPad to prevent cards from touching left edge */
    .features-cards-wrapper {
        top: 450px; /* Fixed offset: same increased spacing as desktop - prevents upward drift */
        left: 24px; /* iPad alignment: shift all cards 24px to the right to avoid touching left edge */
        /* Ensure wrapper respects container bounds */
        max-width: calc(100% - 24px); /* Adjust max-width to account for left offset */
    }
    
    /* Card positions calculated to prevent overflow */
    /* All positions ensure card + left position <= container width */
    /* Use responsive positioning that prevents right-side overflow */
    /* Note: All card positions are relative to the wrapper, which now has left: 24px */
    /* Fluid offset: 40px at 1300px, 0px at 768px, linearly interpolated */
    /* Formula: (viewportWidth - 768) / (1300 - 768) * 40 = (100vw - 768px) * 40 / 532 */
    .feature-card[data-card-index="0"] {
        /* Card 0: Center-left position - safe from overflow */
        /* Fluid offset: 40px at 1300px, 0px at 768px */
        left: calc(clamp(0px, 12vw, 184px) + clamp(0px, calc((100vw - 768px) * 40 / 532), 40px));
    }
    
    .feature-card[data-card-index="1"] {
        /* Card 1: Right-side card - prevent overflow by using max constraint */
        /* Use min() to ensure left + card-width never exceeds container */
        /* On smaller screens, this will automatically reduce left position */
        /* Fluid offset: 40px at 1300px, 0px at 768px */
        left: calc(min(
            clamp(400px, 55vw, 764px),
            calc(100% - clamp(280px, 28vw, 368px) - 24px) /* Account for wrapper's left offset */
        ) + clamp(0px, calc((100vw - 768px) * 40 / 532), 40px));
        top: clamp(250px, 28vw, 314px);
    }
    
    .feature-card[data-card-index="2"] {
        /* Card 2: Far left - now starts 24px from left edge (via wrapper offset) */
        /* Fluid offset: 40px at 1300px, 0px at 768px */
        left: calc(0px + clamp(0px, calc((100vw - 768px) * 40 / 532), 40px)); /* Relative to wrapper, which is already offset 24px */
        top: clamp(500px, 55vw, 632px);
    }
    
    .feature-card[data-card-index="3"] {
        /* Card 3: Center-right - prevent overflow by using max constraint */
        /* Use min() to ensure left + card-width never exceeds container */
        /* Fluid offset: 40px at 1300px, 0px at 768px */
        left: calc(min(
            clamp(300px, 40vw, 582px),
            calc(100% - clamp(280px, 28vw, 368px) - 24px) /* Account for wrapper's left offset */
        ) + clamp(0px, calc((100vw - 768px) * 40 / 532), 40px));
        top: clamp(750px, 85vw, 948px);
    }
}

/* Mobile device layout: Force mobile layout on actual mobile phones regardless of viewport width */
/* This ensures phones in landscape (>= 768px) still use mobile layout */
.device-mobile .features-section {
    /* Mobile layout dimensions (from Figma specifications) */
    --mobile-content-width: 327px; /* Main content width for header, cards, footer */
    --mobile-header-top-margin: 80px; /* Header top margin */
    --mobile-container-padding: 24px; /* Container horizontal padding */
    --mobile-card-width: 327px; /* Card width */
    --mobile-card-min-height: 260px; /* Card minimum height */
    --mobile-card-padding: 24px; /* Card internal padding */
    --mobile-card-gap: 20px; /* Gap between cards */
    --mobile-header-gap: 20px; /* Gap in header between elements */
    --mobile-content-gap: 16px; /* Gap in card content */
    --mobile-footer-gap: 40px; /* Gap in footer between elements */
    --mobile-cards-top-margin: 40px; /* Top margin for cards wrapper */
    --mobile-footer-bottom-margin: 80px; /* Bottom margin for footer */
    --mobile-icon-size: 48px; /* Feature card icon container size */
    --mobile-icon-svg-size: 22px; /* Feature card icon SVG size */
    --mobile-icon-padding: 8px; /* Icon container padding */
    --mobile-tag-gap: 6px; /* Gap in tag element */
    --mobile-title-font-size: 28px; /* Title font size */
    --mobile-title-line-height: 32px; /* Title line height */
    --mobile-title-letter-spacing: 0.6px; /* Title letter spacing */
    --mobile-subtitle-font-size: 16px; /* Subtitle font size */
    --mobile-subtitle-line-height: 24px; /* Subtitle line height */
    --mobile-subtitle-margin-top: 16px; /* Subtitle top margin */
    --mobile-card-title-font-size: 20px; /* Card title font size */
    --mobile-card-title-line-height: 24px; /* Card title line height */
    --mobile-card-title-letter-spacing: 0.2px; /* Card title letter spacing */
    --mobile-text-font-size: 14px; /* Text font size (tag, description) */
    --mobile-text-line-height: 21px; /* Text line height */
    --mobile-text-letter-spacing: 0.1px; /* Text letter spacing */
    --mobile-tag-icon-size: 15px; /* Tag icon width */
    --mobile-tag-icon-height: 17px; /* Tag icon height */
    --mobile-detail-gap: 12px; /* Gap in details section */
    --mobile-detail-icon-size: 20px; /* Detail item icon size */
    --mobile-detail-text-font-size: 16px; /* Detail item text font size */
    
    height: auto !important; /* Override desktop 100vh */
    min-height: auto;
    overflow: visible !important; /* Allow normal scrolling */
}

.device-mobile .features-section .features-bottom-image {
    background-image: url('/resources/images/home_new/sales-bottom-bg-mobile.png');
}

.device-mobile .features-container {
    height: auto !important;
    padding: 0 var(--mobile-container-padding);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.device-mobile .features-header {
    position: relative !important; /* Override desktop absolute */
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: var(--mobile-content-width);
    margin: var(--mobile-header-top-margin) 0 0 0;
    padding: 0;
    opacity: 1; /* Full opacity on mobile */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--mobile-header-gap);
}

.device-mobile .features-tag {
    display: flex;
    gap: var(--mobile-tag-gap);
    align-items: center;
    justify-content: center;
    padding: 0;
}

.device-mobile .features-tag svg {
    width: var(--mobile-tag-icon-size);
    height: var(--mobile-tag-icon-height);
}

.device-mobile .features-tag span {
    font-family: var(--font-family-inter-tight, "Inter Tight", sans-serif);
    font-weight: var(--font-weight-medium, 500);
    font-size: var(--mobile-text-font-size);
    line-height: var(--mobile-text-line-height);
    letter-spacing: var(--mobile-text-letter-spacing);
    background: linear-gradient(138.91deg, var(--Colors-Peach-300, #ffbfb5) 22.107%, var(--Colors-Violet-300, #c4b5ff) 55.634%, var(--Colors-Blue-200, #b5bfff) 84.734%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.device-mobile .features-title {
    font-size: var(--mobile-title-font-size);
    line-height: var(--mobile-title-line-height);
    letter-spacing: var(--mobile-title-letter-spacing);
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.device-mobile .features-subtitle {
    position: relative;
    top: 0;
    margin: var(--mobile-subtitle-margin-top) 0 0 0; 
    font-size: var(--mobile-subtitle-font-size);
    line-height: var(--mobile-subtitle-line-height);
    letter-spacing: var(--mobile-text-letter-spacing);
    color: var(--fg-primary-rest, #d4d4de);
    text-align: center;
}

.device-mobile .features-cards-wrapper {
    position: relative !important; /* Override desktop absolute */
    top: auto !important;
    left: auto !important;
    width: var(--mobile-card-width);
    padding: 0;
    min-height: auto;
    margin: var(--mobile-cards-top-margin) 0 0 0;
}

.device-mobile .features-cards {
    display: flex;
    flex-direction: column;
    gap: var(--mobile-card-gap);
    width: 100%;
    min-height: auto;
}

.device-mobile .feature-card {
    position: relative;
    width: var(--mobile-card-width);
    min-height: var(--mobile-card-min-height);
    left: auto !important;
    top: auto !important;
    padding: var(--mobile-card-padding);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}

.device-mobile .feature-card[data-card-index="0"] {
    border-color: rgba(255, 255, 255, 0.01); /* Match Figma: border-[rgba(255,255,255,0.01)] */
}

.device-mobile .feature-card[data-card-index="1"],
.device-mobile .feature-card[data-card-index="2"],
.device-mobile .feature-card[data-card-index="3"] {
    border-color: rgba(255, 255, 255, 0.09); /* Changed from blue to white border */
}

.device-mobile .feature-card-icon {
    width: var(--mobile-icon-size);
    height: var(--mobile-icon-size);
    padding: var(--mobile-icon-padding);
    border: 1px solid var(--Colors-Violet-300-12, rgba(196, 181, 255, 0.12));
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.device-mobile .feature-card-icon svg {
    width: var(--mobile-icon-svg-size);
    height: var(--mobile-icon-svg-size);
}

.device-mobile .feature-card-content {
    display: flex;
    flex-direction: column;
    gap: var(--mobile-content-gap);
}

.device-mobile .feature-card-title {
    font-size: var(--mobile-card-title-font-size);
    line-height: var(--mobile-card-title-line-height);
    letter-spacing: var(--mobile-card-title-letter-spacing);
}

.device-mobile .feature-card-description {
    font-size: var(--mobile-text-font-size);
    line-height: var(--mobile-text-line-height);
    letter-spacing: var(--mobile-text-letter-spacing);
    opacity: 0.8; /* Match Figma: opacity-80 */
}

.device-mobile .features-footer {
    position: relative !important; /* Override desktop absolute */
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: var(--mobile-content-width);
    padding: 0;
    margin: var(--mobile-cards-top-margin) 0 var(--mobile-footer-bottom-margin) 0;
    opacity: 1; /* Full opacity on mobile */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--mobile-footer-gap);
}

.device-mobile .features-divider {
    width: 100%;
    height: 4px;
}

.device-mobile .features-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px; /* Match Figma: gap-[var(--spacing/32,32px)] */
    width: 100%;
}

.device-mobile .features-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px; /* Match Figma: gap-[var(--spacing/16,16px)] */
    width: 100%;
    align-items: center;
}

.device-mobile .features-buttons .btn-primary,
.device-mobile .features-buttons .btn-outline {
    width: 100%;
    max-width: 327px; /* Match Figma: w-full */
    height: 52px; /* Match Figma: h-[52px] */
}

.device-mobile .features-details {
    display: flex;
    flex-direction: column;
    gap: var(--mobile-detail-gap);
    align-items: center;
}

.device-mobile .features-detail-item {
    display: flex;
    gap: var(--mobile-detail-gap);
    align-items: center;
    justify-content: center;
}

.device-mobile .features-detail-item svg {
    width: var(--mobile-detail-icon-size);
    height: var(--mobile-detail-icon-size);
}

.device-mobile .features-detail-item span {
    font-size: var(--mobile-detail-text-font-size);
    line-height: var(--mobile-subtitle-line-height);
    letter-spacing: var(--mobile-text-letter-spacing);
    color: var(--fg-primary-rest, #D4D4DE);
}

.device-mobile .feature-card-bg {
    display: none;
}

.device-mobile .features-section .features-top-image {
    background-image: url('/resources/images/home_new/sales-top-bg-mobile.png');
}

/* On mobile devices with screen width > 750px, use desktop background */
@media (min-width: 751px) {
    .device-mobile .features-section .features-top-image {
        background-image: url('/resources/images/home_new/sales-top-bg.png');
    }
}

/* Below 768px: Mobile layout - Normal document flow, NO scroll behavior */
@media (max-width: 767px) {
    /* Mobile layout dimensions (from Figma specifications) - same as .device-mobile for consistency */
    .features-section {
        --mobile-content-width: 327px;
        --mobile-header-top-margin: 80px;
        --mobile-container-padding: 24px;
        --mobile-card-width: 327px;
        --mobile-card-min-height: 260px;
        --mobile-card-padding: 24px;
        --mobile-card-gap: 20px;
        --mobile-header-gap: 20px;
        --mobile-content-gap: 16px;
        --mobile-footer-gap: 40px;
        --mobile-cards-top-margin: 40px;
        --mobile-footer-bottom-margin: 80px;
        --mobile-icon-size: 48px;
        --mobile-icon-svg-size: 22px;
        --mobile-icon-padding: 8px;
        --mobile-tag-gap: 6px;
        --mobile-title-font-size: 28px;
        --mobile-title-line-height: 32px;
        --mobile-title-letter-spacing: 0.6px;
        --mobile-subtitle-font-size: 16px;
        --mobile-subtitle-line-height: 24px;
        --mobile-subtitle-margin-top: 16px;
        --mobile-card-title-font-size: 20px;
        --mobile-card-title-line-height: 24px;
        --mobile-card-title-letter-spacing: 0.2px;
        --mobile-text-font-size: 14px;
        --mobile-text-line-height: 21px;
        --mobile-text-letter-spacing: 0.1px;
        --mobile-tag-icon-size: 15px;
        --mobile-tag-icon-height: 17px;
        --mobile-detail-gap: 12px;
        --mobile-detail-icon-size: 20px;
        --mobile-detail-text-font-size: 16px;
        
        height: auto !important; /* Override desktop 100vh */
        min-height: auto;
        overflow: visible !important; /* Allow normal scrolling */
    }
    
    .features-section .features-bottom-image {
        background-image: url('/resources/images/home_new/sales-bottom-bg-mobile.png');
    }
    
    /* Container: Normal flow with padding */
    .features-container {
        height: auto !important;
        padding: 0 var(--mobile-container-padding);
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Header: Normal flow, match Figma positioning */
    .features-header {
        position: relative !important; /* Override desktop absolute */
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: var(--mobile-content-width);
        margin: var(--mobile-header-top-margin) 0 0 0;
        padding: 0;
        opacity: 1; /* Full opacity on mobile */
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--mobile-header-gap);
    }
    
    .features-tag {
        display: flex;
        gap: var(--mobile-tag-gap);
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    
    .features-tag svg {
        width: var(--mobile-tag-icon-size);
        height: var(--mobile-tag-icon-height);
    }
    
    .features-tag span {
        font-family: var(--font-family-inter-tight, "Inter Tight", sans-serif);
        font-weight: var(--font-weight-medium, 500);
        font-size: var(--mobile-text-font-size);
        line-height: var(--mobile-text-line-height);
        letter-spacing: var(--mobile-text-letter-spacing);
        background: linear-gradient(138.91deg, var(--Colors-Peach-300, #ffbfb5) 22.107%, var(--Colors-Violet-300, #c4b5ff) 55.634%, var(--Colors-Blue-200, #b5bfff) 84.734%);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }
    
    .features-title {
        font-size: var(--mobile-title-font-size);
        line-height: var(--mobile-title-line-height);
        letter-spacing: var(--mobile-title-letter-spacing);
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    /* Subtitle: Normal flow, positioned after header */
    .features-subtitle {
        position: relative;
        top: 0;
        margin: var(--mobile-subtitle-margin-top) 0 0 0; 
        font-size: var(--mobile-subtitle-font-size);
        line-height: var(--mobile-subtitle-line-height);
        letter-spacing: var(--mobile-text-letter-spacing);
        color: var(--fg-primary-rest, #d4d4de);
        text-align: center;
    }
    
    /* Cards wrapper: Normal flow, flex column */
    .features-cards-wrapper {
        position: relative !important; /* Override desktop absolute */
        top: auto !important;
        left: auto !important;
        width: var(--mobile-card-width);
        padding: 0;
        min-height: auto;
        margin: var(--mobile-cards-top-margin) 0 0 0;
    }
    
    .features-cards {
        display: flex;
        flex-direction: column;
        gap: var(--mobile-card-gap);
        width: 100%;
        min-height: auto;
    }
    
    /* Cards: Normal flow, match Figma sizes */
    .feature-card {
        position: relative;
        width: var(--mobile-card-width);
        min-height: var(--mobile-card-min-height);
        left: auto !important;
        top: auto !important;
        padding: var(--mobile-card-padding);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        flex-shrink: 0;
    }
    
    /* Card borders: Match Figma design */
    .feature-card[data-card-index="0"] {
        border-color: rgba(255, 255, 255, 0.01); /* Match Figma: border-[rgba(255,255,255,0.01)] */
    }
    
    /* Remove blue border from second and third cards on mobile */
    .feature-card[data-card-index="1"] {
        border-color: rgba(255, 255, 255, 0.09); /* Changed from blue to white border */
    }
    
    .feature-card[data-card-index="2"] {
        border-color: rgba(255, 255, 255, 0.09); /* Changed from blue to white border */
    }
    
    .feature-card[data-card-index="3"] {
        border-color: rgba(255, 255, 255, 0.09); /* Match Figma: border-[rgba(255,255,255,0.09)] */
    }
    
    /* Card icon: Match Figma mobile size */
    .feature-card-icon {
        width: var(--mobile-icon-size);
        height: var(--mobile-icon-size);
        padding: var(--mobile-icon-padding);
        border: 1px solid var(--Colors-Violet-300-12, rgba(196, 181, 255, 0.12));
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .feature-card-icon svg {
        width: var(--mobile-icon-svg-size);
        height: var(--mobile-icon-svg-size);
    }
    
    /* Card content: Match Figma spacing */
    .feature-card-content {
        display: flex;
        flex-direction: column;
        gap: var(--mobile-content-gap);
    }
    
    .feature-card-title {
        font-size: var(--mobile-card-title-font-size);
        line-height: var(--mobile-card-title-line-height);
        letter-spacing: var(--mobile-card-title-letter-spacing);
    }
    
    .feature-card-description {
        font-size: var(--mobile-text-font-size);
        line-height: var(--mobile-text-line-height);
        letter-spacing: var(--mobile-text-letter-spacing);
        opacity: 0.8; /* Match Figma: opacity-80 */
    }
    
    /* Footer: Normal flow, positioned after cards */
    .features-footer {
        position: relative !important; /* Override desktop absolute */
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: var(--mobile-content-width);
        padding: 0;
        margin: var(--mobile-cards-top-margin) 0 var(--mobile-footer-bottom-margin) 0;
        opacity: 1; /* Full opacity on mobile */
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--mobile-footer-gap);
    }
    
    .features-divider {
        width: 100%;
        height: 4px;
    }
    
    .features-footer-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 32px; /* Match Figma: gap-[var(--spacing/32,32px)] */
        width: 100%;
    }
    
    .features-buttons {
        display: flex;
        flex-direction: column;
        gap: 16px; /* Match Figma: gap-[var(--spacing/16,16px)] */
        width: 100%;
        align-items: center;
    }
    
    .features-buttons .btn-primary,
    .features-buttons .btn-outline {
        width: 100%;
        max-width: 327px; /* Match Figma: w-full */
        height: 52px; /* Match Figma: h-[52px] */
    }
    
    .features-details {
        display: flex;
        flex-direction: column;
        gap: var(--mobile-detail-gap);
        align-items: center;
    }
    
    .features-detail-item {
        display: flex;
        gap: var(--mobile-detail-gap);
        align-items: center;
        justify-content: center;
    }
    
    .features-detail-item svg {
        width: var(--mobile-detail-icon-size);
        height: var(--mobile-detail-icon-size);
    }
    
    .features-detail-item span {
        font-size: var(--mobile-detail-text-font-size);
        line-height: var(--mobile-subtitle-line-height);
        letter-spacing: var(--mobile-text-letter-spacing);
        color: var(--fg-primary-rest, #D4D4DE);
    }
    
    /* Hide card background images on mobile (they're decorative) */
    .feature-card-bg {
        display: none;
    }
}

@media (max-width: 670px) {
    /* Sales section mobile background images */
    .features-section .features-top-image {
        background-image: url('/resources/images/home_new/sales-top-bg-mobile.png');
    }
}
