/* Blog Specific Styles */

/* Blog Hero */
.blog-hero {
  background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-dark) 100%);
  color: white;
  padding: 80px 0 60px;
  margin-top: 64px;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.6;
}

/* Blog Search */
.blog-search {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  background: white;
  border-radius: 50px;
  padding: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.blog-search input {
  flex: 1;
  border: none;
  padding: 16px 24px;
  font-size: 16px;
  border-radius: 50px;
  outline: none;
  color: var(--text-primary);
}

.blog-search button {
  background: var(--whatsapp-green);
  border: none;
  border-radius: 50px;
  padding: 16px 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-search button:hover {
  background: var(--whatsapp-dark);
}

.blog-search button svg {
  width: 20px;
  height: 20px;
  color: white;
}

/* Blog Navigation */
.blog-nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: var(--whatsapp-green);
  color: white;
}

/* Blog Layout */
.blog-main {
  padding: 40px 0 80px;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* Featured Post */
.featured-post {
  margin-bottom: 40px;
}

.featured-card {
  background: var(--bg-primary);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.featured-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.featured-content {
  padding: 32px;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.featured-category {
  background: var(--whatsapp-green);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.featured-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
  color: var(--text-primary);
}

.featured-excerpt {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--whatsapp-green);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.read-more:hover {
  color: var(--whatsapp-dark);
}

.read-more svg {
  width: 16px;
  height: 16px;
}

/* Categories Filter */
.categories-filter {
  margin-bottom: 32px;
}

.categories-filter h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-tag {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.category-tag:hover,
.category-tag.active {
  background: var(--whatsapp-green);
  border-color: var(--whatsapp-green);
  color: white;
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.post-card {
  background: var(--bg-primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.post-content {
  padding: 24px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.post-category {
  background: var(--whatsapp-light);
  color: var(--whatsapp-dark);
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.post-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-excerpt {
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.sidebar-widget h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* Popular/Recent Posts */
.popular-posts,
.recent-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-post {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.sidebar-post:hover {
  opacity: 0.8;
}

.sidebar-post-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.sidebar-post-content {
  flex: 1;
  min-width: 0;
}

.sidebar-post-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-post-date {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.tag:hover {
  background: var(--whatsapp-green);
  color: white;
}

/* Newsletter Widget */
.newsletter-widget {
  background: linear-gradient(135deg, var(--whatsapp-green), var(--whatsapp-dark));
  color: white;
}

.newsletter-widget h3 {
  color: white;
}

.newsletter-widget p {
  opacity: 0.9;
  margin-bottom: 16px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.newsletter-form input {
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
}

.newsletter-form button {
  background: white;
  color: var(--whatsapp-green);
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background: var(--bg-secondary);
}

/* Loading States */
.loading-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: var(--text-secondary);
}

.loading-spinner-small {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--whatsapp-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .blog-search {
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .category-tags {
    justify-content: center;
  }

  .blog-nav {
    gap: 12px;
  }

  .nav-link {
    padding: 6px 12px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding: 60px 0 40px;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .featured-title {
    font-size: 1.5rem;
  }

  .featured-content {
    padding: 24px;
  }

  .post-content {
    padding: 20px;
  }

  .sidebar-widget {
    padding: 20px;
  }
}
