/* ============================================
   Hero Section Styles - FIXED VERSION
   ============================================ */

/* Prevent horizontal scrollbar from badges extending outside hero section */
body {
    overflow-x: hidden;
}

.hero-section {
    min-height: 1100px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 122px 90px 0px;
    margin: 0;
    background-color: #050B26; /* Fallback while hero background image loads */
    /* Background image is now a DOM element (.hero-bg-img) to fix mobile scroll desync */
    position: relative;
    /* Use overflow: visible so the section doesn't create an internal scroll context
       (overflow-x:hidden + overflow-y:visible computes to overflow-y:auto per CSS spec,
       which eats the first scroll event). Body handles horizontal clip instead. */
    overflow: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    isolation: isolate; /* Creates new stacking context for scroll performance */
}

/* Background image as DOM element - replaces CSS background-image for reliable mobile scroll */
.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

/* ============================================
   MAIN FIX FOR LARGE SCREENS
   ============================================ */

/* Large Desktop (1400px and above) - FIXED */
@media (min-width: 1400px) {
    .hero-section {
        min-height: 800px;
    }
    
    .hero-phone-container {
        gap: 120px;
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }
    
    .hero-phone-image {
        width: 500px;
        max-width: 500px;
    }
    
    .phone-with-badges-wrapper {
        margin-top: 30px;
        /* Remove extra bottom margin so the phone can sit flush with the section bottom */
        margin-bottom: 0;
    }

    .users-card {
        margin-bottom: 20px;
    }
    
    .users-card .user-avatars {
        margin-bottom: 0 !important;
    }
    
    .users-card .users-header {
        margin-bottom: 0 !important;
    }
    
    .phone-with-badges-wrapper::after {
        height: 160px;
        bottom: 0;
    }
}

.hero-section > * {
    max-width: 100%;
    box-sizing: border-box;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px; /* perfectly center hero text block */
    position: relative;
    z-index: 1;
}

.hero-phone-container {
    width: 100%;
    max-width: 100%; /* Constrain to parent padding area */
    display: flex;
    justify-content: space-between; /* stretch cards to use full width within 90px padding */
    align-items: flex-end; /* Align items to bottom */
    gap: 32px; /* bring 4.5★ and 10M+ cards closer to the phone on large screens */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    margin-top: auto; /* Push to bottom of section */
    flex-wrap: nowrap; /* Prevent wrapping on large screens */
}

/* Prevent excessive gaps between phone and side cards on very large screens */
@media (min-width: 1400px) {
    .hero-phone-container {
        justify-content: center; /* keep cards visually close to the phone */
        gap: 80px; /* further increase spacing so cards don’t feel cramped on very large screens */
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Constrain cards from spreading too far on very large screens */
/* Gradient at the foot of the phone image */
.phone-with-badges-wrapper::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(180deg, rgba(11, 27, 62, 0) 0%, #07112F 100%);
    z-index: 3; /* above the phone image */
    pointer-events: none;
    opacity: 0;
    animation: fadeInOverlay 0.6s ease-out 1.4s forwards;
}

.hero-phone-image {
    width: 500px;
    max-width: 500px;
    height: auto;
    max-height: none; /* Allow height to scale freely */
    object-fit: contain;
    /* Removed drop shadow so there is no shadow below or around the phone */
    filter: none;
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUpPhone 1s ease-out 0.3s forwards;
    display: block;
    pointer-events: auto; /* Ensure phone image doesn't block scroll events */
}

/* Phone with Badges Wrapper */
.phone-with-badges-wrapper {
    position: relative;
    display: inline-block;
    padding-top: 20px; /* Added a bit of top padding to give the phone + badges more breathing room */
    margin-bottom: 0; /* Let the phone sit flush with the bottom edge when aligned */
    padding-bottom: 0;
    overflow: visible; /* Allow badges to extend outside */
    flex-shrink: 0; /* Prevent phone from being squeezed */
    pointer-events: none; /* Ensure wrapper doesn't block scroll events */
}

/* Feature Badges around Phone */
.feature-badge {
    position: absolute;
    background: #ffffff;
    border-radius: 16px;
    padding: 12px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #1a1a1a;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 4; /* Above the gradient shadow */
    opacity: 0;
    animation: badgeFadeInFloat 1s ease-out forwards, badgeFloat 3s ease-in-out 2s infinite;
}

/* Don't apply initial animation to scroll-reveal badges */
.feature-badge.scroll-reveal {
    animation: none;
}

.feature-badge-top-left {
    top: 10%;
    left: -120px; /* Position closer to phone */
    --badge-rotation: 8deg;
    transform: rotate(8deg); /* Hanging downward from high to low */
    animation-delay: 0.8s;
}

.feature-badge-top-right {
    top: 15%;
    right: -180px; /* Position further from phone - moved more right */
    --badge-rotation: -8deg;
    transform: rotate(-8deg); /* Hanging downward from high to low */
    animation-delay: 1s;
}

.feature-badge-bottom-left {
    bottom: 10%;
    left: -160px; /* Position further from phone */
    --badge-rotation: -8deg;
    /* Remove initial fade-in animation, use scroll reveal instead */
    animation: none;
}

/* Override scroll reveal transform to include rotation */
.feature-badge-bottom-left.scroll-reveal {
    transform: translateY(60px) rotate(-8deg);
}

.feature-badge-bottom-left.scroll-reveal.revealed {
    transform: translateY(0) rotate(-8deg);
    /* No extra keyframe animation here to keep reveal smooth */
}

.feature-badge-bottom-right {
    bottom: 10%;
    right: -160px; /* Position further from phone */
    --badge-rotation: 8deg;
    /* Remove initial fade-in animation, use scroll reveal instead */
    animation: none;
}

/* Override scroll reveal transform to include rotation */
.feature-badge-bottom-right.scroll-reveal {
    transform: translateY(60px) rotate(8deg);
}

.feature-badge-bottom-right.scroll-reveal.revealed {
    transform: translateY(0) rotate(8deg);
    /* No extra keyframe animation here to keep reveal smooth */
}

.feature-badge span {
    display: block;
}


.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    width: 287px;
    max-width: 100%;
    height: 40px;
    border: 0.6px solid rgba(255, 255, 255, 0.3);
    border-radius: 42px;
    background: rgba(26, 26, 46, 0.4);
    margin-bottom: 24px;
    font-family: 'Geist', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #A7BFE9;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    white-space: nowrap;
}

.hero-badge-icon {
    width: 18px;
    height: 18px;
    background-image: url('https://pocketly-public-bucket.s3.ap-south-1.amazonaws.com/cf9dfa0f-9514-4442-a00c-48367a05b7af.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: inline-block;
    flex-shrink: 0;
}

.hero-headline {
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-headline-line1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 500;
    font-size: 62px;
    line-height: 88px;
    letter-spacing: 0%;
    text-align: center;
    color: #7594CC;
    margin: 0 0 12px 0;
    transform: translate(4px, 4px); /* move slightly right while keeping vertical offset */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-headline-line2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 72px;
    line-height: 68px;
    letter-spacing: 0%;
    text-align: center;
    color: #ffffff;
    margin: 0;
    transform: translateY(-2px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
}

.hero-sparkle {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0 0px;
    vertical-align: middle;
    flex-shrink: 0;
}

.hero-sparkle.sparkle-1 {
    background-image: url('https://pocketly-public-bucket.s3.ap-south-1.amazonaws.com/05054cf8-c7aa-42a3-95fd-d217a486fff4.png');
    transform: translateY(-18px);
}

.hero-sparkle.sparkle-2 {
    background-image: url('https://pocketly-public-bucket.s3.ap-south-1.amazonaws.com/916ce4fa-9ca6-48d6-b008-e2d8f6e1a0c5.png');
    position: absolute;
    left: calc(18%);
    transform: translateY(45px);
}

.hero-subheadline {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    color: #B0B5C8;
    text-align: center;
    margin-bottom: 32px;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    column-gap: 16px;
    padding: 0 0 0 32px; /* no padding near blue pill, only a bit on the text side */
    min-width: auto;
    min-height: 52px;   /* capsule height */
    background: #E9F1FF; /* light bluish capsule */
    color: #1D4ED8;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 999px;
    border: 2px solid #4A90E2;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.hero-cta-label {
    flex: 1;
    text-align: center;
}


.hero-arrow-pill {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #183FBA;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    flex-shrink: 0;
    border: 2px solid #E9F1FF; /* thin ring matching capsule */
}

.hero-arrow-up-right-icon {
    width: 30px;
    height: 30px;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-cta-button:hover .hero-arrow-up-right-icon {
    transform: rotate(45deg);
}

/* 4.5 Rating Card */
.rating-card {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    height: auto;
    min-height: 200px;
    background: #F1F5FF;
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    cursor: pointer;
    align-self: center; /* align vertically with phone */
    margin: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    flex-shrink: 0; /* Prevent card from being squeezed */
    flex-grow: 0; /* Prevent card from growing */
}

/* Slow down scroll reveal animation for rating card */
.rating-card.scroll-reveal {
    transition: opacity 2.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 2.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.rating-number {
    font-family: 'Geist', 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 900;
    font-size: 84px;
    line-height: 100%;
    letter-spacing: -0.5px;
    background: linear-gradient(360deg, #031450 22.34%, #0256DB 63.83%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    filter: drop-shadow(0 0 0.5px rgba(2, 86, 219, 0.4));
}

.stars {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.star {
    width: 28px;
    height: 28px;
    opacity: 1;
    position: relative;
    display: inline-block;
    background-image: url('https://pocketly-public-bucket.s3.ap-south-1.amazonaws.com/dbb46889-8ae9-45f2-9500-fb4cd5f2482c.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.star.half {
    position: relative;
    overflow: hidden;
}

.star.half::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-color: #FFFFFF;
    pointer-events: none;
    z-index: 10;
}

.rating-text {
    font-family: 'Geist', 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 400; /* match 10M+ users card text weight */
    color: #616161;
    line-height: 1.4;
    margin: 0; /* Remove extra margin around rating text */
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1.2s forwards;
}

.percentage {
    font-family: 'Geist', 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 300;
    color: #616161;
    display: inline-block;
}

/* 10M+ Users Card */
.users-card {
    width: 280px;
    height: 120px;
    background: #F1F5FF;
    border-radius: 24px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    align-self: center; /* same vertical alignment as left card */
    margin: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: visible; /* ensure text/content is not clipped */
    flex-shrink: 0; /* Prevent card from being squeezed */
}

/* Ensure user-avatars and users-header have no margin-bottom */
.users-card .user-avatars,
.users-card .users-header {
    margin-bottom: 0 !important;
}

/* Initial load animation for 10M+ card (similar to scroll-reveal from below) */
.users-card.hero-users-appear {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpCard 1s ease-out 0.4s forwards;
}

/* Slow down scroll reveal animation for users card */
.users-card.scroll-reveal {
    transition: opacity 2.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 2.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.users-header {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0 !important;
    padding-top: 0;
    padding-bottom: 0 !important;
}

.user-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px; /* Match avatar height */
    line-height: 50px;
    margin: 0 !important;
    padding: 0 !important;
}

/* Global rule to ensure user-avatars never has margin-bottom - highest specificity */
.user-avatars,
.users-card .user-avatars,
.hero-cards-wrapper .user-avatars,
.users-header .user-avatars,
.users-card .users-header .user-avatars,
.hero-cards-wrapper .users-card .users-header .user-avatars {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Also ensure users-header doesn't create spacing */
.users-header,
.users-card .users-header,
.hero-cards-wrapper .users-card .users-header {
    margin-bottom: 0 !important;
}

.users-count {
    font-family: 'Geist', 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 32px;
    font-weight: 900;
    line-height: 100%;
    letter-spacing: -0.5px;
    background: linear-gradient(360deg, #031450 22.34%, #0256DB 63.83%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    margin-top: -1px; /* Move text up to align with avatars */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    filter: drop-shadow(0 0 0.5px rgba(2, 86, 219, 0.4));
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #FFFFFF;
    margin-left: -15px;
    object-fit: cover;
    opacity: 0;
    transform: scale(0);
    animation: avatarPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.avatar:first-child {
    margin-left: 0;
    animation-delay: 0.4s;
}

.avatar:nth-child(2) {
    animation-delay: 0.5s;
}

.avatar:nth-child(3) {
    animation-delay: 0.6s;
}

.users-count {
    font-family: 'Geist', 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 48px;
    font-weight: 900;
    line-height: 100%;
    letter-spacing: -0.5px;
    background: linear-gradient(360deg, #031450 22.34%, #0256DB 63.83%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    filter: drop-shadow(0 0 0.5px rgba(2, 86, 219, 0.4));
}

.users-text {
    font-family: 'Geist', 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #616161;
    line-height: 1.4;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.8s forwards;
    margin-top: -6px;
    margin-bottom: 0;
}

/* Keyframe Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUpPhone {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUpCard {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes starFadeIn {
    from {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes avatarPop {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes badgeFadeInFloat {
    0% {
        opacity: 0;
        transform: translateY(20px) rotate(var(--badge-rotation, 0deg));
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(var(--badge-rotation, 0deg));
    }
}

@keyframes badgeFloat {
    0%, 100% {
        transform: translateY(0) rotate(var(--badge-rotation, 0deg));
    }
    50% {
        transform: translateY(-8px) rotate(var(--badge-rotation, 0deg));
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(2, 86, 219, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(2, 86, 219, 0.5);
    }
}

/* Fixed blur at bottom of the screen - Progressive blur effect */
.screen-bottom-blur {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100px;
    pointer-events: none;
    /* Very subtle white tint at 1% opacity */
    background: rgba(255, 255, 255, 0.01);
    /* Blur at 20px (end blur value) */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    /* Simple smooth gradient mask */
    -webkit-mask-image: linear-gradient(to bottom, transparent, black);
    mask-image: linear-gradient(to bottom, transparent, black);
    z-index: 400;
}

/* ============================================
   Responsive Design
   ============================================ */

/* General rule for screens up to 1024px - stack 10M+ below avatars */
@media (max-width: 1024px) {
    .users-card .users-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 0;
        margin-top: 0;
        padding: 0;
    }
    
    .users-card .users-count {
        margin-top: 0;
    }
}

/* Extra Large Desktop (1440px and above) - 3 cards side by side */
@media (min-width: 1440px) {
    .hero-section {
        min-height: 800px;
        padding: 122px 90px 0px;
    }
    
    .hero-phone-container {
        gap: 120px;
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
        flex-wrap: nowrap;
    }
    
    .hero-phone-image {
        width: 500px;
        max-width: 500px;
    }
    
    .phone-with-badges-wrapper {
        margin-top: 30px;
        margin-bottom: 0;
    }

    .users-card {
        margin-bottom: 20px;
    }
    
    .phone-with-badges-wrapper::after {
        height: 160px;
        bottom: 0;
    }
    
    .rating-card,
    .users-card {
        width: 300px;
        min-width: 300px;
        max-width: 300px;
    }
    
    .users-card .user-avatars {
        margin-bottom: 0 !important;
    }
    
    .users-card .users-header {
        margin-bottom: 0 !important;
    }
    
    /* Add 8px gap between avatars/10M+ row and description row */
    .users-card .users-text {
        margin-top: 8px !important;
    }
}

/* Large Desktop (1200px - 1439px) - 3 cards side by side */
@media (min-width: 1200px) and (max-width: 1439px) {
    .hero-section {
        min-height: 900px;
        padding: 100px 70px 0px;
    }
    
    .hero-phone-container {
        gap: 80px;
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
        flex-wrap: nowrap;
    }
    
    .hero-phone-image {
        width: 480px;
        max-width: 480px;
    }
    
    .rating-card {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        padding: 20px 20px 20px 20px !important;
    }
    
    .users-card {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        padding: 14px !important;
        gap: 8px !important;
    }
    
    .users-card .user-avatars {
        margin-bottom: 0 !important;
    }
    
    .users-card .users-header {
        margin-bottom: 0 !important;
    }
}

/* Desktop and Large Laptops (1025px - 1199px) - 3 cards side by side */
@media (min-width: 1025px) and (max-width: 1199px) {
    .hero-section {
        min-height: 1000px;
        padding: 90px 60px 0px;
    }
    
    .hero-phone-container {
        flex-wrap: nowrap;
        justify-content: center;
        align-items: flex-end;
        gap: 56px;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 40px;
        padding-bottom: 20px;
    }
    
    .hero-phone-image {
        max-width: 460px;
        width: 460px;
    }
    
    /* Keep 4.5★ and 10M+ cards exactly the same size on small laptops */
    .rating-card {
        width: 260px;
        min-width: 240px;
        max-width: 280px;
        padding: 20px 20px 20px 20px !important;
    }
    
    .users-card {
        width: 260px;
        min-width: 240px;
        max-width: 280px;
        padding: 14px !important;
        gap: 8px !important;
    }
    
    .users-card .user-avatars {
        margin-bottom: 0 !important;
    }
    
    .users-card .users-header {
        margin-bottom: 0 !important;
    }
}

/* Intermediate breakpoint (1100px - 1199px) for smoother transition */
@media (min-width: 1100px) and (max-width: 1199px) {
    .hero-phone-container {
        gap: 64px;
        margin-bottom: 40px;
        padding-bottom: 20px;
    }
    
    .hero-phone-image {
        max-width: 480px;
        width: 480px;
    }
    
    .rating-card {
        width: 270px;
        min-width: 250px;
        max-width: 290px;
        padding: 20px 20px 20px 20px !important;
    }
    
    .users-card {
        width: 270px;
        min-width: 250px;
        max-width: 290px;
        padding: 14px !important;
        gap: 8px !important;
    }
    
    .users-card .user-avatars {
        margin-bottom: 0 !important;
    }
    
    .users-card .users-header {
        margin-bottom: 0 !important;
    }
}

/* Intermediate breakpoint (900px - 1023px) for smoother transition */
@media (min-width: 900px) and (max-width: 1023px) {
    .hero-section {
        padding: 75px 35px 50px;
    }
    
    .hero-headline-line1 {
        font-size: 50px;
        line-height: 68px;
    }
    
    .hero-headline-line2 {
        font-size: 58px;
        line-height: 66px;
    }
    
    .phone-with-badges-wrapper {
        max-width: 510px !important;
    }
    
    .hero-phone-container {
        margin-bottom: 40px !important;
        padding-bottom: 30px !important;
    }
}

/* Intermediate breakpoint (600px - 767px) for smoother transition */
@media (min-width: 600px) and (max-width: 767px) {
    .hero-section {
        padding: 75px 28px 50px;
    }
    
    .hero-headline-line1 {
        font-size: 40px;
        line-height: 56px;
    }
    
    .hero-headline-line2 {
        font-size: 46px;
        line-height: 54px;
    }
    
    .phone-with-badges-wrapper {
        max-width: 390px;
    }
    
    .rating-card {
        max-width: 330px !important;
        padding: 14px 14px 16px 14px !important;
    }
    
    .users-card {
        max-width: 330px !important;
        padding: 14px !important;
        gap: 8px !important;
    }
}

/* Tablets (769px - 1023px) - Phone on top, cards below in row */
@media (min-width: 769px) and (max-width: 1023px) {
    .hero-section {
        /* Avoid 100vh on mobile/tablets to prevent visible height jumping as browser UI hides/shows */
        min-height: auto;
        padding: 72px 30px 40px;
        overflow-x: hidden;
    }
    
    .hero-content {
        padding: 0 20px;
        margin-bottom: 40px;
    }
    
    .hero-headline-line1 {
        font-size: 52px;
        line-height: 70px;
    }
    
    .hero-headline-line2 {
        font-size: 60px;
        line-height: 68px;
    }
    
    .hero-subheadline {
        font-size: 16px;
    }
    
    .hero-sparkle {
        width: 26px;
        height: 26px;
    }
    
    /* Match overall structure: phone on top, cards below */
    .hero-phone-container {
        margin-top: 40px !important;
        margin-bottom: 40px !important;
        gap: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: stretch !important;
        padding: 0 20px 30px 20px !important;
        box-sizing: border-box !important;
    }
    
    .phone-with-badges-wrapper {
        order: 1 !important;
        width: 100% !important;
        max-width: 500px !important;
        display: flex !important;
        justify-content: center !important;
        margin: 0 auto 24px auto !important;
        padding: 0 40px !important;
        box-sizing: border-box !important;
        flex: 1 1 100% !important;
        flex-basis: 100% !important;
    }
    
    .hero-phone-image {
        max-width: 100%;
        width: 100%;
        flex-shrink: 1;
    }
    
    .phone-with-badges-wrapper::after {
        height: 90px;
        bottom: 0;
    }
    
    .feature-badge {
        font-size: 13px;
        padding: 8px 14px;
    }
    
    .feature-badge-top-left,
    .feature-badge-bottom-left {
        left: -70px;
    }
    
    .feature-badge-top-right,
    .feature-badge-bottom-right {
        right: -70px;
    }
    
    /* Make 4.5★ and 10M+ cards exactly equal on tablets */
    .rating-card {
        order: 2 !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 16px 16px 20px 16px !important;
        min-height: 190px !important;
        margin: 0 !important;
        flex: 1 1 calc(50% - 16px) !important;
        justify-content: flex-start !important;
        gap: 10px !important;
    }
    
    .users-card {
        order: 2 !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 16px !important;
        min-height: 190px !important;
        margin: 0 !important;
        flex: 1 1 calc(50% - 16px) !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }
    
    /* Stack avatars above 10M+ text for tablets */
    .users-card .users-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 0;
        margin-top: 0;
        padding: 0;
    }
    
    .users-card .user-avatars {
        height: 50px;
        display: flex;
        align-items: center;
        margin: 0;
        padding: 0;
    }
    
    .users-card .users-count {
        margin-top: 0;
        margin-bottom: 0;
        padding: 0;
        font-size: 40px;
        line-height: 1;
        height: auto;
        display: flex;
        align-items: center;
    }
}

/* Cards wrapper - hidden by default, shown only on mid-width screens */
.hero-cards-wrapper {
    display: none;
}

.hero-card-1024 {
    display: none;
}

/* Specific adjustments for mid-width screens - container in column, cards in row below phone
   For widths between 769px and 1130px, place the cards below the phone. */
@media (min-width: 769px) and (max-width: 1130px) {
    /* Container in column direction for mid-width screens */
    .hero-phone-container {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 24px !important;
        margin-top: 40px !important;
        margin-bottom: 40px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 20px 30px 20px !important;
        box-sizing: border-box !important;
    }
    
    /* Hide original cards on 1024px */
    .hero-card-original {
        display: none !important;
    }
    
    /* Show cards wrapper on 1024px */
    .hero-cards-wrapper {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 24px !important;
        width: 100% !important;
        order: 2 !important;
    }
    
    /* Show cards inside wrapper on 1024px */
    .hero-card-1024 {
        display: flex !important;
    }
    
    /* Phone wrapper on top */
    .phone-with-badges-wrapper {
        order: 1 !important;
        width: 100% !important;
        max-width: 520px !important;
        margin: 0 auto 24px auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 40px !important;
        box-sizing: border-box !important;
    }
    
    /* Cards inside wrapper - make them equal size */
    .hero-cards-wrapper .rating-card,
    .hero-cards-wrapper .users-card {
        width: 240px !important;
        min-width: 240px !important;
        max-width: 240px !important;
        flex: 0 0 240px !important;
        min-height: 180px !important;
        padding: 16px !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Ensure users-header stacks vertically at 1024px */
    .hero-cards-wrapper .users-card .users-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
    }
    
    .hero-cards-wrapper .users-card .users-count {
        margin-top: 0 !important;
        font-size: 36px !important;
    }
}

/* Specific 768px breakpoint - Phone on top, cards below in row */
@media (min-width: 768px) and (max-width: 768px) {
    .hero-section {
        padding: 64px 30px 40px;
        min-height: auto;
    }
    
    .hero-content {
        padding: 0 20px;
        margin-bottom: 40px;
    }
    
    .hero-headline-line1 {
        font-size: 40px;
        line-height: 56px;
    }
    
    .hero-headline-line2 {
        font-size: 46px;
        line-height: 54px;
    }
    
    .hero-phone-container {
        margin-top: 40px;
        gap: 20px;
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        padding: 0 20px;
        box-sizing: border-box;
    }
    
    .phone-with-badges-wrapper {
        order: 1;
        width: 100%;
        max-width: 400px;
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
        padding: 0 30px;
        box-sizing: border-box;
        flex: 0 0 100%;
    }
    
    .rating-card,
    .users-card {
        order: 2 !important;
        width: auto !important;
        max-width: 340px !important;
        min-width: 0 !important;
        padding: 14px !important;
        min-height: 145px !important;
        height: auto !important;
        margin: 0 !important;
        flex: 0 0 calc(50% - 10px) !important;
        flex-basis: calc(50% - 10px) !important;
        flex-grow: 0 !important;
        flex-shrink: 1 !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }
}

/* Mobile Landscape and Small Tablets (481px - 767px) - Phone on top, cards below */
@media (min-width: 481px) and (max-width: 767px) {
    .hero-section {
        padding: 70px 25px 0;
        min-height: 0 !important;
        height: auto !important;
        overflow: hidden;
    }
    
    .hero-content {
        padding: 0 20px;
        margin-bottom: 40px;
    }
    
    .hero-badge {
        font-size: 12px;
        padding: 6px 12px;
        margin-bottom: 24px;
        margin-top: 16px;
    }
    
    .hero-headline-line1 {
        font-size: 38px;
        line-height: 54px;
    }
    
    .hero-headline-line2 {
        font-size: 44px;
        line-height: 52px;
    }
    
    .hero-sparkle {
        width: 22px;
        height: 22px;
        margin: 0 8px;
    }
    
    .hero-subheadline {
        font-size: 14px;
        line-height: 24px;
        margin-bottom: 32px;
    }
    
    .hero-cta-button {
        padding: 14px 28px;
        font-size: 14px;
    }
    
    .hero-phone-container {
        margin-top: 40px;
        gap: 20px;
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        padding: 0 20px;
        box-sizing: border-box;
    }
    
    .phone-with-badges-wrapper {
        order: 1;
        width: 100%;
        max-width: 380px;
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
        padding: 0 25px;
        box-sizing: border-box;
        flex: 0 0 100%;
    }
    
    .hero-phone-image {
        max-width: 100%;
        width: 100%;
    }
    
    .phone-with-badges-wrapper::after {
        height: 80px;
        bottom: 0;
    }
    
    .feature-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .feature-badge-top-left {
        top: 8%;
        left: -50px;
    }
    
    .feature-badge-top-right {
        top: 10%;
        right: -50px;
    }
    
    .feature-badge-bottom-left {
        bottom: 15%;
        left: -50px;
    }

    .feature-badge-bottom-right {
        bottom: 15%;
        right: -50px;
    }
    
    .rating-card {
        order: 2 !important;
        width: auto !important;
        max-width: 320px !important;
        min-width: 0 !important;
        padding: 14px 14px 16px 14px !important;
        min-height: 145px !important;
        height: auto !important;
        margin: 0 !important;
        flex: 0 0 calc(50% - 10px) !important;
        flex-basis: calc(50% - 10px) !important;
        flex-grow: 0 !important;
        flex-shrink: 1 !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }

    /* Tighten vertical spacing inside 4.5 card for better balance */
    .rating-card .rating-number {
        font-size: 44px;
        margin: 0;
        padding: 0;
        line-height: 1;
        height: 44px; /* match avatar height for alignment */
        display: flex;
        align-items: center;
    }

    .rating-card .stars {
        margin: 0;
        padding: 0;
        gap: 6px;
        height: 28px; /* fixed height for alignment with 10M+ */
        display: flex;
        align-items: center;
    }

    .rating-card .rating-text {
        font-size: 12px;
        line-height: 1.3;
        margin: 0;
        padding: 0;
    }
    
    .rating-number {
        font-size: 56px;
    }
    
    .star {
        width: 24px;
        height: 24px;
    }
    
    .rating-text {
        font-size: 14px;
    }
    
    .users-card {
        order: 2 !important;
        width: auto !important;
        max-width: 320px !important;
        min-width: 0 !important;
        padding: 14px !important;
        min-height: 145px !important;
        height: auto !important;
        gap: 8px !important;
        margin: 0 !important;
        flex: 0 0 calc(50% - 10px) !important;
        flex-basis: calc(50% - 10px) !important;
        flex-grow: 0 !important;
        flex-shrink: 1 !important;
        justify-content: flex-start !important;
        box-sizing: border-box !important;
    }

    /* Stack avatars above 10M+ text on mobile-tablet */
    .users-card .users-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px !important; /* match rating card gap */
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        padding: 0;
    }

    .users-card .user-avatars {
        height: 44px; /* match rating-number height for parallel alignment */
        display: flex;
        align-items: center;
        margin: 0;
        padding: 0;
    }

    .users-card .users-count {
        margin-top: 0 !important;
        margin-bottom: 0;
        padding: 0;
        font-size: 40px;
        line-height: 1;
        height: 28px; /* match stars height for parallel alignment */
        display: flex;
        align-items: center;
    }
    
    /* Match description text size & vertical alignment with rating card on small screens */
    .users-card .users-text {
        font-size: 12px;
        line-height: 1.3;
        margin-top: 0;
        margin-bottom: 0;
    }

    .avatar {
        width: 40px;
        height: 40px;
        margin-left: -12px;
    }
    
    .avatar:first-child {
        margin-left: 0;
    }
}

/* Better mobile scroll fix - prevent viewport height jumps when browser UI shows/hides */
@media (max-width: 1023px) {
    html {
        /* Prevent viewport resize jumps and horizontal scroll */
        overflow-x: hidden;
    }
    
    body {
        /* Lock body to prevent content shift while allowing normal scroll */
        position: relative;
        overflow-x: hidden;
    }
    
    .hero-section {
        min-height: 0 !important;
        height: auto !important;
        justify-content: flex-start;
        padding-bottom: 0;
        overflow: hidden;
    }

    .hero-phone-container {
        /* Remove auto margin that pushes phone down when there's extra space */
        margin-top: 0;
    }
}

/* Screens below 500px - Constrain card widths */
@media (max-width: 500px) {
    .rating-card {
        max-width: 280px !important;
    }
    
    .users-card {
        max-width: 280px !important;
    }
}

/* Small Mobile Phones (320px - 480px) */
@media (max-width: 480px) {
    .hero-section {
        padding: 50px 20px 0;
        min-height: 0 !important;
        height: auto !important;
        overflow: hidden;
    }
    
    .hero-content {
        padding: 0;
        margin-bottom: 30px;
    }
    
    .hero-badge {
        width: auto;
        max-width: 100%;
        font-size: 11px;
        padding: 6px 12px;
        margin-bottom: 20px;
        margin-top: 24px;
        height: auto;
    }
    
    .hero-badge-icon {
        width: 16px;
        height: 16px;
    }
    
    .hero-headline-line1 {
        font-size: 32px;
        line-height: 42px;
        margin-bottom: 8px;
    }
    
    .hero-headline-line2 {
        font-size: 38px;
        line-height: 44px;
    }
    
    .hero-sparkle {
        width: 20px;
        height: 20px;
    }
    
    .hero-sparkle.sparkle-1 {
        transform: translateY(-14px);
    }
    
    .hero-sparkle.sparkle-2 {
        left: calc(15%);
        transform: translateY(35px);
    }
    
    .hero-subheadline {
        font-size: 13px;
        line-height: 20px;
        margin-bottom: 24px;
        padding: 0 10px;
    }
    
    .hero-cta-button {
        padding: 0 0 0 24px;
        min-height: 48px;
        font-size: 13px;
        column-gap: 12px;
    }
    
    .hero-arrow-pill {
        width: 48px;
        height: 48px;
    }
    
    .hero-arrow-up-right-icon {
        width: 24px;
        height: 24px;
    }
    
    .hero-phone-container {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: stretch; /* ensure cards have equal height */
        justify-content: center;
        gap: 16px;
        margin-top: 12px;
        padding: 0;
    }
    
    .phone-with-badges-wrapper {
        order: 1;
        width: 100%;
        max-width: 240px;
        display: flex;
        justify-content: center;
        margin-bottom: 0;
        padding: 0 20px;
        box-sizing: border-box;
        flex: 0 0 100%;
    }
    
    .hero-phone-image {
        max-width: 100%;
        width: 100%;
        filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.4));
    }
    
    .phone-with-badges-wrapper::after {
        height: 70px;
        bottom: 0;
    }
    .feature-badge {
        font-size: 10px;
        padding: 5px 10px;
        border-radius: 10px;
    }
    
    .feature-badge-top-left {
        top: 8%;
        left: -40px;
    }
    
    .feature-badge-top-right {
        top: 10%;
        right: -40px;
    }
    
    .feature-badge-bottom-left {
        bottom: 15%;
        left: -40px;
    }

    .feature-badge-bottom-right {
        bottom: 15%;
        right: -40px;
    }
    
    .rating-card {
        order: 2;
        width: 100%;
        max-width: none;
        min-width: 0;
        padding: 12px; /* reduce internal padding to cut empty space */
        min-height: 135px; /* ensure consistent height with users card */
        margin: 0;
        border-radius: 20px;
        flex: 1 1 calc(50% - 12px);
        justify-content: flex-start;
        gap: 8px; /* consistent spacing between elements */
    }

    /* Tighten vertical spacing inside 4.5 card for small mobile */
    .rating-card .rating-number {
        font-size: 40px;
        margin: 0;
        padding: 0;
        line-height: 1;
        height: 40px; /* match avatar height for alignment */
        display: flex;
        align-items: center;
    }

    .rating-card .stars {
        margin: 0;
        padding: 0;
        gap: 4px;
        height: 24px; /* fixed height for alignment with 10M+ */
        display: flex;
        align-items: center;
    }

    .rating-card .rating-text {
        font-size: 11px;
        line-height: 1.3;
        margin: 0;
        padding: 0;
    }
    
    .rating-number {
        font-size: 48px;
    }
    
    .stars {
        gap: 6px;
    }
    
    .star {
        width: 20px;
        height: 20px;
    }
    
    .rating-text {
        font-size: 13px;
    }
    
    .users-card {
        order: 2;
        width: 100%;
        max-width: none;
        min-width: 0;
        padding: 12px; /* match rating card padding */
        min-height: 135px; /* match rating card height to prevent text cropping */
        gap: 8px; /* match rating card gap for consistent spacing */
        margin: 0;
        border-radius: 20px;
        flex: 1 1 calc(50% - 12px);
        justify-content: flex-start;
    }

    /* Stack avatars above 10M+ text on small mobile */
    .users-card .users-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px !important; /* match rating card gap */
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        padding: 0;
    }

    .users-card .user-avatars {
        height: 40px; /* match rating-number height for parallel alignment */
        display: flex;
        align-items: center;
        margin: 0;
        padding: 0;
    }

    .users-card .users-count {
        margin-top: 0 !important;
        margin-bottom: 0;
        padding: 0;
        font-size: 34px;
        line-height: 1;
        height: 24px; /* match stars height for parallel alignment */
        display: flex;
        align-items: center;
    }
    
    .avatar {
        width: 36px;
        height: 36px;
        border-width: 2px;
        margin-left: -12px;
    }
    
    .avatar:first-child {
        margin-left: 0;
    }
    
    .user-avatars {
        height: 40px; /* match rating-number height */
    }
    
    .users-text {
        font-size: 12px;
        margin-top: -4px;
    }

    /* Match description text size & vertical alignment with rating card on small mobile */
    .users-card .users-text {
        font-size: 11px;
        line-height: 1.3;
        margin-top: 0;
        margin-bottom: 0;
    }
}

/* Very Small Mobile Phones (below 320px) */
@media (max-width: 320px) {
    .hero-section {
        padding: 50px 15px 30px;
        overflow-x: hidden;
    }
    
    .hero-badge {
        font-size: 10px;
        padding: 5px 10px;
        margin-top: 20px;
    }
    
    .hero-headline-line1 {
        font-size: 28px;
        line-height: 36px;
    }
    
    .hero-headline-line2 {
        font-size: 34px;
        line-height: 40px;
    }
    
    .hero-sparkle {
        width: 18px;
        height: 18px;
    }
    
    .hero-subheadline {
        font-size: 12px;
        line-height: 18px;
    }
    
    .hero-cta-button {
        padding: 0 0 0 20px;
        min-height: 44px;
        font-size: 12px;
    }
    
    .hero-arrow-pill {
        width: 44px;
        height: 44px;
    }
    
    .phone-with-badges-wrapper {
        max-width: 200px;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .hero-phone-image {
        max-width: 100%;
        width: 100%;
    }
    
    .phone-with-badges-wrapper::after {
        height: 50px;
        bottom: 0;
    }
    .feature-badge {
        font-size: 9px;
        padding: 4px 8px;
        border-radius: 8px;
    }
    
    .feature-badge-top-left {
        top: 8%;
        left: -30px;
    }
    
    .feature-badge-top-right {
        top: 10%;
        right: -30px;
    }
    
    .feature-badge-bottom-left {
        bottom: 8%;
        left: -30px;
    }
    
    .feature-badge-bottom-right {
        bottom: 8%;
        right: -30px;
    }
    
    .rating-card {
        padding: 12px;
        min-height: 130px;
    }
    
    .rating-number {
        font-size: 42px;
    }
    
    .star {
        width: 18px;
        height: 18px;
    }
    
    .rating-text {
        font-size: 12px;
    }
    
    .users-card {
        padding: 8px;
        min-height: 90px;
    }
    
    .users-count {
        font-size: 24px;
    }
    
    .avatar {
        width: 28px;
        height: 28px;
    }
    
    .user-avatars {
        height: 28px;
    }
    
    .users-text {
        font-size: 11px;
    }
}