/* Hero Section */
.hero__subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  max-width: 500px;
  margin: 0 auto;
}

/* Filter Buttons */
.ctfs-filters {
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid #e1e5e9;
  background: transparent;
  color: #e1e5e9;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: capitalize;
}

.filter-btn:hover {
  border-color: #007acc;
  color: #007acc;
  transform: translateY(-2px);
}

.filter-btn.is-active {
  background: #007acc;
  border-color: #007acc;
  color: white;
}

/* CTFs Grid */
.ctfs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Enhanced Post Cards */
.ctf-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.ctf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.post-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ctf-card:hover .post-card-image img {
  transform: scale(1.05);
}

.post-card-content {
  padding: 1.5rem;
}

/* Tags */
.post-card-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-pwn { background: #ff6b6b; color: white; }
.tag-crypto { background: #4ecdc4; color: white; }
.tag-web { background: #45b7d1; color: white; }
.tag-forensics { background: #96ceb4; color: white; }
.tag-reverse { background: #feca57; color: black; }
.tag-misc { background: #a55eea; color: white; }
.tag-osint { background: #26de81; color: white; }

/* Title */
.post-card-title {
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
}

.post-card-title a {
  color: #15171A;
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-card-title a:hover {
  color: #007acc;
}

/* Excerpt */
.post-card-excerpt {
  color: #738a94;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

/* Meta */
.post-card-meta {
  gap: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #e1e5e9;
  flex-shrink: 0;
  white-space: nowrap
}

.post-card-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #15171A;
}

.post-card-date {
  font-size: 0.85rem;
  color: #738a94;
}

/* Results Counter */
.ctfs-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
  border-top: 1px solid #e1e5e9;
}

.results-text {
  color: #738a94;
  font-size: 0.9rem;
  margin: 0;
}

/* Empty State */
.no-topics-found {
  grid-column: 1 / -1;
  padding: 4rem 2rem;
}

.empty-state {
  max-width: 400px;
  margin: 0 auto;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  margin: 1rem 0;
  font-size: 1.5rem;
  color: #15171A;
}

.empty-state p {
  color: #738a94;
  font-size: 1rem;
  line-height: 1.6;
}

.empty-state a {
  color: #007acc;
  text-decoration: none;
  font-weight: 500;
}

.empty-state a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .ctfs-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .ctfs-filters {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .post-card-content {
    padding: 1.25rem;
  }
  
  .post-card-image {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .post-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .hero__title {
    font-size: 2.5rem;
  }
}

/* Animation for filtered results */
.ctf-card {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Loading animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ctf-card {
  animation: fadeInUp 0.6s ease forwards;
}

/* Stagger the animation for each card */
.ctf-card:nth-child(1) { animation-delay: 0.1s; }
.ctf-card:nth-child(2) { animation-delay: 0.2s; }
.ctf-card:nth-child(3) { animation-delay: 0.3s; }
.ctf-card:nth-child(4) { animation-delay: 0.4s; }
.ctf-card:nth-child(5) { animation-delay: 0.5s; }
.ctf-card:nth-child(6) { animation-delay: 0.6s; }