/* Блоки «Новости» и «Наши кейсы» на страницах статей */

.knowledge {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem 4rem;
}

.knowledge-title {
  font-weight: 500;
  font-size: 1.35rem;
  color: rgba(179, 179, 184, 1);
  margin: 2rem 0 1.5rem;
  text-align: left;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.services-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.services-card {
  background: rgba(51, 52, 64, 0.5);
  border: 2px solid rgba(71, 63, 53, 1);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  transition: border-color 0.2s;
  padding: 0.4rem 0.6rem;
}

.services-card:hover {
  border-color: rgba(253, 189, 48, 0.4);
}

.services-card-content {
  flex: 1;
  padding: 0.4rem 0.75rem 0.6rem;
  min-width: 0;
}

.services-card-title {
  font-weight: 300;
  font-size: 1.05rem;
  color: #fff;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.services-card-desc {
  font-weight: 300;
  font-size: 0.875rem;
  color: rgba(187, 187, 187, 1);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 1.4em;
}

.services-read-more {
  margin-top: 0.35rem;
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  color: #FDBD30;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  animation: read-more-pulse 1.6s ease-in-out infinite;
}

.services-read-more:hover {
  text-decoration: underline;
}

/* На странице статьи — только компактные карточки со ссылкой «Прочитать» */
.knowledge[data-related-articles] .services-card-toggle,
.knowledge[data-related-articles] .services-card-full,
.knowledge[data-related-articles] .services-card-anchor {
  display: none !important;
}

.knowledge[data-related-articles] .services-card {
  display: flex;
  align-items: stretch;
}

@keyframes read-more-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.knowledge-banner {
  position: sticky;
  top: 2rem;
  border-radius: 10px;
  padding: 0.75rem 0.75rem 1rem;
  border: 1px solid transparent;
  background:
    linear-gradient(#24252D, #24252D) padding-box,
    linear-gradient(135deg, #474035, #FDBD30, #3E3936, #A17E33) border-box;
  overflow: hidden;
  color: #fff;
}

.knowledge-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/illustrations/девушка с цветком.svg") center bottom / cover no-repeat;
  opacity: 1;
  z-index: 0;
}

.knowledge-banner .services-side-title {
  position: relative;
  z-index: 1;
  color: rgba(179, 179, 184, 1);
  margin: 0;
  font-weight: 500;
  font-size: 1rem;
}

.knowledge-banner-subtitle {
  position: relative;
  z-index: 1;
  font-weight: 500;
  font-size: 1.5rem;
  color: #FDBD30;
  margin: 0.25rem 0 0;
  line-height: 1.25;
}

.info-banner.knowledge-banner::before {
  background: url("../images/illustrations/девушка с цветком.svg") center bottom / cover no-repeat;
}

.services-side-subtitle {
  position: relative;
  z-index: 1;
}

.cases {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem 4rem;
}

.cases-title {
  font-weight: 500;
  font-size: 1.35rem;
  color: rgba(179, 179, 184, 1);
  margin: 2rem 0 1.5rem;
  text-align: left;
}

.cases-card {
  border-radius: 16px;
  border: 1px solid transparent;
  background:
    linear-gradient(#24252d, #24252d) padding-box,
    linear-gradient(135deg, #474035, #FDBD30, #3E3936, #A17E33) border-box;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: stretch;
}

.cases-image-wrap {
  border-radius: 10px;
  overflow: hidden;
  background: #333541;
}

.cases-image {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.cases-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: rgba(179, 179, 184, 1);
}

.cases-project-title {
  font-weight: 500;
  font-size: 1.1rem;
  color: #fff;
  margin: 0;
}

.cases-meta {
  font-weight: 300;
  font-size: 0.9rem;
  margin: 0 0 0.25rem;
  color: rgba(179, 179, 184, 1);
}

.cases-desc {
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(187, 187, 187, 1);
  margin: 0;
}

.cases-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.cases-tag {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(36, 37, 45, 1);
  color: rgba(211, 211, 213, 1);
  font-weight: 300;
  font-size: 0.85rem;
}

.cases-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  gap: 1rem;
}

.cases-cta-btn {
  display: inline-block;
  padding: 0.45rem 1.75rem;
  border-radius: 999px;
  border: none;
  background: #FDBD30;
  color: #24252D;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  text-align: center;
}

.cases-dots {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
}

.cases-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(253, 189, 48, 0.4);
}

.cases-dot.is-active {
  width: 28px;
  border-radius: 999px;
  background: rgba(253, 189, 48, 1);
}

@media (max-width: 900px) {
  .knowledge-layout {
    grid-template-columns: 1fr;
  }

  .knowledge-banner {
    position: static;
    min-height: 200px;
  }

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