/* Kontejner pro všechny bubliny */
.imagine-cointaner-bubble {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  justify-items: center;
  align-items: center;
  margin-top: 20px;
  padding: 0; /* odstraněn padding, aby linky nebyly větší než obrázek */
}

/* Linkované bubliny */
.imagine-cointaner-bubble a.buble-link,
.imagine-cointaner-bubble a {
  display: block;
  width: 120px;
  height: 120px;
  text-decoration: none;
  padding: 0;  /* odstranění paddingu */
  margin: 0;   /* odstranění marginu uvnitř gridu */
  position: relative; /* pro text overlay */
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.buble-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;             /* centruje text */
  align-items: center;       /* svisle */
  justify-content: center;   /* vodorovně */
  text-align: center;
  background: rgba(0,0,0,0.6); /* tmavší overlay, lepší čitelnost */
  color: white;
  font-size: 16px;           /* větší písmo */
  font-weight: bold;         /* tučnější text */
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 0;
  border-radius: 15px;
}

.buble-text-no-image {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% + 20px); 
  height: calc(100% + 20px);
  margin-top: -10px;
  margin-left: -10px;
  
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: white;
  color: slateblue;
  font-size: 16px;
  font-weight: bold;
  opacity: 1;
  border-radius: 15px;
  z-index: 5;           /* aby bylo nad tím bílým pozadím odkazu */
}



/* Obecné obrázky buble */
img.buble {
  width: 100%;
  height: 100%;
  object-fit: cover; /* vyplní box, zachová proporce */
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s;
  cursor: pointer;
}

img.buble:hover {
  transform: scale(1.05);
}

img.buble_grey {
  width: 100%;
  height: 100%;
  object-fit: cover; /* vyplní box, zachová proporce */
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s;
  cursor: pointer;
  filter: grayscale(100%);
  transition: filter 0.3s;
}

img.buble_grey:hover {
  filter: grayscale(0%);
}

.imagine-cointaner-bubble a:hover .buble-text,
.imagine-cointaner-bubble a:focus .buble-text {
  opacity: 1;
}


/* Neklikací buble-box s hover textem */
.buble-box {
  position: relative;
  width: 120px;
  height: 120px;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.buble-box img.buble {
  cursor: default;
}

.buble-box .buble-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;             /* centruje text */
  align-items: center;       /* svisle */
  justify-content: center;   /* vodorovně */
  text-align: center;
  background: rgba(0,0,0,0.5); /* poloprůhledný overlay */
  color: white;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 0;
}

.buble-box:hover .buble-text {
  opacity: 1;
}

/* Profilová fotka */
img.profile-pic {
  margin-top: 20px;
  border-radius: 75px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  animation: bounce 2s infinite;
}

/* Základní styl body a text */
body {
  background: linear-gradient(to right, slateblue, lightblue);
  color: white;
  font-family: 'Trebuchet MS';
  text-align: center;
  margin-bottom: 150px;
  margin-left: 175px;
  margin-right: 175px;
  margin-top: 50px;
}

/* Nadpisy */
h2 {
  font-size: 24px;
}

/* Ostatní odkazy pod bublinami */
a {
  background-color: white;
  font-size: 20px;
  border-radius: 10px;
  padding: 10px;
  display: block;
  text-align: center;
  margin: 10px;
  color: slateblue;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.5s ease;
}

a:hover {
  color: white;
  background-color: slateblue;
  transform: scale(1.05);
}

/* Bounce animace */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}
