/*
 * NUPEA — Páginas individuais de conteúdo
 * Escopo: Publicações, Projetos, Eventos e Notícias.
 *
 * O arquivo não altera o cabeçalho, o rodapé, os loops ou os campos dinâmicos.
 * As declarações com !important existem somente para neutralizar estilos inline
 * dos templates legados, até que esses atributos possam ser removidos com segurança.
 */

body.single-nupea_publicacao #primary,
body.single-nupea_projeto #primary,
body.single-nupea_evento #primary,
body.single-post #primary {
    overflow: hidden;
    background: #f4f8fb;
    color: #082e4f;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.single-nupea_publicacao #primary *,
body.single-nupea_projeto #primary *,
body.single-nupea_evento #primary *,
body.single-post #primary * {
    box-sizing: border-box;
}

body.single-nupea_publicacao #primary .nupea-container,
body.single-nupea_projeto #primary .nupea-container,
body.single-nupea_evento #primary .nupea-container,
body.single-post #primary .nupea-container {
    width: min(1180px, calc(100% - 56px));
    max-width: 1180px;
    margin-inline: auto;
}

/* ==================================================
   HERO — PUBLICAÇÃO, PROJETO E EVENTO
================================================== */

body.single-nupea_publicacao #primary > header,
body.single-nupea_projeto #primary > header,
body.single-nupea_evento #primary > header {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 142px 0 76px !important;
}

body.single-nupea_publicacao #primary > header,
body.single-nupea_projeto #primary > header {
    background:
        radial-gradient(circle at 92% 20%, rgba(29, 124, 180, 0.14), transparent 27%),
        linear-gradient(135deg, #f8fbfd 0%, #e9f3f8 100%) !important;
}

body.single-nupea_publicacao #primary > header::after,
body.single-nupea_projeto #primary > header::after,
body.single-nupea_evento #primary > header::after {
    position: absolute;
    z-index: -1;
    right: -170px;
    bottom: -230px;
    width: 510px;
    height: 510px;
    border: 1px solid rgba(11, 94, 168, 0.1);
    border-radius: 50%;
    box-shadow:
        0 0 0 58px rgba(11, 94, 168, 0.035),
        0 0 0 116px rgba(11, 94, 168, 0.025);
    content: "";
    pointer-events: none;
}

body.single-nupea_evento #primary > header {
    background:
        radial-gradient(circle at 90% 16%, rgba(22, 137, 213, 0.22), transparent 28%),
        linear-gradient(135deg, #052c49 0%, #073f65 100%) !important;
}

body.single-nupea_evento #primary > header::after {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 0 58px rgba(255, 255, 255, 0.022),
        0 0 0 116px rgba(22, 137, 213, 0.025);
}

body.single-nupea_publicacao #primary > header nav,
body.single-nupea_projeto #primary > header nav,
body.single-nupea_evento #primary > header nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px !important;
    margin-bottom: 24px !important;
    font-family: inherit !important;
    font-size: 0.78rem !important;
}

body.single-nupea_publicacao #primary > header h1,
body.single-nupea_projeto #primary > header h1,
body.single-nupea_evento #primary > header h1 {
    max-width: 960px !important;
    margin: 0 0 22px !important;
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: clamp(2.35rem, 4.7vw, 4.25rem) !important;
    font-weight: 800 !important;
    line-height: 1.04 !important;
    letter-spacing: -0.05em !important;
}

body.single-nupea_publicacao #primary > header h1,
body.single-nupea_projeto #primary > header h1 {
    color: #082e4f !important;
}

body.single-nupea_evento #primary > header h1 {
    color: #ffffff !important;
}

body.single-nupea_publicacao #primary > header p,
body.single-nupea_projeto #primary > header p,
body.single-nupea_evento #primary > header p,
body.single-nupea_evento #primary > header span {
    font-family: "Inter", system-ui, sans-serif !important;
}

/* ==================================================
   CONTEÚDO E SIDEBAR — CPTs
================================================== */

body.single-nupea_publicacao #primary > .nupea-container,
body.single-nupea_projeto #primary > .nupea-container,
body.single-nupea_evento #primary > .nupea-container {
    padding-top: 76px !important;
    padding-bottom: 96px !important;
}

body.single-nupea_publicacao .nupea-single-grid,
body.single-nupea_projeto .nupea-single-grid,
body.single-nupea_evento .nupea-single-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    align-items: start;
    gap: 40px;
}

body.single-nupea_publicacao .nupea-single-grid > div,
body.single-nupea_projeto .nupea-single-grid > div,
body.single-nupea_evento .nupea-single-grid > div {
    min-width: 0;
}

body.single-nupea_publicacao .nupea-single-grid > div > section,
body.single-nupea_projeto .nupea-single-grid > div > section,
body.single-nupea_evento .nupea-single-grid > div > section {
    margin: 0 0 22px !important;
    padding: 28px;
    border: 1px solid #d8e4ec;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(8, 46, 79, 0.055);
}

body.single-nupea_publicacao .nupea-single-grid section h2,
body.single-nupea_projeto .nupea-single-grid section h2,
body.single-nupea_evento .nupea-single-grid section h2 {
    margin: 0 0 20px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid #e1e9ef !important;
    color: #082e4f !important;
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 1.28rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em;
}

body.single-nupea_publicacao .nupea-single-grid section p,
body.single-nupea_publicacao .nupea-single-grid section li,
body.single-nupea_projeto .nupea-single-grid section p,
body.single-nupea_projeto .nupea-single-grid section li,
body.single-nupea_evento .nupea-single-grid section p,
body.single-nupea_evento .nupea-single-grid section li,
body.single-nupea_publicacao .nupea-single-grid section > div,
body.single-nupea_projeto .nupea-single-grid section > div,
body.single-nupea_evento .nupea-single-grid section > div {
    color: #526a7a;
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 0.98rem;
    line-height: 1.75;
}

body.single-nupea_publicacao .nupea-single-grid section p:first-child,
body.single-nupea_projeto .nupea-single-grid section p:first-child,
body.single-nupea_evento .nupea-single-grid section p:first-child {
    margin-top: 0;
}

body.single-nupea_publicacao .nupea-single-grid section p:last-child,
body.single-nupea_projeto .nupea-single-grid section p:last-child,
body.single-nupea_evento .nupea-single-grid section p:last-child {
    margin-bottom: 0;
}

body.single-nupea_publicacao .nupea-single-grid aside,
body.single-nupea_projeto .nupea-single-grid aside,
body.single-nupea_evento .nupea-single-grid aside {
    min-width: 0;
}

body.single-nupea_publicacao .nupea-single-grid aside > div,
body.single-nupea_projeto .nupea-single-grid aside > div,
body.single-nupea_evento .nupea-single-grid aside > div {
    top: 112px !important;
    padding: 26px !important;
    border: 1px solid #d5e2ea !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 16px 36px rgba(8, 46, 79, 0.08);
}

body.single-nupea_publicacao .nupea-single-grid aside p,
body.single-nupea_publicacao .nupea-single-grid aside dt,
body.single-nupea_publicacao .nupea-single-grid aside dd,
body.single-nupea_publicacao .nupea-single-grid aside a,
body.single-nupea_publicacao .nupea-single-grid aside button,
body.single-nupea_projeto .nupea-single-grid aside p,
body.single-nupea_projeto .nupea-single-grid aside dt,
body.single-nupea_projeto .nupea-single-grid aside dd,
body.single-nupea_projeto .nupea-single-grid aside a,
body.single-nupea_evento .nupea-single-grid aside p,
body.single-nupea_evento .nupea-single-grid aside dt,
body.single-nupea_evento .nupea-single-grid aside dd,
body.single-nupea_evento .nupea-single-grid aside a {
    font-family: "Inter", system-ui, sans-serif !important;
}

body.single-nupea_publicacao .nupea-single-grid aside a,
body.single-nupea_publicacao .nupea-single-grid aside button,
body.single-nupea_projeto .nupea-single-grid aside a,
body.single-nupea_evento .nupea-single-grid aside a {
    min-height: 44px;
    border-radius: 10px !important;
}

body.single-nupea_publicacao .nupea-single-grid aside .btn-citar {
    border: 1px solid #c9d9e4;
    background: #f8fbfd;
    color: #0b5ea8;
    cursor: pointer;
}

body.single-nupea_publicacao #primary > .nupea-container > div:last-child a,
body.single-nupea_projeto #primary > .nupea-container > div:last-child a,
body.single-nupea_evento #primary > .nupea-container > div:last-child a {
    color: #0b5ea8 !important;
    font-family: "Inter", system-ui, sans-serif !important;
}

/* ==================================================
   NOTÍCIAS / POSTS INDIVIDUAIS
================================================== */

body.single-post .nupea-post-hero {
    position: relative;
    overflow: hidden;
    padding: 142px 0 76px;
    background:
        radial-gradient(circle at 91% 18%, rgba(29, 124, 180, 0.14), transparent 28%),
        linear-gradient(135deg, #f8fbfd 0%, #e9f3f8 100%);
}

body.single-post .nupea-post-hero::after {
    position: absolute;
    right: -160px;
    bottom: -220px;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(11, 94, 168, 0.1);
    border-radius: 50%;
    box-shadow:
        0 0 0 56px rgba(11, 94, 168, 0.035),
        0 0 0 112px rgba(11, 94, 168, 0.025);
    content: "";
    pointer-events: none;
}

body.single-post .nupea-page-hero__breadcrumb {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: #6c8090;
    font-size: 0.78rem;
}

body.single-post .nupea-page-hero__breadcrumb a {
    color: #0b5ea8;
    text-decoration: none;
}

body.single-post .nupea-post-hero__cat {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-bottom: 18px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #e7f3ff;
    color: #0b5ea8;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.single-post .nupea-post-hero__titulo {
    position: relative;
    z-index: 1;
    max-width: 940px;
    margin: 0;
    color: #082e4f;
    font-family: inherit;
    font-size: clamp(2.35rem, 4.7vw, 4.25rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.05em;
}

body.single-post .nupea-post-hero__meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    color: #607585;
    font-size: 0.88rem;
}

body.single-post .nupea-post-hero__meta a {
    color: #0b5ea8;
    font-weight: 700;
    text-decoration: none;
}

body.single-post .nupea-post-cover {
    width: min(1180px, calc(100% - 56px));
    margin: -34px auto 0;
}

body.single-post .nupea-post-cover__img {
    display: block;
    width: 100%;
    max-height: 540px;
    aspect-ratio: 16 / 7;
    border: 8px solid #ffffff;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 22px 48px rgba(8, 46, 79, 0.16);
}

body.single-post .nupea-post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    align-items: start;
    gap: 40px;
    padding: 76px 0 96px;
}

body.single-post .nupea-post-content,
body.single-post .nupea-sidebar-card {
    border: 1px solid #d8e4ec;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(8, 46, 79, 0.055);
}

body.single-post .nupea-post-content {
    min-width: 0;
    padding: 34px;
}

body.single-post .nupea-prose {
    color: #405a6d;
    font-size: 1rem;
    line-height: 1.8;
}

body.single-post .nupea-prose h2,
body.single-post .nupea-prose h3,
body.single-post .nupea-prose h4 {
    margin: 1.8em 0 0.7em;
    color: #082e4f;
    font-family: inherit;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

body.single-post .nupea-prose h2 {
    font-size: 1.7rem;
}

body.single-post .nupea-prose h3 {
    font-size: 1.35rem;
}

body.single-post .nupea-prose a {
    color: #0b5ea8;
}

body.single-post .nupea-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

body.single-post .nupea-post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e1e9ef;
}

body.single-post .nupea-post-tags__label {
    color: #526a7a;
    font-size: 0.82rem;
    font-weight: 700;
}

body.single-post .nupea-post-tag {
    padding: 7px 11px;
    border-radius: 999px;
    background: #eaf3ff;
    color: #0b5ea8;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
}

body.single-post .nupea-post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e1e9ef;
}

body.single-post .nupea-post-nav__link {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
    padding: 16px;
    border: 1px solid #d8e4ec;
    border-radius: 12px;
    color: #082e4f;
    text-decoration: none;
}

body.single-post .nupea-post-nav__link--next {
    text-align: right;
}

body.single-post .nupea-post-nav__dir {
    color: #0b5ea8;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.single-post .nupea-post-nav__title {
    overflow: hidden;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.4;
    text-overflow: ellipsis;
}

body.single-post .nupea-post-sidebar {
    display: grid;
    gap: 18px;
}

body.single-post .nupea-sidebar-card {
    padding: 24px;
}

body.single-post .nupea-author-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

body.single-post .nupea-author-card__avatar {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 50%;
}

body.single-post .nupea-author-card__label {
    margin: 0 0 4px;
    color: #139b55;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.single-post .nupea-author-card__name,
body.single-post .nupea-sidebar-card__titulo {
    margin: 0;
    color: #082e4f;
    font-size: 1rem;
    font-weight: 800;
}

body.single-post .nupea-author-card__bio {
    margin: 8px 0 0;
    color: #607585;
    font-size: 0.82rem;
    line-height: 1.55;
}

body.single-post .nupea-sidebar-posts {
    display: grid;
    gap: 14px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

body.single-post .nupea-sidebar-posts__item {
    padding-top: 14px;
    border-top: 1px solid #e5edf2;
}

body.single-post .nupea-sidebar-posts__link {
    color: #082e4f;
    font-size: 0.86rem;
    font-weight: 750;
    line-height: 1.42;
    text-decoration: none;
}

body.single-post .nupea-sidebar-posts__date {
    display: block;
    margin-top: 6px;
    color: #8292a0;
    font-size: 0.72rem;
}

/* ==================================================
   INTERAÇÃO E RESPONSIVIDADE
================================================== */

@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
    body.single-nupea_publicacao .nupea-single-grid > div > section,
    body.single-nupea_projeto .nupea-single-grid > div > section,
    body.single-nupea_evento .nupea-single-grid > div > section,
    body.single-post .nupea-post-content,
    body.single-post .nupea-sidebar-card {
        transition: border-color 220ms ease, box-shadow 220ms ease;
    }

    body.single-nupea_publicacao .nupea-single-grid > div > section:hover,
    body.single-nupea_projeto .nupea-single-grid > div > section:hover,
    body.single-nupea_evento .nupea-single-grid > div > section:hover,
    body.single-post .nupea-post-content:hover,
    body.single-post .nupea-sidebar-card:hover {
        border-color: rgba(11, 94, 168, 0.28);
        box-shadow: 0 18px 38px rgba(8, 46, 79, 0.085);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    body.single-nupea_publicacao #primary .nupea-container,
    body.single-nupea_projeto #primary .nupea-container,
    body.single-nupea_evento #primary .nupea-container,
    body.single-post #primary .nupea-container {
        width: min(920px, calc(100% - 48px));
    }

    body.single-nupea_publicacao #primary > header,
    body.single-nupea_projeto #primary > header,
    body.single-nupea_evento #primary > header,
    body.single-post .nupea-post-hero {
        padding-top: 126px !important;
        padding-bottom: 66px !important;
    }

    body.single-nupea_publicacao .nupea-single-grid,
    body.single-nupea_projeto .nupea-single-grid,
    body.single-nupea_evento .nupea-single-grid,
    body.single-post .nupea-post-layout {
        grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
        gap: 28px;
    }
}

@media (max-width: 767px) {
    body.single-nupea_publicacao #primary .nupea-container,
    body.single-nupea_projeto #primary .nupea-container,
    body.single-nupea_evento #primary .nupea-container,
    body.single-post #primary .nupea-container,
    body.single-post .nupea-post-cover {
        width: calc(100% - 40px);
        max-width: none;
    }

    body.single-nupea_publicacao #primary > header,
    body.single-nupea_projeto #primary > header,
    body.single-nupea_evento #primary > header,
    body.single-post .nupea-post-hero {
        padding-top: 106px !important;
        padding-bottom: 52px !important;
    }

    body.single-nupea_publicacao #primary > header h1,
    body.single-nupea_projeto #primary > header h1,
    body.single-nupea_evento #primary > header h1,
    body.single-post .nupea-post-hero__titulo {
        font-size: clamp(2rem, 10.5vw, 3rem) !important;
        line-height: 1.06 !important;
    }

    body.single-nupea_publicacao #primary > .nupea-container,
    body.single-nupea_projeto #primary > .nupea-container,
    body.single-nupea_evento #primary > .nupea-container {
        padding-top: 54px !important;
        padding-bottom: 66px !important;
    }

    body.single-nupea_publicacao .nupea-single-grid,
    body.single-nupea_projeto .nupea-single-grid,
    body.single-nupea_evento .nupea-single-grid,
    body.single-post .nupea-post-layout {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    body.single-nupea_publicacao .nupea-single-grid > div > section,
    body.single-nupea_projeto .nupea-single-grid > div > section,
    body.single-nupea_evento .nupea-single-grid > div > section {
        padding: 22px;
        border-radius: 16px;
    }

    body.single-nupea_publicacao .nupea-single-grid aside > div,
    body.single-nupea_projeto .nupea-single-grid aside > div,
    body.single-nupea_evento .nupea-single-grid aside > div {
        position: static !important;
        padding: 22px !important;
        border-radius: 16px !important;
    }

    body.single-post .nupea-post-cover {
        margin-top: -24px;
    }

    body.single-post .nupea-post-cover__img {
        max-height: 360px;
        aspect-ratio: 4 / 3;
        border-width: 5px;
        border-radius: 16px;
    }

    body.single-post .nupea-post-layout {
        padding: 54px 0 66px;
    }

    body.single-post .nupea-post-content,
    body.single-post .nupea-sidebar-card {
        border-radius: 16px;
    }

    body.single-post .nupea-post-content {
        padding: 22px;
    }

    body.single-post .nupea-post-nav {
        grid-template-columns: 1fr;
    }

    body.single-post .nupea-post-nav__link--next {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.single-nupea_publicacao .nupea-single-grid > div > section,
    body.single-nupea_projeto .nupea-single-grid > div > section,
    body.single-nupea_evento .nupea-single-grid > div > section,
    body.single-post .nupea-post-content,
    body.single-post .nupea-sidebar-card {
        transition: none;
    }
}
