/* ==========================================================================
   ACME Mobility – Components
   components.css — Cards, Badges, Hero, Diagrams, Alerts, Stats
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero Section (index.html)
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-20) var(--space-16);
}

.hero-section {
  margin-bottom: 6rem !important;
}

/* Gradient background */
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(0,119,182,0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0,180,216,0.15) 0%, transparent 50%),
    var(--bg-base);
  z-index: 0;
}

/* Animated grid */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--bg-border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-border-subtle) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--primary-muted);
  border: 1px solid rgba(0,180,216,0.3);
  color: var(--primary);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: var(--font-black);
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-10);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Hero stats */
.hero-stats {
  display: flex;
  gap: var(--space-10);
  margin-top: var(--space-16);
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-black);
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero-stat-value.primary { color: var(--primary); }

.hero-stat-label {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--space-1);
}

/* --------------------------------------------------------------------------
   2. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  box-shadow: 0 0 20px rgba(0,180,216,0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0,180,216,0.4);
  color: white;
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--bg-border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--bg-border);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* --------------------------------------------------------------------------
   3. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  border-color: rgba(0,180,216,0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

.card-icon svg { width: 24px; height: 24px; }

.card-icon.primary { background: var(--primary-muted); color: var(--primary); }
.card-icon.success { background: var(--success-muted); color: var(--success); }
.card-icon.warning { background: var(--warning-muted); color: var(--warning); }
.card-icon.danger  { background: var(--danger-muted);  color: var(--danger); }
.card-icon.info    { background: var(--info-muted);    color: var(--info); }

.card-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.card-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

/* Card link */
.card-link {
  text-decoration: none;
  display: block;
}

/* Card grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.cards-grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

.cards-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .cards-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .cards-grid, .cards-grid-2, .cards-grid-3 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   4. Service Card (sezione Microservizi)
   -------------------------------------------------------------------------- */
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.service-card:hover {
  border-color: rgba(0,180,216,0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.service-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.service-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-lg);
}

.service-card-name {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  line-height: 1.3;
}

.service-card-port {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--primary);
  background: var(--primary-muted);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-top: var(--space-1);
  display: inline-block;
}

.service-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.service-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* --------------------------------------------------------------------------
   5. Badges / Tags
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-primary { background: var(--primary-muted); color: var(--primary); border: 1px solid rgba(0,180,216,0.3); }
.badge-success { background: var(--success-muted); color: var(--success); }
.badge-warning { background: var(--warning-muted); color: var(--warning); }
.badge-danger  { background: var(--danger-muted);  color: var(--danger); }
.badge-info    { background: var(--info-muted);    color: var(--info); }
.badge-neutral { background: var(--bg-hover); color: var(--text-secondary); border: 1px solid var(--bg-border); }

/* Tech badges (sezione tecnologie) */
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tech-badge:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-muted);
  transform: translateY(-2px);
}

.tech-badge-icon {
  font-size: var(--text-base);
  line-height: 1;
}

/* Tech grid */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

/* --------------------------------------------------------------------------
   6. Alert / Callout
   -------------------------------------------------------------------------- */
.alert {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  border-left: 3px solid;
  margin: var(--space-6) 0;
}

.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

.alert-content { flex: 1; }

.alert-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.alert-body {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin: 0;
}

.alert-primary { background: var(--primary-muted); border-color: var(--primary); color: var(--primary); }
.alert-success { background: var(--success-muted); border-color: var(--success); color: var(--success); }
.alert-warning { background: var(--warning-muted); border-color: var(--warning); color: var(--warning); }
.alert-danger  { background: var(--danger-muted);  border-color: var(--danger);  color: var(--danger); }

.alert-title { color: inherit; }
.alert-body { color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   7. Stats / Metrics
   -------------------------------------------------------------------------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin: var(--space-8) 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.stat-value {
  font-size: var(--text-4xl);
  font-weight: var(--font-black);
  color: var(--primary);
  letter-spacing: -0.04em;
  line-height: 1;
  display: block;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: var(--font-medium);
}

/* --------------------------------------------------------------------------
   8. Timeline (flusso principale)
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: var(--space-8);
  margin: var(--space-6) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-8);
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: calc(-32px + 7px);
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-base);
  box-shadow: var(--shadow-glow-sm);
}

.timeline-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.timeline-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* --------------------------------------------------------------------------
   9. Diagram Container
   -------------------------------------------------------------------------- */
.diagram-container {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin: var(--space-6) 0;
  overflow: auto;
}

.diagram-container.mermaid-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Mermaid overrides */
.diagram-container .mermaid {
  max-width: 100%;
  overflow: auto;
}

/* Image diagram */
.diagram-img-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  overflow: auto;
  cursor: zoom-in;
  transition: transform var(--transition-base);
}

.diagram-img-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   10. Tabs
   -------------------------------------------------------------------------- */
.tabs {
  border-bottom: 1px solid var(--bg-border);
  display: flex;
  gap: 0;
  margin-bottom: var(--space-8);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: var(--font-semibold);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --------------------------------------------------------------------------
   11. Accordion / Collapsible
   -------------------------------------------------------------------------- */
.accordion {
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin: var(--space-4) 0;
}

.accordion-item {
  border-bottom: 1px solid var(--bg-border-subtle);
}

.accordion-item:last-child { border-bottom: none; }

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  text-align: left;
  transition: background var(--transition-fast);
  gap: var(--space-3);
}

.accordion-trigger:hover { background: var(--bg-hover); }

.accordion-trigger-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition-base);
}

.accordion-item.open .accordion-trigger-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.accordion-item.open .accordion-trigger {
  color: var(--primary);
  background: var(--primary-muted);
}

.accordion-content {
  display: none;
  padding: var(--space-5);
  background: var(--bg-surface);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.accordion-item.open .accordion-content {
  display: block;
}

/* --------------------------------------------------------------------------
   12. Team Cards
   -------------------------------------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-6);
  margin: var(--space-6) 0;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  transition: all var(--transition-base);
}

.team-card:hover {
  border-color: rgba(0,180,216,0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto var(--space-4);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  font-weight: var(--font-black);
  color: white;
  border: 3px solid var(--bg-border);
  overflow: hidden;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.team-name {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.team-role {
  font-size: var(--text-sm);
  color: var(--primary);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-3);
}

.team-links {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
}

.team-link {
  color: var(--text-muted);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
}

.team-link:hover { color: var(--primary); }
.team-link svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   13. Gallery / Lightbox
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  cursor: pointer;
  aspect-ratio: 16/10;
  transition: all var(--transition-base);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  display: flex;
  align-items: flex-end;
  padding: var(--space-4);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-label {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: white;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  padding: var(--space-8);
}

.lightbox.active { display: flex; }

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-xl);
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lightbox-close:hover {
  background: var(--danger-muted);
  border-color: var(--danger);
  color: var(--danger);
}

.lightbox-close svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   14. Document Cards (download)
   -------------------------------------------------------------------------- */
.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-base);
}

.doc-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.doc-card-icon {
  width: 48px;
  height: 48px;
  background: var(--danger-muted);
  color: var(--danger);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-xl);
}

.doc-card-info { flex: 1; min-width: 0; }

.doc-card-name {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-card-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.doc-card-action {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.doc-card:hover .doc-card-action { color: var(--primary); }
.doc-card-action svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   15. Port / Endpoint table row highlight
   -------------------------------------------------------------------------- */
.port-number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--primary);
  background: var(--primary-muted);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   16. Mermaid dark theme override
   -------------------------------------------------------------------------- */
.mermaid svg {
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   17. Projection participant card
   -------------------------------------------------------------------------- */
.participant-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.participant-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  color: var(--text-primary);
}

.participant-card:hover {
  border-color: var(--primary);
  background: var(--primary-muted);
  color: var(--primary);
  transform: translateY(-2px);
}

.participant-card-emoji { font-size: var(--text-2xl); margin-bottom: var(--space-2); display: block; }
.participant-card-name { font-size: var(--text-sm); font-weight: var(--font-semibold); }
.participant-card-abbr { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-1); font-family: var(--font-mono); }

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */
.page-footer {
  border-top: 1px solid var(--bg-border-subtle);
  padding: var(--space-8) var(--space-16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-text a { color: var(--text-secondary); }
.footer-text a:hover { color: var(--primary); }

.footer-links {
  display: flex;
  gap: var(--space-4);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--primary); }

@media (max-width: 768px) {
  .page-footer {
    padding: var(--space-6) var(--space-4);
    flex-direction: column;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   19. Swagger UI Styling
   -------------------------------------------------------------------------- */
.swagger-section {
  margin: var(--space-8) 0;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.swagger-section-header {
  padding: var(--space-4) var(--space-6);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.swagger-section-title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.swagger-section-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.swagger-endpoint-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
}

.swagger-endpoint {
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
  background: var(--bg-base);
}

.swagger-endpoint.get { border-color: rgba(97, 175, 254, 0.4); }
.swagger-endpoint.get .swagger-endpoint-header { background: rgba(97, 175, 254, 0.08); }
.swagger-endpoint.post { border-color: rgba(73, 204, 144, 0.4); }
.swagger-endpoint.post .swagger-endpoint-header { background: rgba(73, 204, 144, 0.08); }

.swagger-endpoint-header {
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  gap: var(--space-4);
}

.swagger-endpoint-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.swagger-method {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: white;
  min-width: 60px;
  text-align: center;
  text-transform: uppercase;
}

.swagger-method.get { background: #61affe; }
.swagger-method.post { background: #49cc90; }
.swagger-method.put { background: #fca130; }
.swagger-method.delete { background: #f93e3e; }
.swagger-method.grpc { background: #8e44ad; }
.swagger-method.soap { background: #d35400; }

.swagger-path {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.swagger-summary {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.swagger-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.swagger-endpoint.open .swagger-icon {
  transform: rotate(180deg);
  color: var(--text-primary);
}

.swagger-endpoint-body {
  display: none;
  padding: var(--space-5);
  border-top: 1px solid var(--bg-border-subtle);
  background: var(--bg-surface);
  font-size: var(--text-sm);
}

.swagger-endpoint.open .swagger-endpoint-body {
  display: block;
}

.swagger-subtitle {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.swagger-subtitle:first-child { margin-top: 0; }

.swagger-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-4);
  font-size: var(--text-xs);
}

.swagger-table th {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--bg-border);
}

.swagger-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--bg-border-subtle);
  color: var(--text-primary);
}

.swagger-code-block {
  background: #0d1117;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #e6edf3;
  overflow-x: auto;
  margin-top: var(--space-2);
}



/* --------------------------------------------------------------------------
   15. Technology Architecture Diagram Cards
   -------------------------------------------------------------------------- */
.tech-arch-container {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin: var(--space-6) 0;
}

.tech-arch-group {
  border: 2px dashed var(--bg-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  background: rgba(22, 27, 34, 0.5);
  position: relative;
}

.tech-arch-group:last-child {
  margin-bottom: 0;
}

.tech-arch-group-title {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-light);
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: var(--space-4);
}

.tech-arch-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.tech-arch-node {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1 1 200px;
}

.tech-arch-icon {
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.tech-arch-details {
  display: flex;
  flex-direction: column;
}

.tech-arch-name {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.tech-arch-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
}

