/* =========================
   DESIGN TOKENS
========================= */
:root {
  --blue: #2563eb;
  --black: #020617;
  --gray: #475569;
  --border: rgba(2, 6, 23, 0.08);
  --bg-light: #f8fafc;
  --white: #ffffff;
}

/* =========================
   BASE STYLES
========================= */
body {
  background: var(--bg-light);
  font-family: Inter, system-ui, sans-serif;
}

.section {
  padding: 100px 0;
}

/* =========================
   BISPAGE TIMELINE
========================= */
.bispage-timeline {
  background: var(--white);
  padding: 80px 0;
}

/* Header */
.timeline-header h2 {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--black);
}

.timeline-header p {
  max-width: 720px;
  margin-top: 12px;
  font-size: 1.05rem;
  color: var(--gray);
}

/* Arrows */
.timeline-arrows button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--black);
  font-size: 18px;
  margin-left: 10px;
}

/* Track */
.timeline-track {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding-bottom: 25px;
  scroll-behavior: smooth;
}

.timeline-track::-webkit-scrollbar {
  display: none;
}

/* Card */
.timeline-card {
  min-width: 360px;
  background: var(--white);
  border-radius: 22px;
  padding: 34px;
  border-top: 2px solid var(--blue);
  box-shadow: 0 25px 60px rgba(2, 6, 23, 0.08);
  transform-style: preserve-3d;
  transition: box-shadow 0.25s ease;
}

.timeline-card:hover {
  box-shadow: 0 35px 90px rgba(2, 6, 23, 0.12);
}

.timeline-card .year {
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 600;
}

.timeline-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 10px 0;
  color: var(--black);
}

.timeline-card p {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--gray);
}

/* Icons */
.icons {
  display: flex;
  gap: 18px;
  margin-top: 28px;
}

.icons img {
  height: 26px;
}

/* =========================
   DIAGRAM / FLOW SYSTEM
========================= */

/* Wrapper */
.diagram-wrapper {
  position: relative;
  width: 650px;
  height: 520px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 26px;
  position: relative;
  z-index: 3;
}

/* Card Nodes */
.card-node {
  background: var(--white);
  border-radius: 16px;
  padding: 14px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  opacity: 0.25;
  cursor: pointer;
  transition: all 0.35s ease;
}

.card-node.active {
  opacity: 1;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 25px 70px rgba(99, 102, 241, 0.35);
}

/* Center Node */
.center-node {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 230px;
  background: var(--white);
  border-radius: 30px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  font-weight: 700;
}

/* SVG Lines */
.svg-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Flow Animation */
.flow-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1 14;
  animation:
    moveDots 1.4s linear infinite,
    pulseDots 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.6));
}

@keyframes moveDots {
  to {
    stroke-dashoffset: -120;
  }
}

@keyframes pulseDots {
  0% {
    stroke-width: 3;
    opacity: 0.6;
  }
  50% {
    stroke-width: 5;
    opacity: 1;
  }
  100% {
    stroke-width: 3;
    opacity: 0.6;
  }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
  .diagram-wrapper {
    transform: scale(0.85);
  }
}

@media (max-width: 576px) {
  .diagram-wrapper {
    transform: scale(0.7);
  }
}
