/* === MAPA === */
#mapa-sofofa {
  position: relative;
  width: 100%;
  max-width: 1080px;
  aspect-ratio: 16 / 3;
  background-image: url('chile.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin: 0 auto;
}

.punto {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
  z-index: 5;
}

.punto-norte { background-color: #386bb2 !important; }
.punto-centro { background-color: #e9811b !important; }
.punto-sur { background-color: #46ad48 !important; }

.punto:hover {
  transform: scale(1.3);
  z-index: 10;
}

/* === TOOLTIP DEL MAPA === */
#mapa-tooltip {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  padding: 10px;
  max-width: 400px;
  box-sizing: border-box;
  z-index: 15;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#mapa-tooltip.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.tooltip-box {
  text-align: center;
}

/* === POSTS DENTRO DEL TOOLTIP === */
.posts-wrapper {
  display: grid;
  gap: 10px;
  place-items: start center;
  justify-content: center;
  align-items: start;
  text-align: center;
  grid-auto-flow: row;
}

.posts-wrapper.column-1 { grid-template-columns: repeat(1, 120px); }
.posts-wrapper.column-2 { grid-template-columns: repeat(2, 120px); }
.posts-wrapper.column-3 { grid-template-columns: repeat(3, 120px); }

.item-post {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 120px;
  width: 120px;
  overflow: hidden;
  margin: 0 auto;
}

.item-post .post-thumbnail img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 6px;
}

.item-post p {
  font-size: 12px;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: break-word;
  text-align: center;
}

/* === TÍTULO DE CADA REGIÓN === */
.categoria-titulo {
  text-align: center;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 600;
}

.categoria-titulo div {
  display: block;
  margin: 2px auto;
  padding: 6px 10px;
  border-radius: 6px;
  color: #fff;
  width: fit-content;
  line-height: 1;
}

/* === ACORDEÓN (SOLO EN MÓVIL) === */
#acordeon-regiones {
  display: none;
  max-width: 1000px;
  margin: 20px auto;
  background: transparent;
}

.acordeon-item {
  margin-bottom: 10px;
  border: none;
  overflow: hidden;
  background: transparent;
}

.acordeon-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 20px;
  background: #fff!important;
  color: #474756;
  border: none;
  cursor: pointer;
  text-align: left;
  font-weight: bold;
  font-size: 16px;
  transition: background 0.3s ease;
  border-radius: 50px;
  margin-bottom: 4px;
}

.acordeon-toggle .color-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.acordeon-toggle.punto-norte .color-circle { background-color: #386bb2; }
.acordeon-toggle.punto-centro .color-circle { background-color: #e9811b; }
.acordeon-toggle.punto-sur .color-circle { background-color: #46ad48; }

.acordeon-toggle::after {
  content: '\25BC';
  margin-left: auto;
  transition: transform 0.3s ease;
}

.acordeon-toggle.active::after {
  transform: rotate(180deg);
}

.acordeon-contenido {
  max-height: 0;
  overflow: hidden;
  padding: 0 12px;
  background: transparent;
  transition: max-height 0.5s ease, padding 0.4s ease;
}

.acordeon-contenido.open {
  max-height: 1000px;
  padding: 12px;
}

a.post-thumbnail img {
  border-radius: 50%;
}

/* === RESPONSIVE PARA MÓVILES === */
@media screen and (max-width: 768px) {
  #mapa-sofofa {
    display: none !important;
  }

  #acordeon-regiones {
    display: block !important;
  }

  .posts-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    justify-items: center;
    text-align: center;
  }

  .item-post {
    max-width: 100%;
  }

  .item-post .post-thumbnail img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
  }

  .item-post p {
    font-size: 13px;
    margin-top: 6px;
  }
}