.related-apps {
  margin-top: 2.5rem;
  padding: 1.75rem 1.25rem 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(138, 7, 7, 0.12);
  background: linear-gradient(165deg, rgba(138, 7, 7, 0.04) 0%, rgba(138, 7, 7, 0.02) 45%, transparent 100%);
}

body.darkmode .related-apps {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(255, 64, 64, 0.08) 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
}

.related-apps__header {
  margin-bottom: 1.25rem;
  text-align: center;
}

.related-apps__title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin: 0 0 0.35rem;
  font-weight: 800;
  color: #5a0505;
}

body.darkmode .related-apps__title {
  color: #ffb4b4;
}

.related-apps__subtitle {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.85;
  color: inherit;
}

.related-apps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1rem;
}

@media (min-width: 900px) {
  .related-apps__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.related-apps__card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(138, 7, 7, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

body.darkmode .related-apps__card {
  background: rgba(30, 30, 34, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.related-apps__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(138, 7, 7, 0.15);
  border-color: rgba(138, 7, 7, 0.28);
}

.related-apps__card:focus-visible {
  outline: 3px solid #8a0707;
  outline-offset: 2px;
}

body.darkmode .related-apps__card:hover {
  box-shadow: 0 8px 28px rgba(255, 64, 64, 0.12);
  border-color: rgba(255, 160, 160, 0.25);
}

.related-apps__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 0.75rem 0.5rem 0.25rem;
  background: rgba(138, 7, 7, 0.06);
}

body.darkmode .related-apps__thumb {
  background: rgba(255, 255, 255, 0.04);
}

.related-apps__thumb img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.related-apps__body {
  padding: 0.65rem 0.85rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  text-align: right;
}

[dir="ltr"] .related-apps__body {
  text-align: left;
}

.related-apps__badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(138, 7, 7, 0.12);
  color: #6a0808;
}

body.darkmode .related-apps__badge {
  background: rgba(255, 160, 160, 0.15);
  color: #ffc9c9;
}

.related-apps--os .related-apps__badge {
  background: rgba(14, 58, 255, 0.12);
  color: #0e2a9e;
}

body.darkmode .related-apps--os .related-apps__badge {
  background: rgba(120, 160, 255, 0.18);
  color: #c8d8ff;
}

.related-apps__name {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
  color: #1a1a1f;
}

body.darkmode .related-apps__name {
  color: #f2f3f7;
}

body.darkmode .related-apps--os .related-apps__name {
  color: #e8edff;
}

.related-apps__desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  opacity: 0.82;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-apps__cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #8a0707;
}

[dir="ltr"] .related-apps__cta {
  justify-content: flex-start;
}

body.darkmode .related-apps__cta {
  color: #ff9090;
}

.related-apps__cta-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.related-apps__card:hover .related-apps__cta-icon {
  transform: translateX(-4px);
}

[dir="ltr"] .related-apps__card:hover .related-apps__cta-icon {
  transform: translateX(4px) rotate(180deg);
}
