.posts-section {
  display: flex;
  justify-content: center;
}

.posts-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  width: 100%;
  margin-bottom: 30px;
}

@media (max-width: 992px) {
  .posts-container {
    grid-template-columns: repeat(1, 1fr);
  }
}

.blog-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 40px;
}

.blog-content {
  flex: 1 1 65%;
  min-width: 300px;
}

.blog-sidebar {
  flex: 0 0 30%;
  min-width: 280px;
  background-color: #1a1a2e;
  padding: 24px;
  border-radius: 12px;
}

.sidebar-section {
  margin-bottom: 32px;
}

.sidebar-section h4 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #fff;
}

.social-icons a {
  display: inline-block;
  margin-right: 12px;
  font-size: 18px;
  color: var(--accent-blue);
  transition: color 0.3s;
}

.social-icons a:hover {
  color: var(--accent-purple);
}

@media (max-width: 768px) {
  .blog-layout {
    flex-direction: column;
  }

  .blog-content,
  .blog-sidebar {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .blog-sidebar {
    order: 2;
    margin-top: 40px;
    background: transparent;
    padding: 0;
  }

  .sidebar-section {
    background: #1a1a2e;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
  }
}

.card-post {
  border-radius: 8px;
  overflow: hidden;
}

.post-container {
  background-position: center;
  height: 240px;
  position: relative;
  background-size: contain;
  background-repeat: no-repeat;
}

.post-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.post-content .title {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 0 0.5rem;
}

.post-content .excerpt {
  font-size: 0.9rem;
  margin: 0;
}

.card-post {
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 0 11px #3c92ca;
  position: relative;
}

.card-post:hover {
  transform: translateY(-6px);
}

.post-container {
  background-size: cover;
  background-position: center;
  height: 200px;
  width: 100%;
  flex-shrink: 0;
}

.post-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-category {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  background: rgb(71 148 250 / 69%);
  padding: 8px 12px;
  border-radius: 6px;
  max-width: max-content;
  position: absolute;
  top: 20px;
}

.title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: #fff;
  line-height: 1.4;
}

.excerpt {
  font-size: 0.95rem;
  color: #c0c0c0;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 15px;
  margin: 10px 0;
  text-decoration: none;
  box-shadow: 0 0 10px #4d00ff70;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
  color: #fff;
  max-width: max-content;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.read-more-btn:hover {
  border-color: var(--accent-blue);
  background: var(--primarybtnhoverbg);
  color: var(--primarybtnhovercolor);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
}
