/* ===== Article Figures (Inline) ===== */
.ae-figure {
    margin: 1.75rem 0;
}

.ae-figure-media {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    background: #f3f4f6;
}

.ae-figure img {
    width: 100%;
    height: auto;
    display: block;
}

.ae-figure-caption {
    margin-top: .6rem;
    font-size: .92rem;
    line-height: 1.35;
    color: #444;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ae-figure-credit {
    font-size: .85rem;
    color: #666;
    white-space: nowrap;
}

.ae-figure-credit a {
    text-decoration: none;
}

/* Default sizes for all articles */
.ae-figure-lg img {
    max-height: 420px;
    object-fit: cover;
}

.ae-figure-sm img {
    max-height: 280px;
    object-fit: cover;
}

/* BMW article: allow taller images from the 3rd figure onward */
.bmw-article .article-content figure:nth-of-type(n+3) img {
    max-height: 360px;
    object-fit: cover;
}

@media (max-width: 576px) {
    .ae-figure-credit-mobile-hidden {
        display: none !important;
    }

    .ae-figure-caption {
        font-size: .9rem;
    }
}

/* Visually hidden (a11y) */
.ae-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ===== Mini gallery (Modelos) ===== */
.ae-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
    margin: 1rem 0 1.5rem 0;
}

@media (max-width: 576px) {
    .ae-gallery {
        grid-template-columns: 1fr;
    }
}

.ae-gallery .ae-figure {
    margin: 0;
}

.ae-gallery .ae-figure-media {
    border-radius: 14px;
}

.ae-gallery .ae-figure-caption {
    margin-top: .5rem;
    font-size: .9rem;
}

/* ===== Clean inline illustration container ===== */
.ae-illustration {
    background: #f8f9fb;
    padding: 28px;
}
