/* ===== BASE STYLES ===== */
:root {
    --primary: #d56a40;
    --secondary: #ECE9E0;
    --dark: #292323;
    --light: #ECE9E0;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

body {
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: #ECE9E0;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER/NAVBAR ===== */
header {
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.5s ease;
}

header.scrolled {
    background: #ECE9E0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px 5%;
}

.logo img {
    width: 350px;
    transition: all 0.5s ease;
}

header.scrolled .logo img {
    width: 250px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    color: #d56a40;
    font-weight: 500;
    letter-spacing: 1px;
    transition: color 0.3s;
}

header.scrolled nav ul li a {
    color: var(--primary);
}

nav ul li a:hover {
    color: #8f8273;
}

.menu-mobile {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--secondary);
    font-size: 1.5rem;
}

header.scrolled .menu-mobile {
    color: var(--dark);
}

/* ===== HERO SECTION ===== */
.projects-hero {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--secondary);
    position: relative;
    background: url('../img/capa\ projeto.png') center/cover no-repeat;
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.projects-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.projects-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.projects-hero p {
    font-size: 1.2rem;
}

/* ===== PROJECTS FILTER ===== */
.projects-filter {
    padding: 30px 0;
    background: var(--light);
    display: flex;
    justify-content: center; /* Centraliza horizontalmente */
    flex-wrap: wrap;        
    gap: 15px;               /* Aumentei um pouco para um respiro melhor */
}

.filter-btn {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
}

/* ===== PROJECTS GRID ===== */
.projects-grid {
    padding: 40px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 2fr)); /* Cria colunas automáticas */
    gap: 30px; /* Espaço entre os cards */
    width: 100%;
}

.project-card {
    background: #ECE9E0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    width: 100%;       /* Mude de auto para 100% */
    height: auto;      /* REMOVA o 50vh e coloque auto */
    display: flex;     /* Adicionado para alinhar conteúdo */
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    position: relative;
    height: 300px;     /* Aumentei de 250px para 300px para ficar mais imponente */
    width: 100%;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Isso aqui garante que a imagem não distorça */
    object-position: center; /* Garante que o foco da foto seja o meio */
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;  
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.project-link {
    color: white;
    text-decoration: none;
    border: 1px solid white;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: white;
    color: var(--dark);
}

.project-info {
    padding: 20px;
}

.project-category {
    display: inline-block;
    padding: 4px 10px;
    background: #f0e6d6;
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    display: flex;
    justify-content: center;
}

.project-info p {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--light);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-logo img {
    width: 100%;
    max-width: 400px;
}

.footer-col h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p {
    line-height: 1.8;
    color: var(--primary);
    font-size: 1rem;
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.1);
    color: var(--primary);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-logo {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .logo img {
        width: 250px;
    }
    
    header.scrolled .logo img {
        width: 200px;
    }
    
    nav ul {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: #8f827367;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: var(--shadow);
        display: none;
    }
    
    nav ul.show {
        display: flex;
    }
    
    .menu-mobile {
        display: block;
    }
    
    .projects-hero {
        height: 60vh;
        margin-top: 70px;
    }
    
    .projects-hero h1 {
        font-size: 2rem;
    }
    
    .projects-hero p {
        font-size: 1rem;
    }
    
    .projects-filter {
        display: flex;            /* Ativa o flexbox */
        justify-content: center;
        gap: 10px;                /* Espaço entre eles */
        padding: 20px 10px;
        overflow-x: hidden;       /* Remove o scroll lateral */
        white-space: normal;      /* Permite a quebra de linha */
    }
    
    .filter-btn {
        margin: 0 5px;
        padding: 6px 15px;
        font-size: 0.9rem;
    }
    
    .project-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .projects-hero {
        height: 50vh;
    }
    
    .projects-hero h1 {
        font-size: 1.8rem;
    }
    
    .footer-col p {
        font-size: 0.9rem;
    }
}