/*
 * AEvent homepage — Solutions (light editorial, 8 nhóm dịch vụ, lưới 2 hàng × 4 cột).
 * Chỉ áp dụng cho `.ae-sol` / `.ae-sol-card`; nạp sau homepage.css.
 * Container dùng cùng quy tắc lề với hero-light.css để các section thẳng hàng.
 *
 * Lưới: 4 cột (≥1280px) — 2 hàng × 4 card cùng kích thước.
 *       2 cột (768–1279px), 1 cột (<768px). Không dùng carousel.
 */

.ae-sol {
    --sl-bg: #ffffff;
    --sl-card: #faf8f6;
    --sl-line: #e8e5e2;
    --sl-ink: #171927;
    --sl-muted: #555760;
    --sl-orange: var(--ae-orange, #ff6600);
    --sl-orange-hover: var(--ae-orange-hover, #e85c00);
    --sl-pad-x: 22px;
    --sl-media-h: 200px;

    padding: 52px 0;
    background: var(--sl-bg);
    color: var(--sl-ink);
    overflow-x: clip;
}

.ae-sol__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    width: min(100% - 2 * var(--sl-pad-x), 1680px);
    margin-inline: auto;
}

/* ——— Đầu section: tiêu đề trái, mô tả + CTA phải ——— */
.ae-sol__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    min-width: 0;
}
.ae-sol__intro,
.ae-sol__aside {
    min-width: 0;
}
.ae-sol__eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sl-ink);
}
.ae-sol__slash {
    display: block;
    flex-shrink: 0;
    width: 6px;
    height: 16px;
    background: var(--sl-orange);
    transform: skewX(-23deg);
}
.ae-sol__title {
    max-width: 780px;
    margin: 0;
    font-size: clamp(30px, 8.4vw, 34px);
    font-weight: 800;
    font-style: italic;
    line-height: 1.15;
    letter-spacing: -0.035em;
    text-transform: none;
    text-wrap: balance;
    color: var(--sl-ink);
}
.ae-sol__desc {
    max-width: 560px;
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.7;
    letter-spacing: 0;
    color: var(--sl-muted);
}
.ae-sol__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--sl-ink);
    text-decoration: none;
    transition: color 200ms ease;
}
.ae-sol__cta span {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}
.ae-sol__cta svg {
    flex-shrink: 0;
    width: 19px;
    height: 19px;
    transition: transform 200ms ease;
}
.ae-sol__cta:hover,
.ae-sol__cta:focus-visible {
    color: var(--sl-orange);
}
.ae-sol__cta:hover svg,
.ae-sol__cta:focus-visible svg {
    transform: translate(2px, -2px);
}

/* ——— Bento grid ——— */
.ae-sol__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    min-width: 0;
}

.ae-sol-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--sl-line);
    border-radius: 14px;
    background: var(--sl-card);
    color: var(--sl-ink);
    text-decoration: none;
}
.ae-sol-card:focus-visible {
    outline: 2px solid var(--sl-orange);
    outline-offset: 3px;
}

/* Chỉ ảnh phóng to; wrapper cắt tràn nên card, chữ, icon, mũi tên và card bên cạnh đứng yên */
.ae-sol-card__media {
    flex-shrink: 0;
    height: var(--sl-media-h);
    overflow: hidden;
    background: #ece7e1;
}
.ae-sol-card__media picture {
    display: block;
    width: 100%;
    height: 100%;
}
.ae-sol-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--sol-pos, center);
    transform: scale(1);
    transform-origin: center;
    transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (hover: hover) and (pointer: fine) {
    .ae-sol-card:hover .ae-sol-card__media img {
        transform: scale(1.08);
    }
}
.ae-sol-card:focus-visible .ae-sol-card__media img {
    transform: scale(1.08);
}

/* Thông tin: icon + mũi tên cùng một hàng, tiêu đề, mô tả. flex:1 để các card cùng hàng bằng chiều cao */
.ae-sol-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}
.ae-sol-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.ae-sol-card__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    color: var(--sl-orange);
}
.ae-sol-card__arrow {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(255, 102, 0, 0.32);
    border-radius: 50%;
    background: transparent;
    color: var(--sl-orange);
    transition:
        background-color 200ms ease,
        border-color 200ms ease,
        color 200ms ease;
}
.ae-sol-card__arrow svg {
    width: 17px;
    height: 17px;
}
.ae-sol-card:hover .ae-sol-card__arrow,
.ae-sol-card:focus-visible .ae-sol-card__arrow {
    background: var(--sl-orange);
    border-color: var(--sl-orange);
    color: #fff;
}
.ae-sol-card__title {
    margin: 16px 0 0;
    font-size: 22px;
    font-weight: 800;
    font-style: normal;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--sl-ink);
}
.ae-sol-card__desc {
    margin: 8px 0 0;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.6;
    letter-spacing: 0;
    color: var(--sl-muted);
}

/* ——— Breakpoints (lề đồng bộ với hero-light.css) ——— */

/* Tablet 768–1279: 2 cột; Event Management trải full hàng đầu */
@media (min-width: 768px) {
    .ae-sol {
        --sl-pad-x: 36px;
        --sl-media-h: 220px;
        padding: 64px 0;
    }
    .ae-sol__inner {
        gap: 40px;
    }
    .ae-sol__title {
        font-size: 36px;
    }
    .ae-sol__desc {
        font-size: 17px;
    }
    .ae-sol__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}
@media (min-width: 1024px) {
    .ae-sol {
        --sl-pad-x: 44px;
        padding: 72px 0;
    }
    /* Tiêu đề trái, mô tả + CTA phải */
    .ae-sol__head {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        column-gap: 64px;
        align-items: end;
    }
    .ae-sol__aside {
        justify-self: end;
        max-width: 560px;
    }
}

/* Desktop ≥1280: 4 cột Bento */
@media (min-width: 1280px) {
    .ae-sol {
        --sl-pad-x: 72px;
        padding: 80px 0;
    }
    .ae-sol__inner {
        gap: 48px;
    }
    .ae-sol__title {
        font-size: 40px;
    }
    .ae-sol__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-auto-rows: 1fr; /* 2 hàng cao bằng nhau */
    }
}

@media (min-width: 1600px) {
    .ae-sol {
        --sl-pad-x: 120px;
        padding: 96px 0;
    }
    .ae-sol__title {
        font-size: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ae-sol-card__media img,
    .ae-sol-card__arrow,
    .ae-sol__cta,
    .ae-sol__cta svg {
        transition: none;
    }
    .ae-sol-card:hover .ae-sol-card__media img,
    .ae-sol-card:focus-visible .ae-sol-card__media img {
        transform: none;
    }
    .ae-sol__cta:hover svg,
    .ae-sol__cta:focus-visible svg {
        transform: none;
    }
}
