/* ===== General Page Styling ===== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f7f7f7;
  color: #333;
}

/* ===== Navbar ===== */
.navbar {
  background: #ffffff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: #333;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  text-align: center;
  color: white;
}

.hero-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  filter: brightness(0.5);
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.hero-text h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.hero-text input {
  padding: 0.5rem;
  font-size: 1rem;
  width: 250px;
  border: none;
  border-radius: 5px 0 0 5px;
}

.hero-text button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: none;
  background: #007bff;
  color: white;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}

/* ===== Course Grid ===== */
.popular-courses {
  padding: 2rem;
  text-align: center;
}

.popular-courses h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding: 0 2rem;
}

/* ===== Course Cards ===== */
.course-card {
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 10px;
  background: #ffffff;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.course-card img {
  width: 100%;
  border-radius: 8px;
  height: 150px;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

.course-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* ===== Login/Register Container (shared from old CSS) ===== */
.container {
  max-width: 400px;
  margin: 2rem auto;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

input, button {
  width: 100%;
  padding: 10px;
  margin: 0.5rem 0;
}

button {
  cursor: pointer;
}

#responseMsg {
  margin-top: 1rem;
  color: green;
  font-weight: bold;
}
