@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

.aafe-icon-cards-wrapper h1,
.aafe-icon-cards-wrapper h2,
.aafe-icon-cards-wrapper h3,
.aafe-icon-cards-wrapper h4,
.aafe-icon-cards-wrapper h5,
.aafe-icon-cards-wrapper h6 {
    font-family: 'Sora', sans-serif;
}
.aafe-icon-cards-wrapper p,
.aafe-icon-cards-wrapper span,
.aafe-icon-cards-wrapper li,
.aafe-icon-cards-wrapper a,
.aafe-icon-cards-wrapper .aafe-icon-cards__desc,
.aafe-icon-cards-wrapper .aafe-icon-cards__body-text {
    font-family: 'Inter', sans-serif;
}

.aafe-icon-cards-wrapper {
    background-color: #E8E8E3;
    padding: 64px 40px;
    box-sizing: border-box;
    width: 100%;
}

.aafe-icon-cards-wrapper * {
    transition-duration: var(--aafe-transition, 300ms);
}

.aafe-icon-cards-wrapper[data-hover="lift"] .aafe-icon-cards__card:hover,
.aafe-icon-cards-wrapper[data-hover="lift"] .aafe-icon-cards__card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.aafe-icon-cards-wrapper[data-hover="scale"] .aafe-icon-cards__card:hover,
.aafe-icon-cards-wrapper[data-hover="scale"] .aafe-icon-cards__card:focus-within {
    transform: scale(var(--aafe-hover-scale, 1.03));
}
.aafe-icon-cards-wrapper[data-hover="glow"] .aafe-icon-cards__card:hover,
.aafe-icon-cards-wrapper[data-hover="glow"] .aafe-icon-cards__card:focus-within {
    box-shadow: 0 0 0 3px var(--aafe-glow-color, #4F46E5),
    0 8px 30px rgba(79,70,229,0.25);
}
.aafe-icon-cards-wrapper[data-hover="shine"] .aafe-icon-cards__card {
    position: relative;
}
.aafe-icon-cards-wrapper[data-hover="shine"] .aafe-icon-cards__card::after {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: none;
    pointer-events: none;
    z-index: 10;
}
.aafe-icon-cards-wrapper[data-hover="shine"] .aafe-icon-cards__card:hover::after,
.aafe-icon-cards-wrapper[data-hover="shine"] .aafe-icon-cards__card:focus-within::after {
    left: 125%;
    transition: left var(--aafe-transition, 600ms) ease;
}

.aafe-icon-cards__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 48px;
}

.aafe-icon-cards__section-icon {
    width: 52px;
    height: 52px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.aafe-icon-cards__section-icon i {
    font-size: 24px;
    color: #1A3C34;
    line-height: 1;
}

.aafe-icon-cards__section-icon svg {
    width: 24px;
    height: 24px;
    fill: #1A3C34;
}

.aafe-icon-cards__heading {
    font-family: "Sora", sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: #1A3C34;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    text-align: center;
}

.aafe-icon-cards__grid {
    display: grid;
    gap: 24px;
    align-items: stretch;
}

.aafe-icon-cards__card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 300ms ease;
    cursor: default;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
    border: none;
}

/* Stretched link for card */
.aafe-icon-cards__title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.aafe-icon-cards__card:hover {
    /* Lift is handled by data-hover="lift" now or standard card hover if no data-hover */
}

.aafe-icon-cards__image-wrap {
    width: 100%;
    height: 240px;
    background: #F5F5F2;
    overflow: hidden;
    position: relative;
    border-start-start-radius: 16px;
    border-start-end-radius: 16px;
    border-end-start-radius: 0;
    border-end-end-radius: 0;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.aafe-icon-cards__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
}

.aafe-icon-cards__body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.aafe-icon-cards__title {
    font-family: "Sora", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 10px 0;
    padding: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.aafe-icon-cards__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.aafe-icon-cards__title a:hover {
    color: #1DB993;
}

.aafe-icon-cards__desc {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    line-height: 1.65;
    color: #555555;
    margin: 0;
    padding: 0;
    flex: 1;
    transition: color 0.3s ease;
}

.aafe-icon-cards__btn-wrap {
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.aafe-icon-cards__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1A3C34;
    background: transparent;
    text-decoration: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.aafe-icon-cards__btn:hover {
    color: #ffffff;
    background: #1A3C34;
}

.aafe-icon-cards__btn-text {
    display: inline-block;
}

.aafe-icon-cards__btn-icon {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.aafe-icon-cards__btn-icon i {
    font-size: 14px;
    line-height: 1;
}

.aafe-icon-cards__btn-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.aafe-icon-cards__btn:hover .aafe-icon-cards__btn-icon,
.aafe-icon-cards__btn:focus-visible .aafe-icon-cards__btn-icon {
    transform: translateX(3px);
}

/* AAFE IMPROVEMENT: RTL Support */
[dir="rtl"] .aafe-icon-cards__btn:hover .aafe-icon-cards__btn-icon,
[dir="rtl"] .aafe-icon-cards__btn:focus-visible .aafe-icon-cards__btn-icon {
    transform: translateX(-3px);
}

@media (max-width: 768px) {
    .aafe-icon-cards-wrapper { padding: 48px 20px; }
    .aafe-icon-cards__grid { grid-template-columns: 1fr; }
    .aafe-icon-cards__image-wrap { height: 200px; }
}
