/* Blog Page Styles */

/* Blog Hero Section */
.blog-hero {
  padding: 4rem 0 2rem;
  background: rgba(0, 0, 0, 0.5);
  text-align: center;
}

.blog-hero h1 {
  font-size: 2.5rem;
  color: #e0e0e0;
  margin-bottom: 1rem;
}

.blog-hero p {
  font-size: 1.1rem;
  color: #c0c0c0;
}

/* Blog Content Layout */
.blog-content {
  padding: 3rem 0;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
}

/* Blog Posts */
.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Featured Post */
.featured-post {
  background: rgba(40, 40, 40, 0.8);
  border: 2px solid #25d366;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
}

.featured-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.2);
}

.featured-post .post-image {
  position: relative;
  height: 400px;
  overflow: hidden;
}

.featured-post .post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-post .post-content {
  padding: 2rem;
}

/* Regular Blog Posts */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.blog-post {
  background: rgba(40, 40, 40, 0.8);
  border: 1px solid rgba(192, 192, 192, 0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-post:hover {
  transform: translateY(-5px);
  border-color: rgba(192, 192, 192, 0.4);
  box-shadow: 0 10px 30px rgba(192, 192, 192, 0.1);
}

.post-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.blog-post:hover .post-image img {
  transform: scale(1.05);
}

.post-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #25d366;
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.post-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-content h2,
.post-content h3 {
  margin-bottom: 1rem;
}

.post-content h2 a,
.post-content h3 a {
  color: #e0e0e0;
  text-decoration: none;
  transition: color 0.3s;
}

.post-content h2 a:hover,
.post-content h3 a:hover {
  color: #25d366;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #808080;
}

.post-date,
.post-author,
.post-reading-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-content p {
  color: #c0c0c0;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.read-more {
  color: #25d366;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.read-more:hover {
  color: #20ba5a;
  transform: translateX(5px);
}

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  align-items: center;
}

.pagination-btn {
  background: rgba(40, 40, 40, 0.8);
  border: 1px solid rgba(192, 192, 192, 0.2);
  color: #c0c0c0;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
}

.pagination-btn:hover {
  background: rgba(60, 60, 60, 0.9);
  border-color: #25d366;
  color: #e0e0e0;
}

.pagination-btn.active {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
  cursor: default;
}

/* Added pagination dots styling */
.pagination-dots {
  color: #808080;
  padding: 0 0.5rem;
  font-weight: bold;
}

/* Sidebar */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: rgba(40, 40, 40, 0.8);
  border: 1px solid rgba(192, 192, 192, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
}

.sidebar-widget h3 {
  color: #e0e0e0;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #25d366;
}

/* Search Widget */
.blog-search-form {
  display: flex;
  gap: 0.5rem;
}

.blog-search-form input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid rgba(192, 192, 192, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #e0e0e0;
  font-size: 1rem;
}

.blog-search-form input:focus {
  outline: none;
  border-color: #25d366;
}

.blog-search-form button {
  background: #25d366;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.2rem;
}

.blog-search-form button:hover {
  background: #20ba5a;
}

/* Categories Widget */
.categories-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.categories-list li a {
  color: #c0c0c0;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
}

.categories-list li a:hover {
  background: rgba(37, 211, 102, 0.1);
  color: #e0e0e0;
  transform: translateX(5px);
}

.categories-list li a span {
  background: rgba(37, 211, 102, 0.2);
  color: #25d366;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Popular Posts Widget */
.popular-posts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 450px;
  overflow-y: auto;
  padding-right: 0.5rem; /* Add vertical scroll for popular posts */
}

/* Add custom scrollbar styling for popular posts */
.popular-posts-list::-webkit-scrollbar {
  width: 6px;
}

.popular-posts-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

.popular-posts-list::-webkit-scrollbar-thumb {
  background: #25d366;
  border-radius: 10px;
}

.popular-posts-list::-webkit-scrollbar-thumb:hover {
  background: #20ba5a;
}

.popular-post {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(192, 192, 192, 0.1);
}

.popular-post:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Fixed image sizing for popular posts */
.popular-post-image {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
}

.popular-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.popular-post-content {
  flex: 1;
  min-width: 0;
}

.popular-post-content h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.popular-post-content h4 a {
  color: #e0e0e0;
  text-decoration: none;
  transition: color 0.3s;
}

.popular-post-content h4 a:hover {
  color: #25d366;
}

.popular-post-date {
  font-size: 0.8rem;
  color: #808080;
}

/* CTA Widget */
.cta-widget {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.1) 0%, rgba(32, 186, 90, 0.1) 100%);
  border: 2px solid #25d366;
}

.cta-widget h3 {
  border-bottom-color: #25d366;
}

.cta-widget p {
  color: #c0c0c0;
  margin-bottom: 1.5rem;
  text-align: center;
}

.cta-widget .btn-whatsapp {
  width: 100%;
  text-align: center;
  display: block;
  margin-bottom: 1rem;
}

.cta-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.cta-features p {
  color: #c0c0c0;
  font-size: 0.9rem;
  margin: 0;
  text-align: left;
}

/* Newsletter Widget */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.newsletter-form input {
  padding: 0.75rem;
  border: 1px solid rgba(192, 192, 192, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #e0e0e0;
  font-size: 1rem;
}

.newsletter-form input:focus {
  outline: none;
  border-color: #25d366;
}

.newsletter-form button {
  background: #25d366;
  color: #fff;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.newsletter-form button:hover {
  background: #20ba5a;
  transform: translateY(-2px);
}

/* Responsive Design for Blog */
@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    order: 2;
  }

  .blog-posts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .blog-hero h1 {
    font-size: 2rem;
  }

  .featured-post .post-image {
    height: 250px;
  }

  .blog-posts-grid {
    grid-template-columns: 1fr;
  }

  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  /* Better mobile display for popular posts */
  .popular-post-image {
    width: 70px;
    height: 55px;
  }
  
  .popular-post-content h4 {
    font-size: 0.85rem;
  }
}
