/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: bold;
}

.logo i {
  color: #60a5fa;
  margin-right: 0.5rem;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 5px;
}

.nav a:hover,
.nav a.active {
  background-color: rgba(255, 255, 255, 0.2);
  color: #60a5fa;
}

.search-box {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 25px;
  padding: 0.5rem;
  min-width: 250px;
}

.search-box input {
  border: none;
  outline: none;
  padding: 0.5rem 1rem;
  flex: 1;
  border-radius: 20px;
}

.search-box button {
  background: #2563eb;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-box button:hover {
  background: #1d4ed8;
}

/* Main Container */
.main-container {
  display: flex;
  min-height: calc(100vh - 80px);
  gap: 2rem;
  padding: 2rem 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Sidebar Styles */
.sidebar {
  width: 280px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.sidebar-header {
  background: #2563eb;
  color: white;
  padding: 1.5rem;
  border-radius: 10px 10px 0 0;
}

.sidebar-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.course-menu {
  list-style: none;
  padding: 1rem 0;
}

.menu-item {
  border-bottom: 1px solid #e5e7eb;
}

.menu-link {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: #374151;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.menu-link:hover,
.menu-link.active {
  background: #eff6ff;
  color: #2563eb;
  border-right: 3px solid #2563eb;
}

.menu-link i {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

.submenu {
  list-style: none;
  background: #f9fafb;
  display: none;
}

.menu-item:hover .submenu {
  display: block;
}

.submenu li a {
  display: block;
  padding: 0.75rem 3rem;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.submenu li a:hover {
  background: #e5e7eb;
  color: #2563eb;
}

/* Content Area */
.content {
  flex: 1;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.breadcrumb {
  margin-bottom: 2rem;
  color: #6b7280;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 10px;
  border: 1px solid #bfdbfe;
}

.hero-section h1 {
  font-size: 2.5rem;
  color: #1e40af;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-section p {
  font-size: 1.2rem;
  color: #374151;
  max-width: 600px;
  margin: 0 auto;
}

/* Courses Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.course-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.course-icon {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  padding: 2rem;
  text-align: center;
}

.course-icon i {
  font-size: 3rem;
}

.course-content {
  padding: 1.5rem;
}

.course-content h3 {
  font-size: 1.4rem;
  color: #1f2937;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.course-content p {
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.difficulty {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.difficulty.beginner {
  background: #dcfce7;
  color: #166534;
}

.difficulty.intermediate {
  background: #fef3c7;
  color: #92400e;
}

.difficulty.advanced {
  background: #fee2e2;
  color: #991b1b;
}

.lessons {
  color: #6b7280;
  font-size: 0.9rem;
}

.course-btn {
  display: inline-block;
  background: #2563eb;
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background 0.3s ease;
  width: 100%;
  text-align: center;
}

.course-btn:hover {
  background: #1d4ed8;
}

/* Footer */
.footer {
  background: #1f2937;
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: #60a5fa;
  font-size: 1.2rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #60a5fa;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: #374151;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  transition: background 0.3s ease;
}

.social-links a:hover {
  background: #2563eb;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1rem;
  text-align: center;
  color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-container {
    flex-direction: column;
    padding: 1rem;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    min-width: 200px;
  }
}

@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 1.5rem;
  }

  .course-content {
    padding: 1rem;
  }

  .search-box {
    min-width: 150px;
  }
}

/* Animation for course cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.course-card {
  animation: fadeInUp 0.6s ease forwards;
}

.course-card:nth-child(1) {
  animation-delay: 0.1s;
}
.course-card:nth-child(2) {
  animation-delay: 0.2s;
}
.course-card:nth-child(3) {
  animation-delay: 0.3s;
}
.course-card:nth-child(4) {
  animation-delay: 0.4s;
}
.course-card:nth-child(5) {
  animation-delay: 0.5s;
}
.course-card:nth-child(6) {
  animation-delay: 0.6s;
}
.course-card:nth-child(7) {
  animation-delay: 0.7s;
}
.course-card:nth-child(8) {
  animation-delay: 0.8s;
}
