/* SEÇÃO 1: Variáveis e configurações globais */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --btn-bg: #3498db;
    --btn-text: #ffffff;
    --box-bg: #e8f4fc;
    --title-color: #2980b9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* SEÇÃO 2: Estilos gerais do corpo e tipografia */
body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--title-color);
    font-size: 2.5rem;
}

h2 {
    color: var(--title-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-align: center;
}

p {
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
}

/* SEÇÃO 3: Layout principal, cabeçalho e navegação */
header {
    padding: 20px;
    text-align: right;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
}

/* SEÇÃO: Menu de navegação responsivo e consistente */
#main-nav {
    background-color: var(--btn-bg);
    width: 90%;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 25px;
    z-index: 999;
    position: relative;
}

#main-nav.fixed {
    position: fixed;
    top: 10px;
    left: 0;
    right: 0;
    max-width: 95%;
    margin: 0 auto;
}

#main-nav ul {
    display: flex;
    justify-content: center;
    list-style-type: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

#main-nav li {
    margin: 5px 10px;
    position: relative;
}

#main-nav a {
    color: var(--btn-text);
    text-decoration: none;
    padding: 12px 15px;
    display: block;
    font-weight: bold;
    transition: all 0.3s ease;
    border-radius: 8px;
    white-space: normal;
    text-align: center;
    min-width: 100px;
    word-wrap: break-word;
}

#main-nav a:hover {
    color: #ecf0f1;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Botão de menu mobile */
.mobile-menu-button {
    display: none;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.2rem;
    margin: 10px auto;
    text-align: center;
}

/* SEÇÃO 4: Componentes comuns (botões, caixas, etc.) */
.btn, .btn_center, .btn_entrega {
    display: inline-block;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: background-color 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.btn, .btn_center {
    background-color: var(--btn-bg);
    color: var(--btn-text);
}

.btn_entrega {
    background-color: #f3d17c;
    color: #000000;
}

.btn:hover, .btn_center:hover, .btn_entrega:hover {
    background-color: #2c3e50;
    color: white;
}

.btn_center {
    align-items: center;
}

.box {
    background-color: var(--box-bg);
    border-radius: 10px;
    padding: 20px;
        height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
    box-shadow: 15px 14px 10px 0 rgba(0, 0, 0, 0.2);
}

.box:hover {
    transform: translateY(-5px);
}

.content-blocks {
    margin-top: 40px;
}

.content-block {
    background-color: var(--box-bg);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 15px 14px 10px 0 rgba(0, 0, 0, 0.2);
}

.content-block h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 20px;
}

.content-block .subtitle {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: left;
    margin-bottom: 20px;
}

.content-block img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 20px;
    border-radius: 10px;
    box-shadow: 15px 14px 10px 0 rgba(0, 0, 0, 0.2);
}

.content-block .block-text {
    text-align: justify;
    font-weight: normal;
    line-height: 1.6;
}

.footer {
    background-color: #fdba90;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.footer:hover {
    background-color: #2c3e50;
}

/* SEÇÃO 5: Layout específico para páginas individuais */
/* 5.1: Página inicial e estrutura comum */
.top-images {
    display: flex;
    justify-content: space-around;
    margin-bottom: 40px;
}

.image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
    max-width: 400px;
}

.image-container img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    background-color: var(--box-bg);
    padding: 10px;
    margin-bottom: 15px;
}

.image-container .btn {
    width: 80%;
    max-width: 200px;
}

.central-image {
    text-align: center;
    margin-bottom: 40px;
}

.central-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.columns {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.column {
    flex: 1;
    min-width: 300px;
    margin: 10px;
}

/* 5.2: Página de pesquisadores */
.table-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.member-row {
    display: flex;
    background-color: #e6f2ff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.member-photo {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.member-photo img {
    width: 150px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.social-icons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.social-icons img {
    width: 30px;
    height: 30px;
    border-radius: 5px;
}

.member-info {
    line-height: 1;
    flex: 2;
    padding: 20px;
}

.keywords {
    display: inline-block;
    background-color: #e0f7fa;
    padding: 3px 8px;
    margin: 2px;
    border-radius: 15px;
    font-size: 0.9em;
}

/* Estilos para o sistema de filtro por palavras-chave */
.keywords-container {
    max-width:98%;
    margin: 0 auto 20px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.keywords-header, .authors-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.keywords-header h3, .authors-header h3 {
    margin: 0;
    color: var(--title-color);
}

#clear-filter, #clear-author-filter {
    padding: 5px 10px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.keywords-list, .authors-list {
    width: 95%;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 15px;
    box-shadow: 15px 14px 10px 0 rgba(0, 0, 0, 0.2);
}

.authors-list {
    margin-top: 20px;
}

#alphabetical-keywords, #alphabetical-authors {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    align-items: center;
    padding: 5px 0;
}

.keyword-pill {
    display: inline-block;
    padding: 5px 5px;
    background-color: #e0f7fa;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.keyword-pill:hover {
    background-color: #b3e5fc;
}

.keyword-pill.active {
    background-color: #4fc3f7;
    color: white;
}

.keyword-count {
    margin-left: 5px;
    font-size: 12px;
    background-color: rgba(0,0,0,0.1);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none;
}

/* 5.3: Página de produções */
.filter-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.filter-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 10px;
    box-shadow: 15px 14px 10px 0 rgba(0, 0, 0, 0.2);
}

.filter-btn:hover {
    background-color: #2980b9;
}

.filter-btn.active {
    background-color: #2c3e50;
}

.publications {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Estilos unificados para os tipos de publicação */
.publication, 
.publication_livro, 
.publication_artigo, 
.publication_capitulo, 
.publication_artigo-outros {
    border: 1px solid #ddd;
    padding: 20px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 15px;
    box-shadow: 10px 10px 10px 0 rgba(0, 0, 0, 0.2);
}

.publication {
    background-color: #95caee;
}

.publication_livro {
    background-color: #f8b1a9;
}

.publication_artigo {
    background-color: #9ef3c1;
}

.publication_capitulo {
    background-color: #e6b972;
}

.publication_artigo-outros {
    background-color: #96f5a6;
}

.publication h2 {
    color: #2c3e50;
    margin-top: 0;
}

.publication .type {
    font-weight: bold;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    box-shadow: 10px 10px 5px 0 rgba(0, 0, 0, 0.2);
    align-items: center;
}

.publication[data-type="livro"] .type {
    background-color: #e74c3c;
}

.publication[data-type="artigo"] .type {
    background-color: #2ecc71;
}

.publication[data-type="capitulo"] .type {
    background-color: #f39c12;
}

.publication[data-type="artigo-outros"] .type {
    background-color: #043a0d;
}

.publication .authors {
    font-style: italic;
    color: #111f5f;
}

.publication .keywords {
    color: #3b0432;
}

.publication .access-link {
    display: inline-block;
    margin-top: 10px;
    color: #00070c;
    text-decoration: none;
}

.link {
    background-color: #0e5469;
    font-weight: bold;
    color: white;
    padding: 10px 10px;
    border-radius: 5px;
    display: inline-block;
    box-shadow: 10px 10px 5px 0 rgba(0, 0, 0, 0.2);
    text-decoration: none;
    margin-right: 10px;
}

.publication .access-link:hover {
    text-decoration: underline;
}

.filter-button, .keyword-button, .author-button {
    background-color: #ecf0f1;
    border: 1px solid #bdc3c7;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    margin: 3px;
}

.filter-button:hover, .keyword-button:hover, .author-button:hover {
    background-color: #3498db;
    color: white;
}

.filter-button.active, .keyword-button.active, .author-button.active {
    background-color: #2980b9;
    color: white;
}

.count {
    opacity: 0.8;
    margin-left: 3px;
}

/* Estilos específicos para livros com imagens */
.publication[data-type="livro"] .book-content {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.publication[data-type="livro"] .book-info {
    flex: 1;
}

.publication[data-type="livro"] .book-image {
    flex-shrink: 0;
    text-align: center;
}

/* SEÇÃO 6: Galeria de imagens */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    filter: brightness(80%);
}

.gallery-item:hover img,
.gallery-item:hover video {
    filter: brightness(100%);
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 30px;
    border-color: transparent transparent transparent white;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .play-button {
    opacity: 1;
}

.fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#fullscreen-content {
    max-width: 90%;
    max-height: 90%;
}

#fullscreen-content img,
#fullscreen-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Estilos padrão para o footer com ondas */
footer {
    background-color: #3d56e6; 
    color: rgb(6, 12, 12); 
    text-align: center; 
    padding: 20px 5px 5px;  
    position: relative; 
    overflow: hidden;
}

footer .waves-container {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    overflow: hidden; 
    line-height: 0; 
    transform: rotate(180deg);
}

footer .waves {
    position: relative; 
    display: block; 
    width: calc(100% + 1.3px); 
    height: 75px;
}

footer .wave-animation {
    animation: wave-animation 15s linear infinite; 
    animation-delay: -3s; 
    transform: translate3d(0, 0, 0);
}

footer .footer-content {
    position: relative; 
    z-index: 1; 
    margin-bottom: 10px;
}

footer a {
    text-decoration: none; 
    color: #3b0e0e;
}

/* SEÇÃO 7: Responsividade */
@media (max-width: 1200px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    #main-nav ul {
        justify-content: space-around;
    }
    
    #main-nav a {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
}

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-button {
        display: block;
        width: 90%;
    }
    
    #main-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
    }
    
    #main-nav.active {
        max-height: 1000px;
    }
    
    #main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    #main-nav li {
        width: 90%;
        margin: 5px 0;
    }
    
    #main-nav a {
        text-align: center;
        padding: 12px 5px;
        font-size: 1rem;
        width: 100%;
    }
    
    #main-nav.fixed {
        top: 0;
        max-width: 100%;
        border-radius: 0;
    }
    
    main {
        padding-top: 20px;
    }
    
    #main-nav.fixed.active + main {
        padding-top: 300px;
    }

    .top-images {
        flex-direction: column;
        align-items: center;
    }

    .image-container {
        width: 100%;
        margin-bottom: 20px;
    }

    .columns {
        flex-direction: column;
    }
    
    .column {
        margin-bottom: 20px;
    }
    
    .member-row {
        flex-direction: column;
    }
    
    .member-photo, .member-info {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        margin: 5px 0;
        width: 80%;
    }
}

/* Animação para rodapé */
@keyframes wave-animation {
    0% { transform: translateX(-90px); }
    100% { transform: translateX(85px); }
}