.category-content-page {
  padding: 1.75rem 0 3.5rem;
}

.category-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.7fr);
  gap: 2rem 2.25rem;
  align-items: start;
}

.category-content-layout--text-only {
  grid-template-columns: 1fr;
  max-width: 46rem;
}

.category-content-body {
  min-width: 0;
}

.category-content-title {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
}

.category-content-text {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #4b5563;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.category-content-text br + br {
  display: block;
  content: "";
  margin-top: 0.65rem;
}

.category-content-children {
  margin: 2.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.category-content-children__title {
  margin: 0 0 1.15rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
}

.category-content-children__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.category-child-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.category-child-card:hover {
  border-color: color-mix(in srgb, var(--color-primary, #5b7c2e) 45%, #e5e7eb);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  transform: translateY(-2px);
}

.category-child-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f3f4f6;
  text-decoration: none;
}

.category-child-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.35s ease;
}

.category-child-card:hover .category-child-card__media img {
  transform: scale(1.04);
}

.category-child-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #9ca3af;
  font-size: 2rem;
}

.category-child-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem 1.15rem;
}

.category-child-card__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

.category-child-card__title a {
  color: #111827;
  text-decoration: none;
}

.category-child-card__title a:hover {
  color: var(--color-primary, #5b7c2e);
}

.category-child-card__text {
  flex: 1;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #6b7280;
}

.category-child-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
  padding: 0.6rem 0.85rem;
  border-radius: 0.45rem;
  background: var(--color-primary, #5b7c2e);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.category-child-card__cta:hover {
  background: color-mix(in srgb, var(--color-primary, #5b7c2e) 88%, #000);
  color: #fff;
}

.category-child-card__cta i {
  font-size: 0.75rem;
}

@media (max-width: 991.98px) {
  .category-content-children__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .category-content-children__grid {
    grid-template-columns: 1fr;
  }
}

.category-content-cta {
  margin: 1.5rem 0 0;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--color-primary, #5b7c2e);
  background: #f8faf6;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #374151;
}

.category-content-cta a {
  color: var(--color-primary, #5b7c2e);
  font-weight: 600;
  text-decoration: none;
}

.category-content-cta a:hover {
  text-decoration: underline;
}

.category-content-sidebar {
  position: sticky;
  top: 6.5rem;
}

.category-content-gallery {
  display: grid;
  gap: 0.75rem;
}

.category-content-gallery--1,
.category-content-gallery--2,
.category-content-gallery--3 {
  grid-template-columns: 1fr;
}

.category-content-gallery__item {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.65rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.category-content-gallery--1 .category-content-gallery__item {
  aspect-ratio: 1 / 1;
}

.category-content-gallery--2 .category-content-gallery__item:first-child,
.category-content-gallery--3 .category-content-gallery__item:first-child {
  aspect-ratio: 4 / 3;
}

.category-content-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 991.98px) {
  .category-content-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .category-content-sidebar {
    position: static;
    order: -1;
  }

  .category-content-gallery--2,
  .category-content-gallery--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-content-gallery--2 .category-content-gallery__item,
  .category-content-gallery--2 .category-content-gallery__item:first-child,
  .category-content-gallery--3 .category-content-gallery__item,
  .category-content-gallery--3 .category-content-gallery__item:first-child {
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 575.98px) {
  .category-content-gallery--2,
  .category-content-gallery--3 {
    grid-template-columns: 1fr;
  }

  .category-content-gallery--2 .category-content-gallery__item:first-child,
  .category-content-gallery--3 .category-content-gallery__item:first-child {
    aspect-ratio: 4 / 3;
  }
}
