/* ── Logo Manager — Frontend Styles v1.4 ── */

/* ─────────────────────────────────────────
   GRID — Flexbox with no empty cells
───────────────────────────────────────── */
.lgm-logos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;

    /* ── Choose your alignment ── */
    justify-content: center;       /* Option A: centered (default) */
    /* justify-content: space-between; */  /* Option B: spread across */
    /* justify-content: flex-end; */      /* Option C: align right */
}

/* ─────────────────────────────────────────
   ITEM — width respects columns
───────────────────────────────────────── */
.lgm-logo-item {
    flex: 0 0 calc((100% - (var(--lgm-cols, 5) - 1) * 18px) / var(--lgm-cols, 5));
    max-width: calc((100% - (var(--lgm-cols, 5) - 1) * 18px) / var(--lgm-cols, 5));
    display: flex;
    flex-direction: column;
}

/* ─────────────────────────────────────────
   LINK
───────────────────────────────────────── */
.lgm-logo-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    overflow: visible;
    transition: transform .18s ease, box-shadow .18s ease;
}
.lgm-logo-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.13);
}

/* ─────────────────────────────────────────
   LOGO CANVAS
───────────────────────────────────────── */
.lgm-logo-box {
    background: #ffffff;
    border: 1px solid #dde3ec;
    border-radius: 6px;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: border-color .18s, box-shadow .18s;
    overflow: hidden;
}
.lgm-logo-link:hover .lgm-logo-box {
    border-color: #b8b8b8;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* ─────────────────────────────────────────
   INNER WRAPPER
───────────────────────────────────────── */
.lgm-logo-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 14% !important;
    box-sizing: border-box !important;
}

/* Logo image */
.lgm-logo-inner img,
.lgm-logo-box img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}

/* ─────────────────────────────────────────
   NO-LOGO FALLBACK
───────────────────────────────────────── */
.lgm-no-logo {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #bbb;
    text-align: center;
    line-height: 1.4;
    padding: 14%;
}

/* ─────────────────────────────────────────
   ORG NAME
───────────────────────────────────────── */
.lgm-logo-name {
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #666;
    text-align: center;
    padding: 7px 4px 2px;
    line-height: 1.3;
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1024px) {
    .lgm-logos-grid {
        gap: 18px;
    }
    .lgm-logo-item {
        flex: 0 0 calc((100% - (3 * 18px)) / 4);
        max-width: calc((100% - (3 * 18px)) / 4);
    }
}
@media (max-width: 768px) {
    .lgm-logos-grid {
        gap: 12px;
    }
    .lgm-logo-item {
        flex: 0 0 calc((100% - (2 * 12px)) / 3);
        max-width: calc((100% - (2 * 12px)) / 3);
    }
}
@media (max-width: 480px) {
    .lgm-logos-grid {
        gap: 10px;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }
    .lgm-logo-item {
        flex: 0 0 calc((100% - (var(--lgm-mobile-cols, 1) - 1) * 10px) / var(--lgm-mobile-cols, 1));
        max-width: calc((100% - (var(--lgm-mobile-cols, 1) - 1) * 10px) / var(--lgm-mobile-cols, 1));
    }
    .lgm-logo-inner {
        padding: 7% !important;
    }
}

/* ─────────────────────────────────────────
   PROFILE PAGE
───────────────────────────────────────── */
.lgm-org-description p {
    margin: 0 0 1.1em;
    line-height: 1.85;
}
.lgm-org-description p:last-child { margin-bottom: 0; }
.lgm-org-description ul,
.lgm-org-description ol {
    margin: 0 0 1.1em 1.4em;
    line-height: 1.8;
}
.lgm-org-description a {
    color: #1a5c54;
    text-decoration: underline;
}