/* msuperpower Section Layout */
.msuperpower-section {
    padding: 60px 20px;
    display: flex;
    justify-content: space-between;
    background-color: #000; /* Light gray background */
    color: #eee;
}

.msuperpower-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    gap: 2px; /* Adjust the gap between text and items */
}

/* Left Side: msuperpower Text */
.msuperpower-container {
    flex: 1;
    padding-right: 10px;
    max-width: 45%; /* Take up 50% of the screen */
}

.msuperpower-header h2 {
    font-size: 2.5em;
    color: #72D8EF;
    margin-bottom: 20px;
}

.msuperpower-header p {
    font-size: 1.2em;
    color: #ccc;
    margin-bottom: 40px;
}

/* Right Side: msuperpower Items */
.msuperpower-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative; /* Position relative for animations */
    max-width: 30%; /* Take up 30% of the screen */
}

/* msuperpower Item Styling with Dark Box */
.msuperpower-item {
    background-color: #14161C; /* Dark black background */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px; /* Padding inside the box */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Start hidden */
    transform: translateX(100%); /* Slide in animation */
    transition: opacity 0.5s ease, transform 0.5s ease; /* Smooth transition */
}

.msuperpower-item.show {
    opacity: 1;
    transform: translateX(0); /* Bring into view */
}

/* Ensure the box is square */
.msuperpower-item::before {
    content: "";
    display: block;
    padding-top: 0%; /* Maintain square ratio */
}

.msuperpower-item h3 {
    font-size: 1.8em;
    color: #efa672;
    margin-bottom: 10px;
    z-index: 1; /* Ensure text is on top */
}

.msuperpower-item p {
    font-size: 1.2em;
    color: #72D8EF; /* Light blue color for text bullet */
    margin-bottom: 20px;
    z-index: 1; /* Ensure text is on top */
}

.msuperpower-item img {
    width: 40%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1; /* Ensure image is on top */
}

/* First msuperpower item always visible on page load */
.msuperpower-item:first-of-type {
    opacity: 1;
    transform: translateX(0);
}

/* Animation for Auto-Swiping Items */
@keyframes swipe-in {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes swipe-out {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-100%);
    }
}

.msuperpower-item.show {
    animation: swipe-in 1s forwards;
}

.msuperpower-item.hide {
    animation: swipe-out 1s forwards;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .msuperpower-section {
        padding: 30px 10px;
        display: block;
        background-color: #000;
        color: #eee;
    }

    .msuperpower-content {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    /* Stack the container and items vertically */
    .msuperpower-container, .msuperpower-items {
        max-width: 100%;
        padding-right: 0;
    }

    /* Ensure .msuperpower-items has sufficient height */
    .msuperpower-items {
        position: relative;
        width: 100%;
        height: auto; /* Allow height to be determined dynamically */
        min-height: 300px; /* Set a reasonable minimum height based on item size */
    }

    .msuperpower-item {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        padding: 20px 10px; /* Adjust padding to reduce empty space */
        opacity: 0; /* Start hidden */
        transform: translateX(100%); /* Start off-screen */
        transition: opacity 0.5s ease, transform 0.5s ease;
        display: flex;
        flex-direction: column;
        justify-content: center; /* Center content vertically */
        align-items: center; /* Center content horizontally */
    }

    .msuperpower-item.show {
        opacity: 1;
        transform: translateX(0); /* Bring into view */
    }

    .msuperpower-item.hide {
        opacity: 0;
        transform: translateX(-100%); /* Slide out to the left */
    }

    /* Remove ::before to eliminate excess space */
    .msuperpower-item::before {
        content: none;
    }

    /* Mobile-specific animations */
    @keyframes swipe-in-mobile {
        0% {
            opacity: 0;
            transform: translateX(100%);
        }
        100% {
            opacity: 1;
            transform: translateX(0);
        }
    }

    @keyframes swipe-out-mobile {
        0% {
            opacity: 1;
            transform: translateX(0);
        }
        100% {
            opacity: 0;
            transform: translateX(-100%);
        }
    }

    .msuperpower-item.show {
        animation: swipe-in-mobile 0.5s forwards;
    }

    .msuperpower-item.hide {
        animation: swipe-out-mobile 0.5s forwards;
    }
}
