.posts-list-section {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 40px 20px 50px !important;
  margin-top: 120px !important;
  min-height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1 !important;
}

.posts-header {
  margin-bottom: 40px !important;
  text-align: center !important;
  padding: 20px 0 !important;
  width: 100% !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.posts-title {
  font-size: 48px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 0 12px 0 !important;
  letter-spacing: -1px !important;
  line-height: 1.2 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  text-align: center !important;
  padding: 0 !important;
}

.posts-subtitle {
  font-size: 16px;
  color: rgba(224, 224, 224, 0.8);
  margin: 0;
  display: block;
}

/* Filter Section */
.posts-filter {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 24px;
  width: 100%;
  background: rgba(102, 126, 234, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(102, 126, 234, 0.1);
  backdrop-filter: blur(10px);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-box,
.category-filter {
  padding: 12px 16px;
  border: 1.5px solid rgba(102, 126, 234, 0.3);
  background: rgba(102, 126, 234, 0.05);
  color: #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.search-box {
  min-width: 300px;
}

.search-box:focus,
.category-filter:focus {
  outline: none;
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.15);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
}

.category-filter {
  min-width: 180px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
  cursor: pointer;
}

.category-filter:hover {
  border-color: #667eea;
  background-color: rgba(102, 126, 234, 0.08);
}

.category-filter option {
  background: linear-gradient(135deg, #16213e 0%, #1a2847 100%);
  color: #e0e0e0;
  padding: 12px;
  border: none;
}

.category-filter option:checked {
  background: linear-gradient(135deg, #667eea 0%, #5568d3 100%);
  color: #ffffff;
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
  padding: 0;
  width: 100%;
  min-height: auto;
}

/* When grid contains only no-results message */
.posts-grid .no-results {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 200px;
}

.post-card {
  position: relative;
  background: linear-gradient(135deg, var(--bg3, #16213e) 0%, rgba(22, 33, 62, 0.8) 100%);
  border: 1.5px solid rgba(102, 126, 234, 0.2);
  border-radius: 16px;
  padding: 28px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  min-height: 280px;
  justify-content: space-between;
}

.post-card:hover {
  border-color: rgba(102, 126, 234, 0.6);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.25);
}

.post-card .badge {
  display: inline-block;
  width: fit-content;
  font-family: monospace;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid rgba(102, 126, 234, 0.4);
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
  margin-bottom: 12px;
}

.post-card .title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.4;
  flex: 1;
  word-break: break-word;
}

.post-card .description {
  font-size: 13px;
  color: rgba(224, 224, 224, 0.7);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.post-card .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(224, 224, 224, 0.6);
  padding-top: 12px;
  border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.post-card:hover .title {
  color: #00B4FF;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 0;
  width: 100%;
}

.pagination button {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid rgba(102, 126, 234, 0.3);
  background: rgba(102, 126, 234, 0.05);
  color: #667eea;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.6);
  transform: translateY(-2px);
}

.pagination button.active {
  background: rgba(102, 126, 234, 0.3);
  border-color: #667eea;
  color: #ffffff;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* No Results */
.no-results {
  text-align: center !important;
  color: rgba(224, 224, 224, 0.7) !important;
  font-size: 16px !important;
  line-height: 1.8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  padding: 20px !important;
}

/* Loading */
.loading {
  text-align: center;
  color: rgba(224, 224, 224, 0.8);
  font-size: 16px;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .posts-list-section {
    padding: 60px 20px;
    max-width: 100%;
  }

  .posts-header {
    margin-bottom: 40px;
  }

  .posts-title {
    font-size: 40px;
    margin-bottom: 10px;
  }

  .posts-subtitle {
    font-size: 15px;
  }

  .posts-filter {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
  }

  .search-box {
    min-width: 100%;
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
  }

  .category-filter {
    min-width: 100%;
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
  }

  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 30px;
  }

  .post-card {
    padding: 20px;
  }

  .post-card .title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .post-card .description {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .pagination {
    gap: 6px;
    margin-top: 30px;
  }

  .pagination button {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .posts-list-section {
    padding: 50px 16px;
    min-height: 60vh;
  }

  .posts-header {
    margin-bottom: 30px;
  }

  .posts-title {
    font-size: 32px;
    margin-bottom: 8px;
  }

  .posts-subtitle {
    font-size: 14px;
    line-height: 1.5;
  }

  .posts-filter {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
  }

  .search-box {
    width: 100%;
    padding: 11px 13px;
    font-size: 13px;
    border-radius: 8px;
  }

  .category-filter {
    width: 100%;
    padding: 11px 13px;
    font-size: 13px;
    border-radius: 8px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 20px;
  }

  .post-card {
    padding: 18px;
    border-radius: 14px;
  }

  .post-card .badge {
    font-size: 10px;
    padding: 5px 10px;
    margin-bottom: 10px;
  }

  .post-card .title {
    font-size: 15px;
    margin-bottom: 9px;
    line-height: 1.3;
  }

  .post-card .description {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 12px;
  }

  .post-card .footer {
    font-size: 11px;
    padding-top: 10px;
  }

  .pagination {
    gap: 4px;
    margin-top: 20px;
  }

  .pagination button {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .no-results {
    padding: 40px 16px;
    font-size: 14px;
    line-height: 1.6;
  }

  .loading {
    padding: 40px 16px;
    font-size: 14px;
  }
}

/* Extra small devices (320px and below) */
@media (max-width: 320px) {
  .posts-list-section {
    padding: 40px 12px;
  }

  .posts-title {
    font-size: 28px;
  }

  .posts-filter {
    gap: 8px;
  }

  .posts-grid {
    gap: 12px;
  }

  .pagination button {
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    font-size: 11px;
  }
}
