/* =====================================================================
   About page (/about, pages/about.py). Colours and base styles: assets/theme.css.
   One card per topic (how to cite, then the projects, latest first); inside each card one row per
   item: the label on the left, the names / text on the right.
   ===================================================================== */
.nma-about {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - 130px);
    padding: 1.5em clamp(16px, 4vw, 56px) 3em;
    background: var(--c-canvas);
}

.nma-about .ui-hero.about-hero {
    width: 100%;
    max-width: none;
    margin: 0 0 1.1em;
}

.nma-about .ui-card.about-card {
    width: 100%;
    margin: 0 0 1em;
    padding: 1.1em 1.5em 0.6em;
    border-top: 4px solid var(--c-primary);
}

.nma-about .about-card-current {
    border-top-color: var(--c-accent) !important;
}

.nma-about .about-card-cite {
    border-top-color: var(--c-primary-dark) !important;
}

.nma-about .about-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4em 0.9em;
    margin-bottom: 0.4em;
}

.nma-about .about-card-title {
    margin: 0;
    font-size: 1.25em;
    font-weight: 700;
    color: var(--c-ink);
}

.nma-about .about-row {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 0.3em 1.4em;
    align-items: baseline;
    padding: 0.65em 0;
    border-top: 1px solid var(--c-border);
}

.nma-about .about-label {
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--c-primary-dark);
}

.nma-about .about-people,
.nma-about .about-text,
.nma-about .about-ref {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--c-ink);
}

.nma-about .about-ref-title {
    font-weight: 600;
    color: var(--c-ink);
    text-decoration: none;
}

.nma-about .about-ref-title:hover {
    color: var(--c-primary-dark);
    text-decoration: underline;
}

.nma-about .about-link {
    color: var(--c-primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

@media (max-width: 720px) {
    .nma-about .about-row {
        grid-template-columns: 1fr;
    }
}

/* funding: the funder's logo next to the text */
.nma-about .about-funding {
    display: flex;
    align-items: center;
    gap: 1em;
}

.nma-about .about-funder-logo {
    flex: none;
    height: 46px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    padding: 4px 8px;
}

.nma-about img.about-funder-logo[src*="funder_eu"] {
    padding: 0;
    height: 40px;
    border-radius: 4px;
}

@media (max-width: 720px) {
    .nma-about .about-funding {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* the ERC logo is square: taller so it stays readable */
.nma-about img.about-funder-logo[src*="funder_erc"] {
    height: 72px;
    padding: 4px;
}

/* funding rows: label centred on the logo */
.nma-about .about-row:has(.about-funding) {
    align-items: center;
}

/* several logos for one funding line (e.g. EU flag + programme logo) */
.nma-about .about-funder-logos {
    display: flex;
    align-items: center;
    gap: 0.6em;
    flex: none;
}

.nma-about img.about-funder-logo[src*="funder_msca"] {
    height: 72px;
    padding: 4px;
}

/* title card: short description and the netmeta reference */
.nma-about .about-intro {
    margin: 0.5em 0 0.4em;
    font-size: 1em;
    color: var(--c-ink);
}

.nma-about .about-hero-ref {
    margin: 0;
    padding-left: 0.8em;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--c-ink-muted);
    border-left: 3px solid var(--c-border);
}

/* title card texts use the full width */
.nma-about .about-hero .ui-hero-text,
.nma-about .about-intro {
    max-width: none !important;
}

.nma-about .about-intro + .about-hero-ref {
    margin-bottom: 0.3em;
}

.nma-about .about-hero-ref + .about-intro {
    margin-top: 0.9em;
}

/* institutions: logos at the bottom of the page */
.nma-about .ui-card.about-institutions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5em 4em;
    margin: 1.4em 0 0;
    padding: 1.4em 2em;
    background: #fff;
}

.nma-about .about-inst-logo {
    height: 64px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
}

/* "powered by NREC": its own line under the institution logos */
.nma-about .about-hosting {
    flex-basis: 100%;
    margin: 0.4em 0 0;
    padding-top: 0.9em;
    font-size: 14px;
    text-align: center;
    color: var(--c-ink-muted);
    border-top: 1px solid var(--c-border);
}

.nma-about .about-hosting .about-link {
    font-weight: 700;
}

/* "netmeta:" label in front of its reference in the title card */
.nma-about .about-hero-ref-label {
    font-weight: 700;
    color: var(--c-primary-dark);
}

/* rows: label and content centred vertically (e.g. a label on two lines) */
.nma-about .about-row {
    align-items: center !important;
}

/* a logo on the right of a card title (e.g. NMA-KIT) */
.nma-about .about-card-logo {
    height: 72px;
    width: auto;
    margin-left: auto;
}
