/* Gallery Page Styles */

/* Page Header */
.page-header {
  padding: 120px 0 60px;
  background: linear-gradient(135deg, #e8f4f8 0%, #f0f7fa 50%, #e5f0f5 100%);
  text-align: center;
}

.page-title {
  font-size: 2.8rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
}

.page-subtitle {
  font-size: 1.3rem;
  color: #64748b;
  max-width: 700px;
  margin: 0 auto;
}

/* Gallery Section */
.gallery-section {
  margin-bottom: 3rem;
}

.section-desc {
  font-size: 1.1rem;
  color: #475569;
  max-width: 900px;
  margin: 0 auto 2rem;
  text-align: center;
  line-height: 1.8;
}

.section-desc-sm {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.gallery-caption h6 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.35rem;
}

.gallery-caption .small {
  font-size: 0.85rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  gap: 1.5rem;
}

.gallery-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .gallery-grid.two-col {
    grid-template-columns: 1fr;
  }
}

/* Gallery Item */
.gallery-item {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.gallery-item.full-width {
  grid-column: 1 / -1;
}

.gallery-link {
  display: block;
  padding: 1rem;
  background: #f8fafc;
}

.gallery-link img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-link img {
  transform: scale(1.02);
}

.gallery-caption {
  padding: 1.25rem;
}

.gallery-caption h5 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.gallery-caption p {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 0;
  line-height: 1.6;
}

/* Stage Sections - New Design */
.stage-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.stage-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.stage-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.5rem;
}

.stage-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.stage-info p {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

.stage-info code {
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #1e40af;
}

.stage-example {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.stage-example img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.stage-example:hover img {
  transform: scale(1.01);
}

.example-label {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.example-label.success {
  background: #dcfce7;
  color: #166534;
}

.example-label.failed {
  background: #fee2e2;
  color: #991b1b;
}

/* Failure Cards */
.failure-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.failure-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.failure-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
}

.failure-badge.timeout {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.failure-badge.memory {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.failure-badge.knowledge {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.failure-badge.intent {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.failure-badge.other {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.failure-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.failure-rate {
  font-size: 0.9rem;
  color: #ef4444;
  font-weight: 600;
  background: #fef2f2;
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: auto;
}

.failure-desc {
  font-size: 1rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Implication Cards */
.implication-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.implication-card:hover {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.implication-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.implication-card h4 i {
  color: #3b82f6;
}

.implication-card p {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 0;
  line-height: 1.6;
}

/* Eval Cards */
.eval-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.eval-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.eval-card-img {
  background: #f8fafc;
  border-radius: 12px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.eval-card-img img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.eval-card-img:hover img {
  transform: scale(1.02);
}

.eval-card-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.7;
  margin: 0;
}

.eval-card-desc strong {
  color: #1e293b;
}

/* Responsive */
@media (max-width: 576px) {
  .page-title {
    font-size: 2rem;
  }
  
  .page-subtitle {
    font-size: 1.1rem;
  }
  
  .stage-card,
  .failure-card {
    padding: 1.5rem;
  }
  
  .failure-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .failure-rate {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

