body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #d4f3ff, #fffecf, #d4ffd8);
  background-size: 300% 300%;
  animation: flow 20s ease infinite;
  color: #1c1c1c;
}

@keyframes flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.label {
  background-color: #ffb400;
  text-transform: uppercase;
  width: 250px;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  padding: 6px 14px;
  text-align: center;
  border-radius: 9999px;
  margin: 0 auto 16px;
  font-style: italic;
  letter-spacing: 1px;
}

h1 {
  color: #5bce00;
  font-size: 2rem;
  margin: 0 0 10px;
  text-align: center;
}

.subtitle {
  font-size: 16px;
  color: #333;
  margin-bottom: 32px;
  text-align: center;
}

.special-box {
  display: flex;
  border: 2px solid #ffe37e;
  background-color: #d8f3dc;
  padding: 1rem;
  border-radius: 16px;
  align-items: center;
  gap: 1rem;
  margin: auto auto 2rem;
  max-width: 90%;
}

.special-box .icon {
  font-size: 2rem;
  color: #ffb400;
}

.special-box .text h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #ffaf47;
}

.special-box .text p {
  font-size: 1rem;
  margin: 0 0 10px;
}

.special-box .text a {
  color: #0077ff;
  font-weight: 500;
  text-decoration: underline;
  font-size: 0.9rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 auto 2rem;
  padding: 4px 1rem;
  border: 1px solid #b7e4c7;
  border-radius: 12px;
  background: #e6f4f1;
  max-width: 90%;
}

.filter-button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: transparent;
  color: #1b4332;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.filter-button.active {
  background: linear-gradient(to right, #38b000, #70e000);
  color: white;
}

.filter-button:hover {
  background-color: #b7e4c7;
  color: #081c15;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.card {
  position: relative;
  width: 300px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card img.card-image-large {
  width: 100%;
  height: 350px;
  object-fit: contain;
  background: #f9f9f9;
  padding: 8px;
}

.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: center;
  justify-content: center;
}

.card-name {
  font-size: 1.2rem;
  font-weight: bold;
  color: #4ec300;
  letter-spacing: 1px;
}

.card-info {
  font-size: 1rem;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.card-votes {
  font-size: 1.1rem;
  font-weight: 500;
  color: #25a0d6;
  margin-top: 5px;
}

.place-badge {
  position: absolute;
  top: 1px;
  left: 1px;
  background: #fcd34d;
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.place-label {
  margin-top: 0.6rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: #c47a00;
}

.first .place-label { color: #daa520; }
.second .place-label { color: #7d8791; }
.third .place-label { color: #b66b2c; }

.popup {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.popup-content {
  position: relative;
  background: white;
  padding: 1rem;
  max-width: 95vw;
  max-height: 95vh;
  border-radius: 8px;
  overflow: auto;
}

.popup-content img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 10px;
}

.popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #444;
}


/* 📱 Адаптивність */
@media screen and (max-width: 768px) {
  .gallery-grid {
    flex-direction: column;
    align-items: center;
  }

  .special-box {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
    width: 90%;
  }

  .filter-buttons {
    flex-direction: column;
    gap: 0.75rem;
    width: 90%;
  }

  .card {
    width: 90%;
  }

  .card img.card-image-large {
    height: auto;
    max-height: 300px;
  }
}
