﻿html {
    font-size: 14px;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    text-align: justify;
    font-size: 16px;
}

.layout-flex {
    display: flex;
    flex: 1;
    position: relative;
    width: 100%;


    min-height: 100vh; /* Adicionado */
}

.sidebar-header {
    width: 100%;
    max-width: 320px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid #ddd;
    transition: transform 0.3s ease;
    transform: translateX(0); /* Visível por padrão */
    text-align: center;
    padding: 0px;
    background-color: #fbfaf6;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Mantém tudo contido */
}

.sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.sidebar-logo {
    display: block;
    width: 100%;
    max-width: 300px;
    object-fit: cover;
    object-position: center;
    margin: 20px auto;
}

.scrollbarmenu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 15px 15px 15px;
}

    /* Estilização da scrollbar */
    .scrollbarmenu::-webkit-scrollbar {
        width: 8px;
    }

    .scrollbarmenu::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .scrollbarmenu::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

        .scrollbarmenu::-webkit-scrollbar-thumb:hover {
            background: #555;
        }


.content-wrapper {
    flex: 1;
    margin-left: 320px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 320px);
    box-sizing: border-box;
    transition: margin-left 0.3s ease; /* Adiciona transição */
    margin-top: 0; /* Desktop */
}

.main-content {
    flex:1;

    padding: 24px;
    padding-bottom: 60px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    color: black;
    background-color: white;

    /* Fundo: Overlay escuro/azul nas bordas + imagem original */
    /*background: 
        radial-gradient( circle at center, transparent 0%
    , rgba(0, 0, 0, 1) 100% )
    , url('../Imgs/testefundo2.png') repeat top left /  auto;*/
}
.main-content p, a {
    padding: 0;
    margin:0;
}
hr {
    all: unset;
    display: block;
    height: 2px; /* define altura */
    width: 100%; /* ocupa a largura total */
    background: linear-gradient(to right, transparent, #421d00, transparent);
}
/* Footer Container */
.footer {
    width: calc(100% - 320px);
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border-top: 1px solid #dee2e6;
    padding: 1.5rem 0;
    margin-top: auto;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

    /* Container interno - ajustado para evitar overflow */
    .footer .container {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 20px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        box-sizing: border-box;
    }

/* Texto do footer - mais compacto */
.footer-text {
    flex: 1;
    min-width: 200px;
    padding-right: 15px;
}

    .footer-text p {
        margin: 0.3rem 0;
        color: #495057;
        font-size: 0.85rem;
        line-height: 1.4;
    }

        .footer-text p:first-child {
            font-weight: 600;
            color: #212529;
            margin-bottom: 0.5rem;
        }

/* Container dos logos - mais compacto */
.logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    max-width: 50%;
    overflow: hidden;
    /* ... outros estilos ... */
    background-color: white; /* Fundo uniforme */
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}


    .logos img {
        height: 50px;
        max-width: 100%;
        object-fit: contain;
        filter: grayscale(20%);
        opacity: 0.9;
        transition: all 0.3s ease;
        /* ... outros estilos ... */
        background-color: white; /* Força fundo branco */
        padding: 5px;
    }

        .logos img:hover {
            filter: grayscale(0%);
            opacity: 1;
            transform: scale(1.05);
        }

/* Garantir que o footer fica abaixo do main */
.content-wrapper {
    position: relative;
    min-height: calc(100vh - 60px); /* Ajuste conforme necessário */
    padding-bottom: 150px; /* Espaço para o footer */
    box-sizing: border-box;
}

/* Responsividade ajustada */
@media (max-width: 992px) {
    .footer .container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .footer-text {
        padding-right: 0;
        margin-bottom: 10px;
    }

    .logos {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer {
        width: 100%;
        padding: 1rem 0;
    }

    .logos img {
        height: 40px;
        max-width: 100%;
    }

    .content-wrapper {
        padding-bottom: 130px; /* Mais espaço em mobile */
    }
}

@media (max-width: 480px) {
    .logos {
        gap: 8px;
    }

        .logos img {
            height: 30px;
            max-width: 70px;
        }

    .footer-text p {
        font-size: 0.8rem;
    }
}

/* Media query para telas pequenas */
@media (max-width: 768px) {
    .sidebar-header {
        z-index: 1100; /* já garantido que está por cima */
        transform: translateX(-100%);
    }
    .containerPF img {
        float: none !important; /* remove float */
        width: 100% !important; /* ocupa toda a largura disponível */
        max-width: 100%; /* não ultrapassa o container */
        height: auto !important; /* mantém proporção */
        padding-right: 0 !important; /* remove padding para lado direito */
        margin-bottom: 10px; /* espaço embaixo */
        display: block; /* garante que a imagem fique em linha separada */
    }
    .sidebar-header.active {
        transform: translateX(0);
    }
    .app-bar {
        display: flex !important;
    }
        .app-bar img {
            margin: auto 0;
            max-width: 100%;
            height: auto;
            width: 150px;
        }
    .content-wrapper {
        margin-top: 40px; /* Garante que o conteúdo não sobreponha o footer */
        padding-top: 50px; /* Altura da .app-bar */
        margin-left: 0;
        width: 100%;
    }

    footer {
        margin-left: 0;
        width: 100%;
    }

    .menu-toggle-btn {
        display: block;
    }

}
/* Nova faixa superior (app bar) */
.app-bar {
    display: none; /* Escondido por padrão (só aparece em mobile) */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    background-color: #fbfaf6;
    border-bottom: 1px solid #ddd;
    z-index: 900;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}
.app-bar img {
    max-width: 100%;
    height: auto;
    width: 200px;
    margin: 10px 0; /* Espaçamento vertical */
}

/* Ajuste do botão do menu */
.menu-toggle-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 8px;
    color: black;
}

    .sidebar ul {
        flex: 1;
        overflow-y: auto; /* scroll vertical apenas aqui */
        overflow-x: hidden; /* impede scroll horizontal */
    }
.nav-link {
    cursor: pointer;
    display: block;
    font-weight: bold;
    padding: 0.5rem 1rem;
    color: #012642 !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .nav-link:hover {
        color: #421d00 !important;
        
    }
h1, h2, h3, h4, h5, h6 {
    color: #012642 !important;
}
h3 {
    font-size: 20px;
    cursor: pointer;
    display: inline-block; /* ajusta ao conteúdo */
    padding: 10px 15px;
    border: 1px solid #012642;
    border-radius: 10px;
    text-align: center;
    margin: 0 auto;
}

.custom-legend {
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    line-height: 18px;
    max-width: 250px;
}

.custom-legend img {
    width: 15px;
    vertical-align: middle;
    margin-right: 5px;

}


.alfabeto-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 10px 0;
}

.letra {
    color: black;
    font-weight: bold;
    font-size: 18px;
    margin: 5px 8px;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    transition: transform 0.1s ease;
}

.letra:hover {
    transform: scale(1.1);
}

.containerPF img {
    width: 30%;
    padding-right: 30px;
    padding-bottom: 10px;
    height: auto;
    display: block;
}

.containerPF p {
    text-align: justify;
}

.containerPF strong {
    color: black !important;
}

.shadow-box {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.55); /* sombra uniforme */
    border-radius: 6px;
    background-color: white;
    padding: 16px;
    margin: 16px 0;
    overflow: hidden; /* impede que a imagem "fuja" da caixa */
    clear: both; /* garante que cada item fique isolado */
}

.shadow-box a {
    word-break: break-all; /* Quebra palavras longas para não estourar o container */
    color: blue;
    text-decoration: underline;
    display: inline-block;
    max-width: 100%;
}
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    font-size: 18px;
}

.pagination-container button {
    background-color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.1s;
}

.pagination-container button:hover:not(:disabled) {
    transform: scale(1.1);
}

.pagination-container button:disabled {
    opacity: 0.4;
    cursor: default;
}


#Autores img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 0 20px 0px 0;
    float: left;
}

#Autores h2 {
    margin-top: 30px;
    clear: both;
}


#Autores p {
    text-align: justify;
    margin-bottom: 20px;
}

/* Limpar o float após cada biografia */
#Autores > div {
    overflow: auto;
    margin-bottom: 40px;
}




#Fontes {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0 auto;
}
    #Fontes a {
        
        color: #333;
    }
    #Fontes h5 {
        color: #18426c;
        margin: 25px 0 15px 0;
        font-size: 1.1em;
        padding-bottom: 5px;
        border-bottom: 1px dashed #ccc;
    }

    #Fontes ul {
        list-style-type: none;
        padding: 0;
        margin: 0 0 30px 0;
    }

    #Fontes li {
        padding: 8px 0;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 20px;
    }

        #Fontes li:before {
            content: "•";
            color: #ff6a00;
            font-size: 1.2em;
            position: absolute;
            left: 0;
        }

        #Fontes li:hover {
            background-color: #f9f9f9;
        }
.video-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

    .video-container iframe {
        width: 100%;
        max-width: 250px;
        aspect-ratio: 16 / 9;
        border: none;
    }

.video-container-Videos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
    .video-container-Videos iframe {
        width: 100%;
        max-width: 500px;
        aspect-ratio: 16 / 9;
        border: none;
    }

.img-card {
    text-align: center;
    max-width: 200px;
    margin: 10px;
    flex: 0 0 auto;
}

    .img-card img {
        width: 100%;
        height: auto;
        border-radius: 8px;
        object-fit: contain;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .img-card h6 {
        font-size: 16px;
        margin: 8px 0 4px;
    }

    .img-card p {
        font-size: 14px;
        margin: 0;
        color: #555;
        word-break: break-word;
    }

form label {
    font-weight: bold;
    color: #012642;
    display: block;
    margin-top: 10px;
}

form input,
form textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

    form input:focus,
    form textarea:focus {
        border-color: #ff6a00;
        outline: none;
        box-shadow: 0 0 5px rgba(255,106,0,0.5);
    }

.btn-enviar {
    margin-top: 15px;
    padding: 10px;
    width: 100%;
    border: none;
    background: #012642;
    color: #fff;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

    .btn-enviar:hover {
        background: #ff6a00;
    }
.required-field::after {
    content: " *";
    color: red;
}

.contact-info {
    max-width: 600px;
    margin: 20px auto 20px;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.especialista {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.foto {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #666;
}

.info {
    flex: 1;
}

.nome {
    font-weight: bold;
    font-size: 1.2em;
    margin: 0 0 5px 0;
}

.cargo-departamento {
    color: #555;
    margin-bottom: 15px;
}

.pergunta {
    font-weight: bold;
    margin-top: 10px;
}

.resposta {
    margin-left: 15px;
    margin-bottom: 10px;
}

.especialista img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #666;
}


.containerImgsIntro p {
    text-align: center;
    font-size: 11px;
}
.containerImgsIntro {
    float: left;
    width: 100%;
    max-width: 250px;
    margin: 0 20px 10px 0;
}

.containerImgsIntro img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    float: left;
}
@media (max-width: 768px) {
    .containerImgsIntro {
        width: 100%;
        max-width: none;
        margin: 0 0 10px 0;
    }
    .containerImgsIntro img {
        width: 100%;
        max-width: none;
    }
}

.containerImgsPP {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

    /* Cada bloco de imagem + legenda */
    .containerImgsPP figure {
        flex: 1 1 calc(50% - 10px); /* duas colunas no desktop */
        max-width: calc(50% - 10px);
        margin: 0;
        text-align: center;
    }

        .containerImgsPP figure img {
            width: 100%;
            height: auto;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }

        .containerImgsPP figure figcaption {
            font-size:11px;
            font-weight: bold;
            margin-top: 5px;
        }

        /* Se houver só 1 figura, ocupa toda a largura */
        .containerImgsPP figure:only-child {
            flex: 1 1 100%;
            max-width: 100%;
        }

/* No telemóvel, sempre 1 por linha */
@media (max-width: 768px) {
    .containerImgsPP figure {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
#Introducao iframe {
    width: 100%;          /* ocupa toda a largura do container */
    max-width: 800px;     /* limita o tamanho máximo */
    aspect-ratio: 16/9;   /* mantém proporção 16:9 */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: block;       /* evita inline spacing */
    margin: 20px auto;    /* centraliza horizontalmente e dá espaçamento */
    border: none;
}

.containerImgsJ {
    max-width: 250px;
    margin: 0 20px 10px 0;
}

    .containerImgsJ figure {
        margin: 0;
        text-align: center;
    }

        .containerImgsJ figure img {
            width: 100%;
            height: auto;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }

        .containerImgsJ figure figcaption {
            font-size: 11px;
            margin-top: 5px;
        }

    /* alternância */
    .containerImgsJ:nth-of-type(odd) {
        float: left; /* imagens ímpares à esquerda */
        margin-right: 20px;
        margin-left: 0;
    }

    .containerImgsJ:nth-of-type(even) {
        float: right; /* imagens pares à direita */
        margin-left: 20px;
        margin-right: 0;
    }
@media (max-width: 768px) {
    .containerImgsJ {
        float: none !important; /* ignora os floats */
        max-width: 100% !important;
        margin: 20px auto; /* centraliza */
    }

        .containerImgsJ figure img {
            max-width: 100% !important; /* imagem ocupa 100% da largura */
        }
       
}

.search-group {
    display: flex;
    width: 280px;
    height: 38px; /* altura fixa */
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #d1d5db; /* borda para o grupo de pesquisa */
}

    .search-group input {
        flex-grow: 1;
        font-size: 14px;
        height: 100%;
        border: none;
        margin: auto 0;
        line-height: 38px; /* mesma altura do container */
        box-sizing: border-box; /* inclui padding e borda no cálculo da altura */
    }

        .search-group input:focus {
            outline: none;
            border-color: #d1d5db;
            box-shadow: none;
        }

    .search-group button {
        border: none;
        width: 42px;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        height: 100%; /* igual altura do input */
        padding: 0;
    }

        .search-group button:focus {
            outline: none;
            box-shadow: none;
        }

        .search-group button:hover img {
            transform: scale(1.1);
            transition: transform 0.2s;
        }

table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

thead {
    background-color: #2c3e50;
    color: white;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

tbody tr:hover {
    background-color: #f1f1f1;
}

th {
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.topo-direita {
    font-size: 14px;
    line-height: 1.4;
    text-align: right; /* alinha o texto à direita */
    color: #333;
    font-style: italic; /* para dar estilo de citação, se quiser */
}

.legenda {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #333;
    border-top: 1px solid #ccc;
    margin-top: 2rem;
    padding-top: 1rem;
}
    .legenda p {
        margin: 0.25rem 0;
        text-indent: -1rem;
        padding-left: 1.5rem;
    }







.section-header {
    cursor: pointer;
    padding: 15px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .section-header:hover {
        background-color: var(--light-color);
    }

    .section-header h2 {
        margin: 0;
        color: var(--primary-color);
        font-weight: 600;
    }


/* Ovelha Saloia Page */

.section-content {
    padding: 20px;
    background-color: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: none;
}

    .section-content.active {
        display: block;
    }

.toggle-icon {
    transition: transform 0.3s ease;
}

    .toggle-icon.rotated {
        transform: rotate(180deg);
    }



.placeholder-content {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.references-list {
    list-style-type: none;
    padding-left: 0;
}

    .references-list li {
        margin-bottom: 15px;
        padding-bottom: 15px;
        border-bottom: 1px dashed #ddd;
    }