body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background: #f4f4f4;
}

#used-machines {
  background-color: #f4f4f4;
  padding: 40px 0;
}

#used-machines h2 {
  text-align: center;
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 30px;
}

/* Pasek filtrów: "wszystko", "koparki" itd. */
.machine-filter-bar {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
}

.filter-button {
  background: #ddd;
  border: none;
  margin: 5px;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.filter-button:hover {
  background: #bbb;
}

.filter-button.active {
  background: #c51212;
  color: white;
}

/* Kafle z maszynami */
.ad-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  padding: 28px;
  margin: 28px auto;
  max-width: 1000px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-card:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
}

.ad-info {
  flex: 1;
}

.ad-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 5px;
}

.ad-type,
.ad-year,
.ad-hours {
  font-size: 17px;
  color: #555;
  margin-bottom: 4px;
}

.ad-price {
  margin-top: 12px;
  font-weight: bold;
  font-size: 20px;
}

.ad-image img {
  width: 240px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}
.ad-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
/* Responsywność dla mniejszych ekranów */
@media (max-width: 768px) {
  .ad-image img {
    width: 180px; /* mniejsze zdjęcie na tabletach */
  }
}

@media (max-width: 480px) {
  .ad-card {
    flex-direction: column; /* kolumnowo na bardzo małych ekranach */
    align-items: center;
  }
  .ad-image img {
    width: 100%; /* zdjęcie na całą szerokość kontenera */
    max-width: 300px; /* limit maksymalny szerokości */
    margin-bottom: 15px;
  }
  .ad-info {
    text-align: center;
  }
}