/* UCAmI fixes: footer previous-events flag alignment and circular staff tweaks */

/* Align previous-events name and flag to the right edge using CSS Grid so all rows align by the right */
.footer .footer-links li.link-item > a {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding-right: 0; /* let the grid occupy the full width of the column */
}

/* Put the country+flag in the second column and align it to the right */
.footer .footer-links li.link-item > a > span[style],
.footer .footer-links li.link-item > a > span {
    position: static !important;
    grid-column: 2;
    justify-self: end !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    white-space: nowrap !important;
}

/* Keep flags compact and consistent */
.footer .footer-links li.link-item img.flag-icon-footer,
.committee-entry img.flag-icon-footer {
    height: 1.4em;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

@media (max-width: 600px) {
    .footer .footer-links li.link-item > a { grid-template-columns: 1fr auto; }
}

/* Align committee entries similarly so the country+flag sits at the column's right edge */
.committee-entry {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.4rem;
}
.committee-entry > span {
    position: static !important;
    grid-column: 2;
    justify-self: end !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
}

/* Make staff images consistently circular and use object-fit to avoid stretching */
.circular {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-block;
}
.circular img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Ensure logos/flags keep aspect ratio */
img.flag-icon-footer, .logo-img, .sponsor-logo { object-fit: contain; }
