/* ========== Dictionary Term Page ========== */
.hero-section {
  background: var(--sections-bg);
  color: #fff;
  padding: 70px 0;
  text-align: center;
  margin-bottom: 40px;
}

.hero-section h1 {
  font-size: 3em;
  margin-bottom: 15px;
  line-height: 1.3;
}

.hero-section p {
  font-size: 1.4em;
  opacity: 0.95;
}
.content-wrapper {
  display: flex;
  gap: 30px;
  flex-wrap: wrap; 
}

.main-content {
  flex: 0 0 75%;
  min-width: 0;
  max-width: 70%;
  box-sizing: border-box;
  padding: 20px; 
}

.popular-side {
  flex: 0 0 25%;
  max-width: 30%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .content-wrapper {
    flex-direction: column;
  }
  .main-content,
  .popular-side {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

.main-content {
  flex: 2;
  min-width: 0;
}

.sidebar {
  background-color: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
  font-size: 1.3em;
  color: var(--accent-primary);
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

/* ====== Term Details Section ====== */
.term-details-section {
    background-color: var(--sections-bg, #fff);
    padding: 2rem;
    border-radius: 16px;
    /* box-shadow: 0 8px 20px rgba(0,0,0,0.08); */
    font-family: 'Noto Sans Arabic', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

.term-details-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--primary-color, #007BFF);
    padding-left: 0.75rem;
    color: var(--text-color, #111);
}

.term-details-section p,
.term-details-section li {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-color, #333);
}

.term-details-section ul {
    list-style: disc inside;
    margin-left: 0;
}

.term-details-section ul li {
    padding: 0.25rem 0;
}

.term-details-section a {
    color: var(--primary-color, #007BFF);
    text-decoration: none;
    transition: color 0.3s;
}

.term-details-section a:hover {
    text-decoration: underline;
}

/* Section separators */
.term-details-section h2 + p,
.term-details-section h2 + ul {
    margin-top: 0.5rem;
}
.term-details-section h2 {
  font-size: 1.5rem; 
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.term-details-section p,
.term-details-section ul {
  font-size: 1.125rem; 
  line-height: 1.6;
  margin-bottom: 1rem;
}

.term-details-section ul li {
  font-size: 1rem; 
  margin-bottom: 0.5rem;
}

/* Dark mode */
body[data-theme="dark"] .term-details-section {
    background-color: #1a1a1a;
    color: #e0e0e0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

body[data-theme="dark"] .term-details-section h2 {
    border-left-color: #4dabf7;
    color: #fff;
}

body[data-theme="dark"] .term-details-section a {
    color: #4dabf7;
}

#related-terms {
  list-style: none;
  padding: 0;
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#related-terms li {
  background-color: #f5f5f5;
  border: 1px solid var(--accent-secondary);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.95em;
  color: var(--accent-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

#related-terms li:hover {
  background-color: var(--accent-secondary);
  color: #fff;
  cursor: pointer;
}

#related-terms li a {
  text-decoration: none;
  color: inherit;
}

.popular-side{
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* ========== Responsive adjustments======== */
@media (max-width: 1024px) {
  .content-wrapper {
    flex-direction: column;
  }
  .main-content,
  .sidebar {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2.3em;
  }
  .hero-section p {
    font-size: 1.1em;
  }
  .term-details-section{
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 50px 0;
  }
  .hero-section h1 {
    font-size: 2em;
  }
  .hero-section p {
    font-size: 1em;
  }
  .term-details-section h2 {
    font-size: 1.5em;
  }
  .comment-form .btn-primary {
    padding: 10px 20px;
    font-size: 1em;
  }
}
