* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.how-it-works-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(30px, 5vw, 50px) clamp(10px, 2vw, 20px);
    background: transparent;
    margin-top: -30px; /* Moves everything up 30px */
    width: 100%; /* Ensure section takes full width */
    max-width: 100vw; /* Prevent any overflow constraints */
}

.how-it-works-header {
    font-size: clamp(2.5em, 5vw, 3.5em);
    color: #ffffff;
    font-family: 'Impact', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.7), 0 0 15px rgba(138, 43, 226, 0.5);
    margin-bottom: clamp(20px, 3vw, 40px);
    position: relative;
    z-index: 1;
}

.how-it-works-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: #8a2be2;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.how-it-works-header:hover::after {
    width: 80%;
}

.card-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: clamp(15px, 2vw, 25px);
    width: 100%;
    padding: clamp(10px, 2vw, 20px);
}

.card {
    -webkit-perspective: 150rem;
    perspective: 150rem;
    position: relative;
    flex: 1 1 clamp(180px, calc(20% - clamp(15px, 2vw, 25px)), 300px);
    max-width: 300px;
    height: clamp(400px, 35vh, 500px);
    margin: clamp(10px, 2vh, 20px) 0;
}

.card__side {
    height: 100%;
    width: 100%;
    transition: all 0.8s ease;
    position: absolute;
    top: 0;
    left: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid #a9a9a9;
    box-shadow: clamp(5px, 1vw, 10px) clamp(5px, 1vw, 10px) 0 rgba(0, 0, 0, 0.7);
}

.card__side--front {
    background: rgba(31, 13, 51, 0.3);
    position: relative;
}

.card__side--back {
    background: #1f0d33;
    transform: rotateY(180deg);
}

.card:hover .card__side--front {
    transform: rotateY(-180deg);
}

.card:hover .card__side--back {
    transform: rotateY(0);
}

.card__side--front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: #8a2be2;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    transition: height 0.4s ease;
    z-index: 1;
}

.card:hover .card__side--front::before {
    height: 100%;
    opacity: 0.3;
    border-radius: 12px;
}

.card__side--back::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: #8a2be2;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    transition: height 0.4s ease;
}

.card:hover .card__side--back::before {
    height: 100%;
    opacity: 0.3;
    border-radius: 12px;
}

.card__side--front::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.2), transparent 70%);
    opacity: 0.5;
    animation: pulse 6s infinite ease-in-out;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(0.9);
        opacity: 0.5;
    }
}

.card__title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: clamp(15px, 2vw, 20px);
    position: relative;
    z-index: 2;
}

.card__heading {
    font-size: clamp(1.8em, 3vw, 2.5em);
    color: #ffffff;
    font-family: 'Impact', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-wrap: auto;
}

.card__cta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    padding: clamp(15px, 2vw, 20px);
}

.card__price-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    color: #ffffff;
}

.card__price-only {
    font-size: clamp(0.9em, 1.2vw, 1.4em);
    font-family: 'Arial Black', sans-serif;
    text-transform: uppercase;
    background: rgba(169, 169, 169, 0.2);
    padding: clamp(6px, 0.8vw, 8px);
    border-radius: 8px;
    margin-bottom: clamp(6px, 0.8vw, 8px);
}

.card__price-value {
    font-size: clamp(0.7em, 0.9vw, 1em);
    font-family: 'Arial Black', sans-serif;
    line-height: 1.3;
}

.try-now-btn {
    display: inline-block;
    margin-top: clamp(20px, 3vw, 40px);
    padding: clamp(12px, 1.5vw, 15px) clamp(25px, 3vw, 30px);
    font-size: clamp(1em, 1.5vw, 1.2em);
    color: #ffffff;
    background: #1f0d33;
    border: 3px solid #a9a9a9;
    border-radius: 8px;
    font-family: 'Arial Black', sans-serif;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: clamp(3px, 0.5vw, 5px) clamp(3px, 0.5vw, 5px) 0 rgba(0, 0, 0, 0.7);
}

.try-now-btn:hover {
    color: #ffffff;
    border-color: #8a2be2;
    transform: translate(-3px, -3px);
    box-shadow: clamp(5px, 0.8vw, 8px) clamp(5px, 0.8vw, 8px) 0 rgba(0, 0, 0, 0.7);
}

.try-now-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(138, 43, 226, 0.5), transparent);
    transition: left 0.5s ease;
}

.try-now-btn:hover::before {
    left: 100%;
}

@media (max-width: 768px) {
    .how-it-works-section {
        padding: clamp(30px, 5vw, 50px) 0; /* Remove horizontal padding */
        width: 100vw; /* Full viewport width */
        margin-left: calc(-50vw + 50%); /* Center within viewport */
    }

    .card-container {
        flex-direction: column; /* Stack cards vertically */
        flex-wrap: wrap; /* Allow wrapping */
        align-items: center; /* Center cards horizontally */
        padding: clamp(10px, 2vw, 20px) 0; /* No horizontal padding */
        width: 100vw; /* Full viewport width */
        gap: clamp(15px, 2vw, 25px);
    }

    .card {
        flex: 0 0 auto; /* No flex growth/shrink */
        width: 90%; /* 90% of the container width */
        max-width: none !important; /* Override any max-width */
        margin: clamp(10px, 2vh, 20px) auto; /* Center horizontally */
        padding: 0;
    }

    .card__side {
        width: 100%; /* Match card width (90% of container) */
    }

    /* Disable hover effects on mobile */
    .card:hover .card__side--front {
        transform: none;
    }

    .card:hover .card__side--back {
        transform: rotateY(180deg);
    }

    /* Increase text size on back side for mobile */
    .card__price-only {
        font-size: clamp(1.2em, 2vw, 1.6em);
    }

    .card__price-value {
        font-size: clamp(1em, 1.5vw, 1.3em);
    }
}