/* =====================================================================
 * components/about-collage.css — scattered, overlapping 5-photo cluster
 * used as a visual lead-in above the About heading on the country program
 * pages (Indonesia / Malaysia). Markup: views/partials/about-collage.php.
 *
 * Look: rounded photo cards in a thin white frame with a soft drop shadow,
 * each rotated a small varying angle and OVERLAPPING its neighbours (via
 * negative margins + z-index) for depth — the centre card (card 3) is
 * larger and sits on top. Mobile keeps only the centre three (cards 1 + 5
 * hidden) at a smaller scale, same rotated/overlapping style.
 *
 * No hex literals — design tokens + color-mix() only.
 * ===================================================================== */

.about-collage {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 56rem;
    margin: 0 auto var(--space-7);
    /* Headroom so the rotated top corners are not clipped by the section. */
    padding-top: var(--space-4);
}

.about-collage__card {
    position: relative;          /* enable z-index stacking */
    flex: 0 0 auto;
    width: 11rem;
    /* Thin white frame: the card surface shows as a border around the photo
     * (padding) plus a hairline edge. Surface-elevated is white in light mode. */
    padding: var(--space-2);
    background-color: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.about-collage__img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius-md);
    background-color: var(--color-surface);   /* tint before the photo loads */
}

/* --- Scatter: rotation + overlap + stacking ---------------------------
 * Outer cards (1, 5) sit lowest and rotate most; they tuck UNDER their
 * inner neighbours via negative margins pulling the cluster together. The
 * centre card (3) is largest, nearly upright, and on top. */
.about-collage__card--1 {
    transform: rotate(-7deg) translateY(0.5rem);
    margin-right: calc(var(--space-5) * -1);
    z-index: 1;
}
.about-collage__card--2 {
    transform: rotate(4deg) translateY(-0.25rem);
    margin-right: calc(var(--space-4) * -1);
    z-index: 2;
}
.about-collage__card--3 {
    width: 13rem;                /* centre card — larger / more prominent */
    transform: rotate(-2deg);
    box-shadow: var(--shadow-lg);
    z-index: 3;
}
.about-collage__card--4 {
    transform: rotate(5deg) translateY(-0.25rem);
    margin-left: calc(var(--space-4) * -1);
    z-index: 2;
}
.about-collage__card--5 {
    transform: rotate(-6deg) translateY(0.5rem);
    margin-left: calc(var(--space-5) * -1);
    z-index: 1;
}

/* --- Mobile (<1024px): centre three only ------------------------------
 * Hide the outermost cards (1, 5); keep about-2 / about-3 / about-4 in the
 * same overlapping, rotated style, scaled down with gentler overlap so the
 * trio fits a narrow screen and stays centred above the heading. The hidden
 * imgs stay in the DOM (loading="lazy") — they simply do not render. */
@media (max-width: 1023.98px) {
    .about-collage__card--1,
    .about-collage__card--5 {
        display: none;
    }

    .about-collage__card  { width: 7.5rem; }
    .about-collage__card--3 { width: 9rem; }

    .about-collage__card--2 { margin-right: calc(var(--space-3) * -1); }
    .about-collage__card--4 { margin-left: calc(var(--space-3) * -1); }
}
