.ae-home {
    padding: 20px 28px 88px;
    min-height: calc(100vh - 110px);
}

/* Main layout:
   WAE full width
   HAE / FAE side by side
   WAE-Repeats centered below
*/
.ae-grid {
    max-width: 1480px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    grid-template-areas:
        "wae wae"
        "hae fae"
        "repeat repeat";
    gap: 28px;
}

.ae-card-wae {
    grid-area: wae;
}

.ae-card-hae {
    grid-area: hae;
}

.ae-card-fae {
    grid-area: fae;
}

.ae-card-repeat {
    grid-area: repeat;
    width: min(100%, 1120px);
    justify-self: center;
}

/* Card */
.ae-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(12, 40, 80, 0.14);
    box-shadow: 0 18px 44px rgba(12, 40, 80, 0.10);
    color: inherit;
    text-decoration: none !important;
    cursor: pointer;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}

.ae-card:hover {
    transform: translateY(-5px);
    border-color: rgba(13, 110, 253, 0.38);
    box-shadow: 0 26px 64px rgba(12, 40, 80, 0.16);
    color: inherit;
}

.ae-card-wae {
    border: 2px solid rgba(13, 110, 253, 0.38);
    box-shadow: 0 26px 76px rgba(13, 110, 253, 0.18);
}

/* Featured ribbon */
.ae-feature-label {
    position: absolute;

    top: 18px;
    right: 18px;

    width: auto;

    padding: 8px 16px;

    border-radius: 999px;

    background: #0d6efd;

    color: white;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;

    transform: none;

    z-index: 10;
}

/* Header */
.ae-card-header {
    min-height: 124px;
    padding: 24px 30px 22px;
    color: #ffffff;
}

.ae-card-wae .ae-card-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    min-height: 132px;
    padding: 28px 36px 24px;
}

.ae-card-header h2 {
    margin: 6px 0 3px;
    font-size: clamp(42px, 3.5vw, 58px);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -1.2px;
}

.ae-card-wae .ae-card-header h2 {
    font-size: clamp(64px, 5vw, 88px);
}

.ae-card-repeat .ae-card-header h2 {
    font-size: clamp(34px, 3vw, 50px);
}

.ae-card-header p {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    opacity: 0.95;
}

.ae-organism {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ae-card-summary {
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 15px;
    font-weight: 750;
    white-space: nowrap;
}

/* Themes */
.wae-header {
    background: linear-gradient(135deg, #063b7a, #0d6efd 56%, #168052);
}

.hae-header {
    background: linear-gradient(135deg, #0b4ea2, #1a91d1);
}

.fae-header {
    background: linear-gradient(135deg, #d85b00, #ff8a1d);
}

.repeat-header {
    background: linear-gradient(135deg, #7a2e00, #e85d04 55%, #102a4c);
}

/* Image */
.ae-img-box {
    padding: 14px;
    background: linear-gradient(180deg, #ffffff, #f3f7fc);
    border-bottom: 1px solid rgba(12, 40, 80, 0.08);
}

.ae-img-box img {
    display: block;
    width: 100%;
    height: clamp(250px, 33vh, 370px);
    object-fit: contain;
    border-radius: 16px;
    background: #ffffff;
}

.ae-wae-img img {
    height: clamp(340px, 48vh, 530px);
}

.ae-repeat-img img {
    height: clamp(280px, 36vh, 430px);
}

/* Body */
.ae-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px 30px 26px;
}

.ae-wae-body {
    display: grid;
    grid-template-columns: 1.5fr 1fr 180px;
    gap: 22px;
    align-items: center;
}

.ae-card-body h3 {
    margin: 0 0 9px;
    color: #102a4c;
    font-size: 21px;
    font-weight: 850;
    line-height: 1.32;
}

.ae-card-wae .ae-card-body h3 {
    font-size: 26px;
}

.ae-card-body p {
    margin: 0 0 16px;
    color: #5c6878;
    font-size: 15px;
    line-height: 1.58;
}

.ae-wae-body p {
    margin-bottom: 0;
}

.ae-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.ae-tag-row span {
    padding: 6px 11px;
    border-radius: 999px;
    background: #edf4ff;
    color: #0b4ea2;
    font-size: 12px;
    font-weight: 750;
}

/* WAE stats */
.ae-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0;
}

.ae-stat-row div {
    padding: 13px 8px;
    border-radius: 16px;
    border: 1px solid rgba(13, 110, 253, 0.16);
    background: linear-gradient(180deg, #f1f7ff, #ffffff);
    text-align: center;
}

.ae-stat-row strong {
    display: block;
    color: #0b4ea2;
    font-size: 25px;
    line-height: 1;
}

.ae-stat-row span {
    display: block;
    margin-top: 6px;
    color: #586575;
    font-size: 12px;
    font-weight: 750;
}

/* Button-like CTA */
.ae-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    width: 100%;
    border-radius: 14px;
    background: #102a4c;
    color: #ffffff;
    font-size: 15px;
    font-weight: 850;
    transition: 0.2s ease;
}

.ae-card:hover .ae-btn {
    background: #0d6efd;
}

.ae-btn-primary {
    min-height: 52px;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    font-size: 16px;
}

.ae-card:hover .ae-btn-primary {
    background: linear-gradient(135deg, #0b5ed7, #084298);
}

/* Responsive */
@media (max-width: 1100px) {
    .ae-grid {
        max-width: 880px;
        grid-template-columns: 1fr;
        grid-template-areas:
            "wae"
            "hae"
            "fae"
            "repeat";
    }

    .ae-card-repeat {
        width: 100%;
    }

    .ae-card-wae .ae-card-header {
        display: block;
    }

    .ae-card-summary {
        display: inline-block;
        margin-top: 14px;
        white-space: normal;
    }

    .ae-wae-body {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .ae-img-box img,
    .ae-wae-img img,
    .ae-repeat-img img {
        height: auto;
        max-height: 560px;
    }
}

@media (max-width: 576px) {
    .ae-home {
        padding: 96px 14px 84px;
    }

    .ae-grid {
        gap: 22px;
    }

    .ae-card-header,
    .ae-card-wae .ae-card-header,
    .ae-card-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .ae-card-header {
        min-height: 112px;
    }

    .ae-card-wae .ae-card-header h2 {
        font-size: 56px;
    }

    .ae-card-header h2,
    .ae-card-repeat .ae-card-header h2 {
        font-size: 38px;
    }

    .ae-stat-row {
        grid-template-columns: 1fr;
    }
}
