/* Content pages: news articles, events, listings */

.content-page,
.content-listing {
  padding: 60px 0 120px;
  min-height: 60vh;
}

.content-page__breadcrumbs {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 14px;
  color: #8f8f8f;
  margin-bottom: 24px;
}

.content-page__breadcrumbs a {
  color: #8f8f8f;
  text-decoration: none;
}

.content-page__breadcrumbs a:hover {
  color: #171717;
}

.content-page__date {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 14px;
  color: #8f8f8f;
  margin-bottom: 12px;
}

.content-page__title {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 42px;
  font-weight: 500;
  line-height: 1.25;
  color: #171717;
  margin: 0 0 32px;
}

.content-page__hero {
  margin-bottom: 32px;
  border-radius: 16px;
  overflow: hidden;
}

.content-page__hero img {
  width: 100%;
  height: auto;
  display: block;
}

.content-page__body {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #171717;
  max-width: 800px;
}

.content-page__body h2 {
  font-size: 28px;
  font-weight: 500;
  margin: 40px 0 16px;
}

.content-page__body h3 {
  font-size: 22px;
  font-weight: 500;
  margin: 32px 0 12px;
}

.content-page__body p {
  margin: 0 0 16px;
}

.content-page__body img {
  max-width: 100%;
  border-radius: 12px;
  margin: 24px 0;
}

.content-page__body a {
  color: #2f4eff;
}

.content-page__body ul,
.content-page__body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.content-page__body li {
  margin-bottom: 8px;
}

/* Listing page */

.content-listing__title {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 42px;
  font-weight: 500;
  color: #171717;
  margin: 0 0 40px;
}

.content-listing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.content-listing__card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.content-listing__card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.content-listing__card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.content-listing__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-listing__card-body {
  padding: 20px 24px 24px;
  flex: 1;
}

.content-listing__card-date {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 13px;
  color: #8f8f8f;
  margin-bottom: 8px;
}

.content-listing__card-title {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  color: #171717;
  margin: 0 0 8px;
}

.content-listing__card-desc {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #8f8f8f;
  margin: 0;
}

/* Homepage news block */

.homepage-news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.homepage-news__card {
  background: #fff;
  border-radius: 30px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.homepage-news__card:hover {
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}

.homepage-news__card-image {
  aspect-ratio: 560/320;
  overflow: hidden;
}

.homepage-news__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.homepage-news__card-body {
  padding: 20px 24px 24px;
}

.homepage-news__card-date {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 13px;
  color: #8f8f8f;
  margin-bottom: 8px;
}

.homepage-news__card-title {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  color: #171717;
  margin: 0;
}

@media (max-width: 960px) {
  .homepage-news__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .homepage-news__grid {
    grid-template-columns: 1fr;
  }
}

/* Load more button */

.content-listing__load-more {
  text-align: center;
  padding: 40px 0 0;
}

.content-listing__load-more-btn {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #000;
  background-color: #FEE121;
  border: 2px solid #FEE121;
  border-radius: 30px;
  padding: 16.8px 60px;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.content-listing__load-more-btn:hover {
  color: #000;
  background-color: #f5f6f8;
  border-color: #bdbdbd;
}

/* Cases filter — matches Tilda t778 catalog filters */

.cases-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

/* --- Filter dropdown (Отрасль, Интегратор) --- */

.cases-filter__dropdown {
  position: relative;
}

.cases-filter__dropdown-btn {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #000;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 20px;
  padding: 0 40px 0 20px;
  height: 40px;
  line-height: 40px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
  white-space: nowrap;
  position: relative;
}

.cases-filter__dropdown-btn::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #000;
  border-bottom: 1.5px solid #000;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  transition: transform 0.2s ease;
}

.cases-filter__dropdown.open .cases-filter__dropdown-btn {
  background-color: #FEE121;
  border-color: #FEE121;
}

.cases-filter__dropdown.open .cases-filter__dropdown-btn::after {
  transform: translateY(-25%) rotate(-135deg);
}

.cases-filter__dropdown-list {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  padding: 15px;
  z-index: 100;
  box-sizing: border-box;
}

.cases-filter__dropdown.open .cases-filter__dropdown-list {
  display: block;
}

/* Simple list items (Отрасль) */
.cases-filter__dropdown-item {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #000;
  padding: 6px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.cases-filter__dropdown-item:hover {
  color: #000;
  opacity: 0.7;
}

/* Checkbox items (Интегратор) */
.cases-filter__checkbox-item {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #000;
  padding: 6px 8px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cases-filter__checkbox {
  width: 16px;
  height: 16px;
  border: 2px solid #bdbdbd;
  border-radius: 3px;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cases-filter__checkbox-item.checked .cases-filter__checkbox {
  background-color: #000;
  border-color: #000;
}

.cases-filter__checkbox-item.checked .cases-filter__checkbox::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* --- Sort dropdown (Порядок) --- */

.cases-filter__sort {
  margin-left: auto;
}

.cases-filter__sort .cases-filter__dropdown-btn {
  background: #fff;
  border: 1px solid #fff;
  border-radius: 20px;
  padding: 0 35px 0 20px;
  min-width: 240px;
}

.cases-filter__sort .cases-filter__dropdown-btn::after {
  right: 15px;
  border-right-width: 2px;
  border-bottom-width: 2px;
  width: 7px;
  height: 7px;
}

.cases-filter__sort .cases-filter__dropdown-list {
  right: 0;
  left: auto;
  min-width: 240px;
}

.cases-filter__sort .cases-filter__dropdown-item {
  padding: 8px 12px;
}

.cases-filter__sort .cases-filter__dropdown-item--active {
  background-color: #FEE121;
  border-radius: 8px;
}

/* --- Chosen value tag --- */

.cases-filter__chosen-val {
  display: none;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 13px;
  color: #000;
  background: #fff;
  border-radius: 20px;
  padding: 8px 12px 8px 28px;
  cursor: pointer;
  position: relative;
}

.cases-filter__chosen-val::before {
  content: '\00d7';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #757575;
}

.cases-filter__chosen-val.visible {
  display: inline-block;
}

/* Cases listing — matches Tilda t778 catalog grid */

.content-listing__grid--2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 40px;
}

.content-listing__card--case {
  border-radius: 30px;
  background: #fff;
  box-shadow: none;
  transition: box-shadow 0.3s ease;
}

.content-listing__card--case:hover {
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}

.content-listing__card-image--case {
  aspect-ratio: 560/320;
  border-radius: 30px 30px 0 0;
}

.content-listing__card-image--case img {
  border-radius: 30px 30px 0 0;
}

.content-listing__card-title--case {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.35;
  color: #000000;
}

@media (max-width: 960px) {
  .content-listing__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-listing__grid--2col {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .content-page__title,
  .content-listing__title {
    font-size: 32px;
  }
  .content-listing__card-title--case {
    font-size: 20px;
  }
  .cases-filter__btn {
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .content-listing__grid,
  .content-listing__grid--2col {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .content-listing__grid,
  .content-listing__grid--2col {
    grid-template-columns: 1fr;
  }
  .content-page__title,
  .content-listing__title {
    font-size: 26px;
  }
  .content-page,
  .content-listing {
    padding: 40px 0 80px;
  }
  .content-listing__card-title--case {
    font-size: 16px;
  }
  .cases-filter {
    margin-bottom: 30px;
  }
}
