/* Arquivo CSS modernizado para a página A Prefeitura */
/* Autor: Sistema Modernizado */
/* Data: 2025 */

/* ===== VARIÁVEIS CSS ===== */
:root {
  --primary-color: #1c4c7d;
  --primary-light: #2a5b94;
  --primary-dark: #163d63;
  --secondary-color: #f8f9fa;
  --text-dark: #2c3e50;
  --text-light: #6c757d;
  --border-color: #e9ecef;
  --success-color: #28a745;
  --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
  --shadow-heavy: 0 8px 16px rgba(0,0,0,0.2);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* ===== RESET E BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #f5f6fa;
}

/* ===== CONTAINER PRINCIPAL ===== */
.prefeitura-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  margin-top: 40px;
  margin-bottom: 40px;
}

/* ===== CABEÇALHO DA PÁGINA ===== */
.page-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 3px solid var(--primary-color);
}

.page-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 10px;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  font-weight: 400;
}

/* ===== NAVEGAÇÃO POR ABAS PRINCIPAIS ===== */
.main-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.main-tab {
  background: none;
  border: none;
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-tab:hover {
  color: var(--primary-color);
  background-color: var(--secondary-color);
}

.main-tab.active {
  color: var(--primary-color);
}

.main-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--primary-color);
}

.main-tab i {
  font-size: 1.2rem;
}

/* ===== ABAS SECUNDÁRIAS ===== */
.sub-tabs-container {
  margin-bottom: 30px;
}

.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.sub-tab {
  background: var(--secondary-color);
  border: 2px solid var(--border-color);
  padding: 10px 16px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.sub-tab:hover {
  background-color: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.sub-tab.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-medium);
}

.sub-tab i {
  font-size: 0.9rem;
}

/* ===== ÁREA DE CONTEÚDO ===== */
.content-area {
  background: white;
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
  min-height: 400px;
}

.content-section {
  display: none;
  animation: fadeInUp 0.4s ease-out;
}

.content-section.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ESTILOS DO CONTEÚDO ===== */
.content-title {
  font-size: 1.8rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-title i {
  font-size: 1.6rem;
}

.content-description {
  font-size: 1rem;
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 25px;
  text-align: justify;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.info-card {
  background: var(--secondary-color);
  padding: 20px;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
}

.info-card h4 {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card h4 i {
  font-size: 1rem;
}

.info-card p {
  color: var(--text-dark);
  font-size: 0.95rem;
  margin: 0;
}

.info-card address {
  font-style: normal;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  .prefeitura-container {
    margin: 10px;
    padding: 15px;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .main-tabs {
    flex-direction: column;
    align-items: center;
  }
  
  .main-tab {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 12px 20px;
  }
  
  .sub-tabs {
    justify-content: center;
  }
  
  .sub-tab {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  
  .content-area {
    padding: 20px;
  }
  
  .content-title {
    font-size: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.7rem;
  }
  
  .main-tab {
    font-size: 1rem;
    padding: 10px 15px;
  }
  
  .sub-tab {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
  
  .content-area {
    padding: 15px;
  }
  
  .content-title {
    font-size: 1.3rem;
  }
}

/* ===== UTILIDADES ===== */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.hidden {
  display: none !important;
}

/* ===== BOTÕES DE DOWNLOAD ===== */
.download-section {
  margin-top: 30px;
  padding: 20px;
  background: var(--secondary-color);
  border-radius: var(--border-radius);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  word-break: break-word;
}

.download-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  color: white;
  text-decoration: none;
}

.download-btn i {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ===== LOADING STATE ===== */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  color: var(--text-light);
  font-size: 1.1rem;
}

.loading i {
  margin-right: 10px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
