.rank-cards {
    margin: 128px 0;
}

.rank-cards__container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;

    &.rank-cards__container-3 {
      max-width: 1280px;
    }
    &.rank-cards__container-4 {
      max-width: 1460px;
    }
}

.rank-head h2 {
    color: black;
    text-align: center;
    font-family: Nunito, system-ui, Arial;
    font-size: 48px;
    font-weight: 700;
    line-height: 64px;
    margin: 0 0 48px;
}

.rank-head p {
    color: black;
    text-align: center;
    font-family: Nunito, system-ui, Arial;
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
    margin: 0 0 86px;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.rank-cols {
    display: grid;
    grid-template-columns: 30% 1fr;
    gap: 33px;
    margin-bottom: 48px;
    padding: 0 8px;

    &.rank-cols-3 {
      grid-template-columns: 30% 1fr 1fr;
    }
    &.rank-cols-4 {
      grid-template-columns: 20% 1fr 1fr 1fr;
    }
}

.rank-col-head {
    color: #000;
    font-family: Nunito;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.rank-row {
    border-radius: 160px;
}
.rank-item {
    display: grid;
    grid-template-columns: 40% 1fr;
    align-items: center;
    gap: 33px;
    padding: 40px 48px;

    &.rank-item-3 {
      grid-template-columns: 30% 1fr 1fr;
    }
    &.rank-item-4 {
      grid-template-columns: 20% 1fr 1fr 1fr;
    }
}
.rank-item:first-child {
    .rank-text {
        position: relative;

        span {
            z-index: 2;
            position: relative;
        }
    }
    .is-highlight .rank-text:after{
        content: "";
        position: absolute;
        top: -5px;
        left: -15px;
        width: 265.134px;
        height: 41.802px;
        background-size: contain;
        z-index: 1;
        background-image: url(../imgs/afterbanklist.svg);
        background-repeat: no-repeat;
    }
}
.rank-right.exchange .rank-text,
.rank-right.paycheck .rank-text {
  font-size: 20px;
  line-height: 24px;
  text-align: center;
  font-weight: 700;
  display: inline-block;
  position: relative;
}
.rank-row:nth-child(2n + 1) {
    background: #FFF;
    box-shadow: 0 31px 23.2px -25px #CBC7B8;
}
.rank-highlight {
    background: url(../imgs/afterbanklist.svg) no-repeat center / contain;
    background-repeat: no-repeat;
    position: absolute;
    width: 120%;
    height: 120%;
    min-height: 42px;
    min-width: 280px;
    left: 55%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.rank-row:nth-child(2n) {
    background: #F0EEE7;
}

.rank-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.rank-logo {
    display: flex;

    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.rank-logo img {
    max-width: 100%;
    height: auto;
    display: block;
    width: 80px;
    height: 80px;
}

.rank-name {
    color: #000;
    font-family: Nunito;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

.rank-right {
    position: relative;
}

.rank-text {
    color: #000;
    font-family: Nunito;
    font-size: 18px;
    font-weight: 500;
    line-height: 30px;
    margin: 0;
    text-align: left;
    margin-bottom: 0px !important;
}

.rank-text b,
.rank-text strong {
    font-weight: 700;
    color: #000;
}

.rank-right.is-highlight {
}

.rank-row + .rank-row {
    margin-top: 8px;
}


@media (max-width: 767px) {
    .rank-text:after{
        width:202px !important;
        background-image: url(../imgs/afterbanklistmobile.svg) !important;
    }
    .desktop-only {
        display: none;
    }

    .rank-logo img{
        height:60px;
        width:60px;
        margin-left:10px;
        max-width:60px !important;
        /* margin:auto !important; */
    }

    .rank-name{
        width:80px;
        text-align: center;
    }

    .mobile-only {
        display: block;
    }

    .rank-cards {
        margin: 64px 0;
    }

    .rank-head h2 {
        font-size: 28px;
        line-height: 40px;
        margin-bottom: 32px;
    }

    .rank-head p {
        font-size: 18px;
        line-height: 24px;
        margin-bottom: 80px;
        text-align: center;
    }

    .rank-list {
        gap: 12px;
        display: block;
    }

    .rank-item {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
        padding: 16px 24px 24px;
        border-radius: 24px;
        
        

        &.rank-item-3 {
          display: grid;
          grid-template-columns: 100px 300px 100px;
        }
        &.rank-item-4 {
          display: inline-grid;
          grid-template-columns: 100px 300px 180px 240px;
          align-items: center;
        }
    }

    .rank-cols {
        padding: 0 24px;
        gap: 16px !important;
        margin-bottom: 10px;

        &.rank-cols-3 {
          grid-template-columns: 100px 300px 100px;
        }
        &.rank-cols-4 {
          grid-template-columns: 100px 300px 180px 240px;
          align-items: center;

          .rank-col-head {
            justify-content: center;

            &:nth-child(3),
            &:nth-child(4) {
              text-align: center;
            }
          }
        }
    }


    .rank-text-heading {
        left: -10%;
        margin-bottom: 10px;
        position: relative;
        color: var(--Shades-Dark-Side-Rich-Black, #000);
        text-align: center;
        leading-trim: both;
        text-edge: cap;
        font-feature-settings: 'liga' off, 'clig' off;

        /* Mobile/Headline/H4 Bold */
        font-family: Nunito;
        font-size: 20px;
        font-style: normal;
        font-weight: 700;
        line-height: 28px; /* 140% */
        text-align: left;
        padding-left: 30px;
    }

    .rank-row:nth-child(2n + 1) {}
    .rank-row:nth-child(2n) {
        background: transparent;
    }
    .rank-row:nth-child(2n + 1) .rank-item {
        background: #FFF;
        border-radius: 24px;
        box-shadow: 0 31px 23.2px -25px #CBC7B8;
    }
    .rank-row:nth-child(2n) .rank-item {
        padding: 32px 20px;
        gap: 16px;
    }

    .rank-left {
        width: 80px;
        gap: 12px;
        align-items: flex-start;
    }

    .rank-logo {
        width: 69px;
        padding: 8.534px 14.184px 3.144px 14.278px;
    }

    .rank-name {
        margin-top: 12px;
        font-size: 16px;
        line-height: 24px;
    }

    .rank-right {
        width: 60%;
        padding-right: 0;
    }
    .rank-item-3 .rank-right,
    .rank-item-4 .rank-right {
      width: auto;
      text-align: center;

        &.fee {
    text-align: left;
}
    }

    .rank-right.rank-item-4.is-highlight {
        padding-right: 140px;
    }

    .rank-badge {
        position: static;
        transform: none;
        margin-top: 8px;
        font-size: 14px;
        line-height: 18px;
    }

    .rank-text {
        font-size: 16px !important;
        line-height: 24px !important;
    }

    .rank-mobil-container {
      padding:  0 16px;
      margin: 0 -16px;
      overflow: auto;
    }

    .rank-mobil-container.right {
      mask-image: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) calc(100% - 100px), rgba(0, 0, 0, 0) 100%);
    }
    .rank-mobil-container.left {
      mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100px, rgba(0, 0, 0, 1) 100%);
    }
    .rank-mobil-container.left.right {
      mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100px, rgba(0, 0, 0, 1) calc(100% - 100px), rgba(0, 0, 0, 0) 100%);
    }

    .rank-highlight {
    min-width: 200px;
}
}