/* ==========================================
   GALERIA EJA - Estilos v2.8.0
   ========================================== */

/* Grid da Galeria */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Card de Postagem */
.postagem-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.postagem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Header da Postagem */
.postagem-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.postagem-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.postagem-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.postagem-info {
    flex: 1;
}

.postagem-autor {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem;
}

.postagem-data {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.125rem;
}

.postagem-menu {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.postagem-menu:hover {
    background: #f1f5f9;
}

/* Imagem/Vídeo da Postagem */
.postagem-media {
    width: 100%;
    background: #000;
    position: relative;
}

.postagem-media img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.postagem-media iframe {
    width: 100%;
    height: 300px;
    border: none;
    display: block;
}

.postagem-media-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Conteúdo da Postagem */
.postagem-content {
    padding: 1rem;
}

.postagem-titulo {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.postagem-descricao {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.postagem-agendamento {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #eff6ff;
    color: #2563eb;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.postagem-agendamento:hover {
    background: #dbeafe;
}

/* Footer da Postagem */
.postagem-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 1rem;
}

.postagem-action {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.postagem-action:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.postagem-action.liked {
    color: #ef4444;
}

/* Avatar Circular (Foto de Perfil) */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.avatar-circle-lg {
    width: 80px;
    height: 80px;
}

.avatar-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.avatar-initials-lg {
    width: 80px;
    height: 80px;
    font-size: 1.5rem;
}

/* Perfil com Foto */
.perfil-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.perfil-avatar-container {
    position: relative;
}

.perfil-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.perfil-avatar-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    color: #2563eb;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.perfil-avatar-badge:hover {
    transform: scale(1.1);
}

.perfil-info h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.perfil-info p {
    margin: 0.25rem 0 0;
    opacity: 0.9;
}

.perfil-link {
    color: white;
    text-decoration: underline;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: inline-block;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.perfil-link:hover {
    opacity: 1;
}

/* Modal de Foto de Perfil */
.modal-foto-perfil .modal-content {
    max-width: 500px;
}

.foto-preview-container {
    margin: 1.5rem 0;
    text-align: center;
}

.foto-preview {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #667eea;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.foto-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

#foto-preview-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Barra de Progresso */
#upload-progress-container {
    margin: 1.5rem 0;
}

#upload-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    position: relative;
}

#upload-progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 10;
}

/* Botão de Upload Customizado */
.btn-upload-foto {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Avatar com Iniciais */
.avatar-initials-lg {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Responsividade */
@media (max-width: 768px) {
    .galeria-grid {
        grid-template-columns: 1fr;
    }
    
    .postagem-media img,
    .postagem-media iframe {
        height: 250px;
    }
    
    .perfil-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Loading State */
.galeria-grid .loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

/* Empty State */
.galeria-empty {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.galeria-empty i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.galeria-empty h3 {
    color: #475569;
    margin-bottom: 0.5rem;
}
