/* CARDS CSS VERSION 5 */

/* === GLOBAL CARDS (UNCHANGED) === */

.card_track {
    display: grid;
    gap: 1rem;
}

.card_track.four_up {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card_track.three_up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card_track.two_up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* === HOW IT WORKS SECTION === */

.how_it_works_section {
    position: relative;
	z-index: 8;
    overflow: hidden;
    margin-top: 2.5rem;
    margin-bottom: 0;
    padding-top: 4rem;
    padding-bottom: 4rem;
	background: #e3f1f3;
	border-top: 1px solid #454545;
	border-bottom: 1px solid #454545;
    box-shadow:
        0 -6px 14px rgba(0, 0, 0, 0.12),
        0 6px 14px rgba(0, 0, 0, 0.12);
}

/* HEADER */

.how_it_works_header {
    max-width: 48rem;
}

/* TRACK */

.how_it_works_track {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* CARDS */

.how_it_works_card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100%;
    padding: 1.4rem 1.15rem 1.35rem;
    background: #111111;
    border: 2px solid #FFF;
    border-radius: 1.15rem;

    /* TIGHT + CRISP SHADOW */
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.28),
        0 2px 4px rgba(0, 0, 0, 0.18);

    text-align: center;
}


/* CONNECTOR ARROW */

.how_it_works_card::after {
    content: "";
    position: absolute;
    top: 1.8rem;
    right: -0.55rem;
    width: 1.1rem;
    height: 1.1rem;
    border-top: 2px solid rgba(212, 175, 55, 0.75);
    border-right: 2px solid rgba(212, 175, 55, 0.75);
    transform: rotate(45deg);
}

.how_it_works_card:last-child::after {
    display: none;
}

/* STEP BADGE (MORE POP) */

.how_it_works_step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    min-height: 2rem;
    padding: 0 0.9rem;
    margin-bottom: 1rem;
    border-radius: 999rem;

    background: linear-gradient(180deg, #f0d77a 0%, #d4af37 100%);
    color: #111111;

    font-size: 0.72rem;
    font-weight: var(--weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;

    /* STRONGER POP */
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

/* ICON */

.how_it_works_icon {
    width: 4.5rem;
    height: 4.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;

    border-radius: 1rem;

    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.35);

    /* SHARPER INNER FEEL */
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.05),
        0 4px 10px rgba(0,0,0,0.25);
}

.how_it_works_icon img {
    display: block;
    width: 2.2rem;
    height: 2.2rem;
    object-fit: contain;
}

/* TEXT */

.how_it_works_card h3 {
    margin: 0 0 0.6rem;
    color: #ffffff;
    font-size: 1.08rem;
    line-height: 1.2;
}

.how_it_works_card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 18rem;
}

/* FOOTER */

.how_it_works_footer {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* === RESPONSIVE === */

@media (max-width: 1200px) {
    .how_it_works_track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .how_it_works_card:nth-child(3)::after {
        display: none;
    }
}

@media (max-width: 1023px) {
    .how_it_works_track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .how_it_works_card:nth-child(3)::after,
    .how_it_works_card:nth-child(4)::after {
        display: none;
    }
}

@media (max-width: 767px) {

    .how_it_works_section {
        margin-top: 2rem;
        margin-bottom: 2rem;
        padding-top: 3rem;
        padding-bottom: 3rem;

        /* TIGHT MOBILE SHADOW */
        box-shadow:
            0 -5px 12px rgba(0, 0, 0, 0.14),
            0 5px 12px rgba(0, 0, 0, 0.14);
    }

    .how_it_works_track {
        display: grid !important;
        grid-auto-flow: column !important;
        grid-auto-columns: 84% !important;
        grid-template-columns: none !important;
        gap: 0.85rem !important;
        overflow-x: auto !important;
        padding: 0 0.15rem 0.45rem !important;
        margin: 1.25rem -0.15rem 0 !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .how_it_works_card {
        scroll-snap-align: start !important;
        padding: 1.2rem 1rem 1.1rem;
    }

    .how_it_works_card::after {
        display: none;
    }

    .how_it_works_icon {
        width: 3.8rem;
        height: 3.8rem;
    }

    .how_it_works_icon img {
        width: 1.95rem;
        height: 1.95rem;
    }

    .how_it_works_footer {
        flex-direction: column;
        margin-top: 1.15rem;
    }

    .how_it_works_footer .button {
        width: 100%;
    }
}