/* Fix overflowing galley links on Full Issue / issue TOC */
.galleys .galleys_links,
.galleys_links.flex {
    display: flex !important;
    flex-wrap: wrap !important;        /* This is the main fix */
    gap: 10px !important;              /* nice spacing between boxes */
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Make each individual galley link box wrap nicely */
.galleys_links.flex li,
.galleys .galleys_links li {
    flex: 1 1 300px !important;        /* grow but wrap to new line */
    min-width: 280px !important;       /* adjust if you want smaller/larger boxes */
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Extra safety for the whole section */
.obj_issue_toc .galleys,
.galleys {
    max-width: 100% !important;
    word-break: break-word;
}


/* === Center the issue cover image === */
.obj_issue_toc .cover,
div.cover,
.obj_issue_toc img[alt*="Issue"],
.obj_issue_toc .heading > div.cover {
    display: block !important;
    margin: 0 auto 25px auto !important;   /* centers the image + adds space below */
    max-width: 100% !important;            /* responsive */
    height: auto !important;
    text-align: center !important;
}

/* Force image itself to be centered if wrapped in link */
.obj_issue_toc .cover img,
.cover img {
    display: block !important;
    margin: 0 auto !important;
}

/* === Description text: left-aligned and clearly below the image === */
.obj_issue_toc .description,
div.description {
    clear: both !important;                /* prevents floating beside image */
    padding-top: 10px !important;
    text-align: left !important;           /* keeps text left-aligned */
    max-width: 100% !important;
}

/* Optional: Center the issue title if you want */
.obj_issue_toc .heading h1,
.obj_issue_toc h1 {
    text-align: center !important;
}
