/*
 * stoikos.css — stoiker.net
 * Themen-Übersicht /lernen/themen
 * Benötigt: search-common.css
 */

.bg-stoikos {
  background: #f9f7f2;
}

/* ── Intro ── */
.stoikos-intro {
  padding: 2.5rem 0 1.5rem;
}

.stoikos-intro h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #1a1714;
  margin: 0 0 .6rem 0;
}

.stoikos-intro p {
  font-size: .95rem;
  color: #3d3830;
  line-height: 1.7;
  margin: 0;
  max-width: 640px;
}

/* ── Kategorienraster ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* ── Kategorie-Card ── */
.category-card {
  background: #fff;
  border: 1px solid #e8e6e0;
  border-top: 2px solid #1a1714;
  border-radius: 6px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  min-height: 0;
  transition: border-color .15s;
}

.category-card:hover {
  border-color: #b0aa9c;
  border-top-color: #1a1714;
  box-shadow: none;
  transform: none;
}

/* Alle Kategorie-Farben vereinheitlicht */
.cat-grundlagen,
.cat-logik,
.cat-physik,
.cat-ethik,
.cat-emotionen,
.cat-sozial,
.cat-modern {
  border-top-color: #1a1714;
}

.category-header {
  margin-bottom: .75rem;
}

.category-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1714;
  margin: 0;
}

.category-count {
  display: inline-block;
  font-size: .75rem;
  color: #7a7060;
  background: #f0ede5;
  border-radius: 4px;
  padding: .15rem .5rem;
  margin-bottom: .75rem;
}

.category-description {
  font-size: .875rem;
  color: #3d3830;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.category-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.category-articles-list {
  flex: 1;
  margin-bottom: 1rem;
}

.article-list-item {
  padding: .5rem 0;
  border-bottom: 1px solid #f0ede5;
}

.article-list-item:last-child {
  border-bottom: none;
}

.article-item-title {
  font-size: .875rem;
  font-weight: 500;
  margin: 0;
}

.article-item-title a {
  color: #1a1714;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}

.article-item-title a:hover {
  border-bottom-color: #1a1714;
}

/* ── Card-Footer & Button ── */
.category-footer {
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid #e8e6e0;
}

.btn.btn-sm.btn-primary {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  font-size: .85rem;
  font-weight: 500;
  color: #5755d9;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
  cursor: pointer;
}

.btn.btn-sm.btn-primary:hover {
  background: none;
  color: #5755d9;
  border-bottom-color: #5755d9;
  transform: none;
}

.more-articles-hint {
  display: none;
}

/*
 * Leere Kategorien ausblenden
 * Zuverlässiger via Twig: {% if category.count > 0 %}
 * CSS-Fallback (benötigt data-count Attribut):
 */
.category-card:has(.category-count[data-count="0"]) {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}