/* ===============================================
   3DCP Cases - Clean Card Layout
   =============================================== */

/* === CSS Variables === */
:root {
  --bg-sidebar: #171717;
  --bg-main: #f5f3ef;
  --bg-card: #ffffff;
  --bg-muted: #f7f8f9;
  
  --color-green-500: #22c55e;
  --color-green-600: #16a34a;
  --color-orange-500: #f97316;
  --color-blue-500: #0ea5e9;
  --color-pink-500: #ec4899;
  --color-yellow-500: #eab308;
  
  --text-primary: #111111;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  
  --border-color: #e5e5e5;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 8px 24px rgba(0,0,0,0.12);
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  --duration-normal: 200ms;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

body {
  background: var(--bg-main);
}

/* === Breadcrumb === */
.breadcrumb {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  max-width: 1200px;
  margin: 0 auto;
}

.breadcrumb-list a {
  color: var(--color-green-500);
  text-decoration: none;
}

.breadcrumb-list a:hover {
  text-decoration: underline;
}

.breadcrumb-list .current {
  color: var(--text-secondary);
}

.breadcrumb-sep {
  color: #ccc;
}

/* === Filter & Controls === */
.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  background: var(--bg-card);
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--color-green-500);
  outline: none;
}

.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 4px;
}

.view-btn {
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal);
}

.view-btn.active {
  background: var(--color-green-500);
  color: #fff;
}

/* === Cases Count === */
.cases-count {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* === Grid View === */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* === Case Card === */
.case-card {
  display: block;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: var(--shadow-card);
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-green-500);
}

/* Card Image Placeholder */
.case-image-placeholder {
  height: 120px;
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: 0.5;
}

/* Card Content */
.case-content {
  padding: 16px;
}

/* Badges */
.case-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.case-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.badge-country {
  background: var(--bg-sidebar);
  color: #fff;
}

.badge-year {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-status {
  background: #dcfce7;
  color: #166534;
}

/* Title */
.case-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.case-title-en {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

/* Summary */
.case-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta Info */
.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.case-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.case-meta-item svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
  flex-shrink: 0;
}

/* === List View === */
.cases-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: var(--shadow-card);
}

.list-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-green-500);
}

.list-icon {
  font-size: 32px;
  opacity: 0.5;
  flex-shrink: 0;
}

.list-content {
  flex: 1;
  min-width: 0;
}

.list-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.list-subtitle {
  font-size: 12px;
  color: var(--text-tertiary);
}

.list-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
}

/* === Responsive === */
@media (max-width: 768px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }
  
  .list-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .list-badges {
    margin-top: 12px;
  }
}

/* === Animation === */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.case-card,
.list-item {
  animation: slideInUp 0.3s var(--ease-out) both;
}

.case-card:nth-child(1), .list-item:nth-child(1) { animation-delay: 0.03s; }
.case-card:nth-child(2), .list-item:nth-child(2) { animation-delay: 0.06s; }
.case-card:nth-child(3), .list-item:nth-child(3) { animation-delay: 0.09s; }
.case-card:nth-child(4), .list-item:nth-child(4) { animation-delay: 0.12s; }
.case-card:nth-child(5), .list-item:nth-child(5) { animation-delay: 0.15s; }
.case-card:nth-child(6), .list-item:nth-child(6) { animation-delay: 0.18s; }
