.subprojetos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.subprojeto-card {
    background-color: var(--ll-surface);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.subprojeto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.subprojeto-card a.subprojeto-link {
    display: flex;
    text-decoration: none;
    flex-direction: column;
    color: inherit;
    height: 100%;
}

.subprojeto-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.subprojeto-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 0;
    margin-bottom: 0;
}

.subprojeto-texto {
    padding-inline: 1rem;
    padding-bottom: 1.5rem;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.subprojeto-texto h3 {
    font-size: 1.5rem;
    color: var(--ll-text);
    margin: 1rem 0 0.5rem;
    font-weight: bold;
    text-align: center;
}

.subprojeto-texto p {
    font-size: 1rem;
    color: var(--ll-text-subtle);
    line-height: 1.6;
    text-align: justify;
    margin: 0;
}

/* ─────────────────────────────────────────────────────────────
   Página Individual de Subprojeto (single-subprojetos.php)
   Layout: conteúdo à esquerda + sidebar à direita com ações,
   período, redes sociais e seções de liderança e membros.
   ───────────────────────────────────────────────────────────── */

/* ─── Faixa Superior Centralizada ─────────────────────────── */
.container-header.subprojeto-single-header .title {
    text-align: center;
    margin: auto;
}

.container-header.subprojeto-single-header h1 {
    text-align: center;
}

/* ─── Layout Geral ────────────────────────────────────────── */
.subprojeto-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1rem 4rem 1rem;
    box-sizing: border-box;
}

.subprojeto-main {
    min-width: 0;
    width: 100%;
}

/* ─── Sidebar (Card de Informações do Subprojeto) ─────────── */
.subprojeto-info-card {
    background: var(--ll-surface);
    border-radius: 12px;
    border-top: 4px solid var(--ll-accent);
    box-shadow: var(--ll-shadow-2);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Imagem de Capa / Logo na Sidebar */
.subprojeto-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--ll-surface-subtle);
    border: 1px solid var(--ll-border);
    border-radius: 10px;
    padding: 10px;
    overflow: hidden;
}

.subprojeto-logo img {
    max-width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    margin: 0;
}

/* Badges de Metadados (Status) */
.subprojeto-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.subprojeto-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
}

.subprojeto-badge.status-em_andamento {
    background: color-mix(in srgb, var(--ll-accent) 12%, transparent);
    color: var(--ll-accent);
    border: 1px solid color-mix(in srgb, var(--ll-accent) 30%, transparent);
}

.subprojeto-badge.status-concluido {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.subprojeto-badge.status-planejamento {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Lista de Informações (Período) */
.subprojeto-info-lista {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.subprojeto-info-lista li {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.subprojeto-info-lista i {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ll-accent) 12%, transparent);
    color: var(--ll-accent);
    font-size: 1.05rem;
}

.subprojeto-info-lista div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.subprojeto-info-rotulo {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ll-text-faint);
}

.subprojeto-info-valor {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ll-text-strong);
}

/* Botões de Ação na Sidebar */
.subprojeto-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-subprojeto {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: var(--ll-shadow-1);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    box-sizing: border-box;
}

.btn-subprojeto:hover,
.btn-subprojeto:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--ll-shadow-2);
}

/* Botão Link Externo */
.btn-subprojeto.btn-externo {
    background: var(--ll-accent);
    color: var(--ll-on-accent);
}

.btn-subprojeto.btn-externo:hover,
.btn-subprojeto.btn-externo:focus-visible {
    background: var(--ll-accent-hover);
    color: var(--ll-on-accent);
}

/* Botão Instagram */
.btn-subprojeto.btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #ffffff;
}

.btn-subprojeto.btn-instagram:hover,
.btn-subprojeto.btn-instagram:focus-visible {
    opacity: 0.92;
    color: #ffffff;
}

/* Botão GitHub */
.btn-subprojeto.btn-github {
    background: #1f2328;
    color: #ffffff;
}

.btn-subprojeto.btn-github:hover,
.btn-subprojeto.btn-github:focus-visible {
    background: #000000;
    color: #ffffff;
}

/* ─── Seções de Membros (Liderança e Demais Membros) ──────── */
.subprojeto-main .subprojeto-secao {
    margin-top: 3rem;
}

.subprojeto-main .subprojeto-secao h3.subprojeto-secao-titulo {
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--ll-border-subtle);
    font-size: 1.4rem;
    color: var(--ll-text-strong);
}

.subprojeto-main .subprojeto-membros .membros-grid {
    justify-content: flex-start;
    gap: 20px;
    margin: 0;
}

/* Pílula de Cargo dos Membros */
.subprojeto-membros .membro-setores span.membro-cargo {
    background-color: var(--ll-surface-subtle);
    color: var(--ll-text-muted);
    border: 1px solid var(--ll-border);
    text-transform: capitalize;
    font-size: 0.72rem;
    padding: 3px 12px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.subprojeto-membros .icon-formado {
    display: none !important;
}

.subprojeto-membros .membro-item.formado .membro-avatar img {
    border: none !important;
}

/* ─── Responsividade ──────────────────────────────────────── */
@media (min-width: 900px) {
    .subprojeto-layout.tem-sidebar {
        flex-direction: row;
        align-items: flex-start;
        gap: 2.5rem;
    }

    .subprojeto-layout.tem-sidebar .subprojeto-main {
        flex: 1 1 auto;
        order: 1;
    }

    .subprojeto-layout.tem-sidebar .subprojeto-sidebar {
        flex: 0 0 320px;
        order: 2;
        position: sticky;
        top: 2rem;
    }
}

@media (max-width: 899px) {
    .subprojeto-layout .subprojeto-sidebar {
        order: 1;
        width: 100%;
    }

    .subprojeto-layout .subprojeto-main {
        order: 2;
        width: 100%;
    }

    .subprojeto-main .subprojeto-membros .membros-grid {
        justify-content: center;
    }
}
