/* Accreditation Management V2 — "Your accreditation journey reimagined"
   Figma desktop: 19799-8617 | mobile: 20678-111741 */

.am-journey {
    background: linear-gradient(124.27deg, #F3F3FF 8%, #FFDAE4 104%);
    padding: 120px 20px;
    box-sizing: border-box;
}
.am-journey__inner {
    max-width: 1120px;
    margin: 0 auto;
}
h2.am-journey__title {
    margin: 0 0 64px;
    font-family: 'avenir_next_worldbold', 'Verdana';
    font-weight: normal;
    font-size: 32px;
    line-height: 40px;
    color: #333333;
    text-align: center;
}
.am-journey__card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 64px;
    box-sizing: border-box;
}

/* Head and rows share one grid so the "Toddle" column lines up with its icons.
   fr units on the two text columns keep the 384 / 96 / 448 Figma proportions
   while letting the card shrink on narrower desktops and tablets. */
.am-journey__head,
.am-journey__row {
    display: grid;
    grid-template-columns: minmax(0, 384fr) 96px minmax(0, 448fr);
    column-gap: 32px;
    align-items: center;
}
.am-journey__head {
    padding: 16px 0;
    /* Figma puts an 8px gap between the header block and the first row */
    margin-bottom: 8px;
}
.am-journey__head-col {
    font-family: 'avenir_next_worldbold', 'Verdana';
    font-weight: normal;
    font-size: 20px;
    line-height: 28px;
    color: #222222;
}
.am-journey__head-col:last-child {
    grid-column: 3;
}
.am-journey__row {
    padding: 12px 0;
}
.am-journey__cell {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
p.am-journey__text {
    margin: 0;
    font-family: 'avenir_next_worldmedium', 'Verdana';
    font-weight: normal;
    font-size: 16px;
    line-height: 28px;
    color: #222222;
}
.am-journey__cell--grind p.am-journey__text {
    color: #717171;
}
.am-journey__icon-wrap {
    display: inline-flex;
    flex-shrink: 0;
}
svg.am-journey__icon {
    display: block;
    width: 24px;
    height: 24px;
}
/* Muted icon belongs to the mobile card layout only */
.am-journey__icon-wrap--grind {
    display: none;
}

/* Dotted connector: 1px dash / 3px gap, with a chevron head, per Figma */
.am-journey__arrow {
    position: relative;
    display: block;
    width: 96px;
    height: 8px;
    align-self: center;
}
.am-journey__arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 5px;
    height: 1px;
    background-image: repeating-linear-gradient(to right, #8F8F8F 0 1px, transparent 1px 4px);
}
.am-journey__arrow::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1px;
    width: 5px;
    height: 5px;
    border-top: 1px solid #8F8F8F;
    border-right: 1px solid #8F8F8F;
    transform: translateY(-50%) rotate(45deg);
}

@media (max-width: 1024px) and (min-width: 768px) {
    .am-journey {
        padding: 96px 20px;
    }
    h2.am-journey__title {
        margin-bottom: 48px;
        font-size: 28px;
        line-height: 36px;
    }
    .am-journey__card {
        padding: 32px;
    }
    .am-journey__head,
    .am-journey__row {
        grid-template-columns: minmax(0, 384fr) 64px minmax(0, 448fr);
        column-gap: 20px;
    }
    .am-journey__arrow {
        width: 64px;
    }
    .am-journey__head-col {
        font-size: 18px;
        line-height: 26px;
    }
    p.am-journey__text {
        font-size: 15px;
        line-height: 24px;
    }
}

/* Mobile: two stacked columns of cards, muted icon replaces the connector */
@media (max-width: 767px) {
    .am-journey {
        background: linear-gradient(163.58deg, #F3F3FF 0%, #FFDAE4 100%);
        padding: 64px 16px;
    }
    h2.am-journey__title {
        margin-bottom: 32px;
        font-size: 28px;
        line-height: 36px;
    }
    /* The card wrapper is a desktop-only surface; on mobile each cell is its own card */
    .am-journey__card {
        background: none;
        border-radius: 0;
        padding: 0;
    }
    .am-journey__head {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
        padding: 0 0 16px;
        margin-bottom: 0;
    }
    .am-journey__head-col {
        font-size: 16px;
        line-height: 24px;
        color: #333333;
        text-align: center;
    }
    .am-journey__head-col:last-child {
        grid-column: 2;
    }
    .am-journey__rows {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .am-journey__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
        align-items: stretch;
        padding: 0;
    }
    .am-journey__cell {
        flex-direction: column;
        align-items: flex-end;
        justify-content: space-between;
        gap: 8px;
        background: #ffffff;
        border-radius: 8px;
        padding: 16px;
    }
    p.am-journey__text {
        width: 100%;
        font-size: 16px;
        line-height: 24px;
    }
    /* Text always sits above the icon, whatever the desktop source order is */
    .am-journey__cell--toddle p.am-journey__text {
        order: -1;
    }
    .am-journey__icon-wrap--grind {
        display: inline-flex;
    }
    svg.am-journey__icon {
        width: 25.6px;
        height: 25.6px;
    }
    .am-journey__arrow {
        display: none;
    }
}
