/* --- CONFIGURAÇÕES GERAIS E NOVA PALETA RIO SAÚDE --- */
:root {
  --cor-institucional-escuro: #004a80;
  --cor-institucional-ciano: #00c0f3;
  --cor-sus-verde: #008a00;
  --cor-atual: var(--cor-institucional-ciano);
  --cor-concluida: #6c757d;
  --cor-bloqueada: #ced4da;
  --cor-vermelha: #dc3545;
  --cor-amarela: #ffc107;
  --cor-fundo: #f0f2f5;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
  overflow: hidden;
}
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--cor-fundo);
  color: #333;
}
#app-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px;
  height: 100%;
}
h1 {
  margin-bottom: 20px;
  font-size: 1.5em;
  flex-shrink: 0;
  color: var(--cor-institucional-escuro);
}
#mapa-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background-color: #e3f0fa;
  background-image: linear-gradient(-45deg, #82cef7, #acb4ff, #82d8f7, #cce5f2);
  background-size: 400% 400%;
  animation: mover-gradiente 20s ease infinite;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  scroll-behavior: smooth;
}
@keyframes mover-gradiente {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
#mapa-conexoes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.conexao {
  stroke-width: 3px;
  transition: stroke 0.4s ease;
}
.conexao-bloqueada {
  stroke: var(--cor-bloqueada);
  stroke-dasharray: 5 5;
}
.conexao-concluida {
  stroke: var(--cor-concluida);
}
.conexao-ativa {
  stroke: var(--cor-atual);
}
.conexao-animando {
  stroke: var(--cor-sus-verde) !important;
  stroke-width: 5px;
  animation: desenhar-linha 0.7s ease-out forwards;
}
@keyframes desenhar-linha {
  from {
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dashoffset: 0;
  }
}
.etapa {
  position: absolute;
  z-index: 2;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 11px;
  font-weight: bold;
  padding: 5px;
  transition: all 0.4s ease;
  border: 4px solid;
  cursor: pointer;
}
.etapa:hover {
  transform: scale(1.05);
}
.etapa i {
  font-size: 24px;
  margin-bottom: 5px;
}
.etapa.etapa-atual {
  border-color: var(--cor-atual);
  background-color: white;
  color: var(--cor-atual);
  transform: scale(1.1);
  animation: pulse-ciano 1.5s infinite;
  z-index: 10;
}
.etapa.etapa-concluida {
  border-color: var(--cor-concluida);
  background-color: #f1f3f5;
  color: var(--cor-concluida);
  z-index: 5;
}
.etapa.etapa-bloqueada {
  border-color: var(--cor-bloqueada);
  background-color: #e9ecef;
  color: #adb5bd;
}
.etapa-vermelha {
  border-color: var(--cor-vermelha) !important;
  color: var(--cor-vermelha) !important;
  animation: soft-pulse 2s infinite;
}
.etapa-amarela {
  border-color: var(--cor-amarela) !important;
  color: var(--cor-amarela) !important;
}
.etapa-vermelha.etapa-atual {
  animation: pulse-red 1.5s infinite;
}
@keyframes pulse-ciano {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 192, 243, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 192, 243, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 192, 243, 0);
  }
}
@keyframes pulse-red {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}
@keyframes soft-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}
.escondido {
  display: none !important;
}
#card-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 15px;
}
.card-conteudo {
  background-color: white;
  border-radius: 15px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}
.card-galeria {
  position: relative;
  width: 100%;
  background-color: #eee;
  flex-shrink: 0;
  overflow: hidden;
}
#card-imagem-principal {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  animation: pan-image 20s linear infinite alternate;
}
@keyframes pan-image {
  0% {
    transform: scale(1.1) translateX(-2.5%);
  }
  100% {
    transform: scale(1.1) translateX(2.5%);
  }
}
.card-info {
  position: relative;
  padding: 20px;
  overflow-y: auto;
}
.btn-fechar-card {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
}
.btn-fechar-card:hover {
  color: #333;
}
#card-titulo {
  margin-top: 0;
  color: var(--cor-institucional-escuro);
}
#card-tempo-estimado {
  background-color: #e7f1ff;
  color: #0056b3;
  border: 1px solid #b8d6fb;
  border-radius: 50px;
  padding: 5px 15px;
  font-size: 14px;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 15px;
}
#card-tempo-estimado::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f017";
  margin-right: 8px;
}
#card-descricao {
  color: #555;
  line-height: 1.6;
  margin: 15px 0;
}
#card-opcoes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.botao-proximo {
  background-color: var(--cor-sus-verde);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.2s;
}
.botao-proximo:hover {
  background-color: #006400;
}
.botao-urgente {
  background-color: var(--cor-vermelha);
}
.botao-urgente:hover {
  background-color: #b22222;
}
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.btn-flutuante {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--cor-institucional-escuro);
  color: white;
  border: none;
  border-radius: 50px;
  width: 60px;
  height: 60px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  z-index: 999;
  transition: all 0.3s ease;
}
.btn-flutuante span {
  position: absolute;
  right: 70px;
  white-space: nowrap;
  background-color: #343a40;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.btn-flutuante:hover {
  transform: scale(1.1);
}
.btn-flutuante:hover span {
  opacity: 1;
  visibility: visible;
}
@media (min-width: 768px) {
  .card-conteudo {
    flex-direction: row;
  }
  .card-galeria {
    width: 50%;
  }
  #card-imagem-principal {
    height: 100%;
    min-height: 400px;
    aspect-ratio: auto;
  }
  .card-info {
    width: 50%;
  }
}

/* --- NOVO: ESTILO DO RODAPÉ --- */
#app-footer {
  width: 100%;
  text-align: center;
  padding: 15px 0 5px 0;
  font-size: 12px;
  color: #8a99ab; /* Cor sutil */
  flex-shrink: 0; /* Garante que ele não encolha */
}
#app-footer a {
  color: #6c757d; /* Cor um pouco mais forte para o link */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}
#app-footer a:hover {
  color: var(--cor-institucional-escuro); /* Cor primária da marca no hover */
}
