/* Keep page-header compatible with theme (don't break site header) */
.page-header.contest-page-header {
  background: linear-gradient(135deg, #0f3d2e 0%, #1b6b4a 55%, #2d9f6f 100%);
  position: relative;
  overflow: hidden;
}

.contest-content {
  min-height: 200px;
}

.contest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.contest-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contest-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15, 61, 46, 0.14);
  color: inherit;
  text-decoration: none;
}

.contest-card-cover {
  position: relative;
  height: 140px;
  background: center/cover no-repeat #1b6b4a;
}

.contest-card-cover--empty {
  background: linear-gradient(135deg, #0f3d2e, #2d9f6f);
}

.contest-card-cover-badges {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contest-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.contest-card h3 {
  font-size: 1.1rem;
  margin: 0 0 8px;
  line-height: 1.3;
}

.contest-card-desc {
  color: #667;
  font-size: 0.9rem;
  min-height: 2.5em;
  margin-bottom: 12px;
  flex: 1;
}

.contest-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #445;
  margin-bottom: 8px;
}

.contest-card-stats i {
  color: #1b6b4a;
  margin-right: 4px;
}

.contest-card-meta {
  font-size: 12px;
  color: #778;
}

.contest-card-score {
  margin-top: 8px;
  font-size: 13px;
  color: #0f3d2e;
}

.contest-badge {
  background: rgba(255, 255, 255, 0.92);
  color: #0f3d2e;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}

.contest-hashtag-pill {
  background: rgba(15, 61, 46, 0.85);
  color: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* Detail hero */
.contest-hero {
  position: relative;
  min-height: 280px;
  border-radius: 14px;
  overflow: hidden;
  background: center/cover no-repeat #0f3d2e;
  color: #fff;
}

.contest-hero--plain {
  background: linear-gradient(135deg, #0f3d2e 0%, #1b6b4a 50%, #2d9f6f 100%);
}

.contest-hero-overlay {
  position: relative;
  z-index: 1;
  min-height: 280px;
  padding: 28px 28px 24px;
  background: linear-gradient(180deg, rgba(8, 28, 22, 0.25) 0%, rgba(8, 28, 22, 0.78) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.contest-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.contest-hero-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 6px;
  font-weight: 800;
  line-height: 1.2;
}

.contest-hero-sub {
  opacity: 0.9;
  margin-bottom: 16px;
}

.contest-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 18px;
}

.contest-hero-stats strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
}

.contest-hero-stats span {
  font-size: 12px;
  opacity: 0.85;
}

.contest-hashtag-banner {
  background: #e8f5ef;
  border-left: 4px solid #1b6b4a;
  padding: 12px 14px;
  border-radius: 6px;
}

.contest-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.contest-timeline--stack {
  grid-template-columns: 1fr;
}

.contest-timeline > div {
  background: #f7faf8;
  border-radius: 8px;
  padding: 10px 12px;
}

.contest-timeline span {
  display: block;
  font-size: 12px;
  color: #778;
  margin-bottom: 4px;
}

.contest-delta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.contest-delta-grid > div {
  background: #f7faf8;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.contest-delta-grid span {
  display: block;
  font-size: 12px;
  color: #778;
}

.contest-prize-list {
  padding-left: 18px;
  margin-bottom: 0;
}

.contest-prize-list li + li {
  margin-top: 8px;
}

.contest-post-item {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.contest-post-item:last-child {
  margin-bottom: 0;
}

.contest-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.contest-claim-box {
  border: 1px solid #cfe9dc;
  background: #f3fbf7;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.contest-richtext p:last-child {
  margin-bottom: 0;
}

.contest-richtext img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 767.98px) {
  .contest-hero-overlay {
    padding: 20px 16px 18px;
    min-height: 240px;
  }
}
