@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* --- Root Variables & Base Styles --- */
:root {
  --background: 210 20% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --primary: 222 47% 20%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222 47% 11%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --accent: 16 90% 55%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84% 60%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --ring: 222 47% 20%;
  --radius: 0.75rem;
  --gradient-hero: linear-gradient(135deg, hsl(222 47% 15%) 0%, hsl(222 47% 25%) 100%);
  --gradient-accent: linear-gradient(135deg, hsl(16 90% 55%) 0%, hsl(25 95% 60%) 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
}

a {
  color: hsl(var(--accent));
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Shared Components --- */
.bg-gradient-hero { background: var(--gradient-hero); }
.bg-gradient-accent { background: var(--gradient-accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-accent {
  background: var(--gradient-accent);
  color: hsl(var(--accent-foreground));
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-accent:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.input {
  width: 100%;
  height: 3rem;
  padding: 0 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3 px hsl(var(--ring) / 0.1);
}

.label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* --- Navigation --- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: hsl(var(--card) / 0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
}

.navbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-links { display: flex; gap: 2rem; align-items: center; }

.nav-link { 
  color: hsl(var(--muted-foreground)); 
  font-weight: 500; 
  transition: color 0.2s; 
}

.nav-link:hover { 
  color: hsl(var(--foreground)); 
  text-decoration: none; 
}

/* --- Course Grid & Cards --- */
.courses-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) { .courses-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .courses-grid { grid-template-columns: repeat(3, 1fr); } }

.course-card {
  background: hsl(var(--card)); border-radius: 1rem;
  overflow: hidden; border: 1px solid hsl(var(--border));
  transition: transform 0.2s, box-shadow 0.2s;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px -12px hsl(var(--foreground) / 0.15);
}

.course-thumbnail {
  width: 100%; height: 12rem; object-fit: cover;
  background: hsl(var(--muted));
}

.course-content { padding: 1.5rem; }

.course-badge {
  display: inline-block; padding: 0.25rem 0.75rem;
  background: hsl(var(--accent) / 0.1); color: hsl(var(--accent));
  border-radius: 9999px; font-size: 0.75rem; font-weight: 600;
}

.course-title {
  font-size: 1.25rem; font-weight: 700; margin: 0.75rem 0 0.5rem;
  color: hsl(var(--foreground));
}

.course-desc {
  color: hsl(var(--muted-foreground)); font-size: 0.875rem;
  line-height: 1.5; margin-bottom: 1rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.course-meta {
  display: flex; gap: 1rem; font-size: 0.875rem;
  color: hsl(var(--muted-foreground)); margin-bottom: 1rem;
}

.course-meta-item { display: flex; align-items: center; gap: 0.375rem; }

.course-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; border-top: 1px solid hsl(var(--border));
}

.course-price { font-size: 1.25rem; font-weight: 700; color: hsl(var(--foreground)); }

.course-instructor {
  font-size: 0.875rem; color: hsl(var(--muted-foreground));
}

.btn-enroll {
  background: var(--gradient-accent); color: white;
  padding: 0.625rem 1.25rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.875rem; border: none; cursor: pointer;
  transition: opacity 0.2s;
}

.btn-enroll:hover { opacity: 0.9; }

/* --- Search Styles --- */
.search-wrapper { position: relative; }

.search-input {
  width: 100%; max-width: 28rem; height: 3rem;
  padding: 0 1rem 0 2.75rem;
  border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  background: hsl(var(--card)); font-size: 1rem;
}

.search-icon {
  position: absolute; left: 0.875rem; top: 50%;
  transform: translateY(-50%); color: hsl(var(--muted-foreground));
}