.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 15px;
  margin-top: 20px;
  align-items: start;
}

.project-card {
  position: relative;
  aspect-ratio: 4/2.5;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  padding: 15px;
  margin-bottom: 0px;
}

.project-image {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: 8px;
}

.project-card:hover {
  background: rgba(0, 0, 200, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.smart-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 30px 0;
  font-size: 16px;
}

.page-arrow, .page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  text-decoration: none;
}

.page-arrow {
  color: blue;
  font-weight: bold;
}

.page-arrow.disabled {
  color: #ccc;
  cursor: default;
}

.page-number {
  color: #333;
  border: 1px solid #e0e0e0;
}

.page-number.current {
  background: blue;
  color: white;
  border-color: blue;
}

.page-number:hover:not(.current) {
  background: #f5f5f5;
}

.page-dots {
  padding: 0 5px;
}

@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .header-search-wrapper {
    flex-direction: column;
    align-items: stretch;
    margin: 0.5rem 0 0.5rem;
    gap: 0.5rem;
  }

  .search-box {
      display: block;
      width: 100%;
      margin-top: 5px;
      margin-bottom: 0;
      justify-content: flex-start;
      flex: none;
  }

  .search-input,
  .search-input-group {
    width: 100%;
  }

  .filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .apply-filters,
  .reset-filters {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

@media (width: 820px) {
    .date-input, .sort-select {
        font-size: 0.70rem;
    }
    .apply-filters,
    .reset-filters {
        width: 60%;
    }
}

@media (max-width: 450px) {
    .date-input, .sort-select {
        font-size: 0.65rem;
    }
}

@media (max-width: 360px) {
    .date-input, .sort-select {
        font-size: 0.60rem;
    }
}