/* Benefits Section - Mobile First */
.benefits-section {
    color: var(--SyFu-Neutral-light);
    padding-top: 2.5625rem; /* 41px */
    padding-bottom: 3.394rem; /* 54.33px mobile */
    position: relative;
    min-height: 300vh; /* Space for animation */
}

.benefits-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky; /* Make container sticky */
    top: 0;
    height: 100vh; /* Full viewport height */
    z-index: 2; /* Lower z-index to not cover transform section */
    width: 100%;
}

.benefits-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    gap: 5.75rem; /* 92px gap mobile */
}

/* Position container -30vh from top on mobile */
@media (max-width: 1279px) {
    .benefits-container {
        top: -30vh; /* Start container 30vh above viewport */
        padding-top: 30vh; /* Add padding to compensate and show content */
    }
}

/* Section A - Image */
.benefits-image-section {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative; /* Keep image in place */
}

.benefits-image {
    width: 25.25rem; /* 404px */
    height: 30.986rem; /* 495.78px */
    background: url('../../../../assets/img/product/benefits/d-app-f.png') #000 0px -0.002px / 100% 100.001% no-repeat;
}

/* Section B - Title and Carousel */
.benefits-text-section {
    width: 25.5625rem; /* 409px mobile */
    text-align: center;
    position: relative; /* Required for scroll effect container */
}

.benefits-title {
    width: 42.0625rem; /* 337px */
    color: #FFF;
    text-align: center;
    leading-trim: both;
    text-edge: cap;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 2.25rem; /* 36px */
    font-style: normal;
    font-weight: 400;
    line-height: 3.25rem; /* 32.606px - 90.573% */
    margin: 0 auto;
    position: relative;
    z-index: 10; /* Keep title above cards */
}

/* Carousel - Functional CSS from test.html pattern */
.benefits-carousel {
    position: relative; /* Changed from sticky to relative */
    margin-top: 2rem; /* Normal margin from title */
    width: 100%;
    height: 500px; /* Fixed height for carousel */
    display: flex;
    justify-content: center;
    align-items: stretch; /* Align to top instead of center */
    padding-top: 2rem; /* Add some padding */
    overflow: visible; /* Allow number badges to be visible during slide */
}

.carousel-slide {
    position: absolute; /* Absolute positioning for stacking */
    width: auto;
    max-width: 25rem;
    height: 320px;
    display: flex;
    padding: 2.431rem 1.823rem 1.823rem 1.823rem; /* 38.895px 29.171px 29.171px 29.171px */
    flex-direction: column;
    align-items: center;
    gap: 0.912rem; /* 14.585px */
    border-radius: 1rem; /* 16px */
    border: 0.076rem solid #9AF9FF; /* 1.215px */
    background: rgba(13, 27, 43, 0.90);
    backdrop-filter: blur(0.57rem); /* 9.115899085998535px */
    transition: transform 0.2s ease-out, opacity 0.2s ease-out; /* Faster transitions */
    will-change: transform, opacity; /* Optimize for animations */
}

/* Number Badge */
.slide-number {
    position: absolute;
    top: -1.3125rem; /* Half of 43px height to center on border */
    left: 50%;
    transform: translateX(-50%);
    width: 2.6875rem; /* 43px */
    height: 2.9375rem; /* 47px */
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-number svg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.number-text {
    position: relative;
    z-index: 2;
    color: #000;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

/* Slide Content */
.slide-content {
    width: 21.916rem; /* 350.65px */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.912rem; /* 14.59px */
}

.slide-title {
    text-align: center;
    leading-trim: both;
    text-edge: cap;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.75rem; /* 28px */
    font-style: normal;
    font-weight: 900;
    line-height: 1.875rem; /* 30px - 107.143% */
    background: linear-gradient(90deg, #FFF 0%, #58B2D4 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.slide-description {
    color: rgba(255, 255, 255, 0.60);
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 1rem; /* 16px */
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    letter-spacing: -0.019rem; /* -0.304px */
    margin: 0;
}

/* Button */
.slide-button {
    display: flex;
    padding: 0.4375rem 1.25rem; /* 7px 20px */
    justify-content: center;
    align-items: center;
    gap: 0.5rem; /* 8px */
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slide-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.slide-button span {
    color: #FFF;
    font-family: "Barlow", sans-serif;
    font-size: 0.875rem; /* 14px */
    font-style: normal;
    font-weight: 700;
    line-height: 1.75rem; /* 28px - 200% */
    text-transform: capitalize;
}

.button-icon {
    display: flex;
    width: 1rem; /* 16px */
    height: 1rem; /* 16px */
    padding: 0.045rem 0.036rem 0.063rem 0.071rem; /* 0.714px 0.571px 1px 1.143px */
    justify-content: center;
    align-items: center;
}

.button-icon svg {
    width: 100%;
    height: 100%;
}

/* Transform Section - Now outside benefits section */
.transform-section {
    margin-top: 0; /* No negative margin needed since it's outside */
    padding-top: 11rem; /* Spacing from benefits section */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3; /* Above benefits container */
}

.transform-titles {
    text-align: center;
    margin-bottom: 2.5rem; /* 40px */
}

.transform-main-title {
    width: 18.5rem; /* 296px */
    color: #FFF;
    text-align: center;
    font-family: Barlow;
    font-size: 1.375rem; /* 22px */
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    margin: 0 auto;
}

.transform-sub-title {
    width: 25.5rem; /* 408px */
    margin-top: 0.375rem; /* 6px gap */
    color: #FFF;
    text-align: center;
    font-family: "FRIZON", 'Noto Sans JP', sans-serif;
    font-size: 2.25rem; /* 36px */
    font-style: normal;
    font-weight: 400;
    line-height: 2.281rem; /* 36.502px - 101.395% */
    margin-left: auto;
    margin-right: auto;
}

.transform-slider {
    width: 100%;
    max-width: 25rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Mobile: arrows and phone in a flex row */
.slider-arrow-left,
.phone-image-area,
.slider-arrow-right {
    display: flex;
}

.transform-slider {
    display: grid;
    grid-template-columns: 3rem 1fr 3rem; /* arrow, phone, arrow */
    grid-template-rows: auto auto; /* row 1: arrows+phone, row 2: description */
    grid-template-areas: 
        "left-arrow phone right-arrow"
        "description description description";
    gap: 2.438rem; /* 39px gap between arrows and phone */
    justify-items: center;
    align-items: center;
    max-width: 25rem;
}

.slider-arrow-left {
    grid-area: left-arrow;
    justify-self: center;
}

.phone-image-area {
    grid-area: phone;
    width: 15rem; /* 240px */
    height: 30.32rem; /* 485.115px */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.slider-arrow-right {
    grid-area: right-arrow;
    justify-self: center;
}

.phone-slide video {
    pointer-events: none;
}

.phone-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    border-radius: 1.5rem;
    overflow: hidden;
}

.phone-slide.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.phone-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../../../../assets/img/product/benefits/iphone-blue-bg.png') center/cover no-repeat;
    z-index: 3;
}

.phone-placeholder-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 95%;
    background: url('../../../../assets/img/product/benefits/placeholder-1.png') center/cover no-repeat;
    z-index: 1;
}

.phone-video-partial {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: auto;
    object-fit: contain;
    z-index: 2;
}

.phone-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: auto;
    object-fit: contain;
    z-index: 2;
    border-radius: 20px;
}

.phone-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: auto;
    object-fit: contain;
    z-index: 2;
    border-radius: 20px;
}

.phone-content {
    color: #FFF;
    font-family: Barlow;
    font-size: 1rem;
}

.slider-arrow {
    width: 3rem; /* 48px */
    height: 3rem; /* 48px */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.slider-arrow:hover {
    transform: scale(1.05);
}

.slider-description {
    grid-area: description;
    margin-top: 2rem; /* Gap between phone area and description */
    text-align: center;
}

.description-content {
    max-width: 25rem;
    margin: 0 auto;
    display: none;
}

.description-content.active {
    display: block;
}

.title-border {
    width: 4.375rem; /* 70px */
    height: 0.125rem; /* 2px */
    background: #FFD700;
    margin: 0 auto 0.75rem auto; /* 12px padding top */
}

.description-title {
    color: var(--sy-fu-gold-accent, #FFD700);
    font-family: Barlow;
    font-size: 1.75rem; /* 28px */
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    text-align: center;
    margin: 0 0 0.75rem 0; /* 12px padding bottom */
}

.description-text {
    color: rgba(255, 255, 255, 0.60);
    font-family: Inter;
    font-size: 1.125rem; /* 18px mobile */
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-align: center;
    margin: 0;
}

/* Learn More Button styles (moved to meet-manekineko section) */
.transform-learn-more-btn {
    display: flex;
    padding: 1rem 1.75rem; /* 16px 28px */
    justify-content: center;
    align-items: center;
    gap: 0.7rem; /* 11.2px */
    background: transparent;
    border-radius: 2.625rem; /* 42px */
    border: 1px solid #FFF;
    box-shadow: 0 0.25rem 0.856rem 0 rgba(13, 27, 43, 0.30); /* 0 4px 13.7px */
    cursor: pointer;
    transition: all 0.3s ease;
    height: auto;
}

.transform-learn-more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.transform-learn-more-btn span {
    color: #FFF;
    font-family: Barlow;
    font-size: 1.25rem; /* 20px */
    font-style: normal;
    font-weight: 500;
    line-height: 1.875rem; /* 30px - 150% */
    text-transform: capitalize;
}

/* Remove bottom margin from transform section */
.transform-section {
    margin-bottom: 0;
}

/* Mobile responsive adjustments - ensure containers fit within 100% width */
@media (max-width: 549px) {
    /* Adjust container widths to be responsive instead of fixed */
    .benefits-image {
        width: 95%; /* Responsive instead of fixed 25.25rem (404px) */
        max-width: 25.25rem; /* Keep max size as fallback */
        height: auto; /* Allow height to scale proportionally */
        aspect-ratio: 404/495.78; /* Maintain original aspect ratio */
    }

    .benefits-text-section {
        width: 95%; /* Responsive instead of fixed 25.5625rem (409px) */
        max-width: 25.5625rem; /* Keep max size as fallback */
       /* padding: 0 1rem; /* Add side padding */
    }

    .benefits-title {
        width: 90%; /* Responsive instead of fixed 21.0625rem (337px) */
        max-width: 21.0625rem; /* Keep max size as fallback */
    }

    .slide-content {
        width: 95%; /* Responsive instead of fixed 21.916rem (350.65px) */
        max-width: 21.916rem; /* Keep max size as fallback */
    }

    .carousel-slide {
        max-width: 95%; /* Ensure slides don't exceed screen width */
        width: auto;
    }

    /* Transform section adjustments */
    .transform-sub-title {
        width: 95%; /* Responsive instead of fixed 25.5rem (408px) */
        max-width: 25.5rem; /* Keep max size as fallback */
    }

    .transform-main-title {
        width: 90%; /* Responsive instead of fixed 18.5rem (296px) */
        max-width: 18.5rem; /* Keep max size as fallback */
    }

    /* Reduce gap on smaller screens */
    .benefits-content {
        gap: 3rem; /* Reduced from 5.75rem (92px) to 3rem (48px) */
        padding: 0 1rem; /* Add side padding to prevent edge cutoff */
    }

    /* Adjust transform slider for mobile - keep phone size, make container responsive */
    .transform-slider {
        width: 100%; /* Full width container */
        max-width: none; /* Remove max-width constraint */
        padding: 0 1rem; /* Side padding */
        grid-template-columns: 1fr 15rem 1fr; /* Flexible arrow columns, fixed phone column (240px) */
        gap: 1rem; /* Reduced gap between arrows and phone for smaller screens */
    }

    .phone-image-area {
        width: 15rem; /* Keep original 240px size */
        height: 30.32rem; /* Keep original height */
        /* Remove any responsive sizing - phone stays at original size */
    }

    /* Ensure description content doesn't overflow */
    .description-content {
        max-width: 95%;
        padding: 0 1rem;
    }
}