/* Base styles */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: #333;
  line-height: 1.6;
  background-color: #f9fafb;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navigation */
.nav {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo a {
  font-size: 1.5rem;
  font-weight: bold;
  color: #111827;
  text-decoration: none;
  /* 将徽标布局为水平排列，图标与文字并列显示 */
  display: flex;
  align-items: center;
}

/* 徽标图片样式，控制大小和间距 */
.logo a img {
  height: 40px;
  width: auto;
  margin-right: 0.5rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #6b7280;
  font-weight: 500;
  transition: color 0.2s ease;
}

/* User navigation links use the same style as main navigation links */
.nav-user a {
  text-decoration: none;
  color: #6b7280;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-user a:hover {
  color: #2563eb;
}

.nav-links a:hover,
.nav-links a.active {
  color: #2563eb;
}

/* New navigation menu with search */
/* Navigation menu: flex container for links, user actions and search */
.nav-menu {
  display: flex;
  align-items: center;
  width: 100%;
  /* children: nav-links, nav-user and nav-search */
}

/* User actions container on the right */
.nav-user {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin-left: auto; /* push user links to the far right */
  padding: 0;
}

.nav-search input {
  padding: 0.4rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  background-color: #f3f4f6;
}

.nav-search input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
  padding: 4rem 0;
}

.hero-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.hero-text {
  flex: 1 1 45%;
}

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

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #4b5563;
}

.btn {
  display: inline-block;
  background-color: #2563eb;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: #1e40af;
}

.hero-image {
  flex: 1 1 45%;
  text-align: center;
}

.hero-image img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Features section */
.features {
  background-color: #ffffff;
  padding: 4rem 0;
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #111827;
}

.feature-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.feature-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #2563eb;
}

.feature-item p {
  font-size: 0.95rem;
  color: #4b5563;
}

/* Paths section */
.paths {
  background-color: #f3f4f6;
  padding: 4rem 0;
}

.paths h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #111827;
}

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

.path-item {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.path-item h3 {
  font-size: 1.5rem;
  color: #2563eb;
  margin-bottom: 0.5rem;
}

.path-item p {
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

.link-btn {
  display: inline-block;
  background-color: #2563eb;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 0.9rem;
}

.link-btn:hover {
  background-color: #1e40af;
}

/* Footer */
footer {
  background-color: #111827;
  color: #9ca3af;
  padding: 2rem 0;
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 0.875rem;
}

/* Courses page */
.course-list {
  padding: 4rem 0;
}

.course-list h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

/* Filter bar and search on courses page */
.course-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #374151;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

#course-search {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  min-width: 200px;
}

#course-search:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

/* Course group containers */
.course-group-container {
  margin-bottom: 2.5rem;
}

.course-group-container h2 {
  font-size: 1.5rem;
  color: #2563eb;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.course-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
}

.course-card h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #111827;
}

.course-card p {
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 0.75rem;
}

/* Pricing display for courses */
.course-price {
  font-size: 0.9rem;
  color: #e11d48;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Purchase button on course cards */
.buy-btn {
  display: inline-block;
  background-color: #10b981;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.buy-btn:hover {
  background-color: #059669;
}

/* Membership pricing plans */
.membership-plans {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.plan {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  width: 280px;
}

.plan h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: #2563eb;
}

.plan .price {
  font-size: 1.5rem;
  color: #e11d48;
  margin-bottom: 1rem;
  font-weight: 700;
}

.plan ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

.plan ul li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.course-tags span {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
}

.course-tags .difficulty {
  background-color: #fef9c3;
  color: #b45309;
  border-color: #fde68a;
}

.course-tags .rating {
  background-color: #ecfdf5;
  color: #065f46;
  border-color: #d1fae5;
}

/* Updated download link placement */
.download-link {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

/* Side navigation */
.side-nav {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 20;
}

.side-nav a {
  background-color: #2563eb;
  color: #ffffff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 0.9rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
}

.side-nav a:hover {
  background-color: #1e40af;
}

/* Main tabs for technology/application in courses page */
.main-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.main-tab {
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  color: #374151;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.main-tab.active,
.main-tab:hover {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* Section visibility handling for courses page
   Note: we no longer hide all sections by default via a general rule.
   The technology section is visible by default, while the application
   section can be toggled via JavaScript or inline styles. */
/* Removed generic .section display:none rule to ensure content shows.
   Specific sections (e.g. .application-section) may still be hidden via
   inline style or script. */

/* About page */
.about-section {
  padding: 4rem 0;
}

.about-section h1 {
  font-size: 2rem;
  color: #111827;
  margin-bottom: 1.5rem;
  text-align: center;
}

.about-section p {
  font-size: 1rem;
  color: #4b5563;
  margin-bottom: 1rem;
  max-width: 800px;
  line-height: 1.8;
}

/* Contact page */
.contact-section {
  padding: 4rem 0;
}

.contact-section h1 {
  font-size: 2rem;
  color: #111827;
  margin-bottom: 1rem;
  text-align: center;
}

.contact-section p {
  font-size: 1rem;
  color: #4b5563;
  margin-bottom: 1rem;
  text-align: center;
}

.contact-info {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
  text-align: center;
}

.contact-info li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: #2563eb;
}

.contact-info a {
  color: #2563eb;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #111827;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}