/* ============================================= */
/* Global                                        */
/* ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --text: #1b1b1b;
  --text-light: #595959;
  --esri-blue: #007ac2;
  --pill-bg: #e8f4fd;
  --pill-border: #b3d9f2;
  --pill-text: #005e7d;
  --dark-teal: #005e7d;
  --box-border: #2b3e50;
  --yellow-pill-bg: #fef3cd;
  --yellow-pill-border: #f0d060;
  --font: 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
}

html, body { height: 100%; overflow: hidden; font-family: var(--font); background: var(--bg); color: var(--text); }
#app { display: flex; flex-direction: column; height: 100vh; }

/* ============================================= */
/* Navigation                                    */
/* ============================================= */
#slide-nav {
  background: #f5f7fa; border-bottom: 1px solid #e0e0e0;
  padding: 6px 16px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 12px;
}
.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
  padding: 5px 14px; border: 1px solid #d0d0d0; border-radius: 4px;
  background: white; color: var(--text-light); font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: var(--font); transition: all 0.2s;
}
.nav-tab:hover { background: var(--pill-bg); border-color: var(--esri-blue); }
.nav-tab.active { background: var(--esri-blue); color: white; border-color: var(--esri-blue); }
.nav-controls { display: flex; align-items: center; gap: 6px; }
.nav-btn {
  padding: 4px 10px; border: 1px solid #d0d0d0; border-radius: 4px;
  background: white; color: var(--text); font-size: 12px; cursor: pointer; font-family: var(--font);
}
.nav-btn:hover { background: #f0f0f0; }
.nav-btn.primary { background: var(--esri-blue); color: white; border-color: var(--esri-blue); }
.nav-btn.primary:hover { background: #006bb3; }
.nav-hint { font-size: 10px; color: #999; }

/* ============================================= */
/* Slides                                        */
/* ============================================= */
.slide { flex: 1; display: none; overflow: auto; }
.slide.active { display: flex; }
.diagram-canvas { flex: 1; display: flex; justify-content: center; align-items: flex-start; overflow: auto; }

/* Absolute-position container for pixel-perfect layout */
.abs-container {
  position: relative;
  width: 1050px;
  min-height: 590px;
  margin: 10px auto;
  flex-shrink: 0;
}

/* ============================================= */
/* Animations                                    */
/* ============================================= */
.anim { opacity: 0; transition: opacity 500ms ease; }
.anim.visible { opacity: 1; }

/* ============================================= */
/* Category Labels / Braces                      */
/* ============================================= */
.cat-label { position: absolute; top: 0; text-align: center; }
.cat-text { font-size: 13px; font-weight: 700; color: var(--dark-teal); line-height: 1.3; }
.brace { width: 100%; height: 16px; display: block; }

/* ============================================= */
/* Boxes                                         */
/* ============================================= */
.box {
  position: absolute;
  border: 1.5px solid var(--box-border);
  border-radius: 10px;
  background: var(--bg);
  overflow: visible;
}
.box-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  text-align: center; padding: 6px 8px 2px; line-height: 1.3;
}
.box-body-center {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex: 1; gap: 4px; padding: 6px 8px;
}
.box-bottom-left { position: absolute; bottom: 6px; left: 6px; }

/* System items (ERP, CRM...) */
.sys-item { font-size: 22px; font-weight: 700; color: var(--text); text-align: center; line-height: 1.3; }

/* ============================================= */
/* Data Platforms grid (Slide 1)                 */
/* ============================================= */
.dp-subtitle {
  font-size: 11px; font-weight: 700; color: var(--text);
  text-align: center; padding: 2px 0;
}
.dp-grid-s1 {
  display: flex; flex-wrap: wrap; gap: 4px 8px;
  justify-content: center; padding: 4px 8px;
}
.dp-grid-s1 .dp-divider {
  width: 100%; height: 0; border-top: 1px dashed #ccc; margin: 2px 0;
}

/* ============================================= */
/* Platform item (icon + label)                  */
/* ============================================= */
.pi { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.pi span { font-size: 9px; font-weight: 500; color: var(--text-light); line-height: 1.2; }

/* ============================================= */
/* Icons                                         */
/* ============================================= */
.icon-sm { width: 24px; height: 24px; object-fit: contain; }
.icon-md { width: 36px; height: 36px; object-fit: contain; }
.icon-lg { width: 48px; height: 48px; object-fit: contain; }
.icon-xl { width: 64px; height: 64px; object-fit: contain; }

/* ============================================= */
/* Labels                                        */
/* ============================================= */
.label-bold { font-size: 14px; font-weight: 700; color: var(--text); }
.label-sm { font-size: 10px; color: var(--text-light); text-align: center; }
.label-sm-bold { font-size: 10px; font-weight: 600; color: var(--text); text-align: center; }
.label-xs { font-size: 9px; text-align: center; line-height: 1.2; }

/* ============================================= */
/* Icon groups                                   */
/* ============================================= */
.icon-group {
  position: absolute;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}

/* ============================================= */
/* Pills                                         */
/* ============================================= */
.pill {
  display: inline-block; padding: 4px 10px; border-radius: 4px;
  font-size: 10px; font-weight: 600; white-space: nowrap;
}
.blue-pill {
  background: var(--pill-bg); color: var(--pill-text); border: 1px solid var(--pill-border);
}
.yellow-pill {
  background: var(--yellow-pill-bg) !important;
  border-color: var(--yellow-pill-border) !important;
  color: #7c6300 !important;
}

/* ============================================= */
/* Tool sections                                 */
/* ============================================= */
.tool-section {
  position: absolute; padding: 8px 12px;
  background: rgba(0, 122, 194, 0.05);
  border: 1px solid rgba(0, 122, 194, 0.2);
  border-radius: 8px;
}
.tool-section-bordered {
  position: absolute; padding: 8px 12px;
  background: rgba(0, 122, 194, 0.03);
  border: 1.5px solid var(--box-border);
  border-radius: 8px;
}
.section-title-blue {
  font-size: 11px; font-weight: 700; color: var(--esri-blue);
  text-align: center; margin-bottom: 4px;
}
.pills-row { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }

/* ============================================= */
/* Arrows                                        */
/* ============================================= */
.arrow-h { position: absolute; }

/* ============================================= */
/* Connector SVG overlay                         */
/* ============================================= */
.connector-svg {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

/* ============================================= */
/* ArcGIS bottom label                           */
/* ============================================= */
.arcgis-bottom-label {
  position: absolute; font-size: 24px; font-weight: 800;
  color: var(--text); text-align: center;
  width: 200px;
}

/* ============================================= */
/* Responsive                                    */
/* ============================================= */
@media (max-width: 1100px) {
  .abs-container { transform: scale(0.8); transform-origin: top center; }
}
@media (max-width: 850px) {
  .abs-container { transform: scale(0.6); transform-origin: top center; }
  .nav-hint { display: none; }
}
