/* Portal Legislativo - Estilos Principais */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Reset e configurações básicas */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #ffffff;
}

/* Acessibilidade - Alto Contraste */
.high-contrast {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.high-contrast .bg-white {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.high-contrast .bg-light {
    background-color: #333333 !important;
    color: #ffffff !important;
}

.high-contrast .text-muted {
    color: #cccccc !important;
}

.high-contrast .card {
    background-color: #222222 !important;
    border-color: #555555 !important;
    color: #ffffff !important;
}

/* Header */
.accessibility-bar {
    font-size: 0.875rem;
}

.main-header {
    border-bottom: 3px solid var(--primary-color);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    max-height: 140px;
    width: auto;
}

.logo-text h4 {
    font-size: 1.25rem;
    margin: 0;
}

.logo-text small {
    font-size: 0.75rem;
}

/* Navegação */
.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 2rem;
    transition: all 0.3s ease;
}

.hero-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

/* Cards */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Vereador Card */
.vereador-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.vereador-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.vereador-foto {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.partido-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
}

/* Proposição Card */
.proposicao-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
    border-left: 4px solid var(--info-color);
}

.proposicao-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.proposicao-numero {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Notícia Card */
.noticia-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.noticia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.noticia-imagem {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.noticia-categoria {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

/* Search Box */
.search-box {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.search-input {
    border-radius: 2rem;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Estatísticas */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

.stats-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.stats-label {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* Badges personalizados */
.badge-situacao {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-weight: 600;
}

/* Tabelas */
.table-custom {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table-custom th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table-custom td {
    padding: 1rem;
    border-color: #f8f9fa;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: #f8f9fa;
}

/* Paginação */
.pagination .page-link {
    border-radius: 0.5rem;
    margin: 0 0.125rem;
    border: none;
    color: var(--primary-color);
    font-weight: 500;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Formulários */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 1.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid white;
}

/* Breadcrumb personalizado */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--secondary-color);
    font-weight: 600;
}

/* Footer */
footer {
    margin-top: auto;
}

footer .social-links a {
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

/* Responsividade */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    .vereador-foto {
        width: 60px;
        height: 60px;
    }
    
    .search-box {
        padding: 1rem;
    }
    
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline::before {
        left: 0.5rem;
    }
    
    .timeline-item::before {
        left: -1.5rem;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utilitários */
.text-shadow {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.border-start-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-start-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-start-warning {
    border-left: 4px solid var(--warning-color) !important;
}

.border-start-danger {
    border-left: 4px solid var(--danger-color) !important;
}

.border-start-info {
    border-left: 4px solid var(--info-color) !important;
}

/* Estilos para os Cards de Notícias */
.news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.news-card-large, .news-card-small {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 100%;
    background-color: #333; /* Cor de fundo caso a imagem falhe */
}

.news-card-large {
    min-height: 450px; /* Altura para o card principal */
}

.news-card-small {
    min-height: 217px; /* Altura para os cards menores */
}

.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garante que a imagem cubra todo o espaço */
    transition: transform 0.3s ease;
}

.news-card-large:hover .news-card-img,
.news-card-small:hover .news-card-img {
    transform: scale(1.05); /* Efeito de zoom ao passar o mouse */
}

.news-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    padding: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}

.news-card-category {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 5px;
    margin-bottom: 10px;
    align-self: flex-start; /* Alinha a categoria no início */
}

.news-card-title {
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.news-card-large .news-card-title {
    font-size: 1.8rem;
}

.news-card-small .news-card-title {
    font-size: 1.1rem;
}

.news-card-summary {
    font-size: 0.95rem;
    color: #e0e0e0;
    margin-top: 10px;
}