/* Sidebar Content Styles */
.sidebar-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.sidebar-section {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.sidebar-section h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Trending Tags */
.trending-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.trending-tag {
  padding: 0.6rem 1.2rem;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-normal);
  border: 2px solid transparent;
}

.trending-tag:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Popular Posts */
.popular-posts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.popular-post {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--border-radius-lg);
  transition: var(--transition-normal);
  cursor: pointer;
  overflow: hidden;
  width: 100%;
}

.popular-post:hover {
  background: var(--gray-50);
  transform: translateX(5px);
}

.popular-post img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--border-radius-md);
  flex-shrink: 0;
  max-width: 100%;
}

.popular-post-content, .popular-content {
  flex: 1;
  min-width: 0; /* Prevents flex items from overflowing */
}

.popular-post-title, .popular-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.popular-post-meta {
  font-size: 0.8rem;
  color: var(--gray-600);
  display: flex;
  gap: 1rem;
}

/* Newsletter Subscription */
.newsletter-section {
  margin-bottom: 2rem;
}

.newsletter-card {
  background: white;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #FF6F61, #FFA500);
}

.newsletter-icon {
  margin: 0 auto 1rem;
  width: 60px;
  height: 60px;
  background: #f0f5ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-icon i {
  font-size: 28px;
  color: #4285f4;
}

/* Newsletter Message Styles */
.newsletter-message {
  margin: 0.75rem 0;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  animation: fadeInMessage 0.3s ease-out;
  border: 1px solid;
}

.newsletter-message-success {
  background: #e7f7e7;
  color: #2e7d32;
  border-color: #c8e6c9;
}

.newsletter-message-error {
  background: #fdeded;
  color: #c62828;
  border-color: #ffcdd2;
}

.newsletter-message-info {
  background: #e3f2fd;
  color: #1565c0;
  border-color: #bbdefb;
}

@keyframes fadeInMessage {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.newsletter-card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 1rem;
}

.newsletter-card p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

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

.newsletter-input {
  flex: 1;
  padding: 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: var(--transition-normal);
  width: 100%;
  background-color: #f5f5f5;
}

.newsletter-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 111, 97, 0.1);
  background-color: white;
}

.subscribe-btn {
  padding: 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-normal);
  width: 100%;
}

.subscribe-btn:hover {
  background: #e55a4f;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.newsletter-benefits {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-top: 1rem;
}

.newsletter-benefits span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.newsletter-benefits i {
  color: var(--success-color);
}

/* Categories List */
.categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: var(--border-radius-md);
  transition: var(--transition-normal);
  cursor: pointer;
}

.category-item:hover {
  background: var(--gray-50);
}

.category-name {
  font-weight: 500;
  color: var(--dark-color);
}

.category-count {
  background: var(--gray-200);
  color: var(--gray-700);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Archive Section */
.archive-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.archive-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: var(--transition-normal);
}

.archive-item:hover {
  color: var(--primary-color);
}

.archive-item:last-child {
  border-bottom: none;
}

.archive-month {
  font-weight: 500;
}

.archive-count {
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* Social Media Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  text-decoration: none;
  transition: var(--transition-normal);
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Expert Profiles */
.expert-profiles {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.expert-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--border-radius-lg);
  transition: var(--transition-normal);
  background: var(--gray-50);
  overflow: hidden;
  width: 100%;
}

.expert-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--border-radius-md);
  flex-shrink: 0;
  max-width: 100%;
}

.expert-info {
  flex: 1;
  min-width: 0; /* Prevents flex items from overflowing */
}

.expert-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.3rem;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.expert-info p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.expert-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--gray-600);
}

/* Quick Search */
.quick-search-container {
  position: relative;
  margin-bottom: 1rem;
}

.quick-search-input {
  -webkit-user-select: none;
  user-select: none;
  padding: 0.5rem 1rem;
  width: 100%;
  border: none;
  border-radius: var(--border-radius-md);
  background: var(--gray-50);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-normal);
}

.quick-search-input:focus {
  background: white;
  box-shadow: var(--shadow-sm);
}

.quick-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.quick-search-results.show {
  display: block;
}

.search-result-item {
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: var(--transition-normal);
  border-bottom: 1px solid var(--gray-100);
}

.search-result-item:hover {
  background: var(--gray-50);
}

.search-result-item:last-child {
  border-bottom: none;
}
