/* Layout da Página */
.page-catalogo {
    padding: 60px 20px 100px 20px;
}

.catalogo-header {
    text-align: center;
    margin-bottom: 60px;
}

.catalogo-header h1 {
    font-size: 2.8rem;
    margin: 15px 0;
    color: var(--cor-texto);
}

.catalogo-header p {
    color: var(--cor-texto-mutado);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* A Grade de Projetos */
.projetos-grid {
    display: grid;
    /* Isso faz a mágica da responsividade: cria colunas de no mínimo 320px */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* O Card Individual de Projeto */
.projeto-card {
    background-color: var(--cor-fundo-secundario);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.projeto-card:hover {
    transform: translateY(-5px);
    border-color: rgba(29, 78, 216, 0.4);
}

/* Imagem do Projeto */
.projeto-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Informações de Texto */
.projeto-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.projeto-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--cor-texto);
}

.projeto-info p.descricao-clamp {
    color: var(--cor-texto-mutado);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
    
    /* Limita em 4 linhas com reticências (...) */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tags de Linguagens */
.projeto-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.projeto-tags span {
    background-color: rgba(29, 78, 216, 0.1);
    color: #38BDF8;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* =========================================
   NOVIDADE: OS DOIS BOTÕES NO CARD
========================================= */
.botoes-card {
    display: flex;
    gap: 10px;
    margin-top: auto; /* Empurra os botões pro fundo do card */
    padding-top: 15px;
}

.botoes-card .btn {
    flex: 1; /* Faz os dois botões terem o mesmo tamanho */
    padding: 10px;
    font-size: 0.85rem;
    text-align: center;
    justify-content: center;
}

/* =========================================
   CORREÇÃO: ESTILOS DO MODAL QUE FALTAVAM
========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px);
    z-index: 1000; display: flex; justify-content: center; align-items: center;
    padding: 20px; box-sizing: border-box;
}

.modal-content {
    background: var(--cor-fundo-secundario); width: 100%; max-width: 650px;
    border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8); display: flex; flex-direction: column;
    max-height: 90vh; /* Limita a altura para caber na tela do celular */
}

.modal-lg {
    max-width: 700px;
}

.modal-header {
    padding: 20px 30px; border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-between; align-items: center;
}

.modal-header h3 {
    color: var(--cor-texto); font-size: 1.3rem; margin: 0;
}

.btn-fechar {
    background: none; border: none; color: var(--cor-texto-mutado);
    font-size: 1.5rem; cursor: pointer; transition: color 0.2s;
}

.btn-fechar:hover {
    color: #fff;
}

.modal-body {
    padding: 30px; 
    overflow-y: auto; /* Rola APENAS o conteúdo interno da janela */
}

.modal-descricao {
    line-height: 1.6; color: var(--cor-texto-mutado);
}

.modal-footer {
    padding: 20px 30px; display: flex; justify-content: space-between;
    background: rgba(0,0,0,0.2);
    border-bottom-left-radius: 12px; border-bottom-right-radius: 12px;
}