.termek {
  margin: 10px;
  padding: 15px;
  box-sizing: border-box;
  width: calc(25% - 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  transition: all 0.3s ease;
  height: 100%;
}

.termek:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

main {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: -10px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 70px; /* Added padding to account for fixed navbar */
}

.cim {
  text-decoration: none;
  font-size: 1.5rem;
  color: black;
  text-align: center;
  margin-top: 15px;
  margin-bottom: 10px;
  font-weight: 500;
}

.foto {
  height: 200px;
  width: auto;
  max-width: 100%;
  display: block;
  box-shadow: 2px 2px 13px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.cim:hover {
  color: #8cc542;
  transition: all 0.3s ease;
}

.foto:hover {
  box-shadow: 4px 4px 13px hsl(86, 53%, 25%);
}

@media screen and (max-width: 1024px) {
  .termek {
    width: calc(33.33% - 20px);
  }
}

@media screen and (max-width: 768px) {
  .termek {
    width: calc(50% - 20px);
  }

  main {
    padding-top: 120px; /* Increased padding for mobile view to prevent navbar overlap */
  }
}

@media screen and (max-width: 500px) {
  .termek {
    width: 100%;
    float: none;
    margin: 10px 0;
  }

  main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
  }

  .foto {
    height: 180px;
  }
}
