/* =========================================================
   HIFEM — PUBLICAÇÕES
   Página principal de publicações, categorias, listas e PDFs
   ========================================================= */

@import "./global.css";

/* =========================================================
   CATEGORIAS — PÁGINA PRINCIPAL DE PUBLICAÇÕES
   Usado em publicacoes.html com .pub-grid e .pub-card
   ========================================================= */

.pub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 34px;
}

.pub-card {
    position: relative;

    min-height: 210px;

    display: flex;
    flex-direction: column;

    padding: 28px;

    background: rgba(250, 248, 242, 0.76);
    border: 1px solid rgba(184, 155, 96, 0.26);
    border-left: 4px solid var(--gold);

    color: inherit;
    text-decoration: none;

    box-shadow: var(--shadow);

    transition:
        transform 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease;
}

.pub-card:hover,
.pub-card:focus-visible {
    transform: translateY(-5px);
    background: rgba(250, 248, 242, 0.98);
    border-color: rgba(184, 155, 96, 0.58);
    outline: none;
}

.pub-card::after {
    content: "→";

    position: absolute;
    right: 24px;
    bottom: 22px;

    color: var(--gold);
    font-size: 20px;
    font-weight: 800;

    opacity: 0;
    transform: translateX(-6px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.pub-card:hover::after,
.pub-card:focus-visible::after {
    opacity: 1;
    transform: translateX(0);
}

.pub-card.destaque {
    background:
        linear-gradient(
            135deg,
            rgba(16, 47, 54, 0.97),
            rgba(28, 70, 80, 0.94)
        );

    border-color: rgba(184, 155, 96, 0.48);
}

.pub-card.destaque h2,
.pub-card.destaque p {
    color: var(--paper);
}

.pub-card.destaque p {
    color: rgba(250, 248, 242, 0.76);
}

.pub-label {
    display: block;

    color: var(--gold);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;

    margin-bottom: 14px;
}

.pub-card h2 {
    color: var(--blue-dark);

    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 31px;
    font-weight: 600;
    line-height: 1.05;

    margin-bottom: 14px;
}

.pub-card p {
    color: var(--text);
    font-size: 15.5px;
    line-height: 1.65;

    margin-bottom: 18px;
}

.pub-action {
    display: inline-flex;
    width: fit-content;

    margin-top: auto;
    padding-right: 28px;

    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;

    border-bottom: 1px solid rgba(184, 155, 96, 0.6);
}

/* =========================================================
   CATEGORIAS DE PUBLICAÇÕES — ESTRUTURA ANTIGA
   Mantida para compatibilidade
   ========================================================= */

.atalhos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 42px;
}

.link-div {
    min-height: 150px;
}

.link-div a {
    height: 100%;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    padding: 28px;

    background: rgba(250, 248, 242, 0.76);
    border: 1px solid rgba(184, 155, 96, 0.26);

    color: var(--blue-dark);
    text-decoration: none;

    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 31px;
    font-weight: 600;
    line-height: 1.05;

    box-shadow: var(--shadow);

    transition:
        transform 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease;
}

.link-div a::after {
    content: "→";

    color: var(--gold);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 18px;
    font-weight: 800;
}

.link-div a:hover,
.link-div a:focus-visible {
    transform: translateY(-5px);
    background: rgba(250, 248, 242, 0.98);
    border-color: rgba(184, 155, 96, 0.58);
    color: var(--gold);
    outline: none;
}

/* =========================================================
   LISTAS DE PUBLICAÇÕES
   Artigos, teses, dissertações, TCCs e outras produções
   ========================================================= */

.artigos-list,
.publicacoes-list {
    margin-top: 34px;
}

.artigos-list ul,
.publicacoes-list ul {
    list-style: none;
    padding: 0;
    margin: 0;

    display: grid;
    gap: 18px;
}

.artigos-list li,
.publicacoes-list li,
.pub-item {
    position: relative;

    padding: 28px 30px 28px 34px;

    background: rgba(250, 248, 242, 0.76);
    border: 1px solid rgba(184, 155, 96, 0.22);
    border-left: 4px solid var(--gold);

    color: var(--text);
    font-size: 17px;
    line-height: 1.65;

    box-shadow: 0 12px 28px rgba(16, 47, 54, 0.04);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.artigos-list li:hover,
.publicacoes-list li:hover,
.pub-item:hover {
    transform: translateX(4px);
    background: rgba(250, 248, 242, 0.96);
    border-color: rgba(184, 155, 96, 0.45);
}

.artigos-list span,
.publicacoes-list span,
.pub-author {
    color: var(--blue-dark);
    font-weight: 800;
}

.pub-title {
    color: var(--blue-dark);

    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 25px;
    line-height: 1.18;
    font-weight: 600;

    margin-bottom: 8px;
}

.pub-meta {
    color: var(--gold);

    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.8px;

    margin-bottom: 14px;
}

.pub-description {
    color: var(--text);
    font-size: 16px;
    line-height: 1.65;
}

.pub-note {
    margin-top: 22px;

    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.pub-empty {
    padding: 30px;

    background: rgba(250, 248, 242, 0.74);
    border: 1px solid rgba(184, 155, 96, 0.22);
    box-shadow: var(--shadow);

    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

/* =========================================================
   AÇÕES / LINKS DAS PUBLICAÇÕES
   ========================================================= */

.pub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.artigos-list a,
.publicacoes-list a,
.pub-actions a,
.pub-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    padding: 0 14px;

    color: var(--blue-dark);
    background: transparent;
    border: 1px solid rgba(184, 155, 96, 0.55);

    text-decoration: none;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.artigos-list a:hover,
.artigos-list a:focus-visible,
.publicacoes-list a:hover,
.publicacoes-list a:focus-visible,
.pub-actions a:hover,
.pub-actions a:focus-visible,
.pub-actions button:hover,
.pub-actions button:focus-visible {
    background: var(--gold);
    color: var(--paper);
    border-color: var(--gold);
    transform: translateY(-2px);
    outline: none;
}

/* =========================================================
   LIVROS / CAPÍTULOS DE LIVROS
   ========================================================= */

.livros-list {
    list-style: none;
    padding: 0;
    margin: 34px 0 0;

    display: grid;
    gap: 26px;
}

.livro-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 28px;
    align-items: start;

    padding: 28px;

    background: rgba(250, 248, 242, 0.76);
    border: 1px solid rgba(184, 155, 96, 0.22);
    box-shadow: var(--shadow);
}

.livro-capa {
    width: 100%;
    max-width: 180px;
    height: auto;

    object-fit: cover;

    background: var(--paper-2);
    border: 1px solid rgba(184, 155, 96, 0.28);

    filter: saturate(0.86) contrast(0.96);
}

.livro-capa-placeholder {
    width: 100%;
    max-width: 180px;
    min-height: 240px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(184, 155, 96, 0.18),
            rgba(238, 232, 220, 0.96) 68%
        );

    border: 1px solid rgba(184, 155, 96, 0.28);

    color: var(--gold);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 38px;
    font-weight: 500;
    letter-spacing: 3px;
}

.livro-info {
    min-width: 0;
}

.livro-titulo {
    color: var(--blue-dark);

    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 30px;
    line-height: 1.1;
    font-weight: 600;

    margin-bottom: 10px;
}

.livro-autor {
    color: var(--gold);

    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;

    margin-bottom: 14px;
}

.livro-descricao {
    color: var(--text);
    font-size: 16px;
    line-height: 1.65;
}

/* =========================================================
   VISUALIZADOR DE PDF
   ========================================================= */

.pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 300;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(16, 47, 54, 0.82);
    padding: 30px;
}

.pdf-modal.active {
    display: flex;
}

.pdf-box {
    width: min(1100px, 100%);
    height: min(82vh, 850px);

    background: var(--paper);
    border: 1px solid rgba(184, 155, 96, 0.4);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);

    display: flex;
    flex-direction: column;
}

.pdf-header {
    min-height: 58px;
    padding: 0 18px 0 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    border-bottom: 1px solid rgba(184, 155, 96, 0.28);
}

.pdf-header strong {
    color: var(--blue-dark);

    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 24px;
    font-weight: 600;
}

.pdf-close {
    border: 0;
    background: transparent;
    color: var(--blue-dark);

    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.pdf-close:hover,
.pdf-close:focus-visible {
    color: var(--gold);
    outline: none;
}

.pdf-viewer {
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 1040px) {
    .pub-grid,
    .atalhos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .livro-item {
        grid-template-columns: 130px 1fr;
    }

    .livro-capa,
    .livro-capa-placeholder {
        max-width: 130px;
    }

    .livro-capa-placeholder {
        min-height: 190px;
    }
}

@media (max-width: 640px) {
    .pub-grid,
    .atalhos {
        grid-template-columns: 1fr;
    }

    .pub-card {
        min-height: auto;
    }

    .pub-card::after {
        opacity: 1;
        transform: translateX(0);
    }

    .pub-card h2 {
        font-size: 29px;
    }

    .link-div a {
        font-size: 27px;
    }

    .artigos-list li,
    .publicacoes-list li,
    .pub-item {
        padding: 24px;
    }

    .livro-item {
        grid-template-columns: 1fr;
    }

    .livro-capa,
    .livro-capa-placeholder {
        max-width: 220px;
    }

    .livro-capa-placeholder {
        min-height: 280px;
    }

    .pdf-modal {
        padding: 12px;
    }

    .pdf-box {
        height: 88vh;
    }
}

@media (max-width: 520px) {
    .pub-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .pub-actions a,
    .pub-actions button {
        width: 100%;
    }
}