/* Category pages — playful theme */

body.theme-playful:has(.category-playful) {
  background: #faf7f0;
}

body.theme-playful:has(.category-playful) .theme-playful__footer {
  margin-top: 0;
}

.category-playful {
  background: transparent;
}

.category-playful__page {
  padding-bottom: 4rem;
}

/* Back link */
.category-playful__top {
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.category-playful__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a5c42;
  text-decoration: none;
  transition: gap 0.2s;
}

.category-playful__back:hover {
  gap: 0.55rem;
}

/* Hero */
.category-playful__hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .category-playful__hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
  }
}

.category-playful__hero-text {
  order: 2;
}

@media (min-width: 768px) {
  .category-playful__hero-text {
    order: 1;
  }
}

.category-playful__hero-media {
  order: 1;
  margin: 0;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(26, 92, 66, 0.12);
  border-bottom: 4px solid #f0c14a;
  box-shadow: 0 12px 40px rgba(26, 51, 40, 0.1);
  aspect-ratio: 4 / 3;
}

@media (min-width: 768px) {
  .category-playful__hero-media {
    order: 2;
  }
}

.category-playful__hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-playful__hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a5c42;
  background: #e8f5ee;
  padding: 0.4rem 0.875rem 0.4rem 0.5rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.category-playful__hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.category-playful__hero-icon .category-icon {
  width: 1.75rem;
  max-height: 1.75rem;
}

.category-playful__hero-icon .material-symbols-outlined {
  font-size: 1.25rem;
  color: #1a5c42;
}

.category-playful__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #1a3328;
  margin: 0 0 0.875rem;
}

.category-playful__lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #4a5750;
  margin: 0 0 1.25rem;
}

.category-playful__count {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a5c42;
  background: #fff;
  border: 1px solid rgba(26, 92, 66, 0.15);
  padding: 0.4rem 0.875rem;
  border-radius: 9999px;
  margin: 0;
}

.category-playful__count .material-symbols-outlined {
  font-size: 1.125rem;
}

/* Body */
.category-playful__body {
  padding-top: 0.5rem;
}

/* Main grid */
.category-playful__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .category-playful__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 3rem;
  }
}

.category-playful__section-title {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1a3328;
  margin: 0 0 1.25rem;
}

.category-playful__section-title::before {
  content: "";
  flex-shrink: 0;
  width: 4px;
  margin-top: 0.2em;
  align-self: stretch;
  min-height: 1.25em;
  border-radius: 2px;
  background: linear-gradient(180deg, #1a5c42 0%, #2d7a5a 100%);
}

/* Topics nav */
.category-playful__topic-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(26, 92, 66, 0.1);
  box-shadow: 0 4px 16px rgba(26, 92, 66, 0.05);
}

.category-playful__topic-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: none;
  border-radius: 0.625rem;
  background: transparent;
  text-align: left;
  font: inherit;
  color: #4a5750;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.category-playful__topic-btn:hover {
  background: #e8f5ee;
  color: #1a5c42;
}

.category-playful__topic-btn.is-active {
  background: #e8f5ee;
  color: #1a5c42;
  font-weight: 600;
}

.category-playful__topic-btn--empty {
  opacity: 0.65;
}

.category-playful__topic-btn--empty .category-playful__topic-count {
  background: #f3f4f5;
  color: #5c6b62;
}

.category-playful__topic-label {
  font-size: 0.9375rem;
  line-height: 1.4;
}

.category-playful__topic-count {
  flex-shrink: 0;
  min-width: 1.5rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  color: #1a5c42;
  background: rgba(26, 92, 66, 0.1);
  border-radius: 9999px;
}

.category-playful__topic-btn.is-active .category-playful__topic-count {
  background: #1a5c42;
  color: #fff;
}

/* Featured guides */
.category-playful__guide-item[hidden] {
  display: none;
}
.category-playful__featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .category-playful__featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.category-playful__empty {
  font-size: 0.9375rem;
  color: #5c6b62;
  margin: 0;
}
