.pibid-page {
    text-align: left;
}

.pibid-page [id] {
    scroll-margin-top: 24px;
}

.pibid-hero {
    min-height: 230px;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
}

.pibid-hero h1 {
    max-width: 900px;
    margin: 0;
}

.pibid-hero__subtitle {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
}

.pibid-logos {
    border-bottom: 1px solid var(--cinza2);
    background: #fff;
}

.pibid-logos__list {
    min-height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 6vw, 72px);
    padding: 24px 0;
}

.pibid-logos__item {
    width: min(210px, 28%);
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pibid-logos__item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 92px;
    object-fit: contain;
}

.pibid-layout {
    padding-top: 56px;
    padding-bottom: 72px;
}

.pibid-section {
    padding: 0 0 52px;
    margin: 0 0 52px;
    border-bottom: 2px solid var(--cinza2);
}

.pibid-section:last-child {
    margin-bottom: 0;
}

.pibid-section__title {
    position: relative;
    margin: 0 0 30px;
    padding-bottom: 14px;
    font-weight: 700;
}

.pibid-section__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 74px;
    height: 3px;
    background: var(--vermelho1);
}

.pibid-section__heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.pibid-section__heading-row > a {
    margin-top: 7px;
    color: var(--azul1);
    font-weight: 700;
    text-decoration: none;
}

.pibid-rich-text {
    font-size: 15px;
    line-height: 1.85;
}

.pibid-rich-text p:last-child,
.pibid-info-card p:last-child {
    margin-bottom: 0;
}

.pibid-external-link {
    margin-top: 18px;
}

.pibid-subproject {
    margin-top: 34px;
    padding: 32px;
    border: 1px solid var(--cinza2);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 57, 124, .07);
}

.pibid-subproject > h3 {
    margin: 0 0 22px;
    color: var(--azul1);
    font-weight: 700;
    line-height: 1.35;
}

.pibid-subproject__details {
    margin-top: 24px;
}

.pibid-info-card {
    padding: 22px;
    border-radius: 10px;
    background: #f5f7fa;
    font-size: 14px;
}

.pibid-info-card h4 {
    margin: 0 0 14px;
    color: var(--azul1);
    font-size: 16px;
    font-weight: 700;
}

.pibid-people {
    margin-top: 20px;
}

.pibid-people .accordion-button {
    color: var(--azul1);
    font-size: 15px;
    font-weight: 700;
}

.pibid-people .accordion-button:not(.collapsed) {
    color: var(--azul1);
    background: rgba(0, 57, 124, .07);
    box-shadow: none;
}

.pibid-people .accordion-button:focus {
    border-color: var(--azul2);
    box-shadow: 0 0 0 .2rem rgba(73, 150, 241, .25);
}

.pibid-name-list {
    columns: 2;
    column-gap: 32px;
    margin: 0;
    padding-left: 20px;
}

.pibid-name-list li {
    break-inside: avoid;
    margin-bottom: 6px;
}

.pibid-timeline {
    position: relative;
    padding-left: 24px;
}

.pibid-timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 18px;
    left: 5px;
    width: 2px;
    background: var(--cinza2);
}

.pibid-update {
    position: relative;
    margin-bottom: 42px;
}

.pibid-update::before {
    content: "";
    position: absolute;
    top: 7px;
    left: -24px;
    width: 12px;
    height: 12px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--vermelho1);
    box-shadow: 0 0 0 2px var(--vermelho1);
}

.pibid-update:last-child {
    margin-bottom: 0;
}

.pibid-update h3 {
    margin: 0 0 14px;
    color: var(--azul1);
    font-weight: 700;
    line-height: 1.4;
}

.pibid-update__date {
    margin: 0 0 6px;
    color: var(--vermelho1);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.pibid-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.pibid-gallery__item {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--cinza2);
    border-radius: 10px;
    background: #f5f5f5;
}

.pibid-gallery__item img {
    width: 100%;
    height: 100%;
    max-height: 430px;
    object-fit: contain;
    transition: transform .2s ease;
}

.pibid-gallery__item:hover img,
.pibid-gallery__item:focus img {
    transform: scale(1.02);
}

.pibid-gallery__item:focus-visible,
.pibid-resource-card:focus-visible,
.pibid-news-card:focus-visible,
.pibid-nav a:focus-visible {
    outline: 3px solid var(--azul2);
    outline-offset: 3px;
}

.pibid-update__caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 20px;
    margin: 10px 0 0;
    color: var(--cinza1);
    font-size: 11px;
    font-style: italic;
}

.pibid-closing-text {
    margin-top: 42px;
    padding: 26px;
    border-left: 4px solid var(--vermelho1);
    background: #f5f7fa;
}

.pibid-resource-card {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid var(--cinza2);
    border-radius: 10px;
    color: var(--azul1);
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.pibid-resource-card:hover {
    color: var(--azul1);
    border-color: var(--azul2);
    box-shadow: 0 10px 24px rgba(0, 57, 124, .09);
    transform: translateY(-2px);
}

.pibid-resource-card i {
    color: var(--vermelho1);
    font-size: 20px;
}

.pibid-resource-card span:nth-child(2) {
    flex: 1;
}

.pibid-news-card {
    height: 100%;
    display: block;
    color: inherit;
    text-decoration: none;
}

.pibid-news-card:hover {
    color: inherit;
}

.pibid-news-card__media {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 16px;
    border-radius: 10px;
    background: #f0f2f5;
}

.pibid-news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.pibid-news-card:hover .pibid-news-card__media img {
    transform: scale(1.03);
}

.pibid-news-card h3 {
    margin: 0 0 14px;
    color: var(--cinza1);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
}

.pibid-news-card time {
    color: var(--cinza1);
    font-size: 11px;
}

.pibid-empty-state {
    margin: 0;
    padding: 24px;
    border: 1px dashed #bbc2ca;
    border-radius: 10px;
    color: var(--cinza1);
    background: #f8f9fa;
}

.pibid-nav-wrap {
    position: sticky;
    top: 20px;
}

.pibid-nav {
    overflow: hidden;
    border: 1px solid var(--cinza2);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 57, 124, .08);
}

.pibid-nav a {
    display: block;
    padding: 15px 18px;
    border-bottom: 1px solid var(--cinza2);
    color: #4b4b4b;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.pibid-nav a:last-child {
    border-bottom: 0;
}

.pibid-nav a:hover,
.pibid-nav a.is-active {
    border-left: 4px solid var(--vermelho1);
    color: var(--azul1);
    background: rgba(0, 57, 124, .06);
}

.pibid-nav-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--azul1);
    font-weight: 700;
}

.pibid-nav-toggle[aria-expanded="true"] {
    border-radius: 10px 10px 0 0;
}

@media (max-width: 991.98px) {
    .pibid-layout {
        padding-top: 36px;
    }

    .pibid-nav-wrap {
        position: static;
    }

    .pibid-nav {
        border-radius: 0 0 10px 10px;
        box-shadow: none;
    }
}

@media (max-width: 767.98px) {
    .pibid-hero {
        min-height: 180px;
    }

    .pibid-logos__list {
        min-height: 0;
        gap: 16px;
        padding: 20px 0;
    }

    /* Os atalhos flutuantes globais do portal ocupam a lateral esquerda no mobile. */
    .pibid-logos .container,
    .pibid-layout {
        padding-left: 62px;
    }

    .pibid-logos__item {
        width: 30%;
        height: 68px;
    }

    .pibid-logos__item img {
        max-height: 68px;
    }

    .pibid-section {
        margin-bottom: 38px;
        padding-bottom: 38px;
    }

    .pibid-subproject {
        padding: 22px 18px;
    }

    .pibid-name-list {
        columns: 1;
    }

    .pibid-gallery {
        grid-template-columns: 1fr;
    }

    .pibid-gallery__item {
        min-height: 190px;
    }

    .pibid-section__heading-row {
        display: block;
    }

    .pibid-section__heading-row > a {
        display: inline-block;
        margin: -16px 0 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pibid-page *,
    .pibid-page *::before,
    .pibid-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
