.education-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  padding-top: 100px;
}

.education-detail {
  background: var(--card-background);
  border-radius: 12px;
  padding: 1rem !important;
  margin-top: 2rem;
}

@media (min-width: 1440px) {
  .education-detail {
    padding: 3rem !important;
  }
  .comparison-grid,
  .greeks-grid,
  .allocation-grid,
  .scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
  }
}

.education-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 1rem;
  background: linear-gradient(
    145deg,
    var(--card-background),
    var(--background-color)
  );
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.education-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.lead {
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.education-section {
  margin-bottom: 4rem;
  scroll-margin-top: 120px; /* Increased to account for navbar + padding */
}

.education-section h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  scroll-margin-top: 120px; /* Added to h2 as well */
}

@media (max-width: 768px) {
  .education-section,
  .education-section h2 {
    scroll-margin-top: 90px; /* Adjusted for mobile navbar height */
  }
}

.concept-explanation {
  background: var(--background-color);
  padding: 1rem;
  border-radius: 8px;
}

.pro-tip,
.interaction {
  padding: 1rem;
}

.key-points {
  margin-top: 1.5rem;
}

.comparison-item,
.greek,
.allocation-item,
.scenario {
  background: var(--background-color);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.example-box {
  background: var(--primary-color);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1.5rem;
}

.example-box h4 {
  margin-bottom: 0.5rem;
}

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

.roll-type {
  background: var(--background-color);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.roll-type h4 {
  color: white;
  margin-bottom: 0.5rem;
}

.pro-tip {
  background: #2d3748;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
  border-left: 4px solid var(--primary-color);
}

.pro-tip h4 {
  color: white;
  margin-bottom: 0.5rem;
}

.greek-interactions {
  background: var(--card-background);
  border-radius: 12px;
  margin-top: 3rem;
}

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

.interaction {
  background: var(--background-color);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.interaction h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.interaction p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul li {
  margin-bottom: 1.2rem;
  line-height: 1.8;
  padding-left: 1.5rem;
  position: relative;
}

.nav-links li {
  padding: 0;
  margin: 0;
}

ul:not(.nav-links) li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

/* Keep nested lists in pro-tips aligned properly */
.pro-tip ul {
  margin-left: 0.5rem;
}

.pro-tip ul li {
  margin-bottom: 0.8rem;
}

.interaction ul li:before {
  content: "→";
  left: 0;
  color: var(--primary-color);
}

.scenario-box {
  background: rgba(33, 150, 243, 0.1);
  border: 1px solid var(--primary-color);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .interaction-examples {
    grid-template-columns: 1fr;
  }

  .greek-interactions {
    padding: 0.25rem;
  }

  .scenario-box,
  .interaction,
  .pro-tip,
  .breadcrumbs {
    padding: 1rem;
  }

  .education-page {
    padding: 0px;
  }

  .education-header h1 {
    font-size: 2rem;
  }
}

.related-content {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-content h4,
.scenario-box h5 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.related-content ul {
  list-style: none;
}

.related-content ul li {
  margin-bottom: 0.5rem;
}

.related-content a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.related-content a:hover {
  color: var(--primary-color);
}
