/* =============================
   ESTILO GLOBAL E TIPOGRAFIA
============================= */
body {
    font-family: 'Montserrat', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    color: #222;
}

/* =============================
   NAVBAR PADRÃO + RESPONSIVO
============================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #004080; /* Azul escuro */
    padding: 1rem 2rem;
    position: relative;
    z-index: 1000;
}

/* Logo */
.logo {
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: bold;
}

/* Lista de links */
.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

/* =============================
   BOTÃO MENU HAMBÚRGUER
============================= */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2001;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animação para "X" */
.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =============================
   RESPONSIVIDADE DO MENU
============================= */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        background-color: #004080;
        position: absolute;
        top: 70px;
        right: 0;  /* <--- CORRETO! Alinhado à direita. */
        width: 100%;
        text-align: center;
        padding: 1rem 0;
        gap: 1rem;

        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .nav-links.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .navbar {
        flex-wrap: wrap;
    }
}

/* =============================
   CONTEÚDO PRINCIPAL
============================= */
main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

/* Botão principal */
.cta {
    display: block;
    width: max-content;
    margin: 2rem auto 0;
    padding: 1rem 2rem;
    background: #2a8541;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.2s;
}

.cta:hover {
    background: #003d6b;
}

/* =============================
   RODAPÉ
============================= */
footer {
    background-color: #f8f8f8;
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #333;
    border-top: 1px solid #ddd;
}

footer nav {
    margin: 10px 0;
}

footer nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

footer nav a {
    text-decoration: none;
    color: #0066cc;
}

footer nav a:hover {
    text-decoration: underline;
    color: #004f99;
}

footer p {
    margin: 10px 0 0 0;
}

/* ================================================= */
/* ESTILOS DO CARROSSEL - VERSÃO GALERIA (LETTERBOX) */
/* ================================================= */

.galeria-laboratorio {
    text-align: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
}

.galeria-laboratorio h2 {
    margin-bottom: 30px;
    font-size: 2em;
    color: #333;
}

.carousel-container {
    position: relative;
    /* ALTERADO: Deixei um pouco maior para um visual de galeria mais agradável */
    max-width: 800px; 
    margin: auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    
    /* Define a proporção do "palco" do carrossel */
    aspect-ratio: 16 / 9; 

    /* ADICIONADO: O fundo preto que aparecerá no espaço vazio */
    background-color: #000;
}

.carousel-slide {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-image {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    
    /* ESSENCIAL: A principal mudança está aqui! */
    /* "contain" faz a imagem caber inteira dentro do container, mantendo a proporção */
    object-fit: contain; 
}

/* O restante do código para os botões permanece igual */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    font-size: 24px;
    font-weight: bold;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}