/* ============================================================
   Get Into Finance – Interview Prep Cases (cases.php)
   Eigenes Stylesheet (vorher fälschlich an dashboard.css gekoppelt).
   Baut auf theme.css auf, behält die bestehende JS/Markup-Struktur
   (.case-card / .case-content / .difficulty etc.) bei.
   ============================================================ */

.main {
  padding: 32px 0 80px;
}

.mainwidth {
  width: 90%;
  max-width: 1180px;
  margin: 0 auto;
}

.cases-page-header {
  margin-bottom: 24px;
}

.main h1 {
  font-size: 30px;
  margin-bottom: 4px;
}

.cases-page-sub {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-ink-soft);
  margin: 0;
}

/* =============== Filter Bar =============== */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  margin-bottom: 28px;
}

.filter-bar input,
.filter-bar select {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--color-primary);
}

.search-box {
  flex: 1;
  min-width: 160px;
}

.btn-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-search:hover {
  background: var(--color-primary-dark);
}

.btn-search:active {
  transform: scale(0.97);
}

.btn-see-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-border);
  background: transparent;
  color: var(--color-ink);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-see-all:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

/* =============== Case Cards =============== */
.caseslower {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.case-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.case-content {
  display: flex;
  flex-direction: column;
}

.case-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-ink);
  margin: 0 0 6px;
}

.case-description {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-ink-soft);
  line-height: 1.5;
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin: 0 0 10px;
}

.read-more {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  color: var(--color-primary-dark);
  margin: 0 0 10px;
}

/* =============== Card top row (difficulty + case number) =============== */
.case-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.case-num-badge {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 11px;
  color: #9aa6b5;
  letter-spacing: 0.02em;
}

/* =============== Difficulty badge — colored by level =============== */
.difficulty {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f1f5f9;
  color: #64748b;
}

/* Entry / Beginner → brand teal */
.difficulty.Entry, .difficulty.entry,
.difficulty.Beginner, .difficulty.beginner {
  background: #d1fae5;
  color: #065f46;
}

/* Analyst / Intermediate → blue */
.difficulty.Analyst, .difficulty.analyst,
.difficulty.Intermediate, .difficulty.intermediate {
  background: #dbeafe;
  color: #1e40af;
}

/* Associate / Advanced → amber */
.difficulty.Associate, .difficulty.associate,
.difficulty.Advanced, .difficulty.advanced {
  background: #fef3c7;
  color: #92400e;
}

/* Expert → red */
.difficulty.Expert, .difficulty.expert {
  background: #fee2e2;
  color: #991b1b;
}

/* =============== Left-border accent on card by difficulty =============== */
.case-card.lvl-entry    { border-left: 3px solid #10b981; }
.case-card.lvl-beginner { border-left: 3px solid #10b981; }
.case-card.lvl-analyst  { border-left: 3px solid #3b82f6; }
.case-card.lvl-intermediate { border-left: 3px solid #3b82f6; }
.case-card.lvl-associate { border-left: 3px solid #f59e0b; }
.case-card.lvl-advanced  { border-left: 3px solid #f59e0b; }
.case-card.lvl-expert    { border-left: 3px solid #ef4444; }

/* =============== Category & subcategory badges =============== */
.case-meta {
  margin-top: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #f1f5f9;
  color: #64748b;
}

/* Category colors by slug */
.cat-accounting         { background: #dbeafe; color: #1e40af; }
.cat-valuation          { background: #ede9fe; color: #5b21b6; }
.cat-ma,
.cat-manda,
.cat-mergersacquisitions { background: #d1fae5; color: #065f46; }
.cat-privateequity,
.cat-pe                 { background: #fef3c7; color: #92400e; }

/* Subcategory: slightly lighter tint of its category */
.subcat.cat-accounting         { background: #eff6ff; color: #2563eb; }
.subcat.cat-valuation          { background: #f5f3ff; color: #6d28d9; }
.subcat.cat-ma,
.subcat.cat-manda,
.subcat.cat-mergersacquisitions { background: #ecfdf5; color: #047857; }
.subcat.cat-privateequity,
.subcat.cat-pe                 { background: #fffbeb; color: #b45309; }
.subcat                        { background: #f8fafc; color: #475569; }

/* =============== Responsive =============== */
@media (max-width: 980px) {
  .caseslower {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .caseslower {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
