/* Hero Image Container - Layered Composition */
.hero-image-container {
    position: relative;
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dashboard Background - Static Layer */
.hero-dashboard {
    position: absolute;
    width: 750px;
    height: auto;
    z-index: 1;
    top: 40%;
    left: 20%;
    transform: translate(-50%, -50%);
    animation: slideInFromRight 1.2s ease-out forwards;
    opacity: 0;
}

/* Gym Man - Center Layer - Static */
.hero-man {
    position: absolute;
    width: 710px;
    height: auto;
    z-index: 2;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    /* filter: drop-shadow(0 8px 12px rgba(0, 0, 0)); */

}

@keyframes slideInFromRight {
    0% {
        transform: translate(100px, -50%);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* Floating Cards - Animated Layer */
.floating-card {
    position: absolute;
    z-index: 3;
    animation: floatUpDown 6s ease-in-out infinite;
}

/* Individual Card Positioning */
.avocado-card {
    width: 364.58px;
    top: -20%;
    left: 5%;
    animation-delay: 0s;
    overflow: hidden;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.workout-card {
    width: 314px;
    top: -7%;
    right: -5.3%;
    animation-delay: 0.5s;
    overflow: hidden;
    filter: drop-shadow(0 3px 6px rgba(255, 255, 255, 0.15));

}

.detected-card {
    width: 314px;
    top: 5%;
    right: -5.3%;
    animation-delay: 1s;
    filter: drop-shadow(0 3px 6px rgba(255, 255, 255, 0.15));


}

.barbell-card {
    width: 178px;
    top: 35%;
    right: 0%;
    animation-delay: 1.5s;
    filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.2));

}

.meals-card {
    width: 233.65px;
    bottom: 15%;
    right: 8%;
    animation-delay: 2s;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));

}

.rose-card {
    width: 214px;
    bottom: 8%;
    left: 8%;
    animation-delay: 2.5s;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Continuous Scale Animation */
@keyframes floatUpDown {

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

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

.design-img {
    width: 900px;
    max-width: 100%;
    height: auto;
}

.hero-image-container-1 {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

@media (max-width: 991px) {
    .hero-image-container-1 {
        margin-top: 50px;
    }
}


/* ============================================
   DESKTOP FIRST - LARGE SCREENS (≥1920px)
   ============================================ */
@media (min-width: 1481px) and (max-width: 1920px) {
    .hero-dashboard {
        width: 620px;
        left: 30%;
    }

    .hero-man {
        width: 540px;
        left: 57%;
    }

    .hero-p {
        font-size: 22px !important;
        line-height: 1.5 !important;
    }

    .hero-h1 {
        font-size: 52px !important;
    }

    .detected-card,
    .workout-card {
        width: 250px !important;
        right: 2%;
    }

    .avocado-card {
        width: 250px !important;
        top: -8%;
    }

    .rose-card {
        width: 180px !important;
    }

    .barbell-card {
        width: 160px !important;
    }
}

/* ============================================
   DESKTOP - LARGE (1200px - 1480px)
   Side-by-side layout for Surface Pro 7 & iPad Pro Landscape
   ============================================ */
@media (min-width: 1200px) and (max-width: 1480px) {

    /* Typography adjustments */
    .grey-bar-text h6,
    .grey-bar-text p {
        font-size: 22px;
    }

    .twenty-four {
        font-size: 28px;
    }

    .advantage-left-content h2 {
        font-size: 36px;
    }

    /* Hero section layout */
    .hero-section-main {
        min-height: 520px !important;
        padding: 40px 50px 10px !important;
        display: flex !important;
        align-items: center !important;
    }

    .hero-section-main .row {
        width: 100% !important;
    }

    .hero-section-main .col-lg-6:first-child {
        text-align: left !important;
        margin-bottom: 0px !important;
        padding-bottom: 0px !important;
    }

    /* Hero text */
    .hero-h1 {
        font-size: 44px !important;
        line-height: normal !important;
        margin-bottom: 20px !important;
    }

    .hero-p {
        font-size: 16px !important;
        line-height: 1.5 !important;
        margin-top: 15px !important;
        margin-bottom: 25px !important;
    }

    .hero-section-main .points-three {
        justify-content: flex-start !important;
        margin-bottom: 25px !important;
        font-size: 16px !important;
    }

    .hero-section-main .btn-hero {
        margin: 0 0 25px 0 !important;
    }

    .hero-section-main .banner-rating {
        justify-content: flex-start !important;
        width: 100% !important;
        margin-left: 0px !important;
    }

    /* Hero images */
    .hero-image-container {
        height: 400px !important;
        margin-right: 0px !important;
    }

    .hero-dashboard {
        width: 500px !important;
        left: 52% !important;
        top: 45% !important;
        transform: translate(-50%, -50%) !important;
        max-width: 520px !important;
    }

    .hero-man {
        width: 420px !important;
        left: 65% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    /* Floating cards */
    .avocado-card {
        width: 200px !important;
    }

    .workout-card {
        width: 190px !important;
        right: -14%;
    }

    .detected-card {
        width: 190px !important;
        top: 8%;
        right: -14%;
    }

    .barbell-card {
        width: 140px !important;
    }

    .meals-card {
        width: 200px !important;
    }

    .rose-card {
        width: 150px !important;
    }

    /* Accordion fixes */
    .dropdown-wrapper .row {
        align-items: flex-start !important;
    }

    .booking-section-wrapper .dropdown-image {
        margin-top: 100px !important;
    }

}

/* ============================================
   DESKTOP - STANDARD (≥1100px)
   Default desktop layout - activates consistently
   ============================================ */
@media (min-width: 1100px) and (max-width: 1199px) {
    .hero-image-container {
        height: 500px;
        margin-top: 30px;
    }

    .hero-dashboard {
        width: 600px !important;
        left: 30% !important;
        top: 45% !important;
    }

    .hero-man {
        width: 500px !important;
        left: 60% !important;
        top: 50% !important;
    }

    /* Floating cards for desktop */
    .avocado-card {
        width: 280px !important;
        top: -10% !important;
        left: 8% !important;
    }

    .workout-card {
        width: 240px !important;
        top: -2% !important;
        right: 0% !important;
    }

    .detected-card {
        width: 240px !important;
        top: 10% !important;
        right: 0% !important;
    }

    .barbell-card {
        width: 140px !important;
        top: 38% !important;
        right: 4% !important;
    }

    .meals-card {
        width: 180px !important;
        bottom: 15% !important;
        right: 8% !important;
    }

    .rose-card {
        width: 160px !important;
        bottom: 10% !important;
        left: 8% !important;
    }

    /* Desktop animation */
    @keyframes floatLargeTablet {

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

        50% {
            transform: translateY(-14px) scale(1.03);
        }
    }

    .floating-card {
        animation: floatLargeTablet 5s ease-in-out infinite;
    }

    .hero-h1 {
        font-size: 44px;
    }

    .hero-p {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    .points-three li {
        font-size: 16px !important;
        padding: 5px !important;
    }

    .hero-section-main .banner-rating ul li {
        font-size: 15px !important;
    }

    .hero-dashboard {
        left: 50% !important;
        max-width: 520px;
        width: 490px !important;
    }

    .hero-man {
        left: 65% !important;
        max-width: 420px;
    }

    .avocado-card {
        width: 200px !important;
        top: -4% !important;
    }

    .detected-card {
        width: 170px !important;
        right: -12% !important;
        top: 8% !important;
    }

    .workout-card {
        width: 170px !important;
        right: -12% !important;
    }

    .barbell-card {
        right: -8% !important;
        width: 120px !important;
    }

    .meals-card {
        width: 200px !important;
        right: -8% !important;

    }

}

/* ============================================
   TABLET (768px - 1099px)
   Tablet layout with centered content
   Includes iPad Pro portrait mode (1024px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1099px) {
    .hero-image-container {
        height: 450px;
        margin-top: 40px;
        position: relative;
        overflow: visible;
    }

    .hero-dashboard {
        width: 500px !important;
        left: 35% !important;
        top: 45% !important;
        transform: translate(-50%, -50%) !important;
        animation: slideInFromRight 1.2s ease-out forwards;
    }

    .hero-man {
        width: 420px !important;
        left: 65% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    /* Floating cards for tablet */
    .floating-card {
        animation: floatTablet 4s ease-in-out infinite;
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
    }

    .avocado-card {
        width: 290px !important;
        top: -5% !important;
        left: 8% !important;
        animation-delay: 0s;
    }

    .workout-card {
        width: 230px !important;
        top: 0% !important;
        right: -1% !important;
        animation-delay: 0.3s;
    }

    .detected-card {
        width: 230px !important;
        top: 12% !important;
        right: -1% !important;
        animation-delay: 0.6s;
    }

    .barbell-card {
        width: 150px !important;
        top: 40% !important;
        right: 6% !important;
        animation-delay: 0.9s;
    }

    .meals-card {
        width: 190px !important;
        bottom: 15% !important;
        right: 10% !important;
        animation-delay: 1.2s;
    }

    .rose-card {
        width: 170px !important;
        bottom: 10% !important;
        left: 10% !important;
        animation-delay: 1.5s;
    }

    /* Tablet animation */
    @keyframes floatTablet {

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

        50% {
            transform: translateY(-12px) scale(1.02);
        }
    }

    /* Content centering for tablet */
    .hero-section-main .col-md-12 {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .hero-section-main .points-three {
        text-align: left !important;
        padding-left: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: fit-content !important;
        display: block !important;
    }

    .hero-section-main .btn-hero {
        margin: 0 auto 25px auto !important;
        display: inline-flex !important;
    }

    .hero-section-main .banner-rating {
        justify-content: center !important;
        width: 100% !important;
    }

    /* Z-index layering */
    .hero-dashboard {
        z-index: 1;
    }

    .hero-man {
        z-index: 2;
    }

    .floating-card {
        z-index: 3;
    }

    /* ============================================
       SECTION STACKING FOR TABLET (iPad Portrait)
       Ensures all sections stack vertically
       ============================================ */

    /* Hero Section - Stack content above image */
    .hero-section-main .row {
        flex-direction: column !important;
    }

    .hero-section-main .col-lg-6 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .hero-section-main .col-lg-6:first-child {
        margin-bottom: 30px !important;
        order: 1;
    }

    .hero-section-main .col-lg-6:last-child {
        order: 2;
    }

    /* Table Section (easy-gym-advantage) - Stack vertically */
    .easy-gym-advantage .row {
        flex-direction: column !important;
    }

    .easy-gym-advantage .why-gyms-switch,
    .easy-gym-advantage .gym-advantage {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .easy-gym-advantage .why-gyms-switch {
        border-radius: 40px 40px 0 0 !important;
        min-height: auto !important;
        padding-bottom: 50px !important;
    }

    .easy-gym-advantage .gym-advantage {
        border-radius: 0 0 40px 40px !important;
    }

    /* Graph Section (group-level) - Stack vertically */
    .group-level-both {
        flex-direction: column !important;
    }

    .group-level-left {
        text-align: center !important;
        padding: 60px 40px !important;
        width: 100% !important;
    }

    .group-level-left ul {
        text-align: left !important;
        display: inline-block !important;
    }

    .group-level-right {
        width: 100% !important;
        padding: 40px !important;
    }

    .graph-chart {
        height: 350px !important;
    }

    /* Accordion Sections - Stack image above/below accordion */
    .dropdown-wrapper-one:not(.booking-section-wrapper) .row {
        flex-direction: column-reverse !important;
    }

    .booking-section-wrapper .row {
        flex-direction: column !important;
    }

    .dropdown-wrapper-one .dropdown-image,
    .booking-section-wrapper .dropdown-image {
        margin-bottom: 40px !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .dropdown-wrapper .col-lg-6 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    /* Stage Section - 2 columns on tablet */
    .stage-section .col-lg-4 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    /* General column stacking for any remaining sections */
    .row .col-lg-6,
    .row .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Ensure content wrapper has proper padding */
    .content-wrapper {
        padding: 0 20px !important;
    }
}

/* ============================================
   MOBILE - LARGE (577px - 767px)
   ============================================ */
@media (min-width: 577px) and (max-width: 767px) {
    .hero-image-container {
        height: 400px;
    }

    .hero-dashboard {
        width: 400px;
        left: 35%;
    }

    .hero-man {
        width: 350px;
        left: 70%;
    }

    .avocado-card,
    .workout-card,
    .detected-card,
    .barbell-card,
    .meals-card,
    .rose-card {
        width: 20%;
    }

    /* Adjust positions for mobile */
    .avocado-card {
        top: -15%;
        left: 3%;
    }

    .workout-card {
        top: -5%;
        right: -3%;
    }

    .detected-card {
        top: 8%;
        right: -3%;
    }

    .barbell-card {
        top: 40%;
        right: 0%;
    }

    .meals-card {
        bottom: 12%;
        right: 5%;
    }

    .rose-card {
        bottom: 5%;
        left: 5%;
    }

    /* Mobile animation */
    .floating-card {
        animation: floatScaleMobile 4s ease-in-out infinite;
    }

    .avocado-card {
        animation-delay: 0s;
    }

    .workout-card {
        animation-delay: 0.5s;
    }

    .detected-card {
        animation-delay: 1s;
    }

    .barbell-card {
        animation-delay: 1.5s;
    }

    .meals-card {
        animation-delay: 2s;
    }

    .rose-card {
        animation-delay: 2.5s;
    }
}

/* ============================================
   MOBILE - SMALL (≤576px)
   ============================================ */
@media (max-width: 576px) {
    .hero-section-main {
        padding-bottom: 0;
    }

    .hero-image-container {
        height: 320px;
    }

    .hero-dashboard {
        width: 320px;
        left: 40%;
    }

    .hero-man {
        width: 280px;
        left: 50%;
    }

    .avocado-card {
        top: -8%;
        left: 2%;
        width: 150px;
    }

    .workout-card {
        top: -3%;
        right: -7%;
        width: 150px;
    }

    .detected-card {
        top: 10%;
        right: -7%;
        width: 150px;
    }

    .barbell-card {
        top: 45%;
        right: -2%;
        width: 100px;
    }

    .meals-card {
        bottom: 10%;
        right: -2%;
        width: 100px;
    }

    .rose-card {
        bottom: 3%;
        left: 3%;
        width: 100px;
    }

    .banner-images {
        gap: 5px !important;
    }

    /* Mobile animation */
    .floating-card {
        animation: floatScaleMobile 4s ease-in-out infinite;
    }

    .avocado-card {
        animation-delay: 0s;
    }

    .workout-card {
        animation-delay: 0.5s;
    }

    .detected-card {
        animation-delay: 1s;
    }

    .barbell-card {
        animation-delay: 1.5s;
    }

    .meals-card {
        animation-delay: 2s;
    }

    .rose-card {
        animation-delay: 2.5s;
    }
}

/* ============================================
   DESIGN GYM SECTION RESPONSIVENESS
   ============================================ */
@media (max-width: 991px) {
    .design-row {
        margin-bottom: 50px;
    }

    /* Force image to be on top for Content-Image rows (which utilize .reverse-mobile class) */
    .reverse-mobile {
        flex-direction: column-reverse;
    }

    /* For Image-Content rows, the natural order is Image then Content, so no change needed.
       However, we ensure all rows display as columns on mobile */
    .design-row {
        text-align: center;
    }

    .design-content-wrapper {
        padding: 30px 15px;
    }

    .design-img-wrapper {
        margin-bottom: 20px;
    }
}




/* ============================================
   MOBILE ANIMATION
   ============================================ */
@keyframes floatScaleMobile {

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

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

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
@media (max-width: 1099px) {
    .floating-card {
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    /* Reduce animation for accessibility */
    @media (prefers-reduced-motion: reduce) {
        .floating-card {
            animation: none !important;
        }

        .hero-dashboard {
            animation: none !important;
            opacity: 1;
        }
    }
}