body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: #371959;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  margin-top: 30px;
  font-size: 34px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  max-width: 900px;
}

h2 {
  margin: 10px 0 30px;
  font-size: 18px;
  font-weight: 400;
  color: #b8b8b8;
  text-align: center;
  max-width: 850px;
  line-height: 1.4;
}

#mapa-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  border-radius: 10px;
  background: white;
  padding: 5px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#zoom-wrapper {
  transform-origin: center center;
  transition: transform 0.1s ease-out;
  cursor: grab;
}

svg path.distrito {
  fill: #753BBD;
  stroke: #3b2274;
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.2s, transform 0.2s;
}

svg path.distrito:hover {
  fill: #9C6BDF;
}

.distrito {
  fill: #753BBD;
  stroke: black;
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.2s;
}

.resaltado {
  fill: #B78CFF !important;
}

#tooltip {
  display: none;
  position: absolute;
  background: #fff;
  border: 1px solid #888;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  pointer-events: none;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  color: #333;
  z-index: 10;
}

.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.96);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  padding: 30px;
  text-align: center;
}

.categoria {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  background: white;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.categoria:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.categoria img {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
}

.categoria span {
  font-size: 14px;
  color: #ccc;
}

.close, .back, .prev, .next {
  position: absolute;
  font-size: 30px;
  color: white;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  z-index: 1002;
  user-select: none;
}

.close { top: 20px; right: 30px; }
.back  { top: 20px; left: 30px; }
.prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.next  { right: 20px; top: 50%; transform: translateY(-50%); }

#galeria img {
  max-width: 90vw;
  max-height: 70vh;
  border-radius: 10px;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); 
}

#carousel-img {
  max-width: 80%;
  max-height: 70%;
  object-fit: contain;
  border: 4px solid white;
  border-radius: 8px;
}

#pie-imagen {
  margin-top: 15px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  text-align: center;
  max-width: 90%;
}

footer {
  width: 100%;
  background-color: #111111;
  color: white;
  padding: 25px 10px 20px;
  font-size: 14px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.footer-logos img {
  height: 100px;
  max-width: 2500px;
}

.mensaje-cierre {
  max-width: 900px;
  font-size: 19px;
  color: #b8b8b8;
  text-align: center;
  margin: 50px 20px 30px;
  line-height: 1.7;
  font-weight: 600;
}

.mensaje-cierre p {
  margin-bottom: 18px;
}

.logo-congreso {
  max-width: 400px;
  height: auto;
  margin-top: 30px;
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  .logo-congreso {
    max-width: 160px;
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 26px;
    padding: 0 10px;
  }

  h2 {
    font-size: 16px;
    padding: 0 15px;
  }

  .mensaje-cierre {
    font-size: 16px;
    padding: 0 15px;
  }

  .footer-logos img {
    height: 100px;
  }
}

.buscador-wrapper {
  margin: 15px 0 20px;
}

#buscador-distrito {
  width: 600px;
  padding: 10px 15px;
  border: 2px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#buscador-distrito:focus {
  border-color: #753BBD;
}

#contador-imagenes {
  font-size: 18px;
  color: #b8b8b8;
  margin: 10px 0 25px;
  font-weight: 600;
  text-align: center;
}

#zoom-buttons {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#zoom-buttons button {
  background: #753BBD;
  color: white;
  border: none;
  padding: 6px 10px;
  font-size: 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

#zoom-buttons button:hover {
  background: #9C6BDF;
}

#zoom-wrapper svg {
  filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.6));
}

#galeria {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#galeria img {
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

#pie-imagen {
  color: white;
  margin-top: 12px;
  font-size: 16px;
  text-align: center;
  max-width: 90%;
}

svg {
  cursor: grab;
}

/* ❗ NUEVO: mensaje de agradecimiento después de subir imagen */
#gracias-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255,255,255,0.97);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  text-align: center;
  padding: 20px;
}

#gracias-overlay h2 {
  font-size: 22px;
  color: #371959;
  margin-bottom: 20px;
  font-weight: 700;
}

#gracias-overlay img {
  max-width: 200px;
  margin-bottom: 20px;
}

#gracias-overlay button {
  padding: 10px 20px;
  background-color: #753BBD;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#gracias-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 20px;
}

#gracias-overlay h2 {
  color: #371959;
  font-size: 22px;
  margin-top: 20px;
  max-width: 90%;
}

#gracias-overlay button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #753BBD;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

#gracias-overlay img {
  max-width: 150px;
  height: auto;
}

#mensaje-flotante {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255,255,255,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#mensaje-flotante.oculto {
  display: none;
}

.caja-mensaje {
  width: 90%;
  max-width: 500px;
  height: auto;
  max-height: 500px;
  background: white;
  padding: 30px 20px;
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0,0,0,0.2);
  text-align: center;
  color: #371959;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.caja-mensaje .logo-mensaje {
  width: 100px;
  height: auto;
}

.caja-mensaje button {
  background: #753BBD;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 10px;
  cursor: pointer;
}

.mensaje-oculto {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 500px;
  transform: translate(-50%, -50%);
  background-color: white;
  border: 2px solid #6a1b9a;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  padding: 30px;
  text-align: center;
  z-index: 9999;
  color: #4a148c;
}

.mensaje-oculto button {
  background-color: #6a1b9a;
  color: white;
  border: none;
  padding: 12px 20px;
  margin-top: 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

.cerrar-mensaje {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 22px;
  font-weight: bold;
  color: #6a1b9a;
  cursor: pointer;
}
