:root {
  --bg-1: #c4e9d8;
  --bg-2: #7ce784;
  --acento: #097c0e;
  --accent: #097c0e;
  --tarjeta: #ffffff;
  --card: #ffffff;
  --texto-muted: #6b6b6b;
  --muted: #6b6b6b;
  --cristal: rgba(255, 255, 255, 0.55);
  --glass: rgba(255, 255, 255, 0.55);
  --texto: #123;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  color: var(--texto);
}

.encabezado {
  text-align: center;
  padding: 18px 12px;
  background: linear-gradient(
    90deg,
    rgba(80, 255, 73, 0.24),
    rgba(30, 224, 68, 0.55)
  );
  backdrop-filter: blur(4px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  animation: float 5s ease-in-out infinite;
}
#titulo {
  font-weight: 800;
  margin: 0;
  color: var(--acento);
  font-size: 2.4rem;
}
.subtitulo {
  margin: 6px 0 0;
  color: var(--texto-muted);
  font-weight: 500;
}

.enlaces-usuario {
  position: absolute;
  right: 18px;
  top: 18px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.enlace-usuario {
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  background: var(--acento);
  border: 1px solid rgba(9, 124, 14, 0.12);
  font-weight: 700;
  transition: filter 0.12s ease, transform 0.12s;
}
.enlace-usuario:hover {
  filter: brightness(0.94);
  transform: translateY(-2px);
}
.enlace-usuario.btn-principal { background: var(--acento); color: #fff; }

.pagina-wrap { max-width: 1200px; margin: 18px auto; padding: 12px; }
.pagina { max-width: 1200px; margin: 18px auto; padding: 12px; }

.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
.grid-contenido {
  display: grid;
  grid-template-columns: 2fr 440px;
  gap: 20px;
  align-items: stretch;
}

.municipios-panel {
  background: transparent;
}
.panel-municipios {
  background: transparent;
}
.panel-header h2 {
  margin: 0;
  color: var(--accent);
  font-size: 1.4rem;
}
.cabecera-panel h2 {
  margin: 0;
  color: var(--acento);
  font-size: 1.4rem;
}
.panel-sub {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}
.sub-panel {
  margin: 4px 0 12px;
  color: var(--texto-muted);
  font-size: 0.95rem;
}

.cuadroscroll, .panel-scroll {overflow:auto; padding:8px; border-radius:14px; background: linear-gradient(180deg, rgba(36,204,117,0.06), rgba(36,204,117,0.03)); }
.contenido-municipios {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.lista-municipios {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.card {
  background: #ffffff !important;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s;
  animation: fadeIn 0.6s both;
}
.tarjeta {
  background: #ffffff !important;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s;
  animation: fadeIn 0.6s both;
}
.card:hover { transform: translateY(-6px) scale(1.01); }
.tarjeta:hover { transform: translateY(-6px) scale(1.01); }
.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.tarjeta img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.card .card-title {
  display: block;
  padding: 12px 14px 0 14px;
  color: var(--accent);
  text-decoration: none;
}
.tarjeta .titulo-tarjeta {
  display: block;
  padding: 12px 14px 0 14px;
  color: var(--acento);
  text-decoration: none;
}
.card h3 {
  margin: 8px 14px 6px;
  font-size: 1.15rem;
}
.tarjeta h3 {
  margin: 8px 14px 6px;
  font-size: 1.15rem;
}
.card p {
  margin: 0 14px 12px;
  color: var(--muted);
  font-size: 0.95rem;
}
.tarjeta p {
  margin: 0 14px 12px;
  color: var(--texto-muted);
  font-size: 0.95rem;
}
.mapa {
  display: inline-block;
  margin: 0 14px 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--glass);
  color: var(--accent);
  font-weight: 600;
  border: 1px solid rgba(9, 124, 14, 0.06);
}
.boton-mapa {
  display: inline-block;
  margin: 0 14px 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--cristal);
  color: var(--acento);
  font-weight: 600;
  border: 1px solid rgba(9, 124, 14, 0.06);
}
.map-frame {
  padding: 0 14px 18px;
}
.marco-mapa {
  padding: 0 14px 18px;
}
.map-frame iframe {
  width: 100%;
  height: 150px;
  border: 0;
  border-radius: 8px;
}
.marco-mapa iframe {
  width: 100%;
  height: 150px;
  border: 0;
  border-radius: 8px;
}
.cuadro-animales {
  background: var(--tarjeta);
  padding: 12px;
  border-radius: 12px;
  position: sticky;
  top: 20px;
  margin-top: 18px;
}
.sidebar-title {
  color: var(--accent);
  margin: 0 0 10px;
  font-size: 1.1rem;
}
.titulo-barra {
  color: var(--acento);
  margin: 0 0 10px;
  font-size: 1.1rem;
}
.animalesCuadro {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  background: transparent;
  padding: 6px;
  border-radius: 8px;
}
.grupo-animales {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 10px;
  padding: 6px;
  border-radius: 8px;
}
.grupo-animales {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 10px;
  padding: 6px;
  border-radius: 8px;
}
.animalTarjeta {
  width: 100%;
  background: var(--tarjeta);
  padding: 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.animalTarjeta img { width:100%; height:200px; object-fit:cover; border-radius:8px; }

.tarjeta-animal {
  width: 100%;
  background: var(--tarjeta);
  padding: 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s;
}
.tarjeta-animal img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}
.tarjeta-animal h3 {
  margin: 6px 0 4px;
  font-size: 1.05rem;
  color: var(--acento);
}
.tarjeta-animal .nombre-animal {
  margin: 0;
  font-size: 1.05rem;
  color: var(--acento);
  font-weight: 700;
  text-align: left;
}
.tarjeta-animal p {
  margin: 0;
  font-size: 0.95rem;
  text-align: left;
  color: rgb(0, 0, 0);
}

@keyframes animalIn {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes popIn {
  0% {
    transform: translateY(6px) scale(0.995);
    opacity: 0;
  }
  60% {
    transform: translateY(-8px) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
.tarjeta-animal:focus,
.tarjeta-animal:active {
  outline: none;
  animation: popIn 0.28s ease both;
}
@media (max-width: 980px) {
  .grid-contenido {
    grid-template-columns: 1fr 360px;
  }
  .grupo-animales {
    grid-template-columns: 1fr;
  }
  .tarjeta-animal img {
    height: 160px;
  }
}

@media (max-width: 760px) {
  .grid-contenido {
    grid-template-columns: 1fr;
  }
  .cuadro-animales {
    position: relative;
    top: auto;
    margin-top: 12px;
  }
}