.schools-stats-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f0f0 100%);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #eaeaea;
  position: relative;
}

.stats-header {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.total-schools, .updated-today, .cities-dropdown {
  display: flex;
  align-items: center;
  padding: 15px 25px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  min-width: 200px;
}

.cities-toggle-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.total-schools:hover, .updated-today:hover, .cities-dropdown:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(92, 56, 144, 0.15);
}

.updated-icon {
  background: linear-gradient(135deg, #06d6a0 0%, #029e73 100%) !important;
}

.updated-today {
  position: relative;
}

.updated-today::after {
  content: 'جديد';
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff6b6b;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: bold;
}

.stats-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #5C3890 0%, #7b4db8 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.stats-icon i {
  font-size: 24px;
  color: white;
}

.stats-info h3 {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.stats-info p {
  font-size: 14px;
  color: #777;
  margin: 5px 0 0;
  display: flex;
  align-items: center;
}

.toggle-icon {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

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

.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease, margin 0.5s ease;
  opacity: 0;
  margin-top: 0;
}

.cities-grid.active {
  max-height: 500px;
  opacity: 1;
  margin-top: 20px;
  overflow-y: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(92, 56, 144, 0.1);
}

.city-item {
  background: white;
  border-radius: 10px;
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(92, 56, 144, 0.1);
  cursor: pointer;
}

.city-item:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 15px rgba(92, 56, 144, 0.15);
  z-index: 1;
}

.city-item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #5C3890, #7b4db8);
}

.city-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  text-align: center;
}

.city-count {
  font-size: 20px;
  font-weight: 700;
  color: #5C3890;
}

.city-item.active {
  background: linear-gradient(135deg, #5C3890 0%, #7b4db8 100%);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 15px rgba(92, 56, 144, 0.25);
}

.city-item.active .city-name,
.city-item.active .city-count {
  color: white;
}

.filtered-text {
  font-size: 16px;
  font-weight: 500;
  color: #5C3890;
  margin: 10px 0;
  padding: 5px 10px;
  background-color: #f5f0ff;
  border-radius: 5px;
  display: inline-block;
}

@media (max-width: 768px) {
  .stats-header {
    flex-direction: column;
    gap: 15px;
  }
  
  .total-schools, .cities-dropdown {
    width: 100%;
  }
  
  .cities-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}