.ajf-benefit-cards,
.ajf-benefit-cards * { box-sizing: border-box; }

.ajf-benefit-cards {
    --ajf-columns-desktop: 4;
    --ajf-columns-tablet: 2;
    --ajf-columns-mobile: 1;
    --ajf-hover-translate: -10px;
    --ajf-float-distance: 8px;
    --ajf-float-duration: 7s;
    --ajf-glow-color: rgba(214, 167, 75, 0.28);
    --ajf-decor-color: rgba(214, 167, 75, 0.16);
    --ajf-dot-color: rgba(214, 167, 75, 0.36);
    --ajf-show-side-arcs: yes;
    --ajf-show-top-dots: yes;
    --ajf-show-bottom-arcs: yes;
    position: relative;
    overflow: hidden;
    padding: 74px 0 120px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfbf9 100%);
}

.ajf-benefit-cards__container {
    position: relative;
    z-index: 3;
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 36px;
}

.ajf-benefit-cards__grid {
    display: grid;
    grid-template-columns: repeat(var(--ajf-columns-desktop), minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

.ajf-benefit-cards__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 440px;
    padding: 48px 30px 44px;
    background: #ffffff;
    border: 1.5px solid rgba(218, 207, 194, 0.48);
    border-radius: 28px;
    box-shadow: 0 18px 38px rgba(28, 37, 57, 0.045);
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
    isolation: isolate;
    outline: none;
}

.ajf-benefit-cards__item:hover,
.ajf-benefit-cards__item:focus-visible,
.ajf-benefit-cards__item:focus-within {
    transform: translateY(var(--ajf-hover-translate));
    box-shadow: 0 24px 56px rgba(28, 37, 57, 0.08);
}

.ajf-benefit-cards__item-icon-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 28px;
}

.ajf-benefit-cards__icon-circle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 146px;
    height: 146px;
    border-radius: 999px;
    background: rgba(248, 242, 234, 0.55);
}

.ajf-benefit-cards__icon-circle::after {
    content: "";
    position: absolute;
    inset: 14%;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.75), rgba(255,255,255,0));
    opacity: .75;
}

.ajf-benefit-cards__item-icon {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #061126;
    font-size: 74px;
    line-height: 1;
}

.ajf-benefit-cards__item-icon svg {
    width: 74px;
    height: 74px;
    fill: currentColor;
}

.ajf-benefit-cards__mini-divider {
    position: relative;
    display: block;
    width: 84px;
    height: 2px;
    margin: 0 auto 26px;
    background: rgba(214, 167, 75, 0.7);
}

.ajf-benefit-cards__mini-divider::before,
.ajf-benefit-cards__mini-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(214, 167, 75, 0.9);
}

.ajf-benefit-cards__mini-divider::before {
    left: 50%;
    width: 60px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.ajf-benefit-cards__mini-divider::after {
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .8);
}

.ajf-benefit-cards__item-title {
    margin: 0 0 20px;
    color: #061126;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 34px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.ajf-benefit-cards__item-description {
    max-width: 260px;
    margin: 0 auto;
    color: #5B6472;
    font-family: Inter, Manrope, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.62;
    font-weight: 400;
    text-wrap: pretty;
}

.ajf-benefit-cards__divider {
    position: relative;
    width: 520px;
    max-width: 100%;
    margin: 82px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.ajf-benefit-cards__divider-line {
    flex: 0 1 41%;
    height: 2px;
    background: #D6A74B;
    opacity: .9;
}

.ajf-benefit-cards__divider-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    border-radius: 999px;
    background: #ffffff;
    flex: 0 0 auto;
}

.ajf-benefit-cards__divider-logo img {
    display: block;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    object-fit: cover;
}

.ajf-benefit-cards__decor,
.ajf-benefit-cards__dots {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.ajf-benefit-cards__decor--left,
.ajf-benefit-cards__decor--right,
.ajf-benefit-cards__decor--bottom-left,
.ajf-benefit-cards__decor--bottom-right {
    width: 230px;
    height: 230px;
    border-radius: 999px;
    border: 1px solid var(--ajf-decor-color);
    box-shadow:
        0 0 0 16px rgba(214,167,75,.045),
        0 0 0 32px rgba(214,167,75,.025);
}

.ajf-benefit-cards__decor--left {
    left: -135px;
    top: 240px;
    display: block;
}

.ajf-benefit-cards__decor--right {
    right: -138px;
    top: 466px;
    display: block;
}

.ajf-benefit-cards__decor--bottom-left {
    left: -168px;
    bottom: 44px;
    width: 200px;
    height: 200px;
    opacity: .55;
}

.ajf-benefit-cards__decor--bottom-right {
    right: -170px;
    bottom: 40px;
    width: 200px;
    height: 200px;
    opacity: .55;
}

.ajf-benefit-cards__dots {
    top: 78px;
    right: 146px;
    width: 178px;
    height: 82px;
    background-image: radial-gradient(var(--ajf-dot-color) 1.4px, transparent 1.4px);
    background-size: 14px 14px;
    opacity: .42;
}

.ajf-benefit-cards--float .ajf-benefit-cards__item {
    animation: ajfBenefitFloat var(--ajf-float-duration) ease-in-out infinite;
}

.ajf-benefit-cards--float .ajf-benefit-cards__item:nth-child(2) { animation-delay: .8s; }
.ajf-benefit-cards--float .ajf-benefit-cards__item:nth-child(3) { animation-delay: 1.6s; }
.ajf-benefit-cards--float .ajf-benefit-cards__item:nth-child(4) { animation-delay: 2.4s; }

.ajf-benefit-cards--icon-glow .ajf-benefit-cards__icon-circle::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 var(--ajf-glow-color);
    animation: ajfBenefitGlow 4.8s ease-in-out infinite;
}

.ajf-benefit-cards--reveal .ajf-benefit-cards__item {
    opacity: 0;
    transform: translateY(40px);
}

.ajf-benefit-cards--reveal .ajf-benefit-cards__item.ajf-in-view {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .7s ease, transform .7s ease;
}

.ajf-benefit-cards--reveal .ajf-benefit-cards__item.ajf-in-view:nth-child(2) { transition-delay: .08s; }
.ajf-benefit-cards--reveal .ajf-benefit-cards__item.ajf-in-view:nth-child(3) { transition-delay: .16s; }
.ajf-benefit-cards--reveal .ajf-benefit-cards__item.ajf-in-view:nth-child(4) { transition-delay: .24s; }

@keyframes ajfBenefitFloat {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(calc(var(--ajf-float-distance) * -1)); }
}

@keyframes ajfBenefitGlow {
    0%,100% { box-shadow: 0 0 0 0 rgba(214,167,75,0); opacity: .1; }
    50% { box-shadow: 0 0 30px 4px var(--ajf-glow-color); opacity: 1; }
}

@media (max-width: 1024px) {
    .ajf-benefit-cards__grid { grid-template-columns: repeat(var(--ajf-columns-tablet), minmax(0, 1fr)); }
    .ajf-benefit-cards__dots { right: 60px; }
}

@media (max-width: 767px) {
    .ajf-benefit-cards {
        padding: 46px 0 84px;
    }

    .ajf-benefit-cards__container {
        padding: 0 20px;
    }

    .ajf-benefit-cards__grid {
        grid-template-columns: repeat(var(--ajf-columns-mobile), minmax(0, 1fr));
        gap: 20px;
    }

    .ajf-benefit-cards__item {
        min-height: 0;
        padding: 34px 22px 30px;
    }

    .ajf-benefit-cards__icon-circle {
        width: 116px;
        height: 116px;
    }

    .ajf-benefit-cards__item-icon,
    .ajf-benefit-cards__item-icon svg {
        font-size: 58px;
        width: 58px;
        height: 58px;
    }

    .ajf-benefit-cards__item-title { font-size: 28px; }
    .ajf-benefit-cards__item-description { font-size: 17px; max-width: none; }
    .ajf-benefit-cards__divider { width: 100%; gap: 14px; margin-top: 54px; }
    .ajf-benefit-cards__divider-logo { width: 58px; height: 58px; }
    .ajf-benefit-cards__divider-logo img { width: 46px; height: 46px; }
    .ajf-benefit-cards__decor--left,
    .ajf-benefit-cards__decor--right,
    .ajf-benefit-cards__decor--bottom-left,
    .ajf-benefit-cards__decor--bottom-right,
    .ajf-benefit-cards__dots { opacity: .5; transform: scale(.72); }
}

@media (prefers-reduced-motion: reduce) {
    .ajf-benefit-cards--float .ajf-benefit-cards__item,
    .ajf-benefit-cards--icon-glow .ajf-benefit-cards__icon-circle::before {
        animation: none !important;
    }
    .ajf-benefit-cards__item,
    .ajf-benefit-cards__item:hover,
    .ajf-benefit-cards__item:focus-visible,
    .ajf-benefit-cards__item:focus-within {
        transition: none !important;
        transform: none !important;
    }
}
