/* Card Style */
.cat-card {
  background-color: rgba(165, 70, 41, 0.05);
  height: 200px;
  border-radius: 15px; /* Rounded corners */
  border: 1px solid rgba(165, 70, 41, 1);
  overflow: hidden; /* Ensures the rounded corners are respected */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Ensures title is at the bottom */
}

.cat-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.8);
}

.cat-card-body {
  padding: 10px; /* Adjust padding as needed */
}

.cat-card-img-top {
  width: 50%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Title Style */
.cat-card-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: rgb(255, 255, 255);
  background-color: rgba(165, 70, 41);
  padding: 10px 15px;
  border-radius: 50px;
  margin-top: auto; /* Pushes title to the bottom within the flexbox */
  width: 100%;
  text-align: center;
}

/* Text Style */
.cat-card-text {
  font-size: 1rem;
  color: #333;
}

/* Responsiveness for small screens */
@media (max-width: 768px) {
  .cat-card {
    height: 80px;
    flex-direction: row; /* Side-by-side layout for small screens */
    align-items: center; /* Center items vertically */
  }

  .cat-card-img-top {
    width: 33%;
    height: 100%;
  }

  .cat-card-title {
    width: 100%; /* Keep it at 65% width */
    font-size: 1rem;
    text-align: center;
    padding: 5px;
    margin-top: 0; /* Removes spacing created by margin-top: auto */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
  }
}
