/* ============================================================
   PROJECTS.CSS — Project cards, case study expand panels
   ============================================================ */

/* --- Filter Tabs ------------------------------------------- */
.project-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: white;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover { border-color: var(--jpm-accent); color: var(--jpm-accent); }

.filter-btn.active {
  background: var(--jpm-primary);
  color: white;
  border-color: var(--jpm-primary);
}

/* --- Project Grid ------------------------------------------ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* --- Project Card ------------------------------------------ */
.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card-header {
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.project-header-metrics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 16px;
}

.project-header-metrics span {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.12);
  padding: 2px 9px;
  border-radius: 100px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.project-card-header.color-1 {
  background: linear-gradient(135deg, #1E1B4B, #4F46E5);
}
.project-card-header.color-2 {
  background: linear-gradient(135deg, #164E63, #06B6D4);
}
.project-card-header.color-3 {
  background: linear-gradient(135deg, #312E81, #818CF8);
}
.project-card-header.color-4 {
  background: linear-gradient(135deg, #064E3B, #10B981);
}

.project-header-icon {
  font-size: 48px;
  opacity: 0.85;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.project-card-number {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
}

.project-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.project-tool-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(79, 70, 229, 0.07);
  color: var(--jpm-primary);
}

.project-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.project-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

/* Key insight callout */
.project-insight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(6, 182, 212, 0.07);
  border-left: 3px solid var(--jpm-accent);

  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  margin: 14px 0;
}

.project-insight-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--jpm-accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.project-insight-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.project-card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background: #FAFBFC;
}

.expand-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--jpm-primary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--transition);
}
.expand-btn:hover { color: var(--jpm-accent); }

.expand-btn svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.expand-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Case study expanded panel */
.case-study {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.case-study.open { max-height: 600px; }

.case-study-inner {
  padding: 24px;
  border-top: 1px solid var(--border-light);
}

.case-study-section {
  margin-bottom: 20px;
}
.case-study-section:last-child { margin-bottom: 0; }

.case-study-section h4 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--jpm-primary);
  margin-bottom: 8px;
}

.case-study-section p,
.case-study-section li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}

.case-study-section ul {
  list-style: disc;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* --- Placeholder Note -------------------------------------- */
.placeholder-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(245, 199, 30, 0.08);
  border: 1px solid rgba(245, 199, 30, 0.3);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 40px;
}

.placeholder-notice p {
  font-size: 13px;
  color: #7A6000;
}

.placeholder-notice strong { font-weight: 700; }

/* --- Additional Projects Grid ------------------------------ */
.additional-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.additional-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.additional-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.additional-card-icon {
  font-size: 28px;
  padding: 20px 20px 0;
  line-height: 1;
}

.additional-card-body {
  padding: 14px 20px;
  flex: 1;
}

.additional-card-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.35;
}

.additional-card-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.additional-card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  background: #FAFBFC;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 960px) {
  .additional-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
  .additional-grid { grid-template-columns: 1fr; }
}
