* {
    font-family: 'Inter', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Header */
#header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#header.scrolled {
    background: rgba(30, 64, 175, 0.95);
    backdrop-filter: blur(10px);
}

/* Hero Section */


.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    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 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s both;
}

/* Cards */
.realizacao-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.realizacao-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}

.realizacao-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.realizacao-card video {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.categoria-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}


.hero-image {
    position: absolute;
    right: -400px; /* começa fora da tela */
    bottom: 0;
    height: 90%;
    max-height: 800px;
    object-fit: contain;
    z-index: 5;
    opacity: 0;
    animation: heroEnter 2s ease-out forwards, heroParallax 8s ease-in-out 2s infinite alternate;

    /* === Fade suave na parte inferior === */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}


/* Animação de entrada da direita para esquerda */
@keyframes heroEnter {
    from {
        transform: translateX(200px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
        right: 0;
    }
}

/* Movimento sutil parallax */
@keyframes heroParallax {
    0% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(-10px) translateY(-5px);
    }
    100% {
        transform: translateX(0) translateY(0);
    }
}
@media (max-width: 768px) {
    .hero-image {
        height: 75%;
        right: -60px;          /* aproxima mais do centro */
        bottom: 120px;          /* sobe a imagem */
        opacity: 0.95;
        animation: heroEnterMobile 2s ease-out forwards, heroParallax 8s ease-in-out 2s infinite alternate;

        /* Mantém o fade suave no final */
        -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 0) 100%);
        mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 0) 100%);
    }

    @keyframes heroEnterMobile {
        from {
            transform: translateX(100px);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
            right: -60px;
            bottom: 120px;
        }
    }
}


.categoria-Saude {
    background-color: #fee2e2;
    color: #991b1b;
}

.categoria-Educacao {
    background-color: #dbeafe;
    color: #1e40af;
}

.categoria-Infraestrutura {
    background-color: #e5e7eb;
    color: #374151;
}

.categoria-Assistencia-Social {
    background-color: #d1fae5;
    color: #065f46;
}

.categoria-Seguranca {
    background-color: #e9d5ff;
    color: #6b21a8;
}

.categoria-Cultura {
    background-color: #fef3c7;
    color: #92400e;
}

.categoria-Esporte {
    background-color: #ffedd5;
    color: #9a3412;
}

.categoria-Meio-Ambiente {
    background-color: #d1fae5;
    color: #047857;
}

.categoria-Outros {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* Filter Buttons */
.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 9999px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Agenda Cards */
.agenda-card {
    background: white;
    border-left: 4px solid #3b82f6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.agenda-card:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(5px);
}

.tipo-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.tipo-Reuniao {
    background-color: #dbeafe;
    color: #1e40af;
}

.tipo-Audiencia-Publica {
    background-color: #fee2e2;
    color: #991b1b;
}

.tipo-Sessao {
    background-color: #e9d5ff;
    color: #6b21a8;
}

.tipo-Visita {
    background-color: #d1fae5;
    color: #065f46;
}

.tipo-Evento-Comunitario {
    background-color: #fef3c7;
    color: #92400e;
}

.tipo-Outros {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.modal-close:hover {
    background: #f3f4f6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .realizacao-card img,
    .realizacao-card video {
        height: 200px;
    }
    
    .modal-content {
        margin: 1rem;
    }
}

/* Loading animation */
.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); }
}

/* Form styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="url"],
textarea,
select {
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    transform: translateY(-2px);
}

/* Alert messages */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* Admin Panel Styles */
.admin-container {
    min-height: 100vh;
    background: #f3f4f6;
}

.admin-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-sidebar {
    background: white;
    border-right: 1px solid #e5e7eb;
    min-height: calc(100vh - 80px);
}

.admin-nav-item {
    display: block;
    padding: 1rem 1.5rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.admin-nav-item:hover {
    background: #f3f4f6;
    color: #3b82f6;
    border-left-color: #3b82f6;
}

.admin-nav-item.active {
    background: #eff6ff;
    color: #3b82f6;
    border-left-color: #3b82f6;
    font-weight: 600;
}

.stats-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stats-card:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Table styles */
.admin-table {
    width: 100%;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-table thead {
    background: #f3f4f6;
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
}

.admin-table td {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
}

.admin-table tbody tr:hover {
    background: #f9fafb;
}

/* File upload */
.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.file-upload-area.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

/* Preview images */
.preview-image {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 2px solid #e5e7eb;
}

/* Video player */
video {
    max-width: 100%;
    border-radius: 0.5rem;
}

.show-card {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

#card-advogado,
#card-mandato {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s ease;
}


#whatsapp-float {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}


/* === PRELOADER === */
#preloader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #003366, #0055a5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.8s ease;
}

#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.preloader-content {
  text-align: center;
  animation: fadeInZoom 1.8s ease-in-out infinite alternate;
}

.preloader-logo {
  width: 160px;
  max-width: 60%;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
}

@keyframes fadeInZoom {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.05);
    opacity: 1;
  }
}

/* Garante que nada apareça antes do preloader */
body.loading {
  overflow: hidden; /* evita rolagem enquanto carrega */
}

body.loading > *:not(#preloader) {
  opacity: 0;
}

/* Spinner do Preloader */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    margin: 20px auto 0; /* Centraliza e dá espaço da logo */
}