/* ========== Dictionary Term Page ========== */
.breadcrumb-nav {
  background-color: var(--bg-secondary);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--accent-primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  margin: 0 0.5rem;
}

.breadcrumb-current {
  color: var(--text-muted);
}

.term-letter-nav {
  background-color: var(--bg-secondary);
  padding: 1rem 0 0.5rem;
}

.term-alphabet-letters {
  grid-template-columns: repeat(3, 1fr);
}

.term-layout {
  align-items: start;
}

.dictionary-term-results #term-pronunciation {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
}

.dictionary-term-results .term-details-section {
  padding: 0;
  background: transparent;
  border-radius: 0;
}

/* Keep term page side columns aligned with dictionary grid widths. */
.dictionary-layout.term-layout .popular-side {
  flex: initial;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.dictionary-layout.term-layout .sidebar-card {
  width: 100%;
}

.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;
  margin-bottom: 1rem;
}
.sidebar-card {
  background-color: var(--bg-secondary);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}
 .btn-suggest {
    display: inline-flex;
    align-items: center;
    text-align: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.875rem;
    background: var(--accent-primary);
    color: #fff;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: 0.3s;
}

 .btn-suggest i {
    font-size: 0.9rem;
}

.btn-suggest:hover {
    background: var(--accent-hover);
}
/* ====== Term Details Section ====== */
.term-details-section {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    font-family: 'Noto Sans Arabic', sans-serif;
    transition: background-color 0.3s, color 0.3s;
    -webkit-transition: background-color 0.3s, color 0.3s;
    -moz-transition: background-color 0.3s, color 0.3s;
    -ms-transition: background-color 0.3s, color 0.3s;
    -o-transition: background-color 0.3s, color 0.3s;
}

.term-details-section .meaning {
    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:hover {
    text-decoration: underline;
}

.term-nav {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.term-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.term-nav-link.prev {
  text-align: right;
}

.term-nav-link.next {
  text-align: left;
}

.term-nav-link:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.14);
  transform: translateY(-1px);
}

.term-nav-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.term-nav-term {
  font-weight: 700;
}

.term-nav-link.disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* Section separators */
.term-details-section .meaning + p,
.term-details-section .meaning + ul {
    margin-top: 0.5rem;
}
.term-details-section .meaning {
  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;
}


#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) {
  .dictionary-term-results .term-details-section{
    padding: 0;
  }

  .term-nav {
    grid-template-columns: 1fr;
  }

  .term-nav-link.prev,
  .term-nav-link.next {
    text-align: right;
  }
}

@media (max-width: 480px) {
  .term-details-section .meaning {
    font-size: 1.5em;
  }
  .comment-form .btn-primary {
    padding: 10px 20px;
    font-size: 1em;
  }
}
