/* ===== Project Detail Page Styles ===== */

/* ── Noise texture overlay ── */
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10%       { transform: translate(-2%, -3%); }
  30%       { transform: translate(3%, 2%); }
  50%       { transform: translate(-1%, 4%); }
  70%       { transform: translate(2%, -2%); }
  90%       { transform: translate(-3%, 1%); }
}

/* ── Shimmer sweep ── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* ── Glow pulse ── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
  50%       { box-shadow: 0 0 20px 4px rgba(59,130,246,0.18); }
}

/* ── Gradient border spin ── */
@keyframes borderSpin {
  to { --angle: 360deg; }
}

/* ── Count-up number ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Slide-in from left ── */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Base */
body.project-page {
  background: var(--bg-color);
  min-height: 100vh;
  /* subtle dot-grid background */
  background-image:
    radial-gradient(circle, rgba(148,163,184,0.18) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Back Button */
.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 30px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: var(--transition);
}

.back-btn:hover {
  background: rgba(255,255,255,0.96);
  box-shadow: var(--shadow-lg), 0 0 0 2px rgba(59,130,246,0.15), inset 0 1px 0 rgba(255,255,255,0.9);
  transform: translateX(-3px);
  color: var(--primary-color);
  border-color: rgba(59,130,246,0.25);
}

/* ===== Hero Section ===== */
.project-hero {
  position: relative;
  padding: 110px 40px 80px;
  overflow: hidden;
  text-align: center;
}

/* Noise texture overlay */
.project-hero::after {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.35;
  animation: grain 8s steps(10) infinite;
  z-index: 0;
}

.task-hero {
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(6,182,212,0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(99,102,241,0.3) 0%, transparent 55%),
    linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 45%, #0284c7 100%);
}

.inspection-hero {
  background:
    radial-gradient(ellipse 70% 60% at 75% 25%, rgba(16,185,129,0.4) 0%, transparent 55%),
    radial-gradient(ellipse 55% 70% at 15% 75%, rgba(6,182,212,0.25) 0%, transparent 50%),
    linear-gradient(135deg, #064e3b 0%, #065f46 40%, #047857 100%);
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(1px);
}

.shape-1 {
  width: 480px;
  height: 480px;
  top: -180px;
  right: -120px;
  background: rgba(255, 255, 255, 0.07);
  animation: float1 9s ease-in-out infinite;
}

.shape-2 {
  width: 300px;
  height: 300px;
  bottom: -100px;
  left: -70px;
  background: rgba(255, 255, 255, 0.05);
  animation: float2 11s ease-in-out infinite;
}

.shape-3 {
  width: 180px;
  height: 180px;
  top: 38%;
  left: 12%;
  background: rgba(255, 255, 255, 0.06);
  animation: float3 7s ease-in-out infinite;
}

/* Extra glow orb */
.shape-4 {
  width: 120px;
  height: 120px;
  top: 20%;
  right: 20%;
  background: rgba(255, 255, 255, 0.04);
  animation: float1 13s ease-in-out infinite reverse;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 22px) scale(1.06); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(18px, -18px) rotate(12deg); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, 12px) scale(1.08); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  color: white;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 22px;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 2px 8px rgba(0,0,0,0.12);
  letter-spacing: 0.3px;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
  line-height: 1.1;
  /* Subtle text shadow for depth */
  text-shadow: 0 2px 20px rgba(0,0,0,0.2), 0 1px 0 rgba(255,255,255,0.1);
}

.hero-subtitle {
  font-size: 1.05rem;
  opacity: 0.88;
  margin-bottom: 26px;
  line-height: 1.65;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  font-size: 0.82rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
  transition: var(--transition);
}

.meta-chip:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

.hero-tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tech-pill {
  position: relative;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  overflow: hidden;
  transition: var(--transition);
}

/* Shimmer sweep on hover */
.tech-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.25) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  background-position: -200% center;
  transition: none;
}

.tech-pill:hover::after {
  animation: shimmer 0.6s ease forwards;
}

.tech-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tech-pill.vue  { background: rgba(66, 184, 131, 0.3);  border: 1px solid rgba(66, 184, 131, 0.5);  color: #d1fae5; }
.tech-pill.rn   { background: rgba(97, 218, 251, 0.25); border: 1px solid rgba(97, 218, 251, 0.4);  color: #bfdbfe; }
.tech-pill.mobx { background: rgba(255, 119, 0, 0.25);  border: 1px solid rgba(255, 119, 0, 0.4);   color: #fed7aa; }
.tech-pill.ts   { background: rgba(49, 120, 198, 0.3);  border: 1px solid rgba(49, 120, 198, 0.5);  color: #bfdbfe; }
.tech-pill.h5   { background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.3); color: white;   }

/* ===== Detail Container ===== */
.project-detail-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 50px 24px 60px;
}

/* ===== Section ===== */
.detail-section {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.9);
  border: 1px solid rgba(226,232,240,0.8);
  animation: fadeInUp 0.5s ease-out both;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* Gradient top accent line — hidden by default, revealed on hover */
.detail-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.detail-section:hover {
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.95);
  border-color: rgba(59,130,246,0.15);
}

.detail-section:hover::before {
  opacity: 1;
}

.detail-section:nth-child(2) { animation-delay: 0.1s; }
.detail-section:nth-child(3) { animation-delay: 0.2s; }
.detail-section:nth-child(4) { animation-delay: 0.3s; }
.detail-section:nth-child(5) { animation-delay: 0.4s; }

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid transparent;
  background-image: linear-gradient(white, white),
    linear-gradient(90deg, rgba(59,130,246,0.3), rgba(6,182,212,0.2), transparent);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-image: linear-gradient(90deg, rgba(59,130,246,0.25), rgba(6,182,212,0.15), transparent) 1;
  /* Fallback */
  border-bottom: 1.5px solid var(--border-color);
}

.section-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  letter-spacing: -0.2px;
}

.section-badge {
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(6,182,212,0.08));
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.section-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: var(--transition);
}

.section-icon:hover {
  transform: rotate(-6deg) scale(1.08);
}

.task-icon {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.inspection-icon {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 14px rgba(5,150,105,0.35);
}

/* ===== Overview Grid ===== */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.overview-card {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid rgba(226,232,240,0.8);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.9);
}

.overview-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

.overview-card:hover {
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(59,130,246,0.1);
  transform: translateY(-4px);
  border-color: rgba(59,130,246,0.2);
  background: white;
}

.overview-card:hover::after {
  transform: scaleX(1);
}

.ov-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
  transition: var(--transition);
}

.overview-card:hover .ov-icon {
  transform: scale(1.1) rotate(-5deg);
}

.inspection-ov {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 12px rgba(5,150,105,0.3);
}

.overview-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.overview-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

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

.platform-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(226,232,240,0.8);
  overflow: hidden;
  transition: var(--transition);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.9);
}

/* Colored left glow bar */
.platform-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.platform-card:hover {
  box-shadow: var(--shadow-lg), -4px 0 20px rgba(59,130,246,0.1), inset 0 1px 0 rgba(255,255,255,0.95);
  transform: translateY(-5px);
  border-color: rgba(59,130,246,0.2);
  background: white;
}

.platform-card:hover::before {
  opacity: 1;
}

.platform-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.platform-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.admin-icon { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.xinghuo-icon { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.rider-icon { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.h5-icon { background: linear-gradient(135deg, #10b981, #059669); }

.platform-info {
  flex: 1;
}

.platform-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.platform-type {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.platform-tech-badge {
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.2);
  white-space: nowrap;
}

.rn-badge {
  background: rgba(97, 218, 251, 0.15);
  color: #0284c7;
  border-color: rgba(97, 218, 251, 0.3);
}

.h5-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.2);
}

.platform-body {
  padding: 18px 20px;
}

.platform-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.feature-item i {
  color: var(--primary-color);
  font-size: 0.75rem;
  margin-top: 3px;
  flex-shrink: 0;
}

/* ===== Highlights ===== */
.highlights-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.highlight-item {
  display: flex;
  gap: 20px;
  padding: 24px 24px 24px 28px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(226,232,240,0.8);
  border-left: 3px solid transparent;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.9);
}

/* Subtle inner glow on hover */
.highlight-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.highlight-item:hover {
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.95);
  border-color: rgba(59,130,246,0.18);
  border-left-color: var(--primary-color);
  background: white;
  transform: translateX(2px);
}

.highlight-item:hover::after {
  opacity: 1;
}

.inspection-highlight:hover {
  border-color: rgba(16,185,129,0.2);
  border-left-color: #10b981;
}

.highlight-num {
  font-size: 2.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(6,182,212,0.15));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  flex-shrink: 0;
  width: 52px;
  font-family: 'Inter', sans-serif;
  letter-spacing: -1px;
  animation: countUp 0.5s ease-out both;
}

.inspection-num {
  background: linear-gradient(135deg, rgba(16,185,129,0.25), rgba(5,150,105,0.15));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.highlight-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.highlight-content p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.72;
  margin-bottom: 12px;
}

.highlight-content code {
  font-family: 'Courier New', 'SF Mono', monospace;
  font-size: 0.82em;
  background: rgba(59,130,246,0.08);
  color: var(--primary-dark);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(59,130,246,0.15);
}

.highlight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.highlight-tags span {
  padding: 3px 10px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary-dark);
  font-size: 0.74rem;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  transition: var(--transition);
}

.highlight-tags span:hover {
  background: rgba(59,130,246,0.15);
  transform: translateY(-1px);
}

.inspection-tags span {
  background: rgba(16, 185, 129, 0.08);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.22);
}

.inspection-tags span:hover {
  background: rgba(16,185,129,0.15);
}

/* ===== Tech Detail Grid ===== */
.tech-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.tech-detail-card {
  padding: 24px 20px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: default;
}

/* Shimmer sweep */
.tech-detail-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255,255,255,0.7) 50%,
    transparent 80%
  );
  background-size: 200% 100%;
  background-position: -200% center;
  opacity: 0;
  transition: none;
}

.tech-detail-card:hover::before {
  opacity: 1;
  animation: shimmer 0.7s ease forwards;
}

.tech-detail-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: rgba(59,130,246,0.2);
  background: white;
}

.tdc-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  color: var(--primary-color);
  transition: var(--transition);
  display: block;
}

.tech-detail-card:hover .tdc-icon {
  transform: scale(1.15) rotate(-5deg);
  filter: drop-shadow(0 4px 8px rgba(59,130,246,0.3));
}

.tech-detail-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.tech-detail-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.62;
}

/* ===== Inspection Types Grid ===== */
.inspection-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.inspection-type-card {
  position: relative;
  padding: 20px 16px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.8);
  text-align: center;
  transition: var(--transition);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.9);
}

.inspection-type-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #059669, #10b981);
  transform: scaleX(0);
  transition: var(--transition);
}

.inspection-type-card:hover {
  box-shadow: 0 6px 20px rgba(16,185,129,0.12), inset 0 1px 0 rgba(255,255,255,0.95);
  transform: translateY(-3px);
  border-color: rgba(110,231,183,0.6);
  background: white;
}

.inspection-type-card:hover::before {
  transform: scaleX(1);
}

.it-number {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

.it-icon {
  font-size: 1.6rem;
  color: #059669;
  margin-bottom: 10px;
}

.inspection-type-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.inspection-type-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Workflow / Status Flow ===== */
.workflow-container {
  max-width: 600px;
  margin: 0 auto;
}

.workflow-desc {
  text-align: center;
  margin-bottom: 32px;
}

.workflow-desc p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.status-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.status-node {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: var(--radius);
  width: 100%;
  max-width: 380px;
  transition: var(--transition);
  cursor: default;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.9);
}

.status-node:hover {
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.95);
  transform: scale(1.02);
  background: white;
  border-color: rgba(59,130,246,0.2);
}

.sn-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-create .sn-dot { background: #94a3b8; }
.status-assigned .sn-dot { background: #f59e0b; }
.status-accepted .sn-dot { background: #3b82f6; }
.status-processing .sn-dot { background: #8b5cf6; background: linear-gradient(135deg, #8b5cf6, #06b6d4); }
.status-submitted .sn-dot { background: #06b6d4; }
.status-rejected .sn-dot { background: #ef4444; }
.status-reviewing .sn-dot { background: #f59e0b; }
.status-passed .sn-dot { background: #10b981; }
.status-failed .sn-dot { background: #ef4444; }
.status-rectifying .sn-dot { background: #f97316; }
.status-expired .sn-dot { background: #6b7280; }
.status-closed .sn-dot { background: #10b981; }

.sn-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 80px;
}

.sn-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.flow-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 4px 0;
}

.status-row {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  justify-content: center;
}

.status-row .status-node {
  flex: 1;
  max-width: none;
}

/* ===== Template Tree ===== */
.template-structure {
  max-width: 800px;
  margin: 0 auto;
}

.template-desc {
  text-align: center;
  margin-bottom: 36px;
}

.template-desc p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.template-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.tree-level {
  display: flex;
  gap: 16px;
  justify-content: center;
  width: 100%;
}

.tree-node {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.8);
  flex: 1;
  max-width: 340px;
  transition: var(--transition);
  position: relative;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.9);
}

.tree-node:hover {
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.95);
  transform: translateY(-2px);
}

.node-template {
  background: rgba(255,255,255,0.92);
  border-color: rgba(16, 185, 129, 0.3);
  border-left: 3px solid #10b981;
}

.node-group {
  background: rgba(255,255,255,0.92);
  border-color: rgba(59, 130, 246, 0.25);
  border-left: 3px solid #3b82f6;
}

.node-item {
  background: rgba(255,255,255,0.92);
  border-color: rgba(139, 92, 246, 0.25);
  border-left: 3px solid #8b5cf6;
}

.node-template:hover { box-shadow: var(--shadow-md), 0 0 0 1px rgba(16,185,129,0.15); }
.node-group:hover    { box-shadow: var(--shadow-md), 0 0 0 1px rgba(59,130,246,0.15); }
.node-item:hover     { box-shadow: var(--shadow-md), 0 0 0 1px rgba(139,92,246,0.15); }

.tn-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.node-template .tn-icon { background: linear-gradient(135deg, #059669, #10b981); }
.node-group .tn-icon { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.node-item .tn-icon { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }

.tn-content {
  flex: 1;
}

.tn-content h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.tn-content p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tn-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 8px;
  background: var(--bg-color);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.tree-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 4px;
}

.connector-line {
  width: 2px;
  height: 16px;
  background: var(--border-color);
}

.connector-branches {
  display: flex;
  gap: 20px;
}

.branch {
  width: 2px;
  height: 12px;
  background: var(--border-color);
}

/* ===== Dual Platform ===== */
.dual-platform {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.dp-card {
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.8);
  overflow: hidden;
  transition: var(--transition);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.9);
}

.dp-card:hover {
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.95);
  transform: translateY(-3px);
  border-color: rgba(59,130,246,0.18);
  background: white;
}

.dp-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border-color);
}

.dp-app .dp-header {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.04));
}

.dp-admin .dp-header {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(37, 99, 235, 0.04));
}

.dp-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #059669, #10b981);
  flex-shrink: 0;
}

.admin-dp-icon {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.dp-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.dp-header span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dp-features {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dp-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.dp-feature > i {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  color: white;
}

.dp-app .dp-feature > i {
  background: linear-gradient(135deg, #059669, #10b981);
}

.dp-admin .dp-feature > i {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.dp-feature strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.dp-feature p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ===== Mermaid Wrapper ===== */
.mermaid-wrapper {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  border: 1px solid var(--border-color);
  overflow-x: auto;
  position: relative;
}

.mermaid-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* ===== Footer ===== */
.project-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 40px 24px 60px;
  flex-wrap: wrap;
}

.back-home-btn,
.next-project-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.back-home-btn {
  background: rgba(255,255,255,0.9);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
}

.back-home-btn:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(-3px);
  color: var(--primary-color);
  border-color: rgba(59,130,246,0.25);
  background: white;
}

.next-project-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow), 0 4px 16px rgba(37,99,235,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}

.next-project-btn:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-lg), 0 6px 24px rgba(37,99,235,0.4);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .project-hero {
    padding: 80px 20px 50px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .project-detail-container {
    padding: 30px 16px 40px;
  }

  .detail-section {
    padding: 24px 18px;
  }

  .platform-grid,
  .overview-grid,
  .tech-detail-grid {
    grid-template-columns: 1fr;
  }

  .inspection-types-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .status-row {
    flex-direction: column;
    align-items: center;
  }

  .status-row .status-node {
    max-width: 380px;
  }

  .tree-level {
    flex-direction: column;
    align-items: center;
  }

  .tree-node {
    max-width: 100%;
  }

  .dual-platform {
    grid-template-columns: 1fr;
  }

  .highlight-item {
    flex-direction: column;
    gap: 12px;
  }

  .highlight-num {
    font-size: 1.5rem;
    width: auto;
  }

  .back-btn {
    top: 12px;
    left: 12px;
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

/* ===== Scroll Animation ===== */
.detail-section {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(2px);
  transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1),
              transform 0.55s cubic-bezier(0.4,0,0.2,1),
              filter 0.55s cubic-bezier(0.4,0,0.2,1);
}

.detail-section.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Stagger children inside visible sections */
.detail-section.visible .overview-card,
.detail-section.visible .platform-card,
.detail-section.visible .tech-detail-card {
  animation: fadeInUp 0.4s cubic-bezier(0.4,0,0.2,1) both;
}

.detail-section.visible .overview-card:nth-child(1),
.detail-section.visible .platform-card:nth-child(1),
.detail-section.visible .tech-detail-card:nth-child(1) { animation-delay: 0.05s; }

.detail-section.visible .overview-card:nth-child(2),
.detail-section.visible .platform-card:nth-child(2),
.detail-section.visible .tech-detail-card:nth-child(2) { animation-delay: 0.1s; }

.detail-section.visible .overview-card:nth-child(3),
.detail-section.visible .platform-card:nth-child(3),
.detail-section.visible .tech-detail-card:nth-child(3) { animation-delay: 0.15s; }

.detail-section.visible .overview-card:nth-child(4),
.detail-section.visible .platform-card:nth-child(4),
.detail-section.visible .tech-detail-card:nth-child(4) { animation-delay: 0.2s; }

.detail-section.visible .highlight-item {
  animation: slideInLeft 0.4s cubic-bezier(0.4,0,0.2,1) both;
}

.detail-section.visible .highlight-item:nth-child(1) { animation-delay: 0.05s; }
.detail-section.visible .highlight-item:nth-child(2) { animation-delay: 0.12s; }
.detail-section.visible .highlight-item:nth-child(3) { animation-delay: 0.19s; }
.detail-section.visible .highlight-item:nth-child(4) { animation-delay: 0.26s; }
.detail-section.visible .highlight-item:nth-child(5) { animation-delay: 0.33s; }
