/* Estilos para elementos reutilizáveis (botões, cards, formulários, modais, etc.) */

/* --- Títulos e Utilitários de Texto --- */
.page-content { padding: 60px 0; }
.page-title { font-family: var(--fonte-titulos); font-size: 2.8rem; color: var(--cor-primaria); text-align: center; margin-bottom: 10px; margin-top: 30px; }
.page-subtitle { text-align: center; font-size: 1.2rem; color: #777; max-width: 700px; margin: 0 auto 20px auto; }
.section-title { text-align: center; font-family: var(--fonte-titulos); font-size: 2.5rem; color: var(--cor-primaria); margin-bottom: 40px; text-transform: uppercase; }
.fade-in-section { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-section.visible { opacity: 1; transform: translateY(0); }

/* --- Banner Padrão para Páginas Internas --- */
.page-banner-internal {
    padding: 80px 20px;
    position: relative;
    text-align: center;
    color: #fff;
    background-color: #333; /* Cor de fundo caso a imagem falhe */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* A 'máscara' escura para garantir a legibilidade do texto */
.page-banner-internal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

/* Garante que o texto fique acima da máscara */
.page-banner-internal .container {
    position: relative; 
    z-index: 2;
}

.page-banner-internal h1 {
    font-family: var(--fonte-titulos);
    font-size: 3rem;
    text-transform: uppercase;
    color: #fff; /* Garante a cor branca */
}

.page-banner-internal p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 10px auto 0 auto;
    color: #fff; /* Garante a cor branca */
}

/* --- Sistema de Botões --- */
.btn, .header-button, .botao-destaque, .botao-enviar, .action-button, .button-edit, .button-delete, .button-info, .botao-cancelar, .logout-button {
    display: inline-block; padding: 10px 20px; text-decoration: none; border-radius: 5px; font-weight: bold; font-size: 1rem;
    border: none; cursor: pointer; text-align: center; white-space: nowrap;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover, .header-button:hover, .botao-destaque:hover, .botao-enviar:hover, .action-button:hover, .button-edit:hover, .button-delete:hover, .button-info:hover, .botao-cancelar:hover, .logout-button:hover {
    transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.header-button, .botao-destaque { background-color: #ffde21; color: #c0392b !important; }
.header-button:hover { background-color: #fff; color: var(--cor-primaria) !important; }
.botao-destaque:hover { background-color: #e6c56d; }
.botao-enviar, .logout-button { background-color: var(--cor-primaria); color: white !important; }
.botao-enviar:hover, .logout-button:hover { background-color: #c0392b; }
.button-edit, .btn--edit { background-color: #007bff; color: white !important; }
.button-edit:hover, .btn--edit:hover { background-color: #0056b3; }
.button-delete, .btn--danger { background-color: #dc3545; color: white !important; }
.button-delete:hover, .btn--danger:hover { background-color: #c82333; }
.button-info, .btn--info { background-color: #17a2b8; color: white !important; }
.button-info:hover, .btn--info:hover { background-color: #117a8b; }
.botao-cancelar, .btn--secondary { background-color: #6c757d; color: white !important; }
.botao-cancelar:hover, .btn--secondary:hover { background-color: #5a6268; }
.btn--sm { padding: 8px 15px; font-size: 0.9em; }

/* --- Formulários --- */
.form-container, .styled-form, .data-form { max-width: 700px; margin: 40px auto; padding: 30px; background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); border: 1px solid #e0e0e0; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #555; }
.form-group input, .form-group textarea, .form-group select, .form-control-file { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; }
.form-actions { margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; text-align: right; }

/* --- Alertas, Tags e Modais --- */
.alert { padding: 15px; margin-bottom: 20px; border-radius: 4px; text-align: center; }
.alert-success { color: #155724; background-color: #d4edda; }
.alert-danger { color: #721c24; background-color: #f8d7da; }
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); }
.modal-box-content { background-color: #fff; margin: 15% auto; padding: 30px; border-radius: 8px; max-width: 500px; position: relative; color: var(--cor-texto); }
.tag { display: inline-block; padding: 6px 14px; margin: 2px; border-radius: 6px; font-size: 0.9em; font-weight: 500; color: #fff; }
.tag--info { background-color: #17a2b8; }
.tag--danger { background-color: #e74c3c; }
.tag--success { background-color: #d4edda; color: #155724; }
.tag--neutral { background-color: #e9ecef; color: #495057; }

/* --- Tabelas --- */
.admin-table-container { overflow-x: auto; background-color: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.07); }
.admin-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.admin-table th, .admin-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #e9ecef; vertical-align: middle; }
.admin-table thead th { background-color: #f8f9fc; color: #555; font-weight: 700; text-transform: uppercase; font-size: 0.8em; }
.admin-table tbody tr:hover { background-color: #f1f5f9; }
.admin-table .actions-cell { display: flex; align-items: center; gap: 8px; }

/* --- Cards --- */
.baluarte-card, .team-card { height: 350px; border-radius: 8px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 20px; transition: transform 0.4s ease; text-decoration: none; background-size: cover; background-position: center; color: white; }
.baluarte-card:hover, .team-card:hover { transform: scale(1.05); }
.baluarte-card::before, .team-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); z-index: 1; }
.product-card { background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); overflow: hidden; display: flex; flex-direction: column; }
.curso-card { flex: 0 0 220px; width: 220px; position: relative; border-radius: 8px; overflow: hidden; text-decoration: none; color: #FFFFFF; background-color: #2c2c2c; }
.user-card-admin { background-color: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); display: flex; flex-direction: column; }
.stat-card { background-color: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.07); border-left: 5px solid var(--cor-primaria); }
.profile-card { background-color: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); overflow: hidden; }
.blog-card { background: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); display: flex; flex-direction: column; overflow: hidden; }


/* --- Estilos Aprimorados do Carrinho Sidebar --- */
#carrinho-sidebar {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    height: fit-content; /* Ajusta a altura ao conteúdo */
}

#carrinho-sidebar h2 {
    color: var(--cor-primaria);
    text-align: center;
    margin: 0 0 20px 0;
    font-family: var(--fonte-titulos);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.carrinho-body {
    min-height: 100px; /* Altura mínima para o corpo do carrinho */
    max-height: 300px; /* Altura máxima antes de a rolagem aparecer */
    overflow-y: auto;
    margin-bottom: 20px;
}

#carrinho-itens {
    list-style: none;
    padding: 0;
    margin: 0;
}

#carrinho-itens li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}
#carrinho-itens li:last-child {
    border-bottom: none;
}

/* Estilo para a mensagem de carrinho vazio */
#carrinho-itens .carrinho-vazio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #888;
    border-bottom: none;
    padding: 20px 0;
}
.carrinho-vazio i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #ccc;
}

#carrinho-footer {
    margin-top: auto; /* Empurra o rodapé do carrinho para baixo */
    border-top: 2px solid #ddd;
    padding-top: 20px;
}

.carrinho-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 20px;
}

.profile-card {
    background-color: #2c2c2c; /* Cor de fundo escura para o card */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    overflow: hidden;
}
.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.profile-card-header h3 {
    margin: 0;
    font-family: var(--fonte-titulos);
    font-size: 1.2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.button-edit-profile {
    font-size: 0.9em;
    font-weight: bold;
    text-decoration: none;
    color: var(--cor-destaque);
}
.profile-card-body {
    padding: 20px;
    color: #ccc;
}
.profile-card-body p { margin-bottom: 12px; }
.profile-card-body p strong { color: #fff; }
.profile-card-body ul { list-style: none; padding-left: 0; }
.profile-card-body li { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.profile-card-body li:last-child { border-bottom: none; }
.profile-card-body .course-list-profile a { color: var(--cor-destaque); text-decoration: none; }
.profile-card-body hr { margin: 20px 0; border-color: rgba(255,255,255,0.1); }

/* --- Componentes Específicos do Admin --- */

.admin-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-actions p {
    margin: 0;
    font-size: 1rem;
    color: #555;
}

.product-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    vertical-align: middle;
}

.text-muted {
    font-size: 0.9em;
    color: #888;
}

.text-center {
    text-align: center;
}