* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Helvetica Neue', Arial, sans-serif; }
body { background: #f4f4f4; color: #333; }
a { text-decoration: none; color: inherit; }

/* 1. Header Global (Home) */
.main-header {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    margin-bottom: 2px;
}
.main-header h1 { font-size: 1.8rem; text-transform: uppercase; letter-spacing: 2px; }
.main-header span { font-size: 0.9rem; color: #777; display: block; margin-top: 5px; }

/* Grid da Home */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
}
.project-thumb {
    position: relative;
    height: 400px;
    overflow: hidden;
    cursor: pointer;
}
.project-thumb img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}
.project-thumb:hover img { transform: scale(1.1); }
.project-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff; padding: 20px; opacity: 0; transition: opacity 0.3s;
}
.project-thumb:hover .project-info { opacity: 1; }

/* 3. Página de Projeto - Header Fixo */
.sticky-header {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid #ddd;
    z-index: 1000;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.sticky-header h2 { font-size: 1.2rem; margin: 0; }
.back-btn { font-size: 0.9rem; font-weight: bold; text-transform: uppercase; }

/* Conteúdo do Projeto */
.project-container {
    max-width: 1200px; margin: 0 auto;
    padding: 100px 20px 40px; /* Padding top maior por causa do header fixo */
    background: #fff; min-height: 100vh;
}
.project-images img { width: 100%; height: auto; display: block; margin-bottom: 0; }

/* 4. Navegação Próximo/Anterior */
.project-nav {
    display: grid; grid-template-columns: 1fr 1fr;
    margin-top: 2px;
}
.nav-item {
    position: relative; height: 150px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    color: #fff; text-align: center; cursor: pointer;
}
.nav-item img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 0; filter: brightness(0.4);
    transition: filter 0.3s;
}
.nav-item:hover img { filter: brightness(0.6); }
.nav-text { position: relative; z-index: 1; text-transform: uppercase; letter-spacing: 1px; }
.nav-label { display: block; font-size: 0.7rem; opacity: 0.8; margin-bottom: 5px; }

/* Painel Admin Dashboard */
.admin-header { background: #333; color: #fff; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.admin-content { max-width: 1000px; margin: 40px auto; padding: 20px; background: #fff; }
.btn-new { background: #28a745; color: #fff; padding: 10px 20px; border-radius: 4px; display: inline-block; margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid #ddd; text-align: left; }
.action-btn { font-size: 0.8rem; margin-right: 10px; padding: 5px 10px; border-radius: 3px; }
.edit { background: #007bff; color: #fff; }
.delete { background: #dc3545; color: #fff; }
.form-container { max-width: 600px; margin: 0 auto; }
input, button { width: 100%; padding: 10px; margin-bottom: 15px; border: 1px solid #ddd; }
button { background: #000; color: #fff; border: none; cursor: pointer; }

/* Responsivo */
/* Responsivo */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr; /* Altera para 1 coluna no mobile */
    }
    .sticky-header { padding: 15px 20px; }
    .sticky-header h2 { font-size: 1rem; }
}