.hc-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.hc-hero-title {
  margin: 0;
}

.hc-hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.hc-hero-card .btn {
  white-space: nowrap;
}

.hc-sidebar,
.hc-main,
.hc-module,
.hc-postgrid {
  min-width: 0;
}

.hc-module + .hc-module {
  margin-top: 24px;
}

.hc-sidebar .hc-module {
  padding: 12px;
}

.hc-category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hc-category-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px;
  color: #0f172a;
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.hc-category-link:hover {
  color: #0f172a;
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.hc-category-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  color: #0b6a80;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.1);
  font-size: 18px;
}

.hc-category-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hc-category-title {
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hc-category-description {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.hc-card-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  width: 100%;
}

.hc-article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
}

.hc-article-card .card-body {
  min-width: 0;
}

.hc-article-card .card-title,
.hc-article-card .card-text {
  overflow-wrap: anywhere;
}

.hc-article-card .card-img-top {
  flex: 0 0 auto;
  width: 100%;
}

@media (max-width: 991.98px) {
  .hc-hero-actions {
    justify-content: flex-start;
  }

  .hc-layout {
    grid-template-columns: 1fr;
  }

  .hc-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .hc-hero-actions,
  .hc-hero-actions .btn {
    width: 100%;
  }

  .hc-card-grid {
    grid-template-columns: 1fr;
  }
}

.latest-questions-list {
  padding-left: 0.5rem;
  border-left: 4px solid #007bff;
}
body.night-mode .latest-questions-list {
  border-left: 4px solid #66b3ff;
}

.latest-item {
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  border-radius: 6px;
  background: #f8faff;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
}
body.night-mode .latest-item {
  background: #1c1f22;
}
.latest-item:hover {
  background: #eef6ff;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.05);
}
body.night-mode .latest-item:hover {
  background: #23272b;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.1);
}

.latest-link {
  color: #333;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  text-decoration: none;
}
body.night-mode .latest-link {
  color: #f1f1f1;
}
.latest-link:hover {
  color: #007bff;
  text-decoration: underline;
}
body.night-mode .latest-link:hover {
  color: #66b3ff;
}

.related-links-list {
  border-left: 4px solid #ff7e00;
  padding-left: 1rem;
  margin-top: 1rem;
}
body.night-mode .related-links-list {
  border-left: 4px solid #ffae42;
}

.related-item {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: #fdf8f2;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
}
body.night-mode .related-item {
  background: #25282c;
}
.related-item:hover {
  background: #fffaf3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
body.night-mode .related-item:hover {
  background: #2c3035;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

.related-link {
  color: #333;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  text-decoration: none;
}
body.night-mode .related-link {
  color: #f1f1f1;
}
.related-link:hover {
  color: #ff7e00;
  text-decoration: underline;
}
body.night-mode .related-link:hover {
  color: #ffae42;
}

.category-tile:hover {
  background-color: #f8f9fa;
  transform: translateY(-2px);
  transition: all 0.2s ease-in-out;
}
body.night-mode .category-tile:hover {
  background-color: #2a2d31;
}

body.night-mode .hc-category-link {
  color: #f8fafc;
  background: #1a1d20;
  border-color: rgba(148, 163, 184, 0.2);
}

body.night-mode .hc-category-link:hover {
  color: #f8fafc;
}

body.night-mode .hc-category-description {
  color: #cbd5e1;
}

.vote-btn {
  min-width: 100px;
}
body.night-mode .vote-btn {
  background: #212529;
  color: #f1f1f1;
}

.img-thumb {
  height: 100px;
  object-fit: cover;
  width: 100%;
}
body.night-mode .img-thumb {
  opacity: 0.95;
}

.card-img-top {
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid #ddd;
}
body.night-mode .card-img-top {
  border-bottom: 1px solid #444;
}

.card-body {
  padding: 1rem;
}
body.night-mode .card-body {
  background: #1a1d20;
}

.card-title {
  font-size: 1rem;
}
body.night-mode .card-title {
  color: #f8f9fa;
}

.card-text {
  font-size: 0.875rem;
}
body.night-mode .card-text {
  color: #ced4da;
}
