/**
 * Category Description Styles
 * For archive-des-wrapper section
 */

.archive-des-wrapper {
  background: #f8f9fa;
  padding: 40px 0;
  margin-top: 30px;
  border-top: 1px solid #e9ecef;
}
.category-description-content {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  line-height: 1.7;
}

.category-description-content h1,
.category-description-content h2,
.category-description-content h3,
.category-description-content h4,
.category-description-content h5,
.category-description-content h6 {
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 600;
}

.category-description-content h2 {
  font-size: 1.8em;
  border-bottom: 2px solid var(--tp-primary);
  padding-bottom: 10px;
}

.category-description-content h3 {
  font-size: 1.5em;
}

.category-description-content p {
  margin-bottom: 15px;
  color: #555;
}

.category-description-content ul,
.category-description-content ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

.category-description-content li {
  margin-bottom: 5px;
  color: #555;
}

.category-description-content a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.category-description-content a:hover {
  color: #2980b9;
  text-decoration: underline;
}

.category-description-content img {
  max-width: 900px;
  width: 100%;
  height: auto;
  margin: 15px auto;
  border-radius: 4px;
}

.category-description-content blockquote {
  background: #f8f9fa;
  border-left: 4px solid #3498db;
  padding: 15px 20px;
  margin: 20px 0;
  font-style: italic;
}

.category-description-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.category-description-content table th,
.category-description-content table td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: left;
}

.category-description-content table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

/* Toggle functionality */
.description-content {
  max-height: 200px;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
  position: relative;
}

.description-content.expanded {
  max-height: none;
}

.description-content:not(.expanded):after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, #ffffff);
  pointer-events: none;
}

.description-toggle-wrapper {
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
}

.description-toggle-btn {
  background: var(--tp-primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.description-toggle-btn:hover {
  background: var(--tp-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toggle-icon {
  transition: transform 0.3s ease;
}

.description-toggle-btn.expanded .toggle-icon {
  transform: rotate(180deg);
}

/* Hide toggle button if content is short */
.description-content.no-toggle + .description-toggle-wrapper {
  display: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .archive-des-wrapper {
    padding: 20px 0;
  }

  .category-description-content {
    padding: 20px 15px;
    margin: 0 10px;
  }

  .category-description-content h2 {
    font-size: 1.5em;
  }

  .category-description-content h3 {
    font-size: 1.3em;
  }

  .description-content {
    max-height: 150px;
  }

  .description-toggle-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
}
