:root {
    --bg: #0f172a;
    --bg-sec: #111827;
    --card: #ffffff;
    --text: #1f2937;
    --text-soft: #6b7280;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --line: #e5e7eb;
    --badge: #eef2ff;
    --badge-text: #3730a3;
    --shadow: 0 15px 40px rgba(15, 23, 42, 0.12);
    --radius: 20px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f8fafc;
    color: var(--text);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.topo-projetos {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    padding: 2rem 0 4rem;
}

.btn-voltar {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 12px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;

    color: #ffffff;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);

    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.btn-voltar:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
}

.hero-projetos {
    max-width: 720px;
}

.tag-topo {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.hero-projetos h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

.hero-projetos p {
    font-size: 1.05rem;
    color: #cbd5e1;
}

.pagina-projetos {
    margin-top: -2rem;
    padding-bottom: 4rem;
}

.grid-projetos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.projeto-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.projeto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

.projeto-imagem {
    position: relative;
    width: 100%;
    height: 240px;
    background: #e5e7eb;
    overflow: hidden;
}

.projeto-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.projeto-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--badge);
    color: var(--badge-text);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 999px;
}

.projeto-badge.secundario {
    background: #dcfce7;
    color: #166534;
}

.projeto-conteudo {
    padding: 1.5rem;
}

.projeto-topo h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.projeto-topo p {
    color: var(--text-soft);
    margin-bottom: 1.2rem;
}

.projeto-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.25rem;
}

.projeto-tech span {
    background: #f3f4f6;
    color: #374151;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.projeto-rodape {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.status {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
}

.btn-projeto {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background: var(--primary);
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    transition: background 0.25s ease, transform 0.25s ease;
}

.btn-projeto:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

@media (min-width: 900px) {
    .projeto-card {
        display: grid;
        grid-template-columns: 1.1fr 1fr;
        min-height: 360px;
    }

    .projeto-imagem {
        height: 100%;
    }

    .projeto-conteudo {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 2rem;
    }

    .projeto-topo h2 {
        font-size: 1.7rem;
    }
}

@media (max-width: 640px) {
    .topo-projetos {
        padding: 1.5rem 0 3rem;
    }

    .hero-projetos p {
        font-size: 0.98rem;
    }

    .projeto-imagem {
        height: 200px;
    }

    .projeto-conteudo {
        padding: 1.2rem;
    }

    .projeto-topo h2 {
        font-size: 1.2rem;
    }

    .btn-projeto {
        width: 100%;
        justify-content: center;
    }

    .btn-voltar {
        top: 14px;
        left: 14px;
        padding: 10px 14px;
        font-size: 0.92rem;
    }
}