/* ==================== */
/* FUNDO (MANTIDO) */
/* ==================== */
.background-projeto {
    position: fixed;
    inset: 0; /* Simplificado de top/left/width/height */
    z-index: -1;
    background:
        linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.6)),
        url('comotudo.jpg') center/cover fixed; /* Combinado background properties */
}

/* ==================== */
/* BASE (MANTIDO) */
/* ==================== */
html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
}

.projeto-body {
    overflow-y: auto;
}

/* ==================== */
/* LAYOUT DA PÁGINA (AJUSTADO) */
/* ==================== */
.projeto-page {
    color: white;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    font-family: 'Georgia', serif;
    min-height: 100vh;
    padding: 80px 5% 40px;
}

/* ==================== */
/* TÍTULO (AJUSTADO) */
/* ==================== */
.projeto-page h1 {
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 40px;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    position: relative;
    padding: 0 15px;
}

.projeto-page h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #ff8a00, #e52e71);
    margin: 15px auto 0;
}

/* ==================== */
/* CONTAINER DE PARCERIAS (AJUSTADO) */
/* ==================== */
.projetos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding-bottom: 30px;
    max-width: 900px;
    margin: 0 auto;
}

/* ==================== */
/* ITEM DE PARCERIA (AJUSTADO) */
/* ==================== */
.projeto-item {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    opacity: 0; /* Estado inicial para animação via JS */
    transform: translateY(30px); /* Estado inicial para animação via JS */
    /* A propriedade 'animation: fadeInUp...' e os 'animation-delay' em :nth-child
       foram removidos pois o JavaScript já controla essa animação de entrada. */
}

/* ==================== */
/* IMAGENS (AJUSTADO PARA MOBILE) */
/* ==================== */
.projeto-imagem {
    width: 100%;
    height: 220px;
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.2);
}

.projeto-imagem img {
    width: auto;
    height: 206%;
    max-width: 150%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s ease;
}

/* ==================== */
/* CONTEÚDO (AJUSTADO) */
/* ==================== */
.projeto-content {
    padding: 20px;
    flex: 1;
}

.projeto-item h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: white;
    position: relative;
    padding-bottom: 8px;
}

.projeto-item h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #ff8a00;
}

.projeto-item p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.85);
    margin-bottom: 5px;
}

/* ==================== */
/* INTERAÇÕES (SUAVIZADAS) */
/* ==================== */
.projeto-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.projeto-item:hover img {
    transform: scale(1.03);
}

/* ==================== */
/* RESPONSIVIDADE (APRIMORADA) */
/* ==================== */
@media (max-width: 900px) {
    .projeto-page {
        padding: 70px 4% 30px;
    }

    .projetos-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
        max-width: 600px;
    }

    .projeto-imagem {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .projeto-page {
        padding: 60px 15px 30px;
    }

    .projetos-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 15px;
    }

    .projeto-page h1 {
        margin-bottom: 30px;
        font-size: 1.6rem;
    }

    .projeto-imagem {
        height: 180px;
    }

    .projeto-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .projeto-page {
        padding: 50px 12px 20px;
    }

    .projeto-item {
        border-radius: 10px;
    }

    .projeto-imagem {
        height: 160px;
    }

    .projeto-item h2 {
        font-size: 1.3rem;
    }

    .projeto-item p {
        font-size: 0.9rem;
    }
}

/* ==================== */
/* MENU (REVISADO PARA RESPONSIVIDADE) */
/* ==================== */
header {
    padding: 25px 5%;
    display: flex;
    justify-content: flex-end;
    animation: slideInDown 0.8s ease-out forwards; /* Assume @keyframes slideInDown em outro arquivo */
    position: relative;
    z-index: 10;
}

.menu {
    display: flex;
    gap: 20px;
}

.menu a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    letter-spacing: 1px;
    position: relative;
    padding: 6px 0;
    font-family: "Roboto"; /* Considerar adicionar fallback fonts genéricas como sans-serif */
    font-weight: 500;
    transition: all 0.3s;
    opacity: 0.6; /* Opacidade principal dos links */
    white-space: nowrap; /* Impede que o texto do link quebre em várias linhas */
}

.menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}

.menu a:hover {
    opacity: 1;
}

.menu a:hover::after {
    width: 100%;
}

/* Ajustes específicos para mobile no menu */
@media (max-width: 768px) {
    header {
        padding: 20px 4%;
    }

    .menu {
        gap: 15px;
        flex-wrap: wrap;         /* Permite que os itens do menu quebrem para a próxima linha */
        justify-content: flex-end; /* Alinha os itens (ou linhas de itens) à direita */
    }

    .menu a {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 15px 3%;
        justify-content: center; /* Header já centraliza o bloco do menu */
    }

    .menu {
        gap: 12px;
        /* flex-wrap: wrap; é herdado do breakpoint de 768px */
        justify-content: center; /* Centraliza os itens do menu, já que o header também está centralizado */
    }

    .menu a {
        font-size: 13px;
        padding: 4px 0;
    }
}