@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

/* Search Bar Styles */
.search-container {
  display: flex;
  justify-content: center; /* Center horizontally */
  align-items: center;
  position: relative; /* Allow precise positioning */
  margin-top: 20px; /* Add space below the header */
  gap: 5px; /* Space between input and button */
}

.search-bar {
  padding: 5px 10px;
  font-size: 0.875rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 300px; /* Wider input field */
  transition: all 0.3s ease;
}

.search-bar:focus {
  outline: none;
  border-color: #ffd700; /* Highlight border on focus */
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.search-btn {
  background-color: #ffd700; /* Yellow background */
  color: #333; /* Dark text */
  border: none;
  padding: 5px 10px;
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.search-btn:hover {
  background-color: #e6c200; /* Darker yellow on hover */
}

.main-container h1 {
  text-align: center;
}

/* WORKOUTS */

.classes-grid {
  display: flex;
  flex-wrap: wrap;
  column-gap: 2rem; /* Horizontal gap between columns */
  row-gap: 2rem; /* Vertical gap between rows */
  padding: 20px;
  width: 100%;
  margin: 0 auto;
}

.class-item {
  max-width: fit-content;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.class-item div {
  padding: 0.5rem;
  max-width: 200px;
  text-overflow: ellipsis;
}

.class-item img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  background-color: gray;
}

.class-item:hover {
  transform: translateY(-5px);
}

.explore-button {
  margin: auto;
}

.explore-button button {
  background-color: #fff8dc;
  padding: 0.5rem 1rem 0.5rem 1rem;
  border: 1px solid #f0c000;
  border-radius: 30px;
  color: #f0c000;
  font-family: Montserrat, sans-serif;
  cursor: pointer;
}

.explore-button button:hover {
  background-color: #fffae9;
}

/* EXERCISES */

.exercise-item {
  position: relative;
  max-width: fit-content;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.exercise-item div {
  padding: 0.5rem;
}

.exercise-item img {
  display: block;
  width: 200px;
  height: 200px;
  background-color: gray;
  filter: brightness(0.5);
  object-fit: cover;
}
.exercise-item p {
  position: absolute;
  top: 50%;
  color: white;
  font-weight: var(--bold);
  text-align: center;
  width: 100%;
  font-size: 2rem;
  transform: translateY(-50%);
}

.exercise-item:hover {
  transform: translateY(-5px);
}

/* Responsive Design */
@media only screen and (max-width: 1200px) {
  .classes-grid {
    justify-content: center;
  }

  .header-details {
    flex-wrap: wrap;
    text-align: center;
  }
}
