/* ============================================================
   PROJETO-SHOW.CSS - Detalhes do Projeto
   ============================================================ */

.projeto-show-section {
    padding: 2rem 1.5rem;
    min-height: 80vh;
    background: var(--color-forest-deep);
    position: relative;
    overflow: hidden;
}

.projeto-show-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?auto=format&fit=crop&q=80&w=2000') no-repeat center center/cover;
    opacity: 0.15;
    z-index: 0;
}

.projeto-show-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 44, 33, 0.7);
    z-index: 1;
}

.projeto-show-section .container {
    max-width: var(--container-width);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* CONTAINER PRINCIPAL - ÚNICO CARD BRANCO */
.projeto-show-content {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Imagem de Capa */
.projeto-show-capa {
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.projeto-show-capa img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

/* Cabeçalho */
.projeto-show-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.projeto-show-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-forest-deep);
    margin: 0;
}

.projeto-show-header h1::before {
    display: none;
}

.projeto-show-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
    color: var(--color-text);
    font-size: 0.9rem;
}

.projeto-show-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.projeto-show-meta i {
    color: var(--color-impact-green);
}

.projeto-show-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

/* Descrição */
.projeto-show-descricao {
    margin-bottom: 2rem;
}

.projeto-show-descricao h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: var(--color-forest-deep);
    margin-bottom: 0.5rem;
}

.projeto-show-descricao h2::before {
    display: none;
}

.projeto-show-descricao p {
    color: var(--color-text);
    line-height: 1.8;
}

/* Grid de informações */
.projeto-show-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.projeto-show-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: #f8f9fa;
}

.projeto-show-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--color-forest-deep);
    margin-bottom: 1rem;
}

.projeto-show-card h3 i {
    color: var(--color-impact-green);
    margin-right: 0.5rem;
}

.projeto-show-card p {
    color: var(--color-text);
    margin: 0.3rem 0;
    font-size: 0.95rem;
}

.projeto-show-card .progress-bar {
    background: #e9ecef;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.projeto-show-card .progress-bar .progress-fill {
    background: var(--color-impact-green);
    height: 100%;
    transition: width 0.6s ease;
}

/* Admin actions */
.projeto-show-admin {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius-lg);
}

/* Ranking */
.projeto-show-ranking {
    margin-bottom: 2rem;
}

.projeto-show-ranking h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    color: var(--color-forest-deep);
    margin-bottom: 1rem;
}

.projeto-show-ranking h2::before {
    display: none;
}

.projeto-show-ranking h2 i {
    color: var(--color-impact-green);
    margin-right: 0.5rem;
}

.projeto-show-ranking .table-responsive {
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.projeto-show-ranking table {
    margin-bottom: 0;
}

.projeto-show-ranking table thead {
    background: var(--color-forest-deep);
}

.projeto-show-ranking table thead th {
    color: var(--color-white);
    padding: 0.75rem;
}

.projeto-show-ranking table tbody td {
    color: var(--color-text);
    border-color: #dee2e6;
    padding: 0.75rem;
}

.projeto-show-ranking table tbody tr:hover {
    background: rgba(6, 44, 33, 0.05);
}

.badge-participando {
    display: inline-block;
    background: var(--color-impact-green);
    color: var(--color-white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-left: 0.5rem;
}

/* Fotos */
.projeto-show-fotos {
    margin-bottom: 2rem;
}

.projeto-show-fotos h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    color: var(--color-forest-deep);
    margin-bottom: 1rem;
}

.projeto-show-fotos h2::before {
    display: none;
}

.projeto-show-fotos h2 i {
    color: var(--color-impact-green);
    margin-right: 0.5rem;
}

.projeto-show-fotos .galeria-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.projeto-show-fotos .galeria-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #dee2e6;
    transition: var(--transition-smooth);
}

.projeto-show-fotos .galeria-item:hover {
    transform: scale(1.02);
    border-color: var(--color-impact-green);
}

.projeto-show-fotos .galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Voltar */
.projeto-show-voltar {
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 768px) {
    .projeto-show-content {
        padding: 1.5rem;
    }
    
    .projeto-show-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .projeto-show-grid {
        grid-template-columns: 1fr;
    }
    
    .projeto-show-actions {
        width: 100%;
    }
    
    .projeto-show-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .projeto-show-capa img {
        max-height: 200px;
    }
    
    .projeto-show-fotos .galeria-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .projeto-show-section {
        padding: 1rem 0.8rem;
    }
    
    .projeto-show-content {
        padding: 1rem;
    }
    
    .projeto-show-header h1 {
        font-size: 1.5rem;
    }
    
    .projeto-show-meta {
        font-size: 0.8rem;
    }
    
    .projeto-show-fotos .galeria-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}
/* ============================================================
   RANKING - RESPONSIVO (igual aos relatórios)
   ============================================================ */

.projeto-show-ranking {
    margin-bottom: 2rem;
}

.projeto-show-ranking h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    color: var(--color-forest-deep);
    margin-bottom: 1rem;
}

.projeto-show-ranking h2::before {
    display: none;
}

.projeto-show-ranking h2 i {
    color: var(--color-impact-green);
    margin-right: 0.5rem;
}

/* Wrapper com overflow para scroll horizontal - IGUAL AOS RELATÓRIOS */
.ranking-table-wrapper {
    overflow-x: auto;
    border: 2px solid var(--color-forest-deep);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

.ranking-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    font-size: 0.9rem;
}

.ranking-table-wrapper thead {
    background: var(--color-forest-deep);
}

.ranking-table-wrapper thead th {
    color: var(--color-white);
    padding: 0.8rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    white-space: nowrap;
}

.ranking-table-wrapper tbody td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #e9ecef;
    color: var(--color-text);
    font-size: 0.9rem;
    white-space: nowrap;
}

.ranking-table-wrapper tbody tr:hover {
    background: rgba(6, 44, 33, 0.03);
}

.badge-participando {
    display: inline-block;
    background: var(--color-impact-green);
    color: var(--color-white);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* ============================================================
   RESPONSIVIDADE DO RANKING
   ============================================================ */

@media (max-width: 768px) {
    .ranking-table-wrapper table {
        min-width: 600px;
        font-size: 0.8rem;
    }
    
    .ranking-table-wrapper thead th {
        padding: 0.5rem 0.6rem;
        font-size: 0.65rem;
    }
    
    .ranking-table-wrapper tbody td {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .badge-participando {
        font-size: 0.55rem;
        padding: 0.1rem 0.4rem;
        margin-left: 0.3rem;
    }
}

@media (max-width: 480px) {
    .ranking-table-wrapper table {
        min-width: 500px;
        font-size: 0.7rem;
    }
    
    .ranking-table-wrapper thead th {
        padding: 0.3rem 0.4rem;
        font-size: 0.55rem;
        letter-spacing: 0.5px;
    }
    
    .ranking-table-wrapper tbody td {
        padding: 0.3rem 0.4rem;
        font-size: 0.65rem;
    }
    
    .badge-participando {
        font-size: 0.5rem;
        padding: 0.05rem 0.3rem;
        margin-left: 0.2rem;
    }
}
/* ============================================================
   ORDENAÇÃO DO RANKING
   ============================================================ */

.ranking-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
    padding: 0.6rem 0.9rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--color-impact-green);
    font-size: 0.85rem;
    color: #475569;
}

.ranking-info {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-limpar-ordem {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
}

.btn-limpar-ordem:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

/* Header clicável */
.th-ordenavel {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background 0.15s;
}

.th-ordenavel:hover {
    background: rgba(255, 255, 255, 0.08);
}

.th-ordenavel .seta {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.7rem;
    opacity: 0.35;
    transition: opacity 0.15s, transform 0.15s;
}

.th-ordenavel .seta::after {
    content: '↕';
}

.th-ordenavel.ordenado-asc .seta::after {
    content: '↑';
}

.th-ordenavel.ordenado-asc .seta {
    opacity: 1;
    color: #10b981;
}

.th-ordenavel.ordenado-desc .seta::after {
    content: '↓';
}

.th-ordenavel.ordenado-desc .seta {
    opacity: 1;
    color: #10b981;
}
/* Projeto antigo */
.projeto-legado-resumo { font-size: 1.05rem; margin: .75rem 0 1.25rem; color: var(--rw-texto, #334155); max-width: 70ch; }
.projeto-legado-detalhes { margin: 1.25rem 0; padding: .9rem 1.1rem; border: 1px solid var(--rw-borda, #e2e8f0); border-radius: 10px; background: var(--rw-superficie, #fff); }
.projeto-legado-detalhes summary { cursor: pointer; font-weight: 600; }
.projeto-legado-detalhes > div { margin-top: .75rem; font-size: .92rem; line-height: 1.6; }
.rw-sem-dados { margin: 0; font-style: italic; color: var(--rw-texto-suave, #64748b); }
.projeto-status-antigo { background: #475569; color: #fff; }
.ranking-turma { white-space: nowrap; }
