:root{
  --cg-category-bg: #0b0c13;
  --cg-category-surface: rgba(15,18,30,.78);
  --cg-category-surface-2: rgba(255,255,255,.04);
  --cg-category-border: rgba(255,255,255,.08);
  --cg-category-text: #ffffff;
  --cg-category-text-soft: rgba(255,255,255,.74);
  --cg-category-accent: #8d90ff;
  --cg-category-shadow: 0 18px 38px rgba(0,0,0,.24);
  --cg-category-radius: 18px;
  --cg-category-container: 1280px;
}

html,
body{
  background: var(--cg-category-bg);
}

.cg-category-page{
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(141,144,255,.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(52,199,255,.08), transparent 25%),
    var(--cg-category-bg);
  color: var(--cg-category-text);
}

.cg-category-page__container{
  width: min(calc(100% - 32px), var(--cg-category-container));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.cg-category-page__header{
  margin-bottom: 28px;
}

.cg-category-page__brand{
  margin-bottom: 18px;
}

.cg-category-page__brand-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
}

.cg-category-page__brand-logo{
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}

.cg-category-page__brand-manual-logo{
  display: block;
  width: 78%;
  height: 78%;
  max-width: 78%;
  max-height: 78%;
  object-fit: contain;
}

.cg-category-page__brand-text{
  color: rgba(255,255,255,.88);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.02em;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cg-category-page__hero{
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(17,24,46,.88), rgba(12,15,26,.94));
  border: 1px solid var(--cg-category-border);
  box-shadow: var(--cg-category-shadow);
}

.cg-category-page__title{
  margin: 0 0 12px;
  color: var(--cg-category-text);
  font-size: clamp(32px, 5vw, 58px);
  line-height: .96;
  font-weight: 900;
  letter-spacing: -.05em;
}

.cg-category-page__seo-box{
  position: relative;
  max-width: 760px;
}

.cg-category-page__description{
  color: var(--cg-category-text-soft);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 700;
  overflow: hidden;
  transition: max-height .28s ease;
}

.cg-category-page__description.is-collapsed{
  max-height: 110px;
  position: relative;
}

.cg-category-page__description.is-collapsed::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52px;
  background: linear-gradient(to bottom, rgba(12,15,26,0), rgba(12,15,26,.96));
  pointer-events: none;
}

.cg-category-page__description.is-expanded{
  max-height: 3000px;
}

.cg-category-page__description > *:first-child{
  margin-top: 0;
}

.cg-category-page__description > *:last-child{
  margin-bottom: 0;
}

.cg-category-page__description h2,
.cg-category-page__description h3,
.cg-category-page__description h4,
.cg-category-page__description h5,
.cg-category-page__description h6{
  margin: 24px 0 12px;
  color: var(--cg-category-text);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -.03em;
}

.cg-category-page__description h2{ font-size: 28px; }
.cg-category-page__description h3{ font-size: 22px; }
.cg-category-page__description h4{ font-size: 18px; }

.cg-category-page__description p{
  margin: 0 0 16px;
  color: var(--cg-category-text-soft);
}

.cg-category-page__description ul,
.cg-category-page__description ol{
  margin: 0 0 16px 20px;
  padding: 0;
}

.cg-category-page__description li{
  margin-bottom: 8px;
}

.cg-category-page__description a{
  color: var(--cg-category-accent);
  text-decoration: none;
}

.cg-category-page__description a:hover{
  color: #ffffff;
}

.cg-category-page__seo-toggle{
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--cg-category-accent);
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  padding: 0;
  cursor: pointer;
  transition: color .18s ease, opacity .18s ease;
}

.cg-category-page__seo-toggle:hover,
.cg-category-page__seo-toggle:focus{
  color: #ffffff;
  outline: none;
}

.cg-category-page__seo-toggle-label-less{
  display: none;
}

.cg-category-page__seo-toggle[aria-expanded="true"] .cg-category-page__seo-toggle-label-more{
  display: none;
}

.cg-category-page__seo-toggle[aria-expanded="true"] .cg-category-page__seo-toggle-label-less{
  display: inline;
}

.cg-category-page__grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.cg-category-page__card{
  border-radius: var(--cg-category-radius);
  overflow: hidden;
  background: var(--cg-category-surface-2);
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.cg-category-page__card:hover{
  transform: translateY(-3px);
  border-color: rgba(141,144,255,.34);
  box-shadow: 0 14px 28px rgba(0,0,0,.20);
}

.cg-category-page__card-link{
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.cg-category-page__card-media{
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #11182e;
}

.cg-category-page__card-media img,
.cg-category-page__card-placeholder{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cg-category-page__card-placeholder{
  background: linear-gradient(135deg, #1c2747 0%, #11182e 100%);
}

.cg-category-page__card-body{
  padding: 14px 14px 16px;
}

.cg-category-page__card-title{
  margin: 0 0 8px;
  color: #fff;
  font-size: 20px;
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -.03em;
}

.cg-category-page__card-excerpt{
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cg-category-page__pagination{
  margin-top: 30px;
}

.cg-category-page__pagination .page-numbers{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.cg-category-page__pagination .page-numbers li{
  list-style: none;
}

.cg-category-page__pagination a,
.cg-category-page__pagination span{
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.cg-category-page__pagination a:hover{
  background: rgba(255,255,255,.07);
  border-color: rgba(141,144,255,.34);
  transform: translateY(-1px);
}

.cg-category-page__pagination .current{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.12);
}

.cg-category-page__empty{
  padding: 40px 0 20px;
}

.cg-category-page__empty-title{
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.04em;
}

.cg-category-page__empty-text{
  margin: 0;
  color: var(--cg-category-text-soft);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 700;
}

@media (max-width: 1100px){
  .cg-category-page__grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px){
  .cg-category-page__container{
    width: min(calc(100% - 20px), var(--cg-category-container));
    padding: 20px 0 30px;
  }

  .cg-category-page__hero{
    padding: 20px;
    border-radius: 20px;
  }

  .cg-category-page__grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .cg-category-page__card-title{
    font-size: 16px;
  }

  .cg-category-page__card-excerpt{
    font-size: 12px;
  }

  .cg-category-page__description{
    font-size: 14px;
  }

  .cg-category-page__description.is-collapsed{
    max-height: 92px;
  }
}

