
:root {
  --primary: #10ea22;
  --primary-dark: #086c38;
  --secondary: rgb(78, 31, 3);
  --dark: rgb(44, 23, 0);
  --light: #daf5c5;
  --gray: #968a7a;
  --gray-dark: #394f37;
  --transition: 0.3s ease;
  --border-radius: 30px;
}

.baloot-gallery {
  max-width: 1200px;
  margin: 0 auto;
  color: var(--light);
  font-family: 'Vazir', sans-serif;
}

.baloot-gallery__title {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
  position: relative;

}

.baloot-gallery__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--primary), transparent);
}

.baloot-gallery__filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.baloot-gallery__filter-btn {
  background-color: var(--secondary);
  color: var(--light);
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: bold;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.baloot-gallery__filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--primary-dark);
  transition: width var(--transition);
  z-index: -1;
}

.baloot-gallery__filter-btn:hover::before {
  width: 100%;
}

.baloot-gallery__filter-btn.active {
  background-color: var(--primary);
  color: var(--dark);
  box-shadow: 0 0 10px var(--primary);
}

.baloot-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.baloot-gallery__item {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  height: 250px;
  transform: scale(0.98);
  transition: all var(--transition);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.baloot-gallery__item:hover {
  transform: scale(1);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.baloot-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.baloot-gallery__item:hover img {
  transform: scale(1.05);
}

.baloot-gallery__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: var(--light);
  transform: translateY(100%);
  transition: transform var(--transition);
}

.baloot-gallery__item:hover .baloot-gallery__overlay {
  transform: translateY(0);
}

.baloot-gallery__title-text {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.baloot-gallery__category {
  font-size: 0.8rem;
  color: var(--primary);
}

.baloot-gallery__modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  transition: all 0.3s ease;
}

.baloot-gallery__modal.active {
  opacity: 1;
  visibility: visible;
}

.baloot-gallery__image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: var(--border-radius);
  box-shadow: 0 0 30px rgba(16,234,34,0.3);
}

.baloot-gallery__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--primary);
  color: var(--dark);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.baloot-gallery__close:hover {
  background-color: var(--light);
  transform: rotate(90deg);
}

.baloot-gallery__nav {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.baloot-gallery__nav-btn {
  background-color: rgba(16,234,34,0.3);
  color: var(--light);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.baloot-gallery__nav-btn:hover {
  background-color: var(--primary);
  color: var(--dark);
}

.baloot-gallery__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0,0,0,0.7);
  color: var(--light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.baloot-gallery__loader {
  width: 50px;
  height: 50px;
  border: 5px solid var(--gray);
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  margin: 2rem auto;
  display: none;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

.baloot-gallery__empty {
  text-align: center;
  padding: 3rem;
  display: none;
}

.baloot-gallery__empty-icon {
  font-size: 3rem;
  color: var(--gray);
  margin-bottom: 1rem;
}

.baloot-gallery__empty-text {
  color: var(--gray);
}


