:root {
  --name-padding-bottom: 6px;
  --button-text-color: #ffffff;
  --wifi-button-color: #000000;
  --card-width: 200px;
  --card-aspect: 200 / 353;
}


#pu-vstupy-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  justify-items: center;
  gap: 15px;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding: 20px 0;
  box-sizing: border-box;
}

/* Tablet: 2 vedľa seba */
@media (max-width: 1100px) {
  #pu-vstupy-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
    padding: 10px 0;
  }
}

/* Mobil: 1 stĺpec */
@media (max-width: 700px) {
  #pu-vstupy-grid {
    grid-template-columns: 1fr;
    max-width: 95vw;
    padding: 6px 0;
  }
}

/*** STYLING BOXOV ***/
#pu-vstupy-grid .item {
  width: 100%;
  max-width: var(--card-width);
  aspect-ratio: var(--card-aspect);
  border-radius: 20px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;   /* Button vždy dole */
  align-items: center;              /* Všetko centrované */
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
  box-sizing: border-box;
}

/* Obrázky sa prispôsobia šírke užšej karty */
#pu-vstupy-grid .name img {
  max-width: 70%;
  height: auto;
}

/* Zamedz rozťahovaniu “Vstúpiť” do rohu — zosilnená špecifickosť (ID + zdvojená trieda) proti téme */
#pu-vstupy-grid a.ahref.ahref {
  display: block;
  margin-left: auto;
  margin-right: auto;
  background: transparent !important;
  color: var(--button-text-color) !important;
  border: 1.5px solid var(--button-text-color) !important;
  border-radius: 50px;
  padding: 0.6rem 1.7rem;
  font: 18px "Margarine", sans-serif;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s;
  min-width: 90px;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  position: static !important;
  align-self: center !important;
}

#pu-vstupy-grid a.ahref.ahref:hover {
  background: transparent !important;
  color: var(--button-text-color) !important;
}

#pu-vstupy-grid .wifi-item a.ahref.ahref {
  color: var(--wifi-button-color) !important;
  border-color: var(--wifi-button-color) !important;
}

#pu-vstupy-grid .wifi-item a.ahref.ahref:hover {
  background: transparent !important;
  color: var(--wifi-button-color) !important;
}

#pu-vstupy-grid .name {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  justify-content: center;
  margin-bottom: 10px !important;
  padding-bottom: var(--name-padding-bottom);
}

#pu-vstupy-grid .title-text {
  color: #ffffff;
  font-weight: 900;
  margin-top: 6px;
  margin-bottom: 0;
}

#pu-vstupy-grid .wifi-item .title-text {
  color: var(--wifi-button-color);
}

#pu-vstupy-grid .button-jittery a.ahref.ahref {
  animation: jittery 4s infinite;
  color: var(--button-text-color) !important;
}
#pu-vstupy-grid .wifi-item.button-jittery a.ahref.ahref {
  color: var(--wifi-button-color) !important;
}
#pu-vstupy-grid .title-text br {
  display: block;
  content: "";
  margin-top: 4px;
}

@keyframes jittery {
  5%, 50% { transform: scale(1);}
  10% { transform: scale(0.9);}
  15% { transform: scale(1.15);}
  20% { transform: scale(1.15) rotate(-5deg);}
  25% { transform: scale(1.15) rotate(5deg);}
  30% { transform: scale(1.15) rotate(-3deg);}
  35% { transform: scale(1.15) rotate(2deg);}
  40% { transform: scale(1.15) rotate(0);}
}