/*
 * Homepage — Front page sections, hero, and content grids.
 */

/* ── Front page wrapper ──────────────────────────────────── */
.bc-front-page {
  display: grid;
  gap: 3rem;
  padding-block: 2rem 4rem;
}

/* ── Hero section ────────────────────────────────────────── */
.bc-home-hero {
  position: relative;
  border-radius: var(--bc-radius-xl);
  overflow: hidden;
  background: var(--bc-bg-card);
  border: 1px solid var(--bc-line);
}

.bc-home-hero__image {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}

.bc-home-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  transition: transform var(--bc-ease-slow);
}

.bc-home-hero:hover .bc-home-hero__image img {
  transform: scale(1.02);
}

.bc-home-hero__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 23, 0.1) 0%,
    rgba(10, 14, 23, 0.7) 55%,
    var(--bc-bg) 100%
  );
}

.bc-home-hero__body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 2.5rem;
}

.bc-home-hero__title {
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.bc-home-hero__title a {
  color: var(--bc-text-strong);
}

.bc-home-hero__title a:hover {
  color: var(--bc-cyan);
}

.bc-home-hero__excerpt {
  font-size: 1rem;
  color: var(--bc-text-soft);
  max-width: 600px;
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.bc-home-hero__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--bc-text-dim);
}

/* ── Home section ────────────────────────────────────────── */
.bc-home-section {
  display: grid;
  gap: 1.25rem;
}

/* ── Post card — homepage variant ───────────────────────── */
.bc-post-card {
  display: flex;
  flex-direction: column;
}

.bc-post-card .bc-card__image {
  aspect-ratio: 16 / 9;
}

/* ── Download card — homepage variant ───────────────────── */
.bc-dl-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: var(--bc-bg-card);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-lg);
  transition: all var(--bc-ease);
}

.bc-dl-card:hover {
  border-color: var(--bc-cyan-border);
  box-shadow: var(--bc-glow-cyan);
  transform: translateY(-1px);
}

.bc-dl-card__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--bc-radius);
  background: rgba(34, 211, 238, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  overflow: hidden;
}

.bc-dl-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bc-dl-card__info {
  min-width: 0;
}

.bc-dl-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bc-dl-card__title a {
  color: var(--bc-text-strong);
}

.bc-dl-card__title a:hover {
  color: var(--bc-cyan);
}

.bc-dl-card__meta {
  font-size: 0.75rem;
  color: var(--bc-text-dim);
}

/* ── Forum topic row — homepage variant ─────────────────── */
.bc-topic-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.875rem 1rem;
  background: var(--bc-bg-card);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-lg);
  transition: all var(--bc-ease);
}

.bc-topic-row:hover {
  border-color: var(--bc-line-hover);
  background: var(--bc-bg-card-alt);
}

.bc-topic-row.is-solved {
  border-left: 3px solid var(--bc-green);
}

.bc-topic-row__title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.bc-topic-row__title a {
  color: var(--bc-text-strong);
}

.bc-topic-row__title a:hover {
  color: var(--bc-cyan);
}

.bc-topic-row__meta {
  font-size: 0.72rem;
  color: var(--bc-text-dim);
}

.bc-topic-row__stats {
  text-align: right;
  font-size: 0.72rem;
  color: var(--bc-text-dim);
  white-space: nowrap;
}

.bc-topic-row__stats strong {
  display: block;
  font-family: var(--bc-font-mono);
  font-size: 0.95rem;
  color: var(--bc-text-strong);
}
