@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Sinhala:wght@400;500;600;700;800&family=Noto+Serif+Sinhala:wght@700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --bg-dark: #0f172a;
  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;

  /* Vibrant Phase Colors */
  --p1-color: #8b5cf6; /* Violet */
  --p2-color: #3b82f6; /* Blue */
  --p3-color: #06b6d4; /* Cyan */
  --p4-color: #10b981; /* Emerald */
  --p5-color: #f59e0b; /* Amber */
  --p6-color: #ec4899; /* Pink */
  --p7-color: #10b981; /* Gold / Empire Green */

  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none !important;
}

body {
  background-color: var(--bg-page);
  color: var(--text-dark);
  font-family: 'Noto Sans Sinhala', 'Plus Jakarta Sans', sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Glows */
.ambient-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}
.glow-top { top: -100px; left: 50%; transform: translateX(-50%); background: #3b82f6; }
.glow-middle { top: 35%; left: -100px; background: #8b5cf6; }
.glow-bottom { bottom: 10%; right: -100px; background: #10b981; }

/* Navigation */
.roadmap-nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  padding: 14px 24px;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-link {
  color: var(--text-dark);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  background: #f1f5f9;
  padding: 6px 16px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
}
.back-link:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateX(-3px);
}

.nav-badge {
  font-size: 12px;
  font-weight: 800;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  padding: 4px 14px;
  border-radius: 50px;
  letter-spacing: 0.5px;
}

/* Hero Intro Section */
.roadmap-hero {
  padding: 70px 20px 50px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-container {
  max-width: 850px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  padding: 6px 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: #2563eb;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 20px;
}

.roadmap-hero h1 {
  font-family: 'Noto Serif Sinhala', serif;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 30px;
  color: var(--text-dark);
}

.gradient-text {
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.intro-quote-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  text-align: left;
  position: relative;
}

.intro-quote-card p {
  font-size: 16px;
  color: #334155;
  line-height: 1.8;
  margin-bottom: 20px;
  font-weight: 500;
}

.quote-sub-highlight {
  background: #f0fdf4;
  border-left: 4px solid #10b981;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 14.5px;
  color: #166534;
  font-weight: 600;
  line-height: 1.7;
}

/* ROADMAP FLOW SECTION */
.roadmap-section {
  padding: 40px 20px 100px 20px;
  position: relative;
  z-index: 1;
}

.roadmap-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

/* Center Snake Line */
.flow-line {
  position: absolute;
  top: 40px;
  bottom: 120px;
  left: 50%;
  width: 6px;
  background: #e2e8f0;
  transform: translateX(-50%);
  border-radius: 10px;
  z-index: 1;
}

.flow-progress {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #8b5cf6 0%, #3b82f6 30%, #10b981 70%, #f59e0b 100%);
  border-radius: 10px;
}

/* Roadmap Nodes */
.roadmap-node {
  display: flex;
  align-items: center;
  margin-bottom: 60px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.roadmap-node.left {
  justify-content: flex-start;
  padding-right: 50%;
}

.roadmap-node.right {
  justify-content: flex-end;
  padding-left: 50%;
}

/* Node Number Badge in Middle */
.node-badge-wrapper {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.phase-number-badge {
  width: 52px;
  height: 52px;
  background: #ffffff;
  border: 4px solid #2563eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: var(--text-dark);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.9), var(--shadow-md);
  transition: all 0.3s ease;
}

.roadmap-node:hover .phase-number-badge {
  transform: scale(1.15);
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

/* Node Glass Cards */
.node-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px;
  width: 90%;
  box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.roadmap-node.left .node-card { margin-right: 40px; }
.roadmap-node.right .node-card { margin-left: 40px; }

.node-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #3b82f6;
}

/* Phase Tags */
.phase-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.p1 { background: rgba(139, 92, 246, 0.12); color: var(--p1-color); }
.p2 { background: rgba(59, 130, 246, 0.12); color: var(--p2-color); }
.p3 { background: rgba(6, 182, 212, 0.12); color: var(--p3-color); }
.p4 { background: rgba(16, 185, 129, 0.12); color: var(--p4-color); }
.p5 { background: rgba(245, 158, 11, 0.12); color: var(--p5-color); }
.p6 { background: rgba(236, 72, 153, 0.12); color: var(--p6-color); }
.p7 { background: rgba(16, 185, 129, 0.15); color: #047857; }

.node-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.node-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Clickable Buttons */
.node-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #2563eb;
  border: 1px solid #cbd5e1;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.node-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
  transform: translateX(4px);
}

/* FINAL NODE (CENTERED) */
.roadmap-node.center-final {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-top: 20px;
}

.final-star-badge {
  font-size: 36px;
  background: #ffffff;
  border: 3px solid #f59e0b;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
  margin-bottom: 20px;
  z-index: 3;
}

.final-card {
  width: 100% !important;
  max-width: 650px !important;
  margin: 0 !important;
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 2px solid #10b981;
  box-shadow: 0 16px 35px rgba(16, 185, 129, 0.15);
}

.final-card h3 {
  font-size: 22px;
  color: #065f46;
}

.final-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 12px 30px !important;
  font-size: 15px !important;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3) !important;
}

.final-btn:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.45) !important;
}

/* Footer */
.roadmap-footer {
  text-align: center;
  padding: 30px 20px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}

/* RESPONSIVE MOBILE VIEW */
@media (max-width: 768px) {
  .flow-line { left: 28px; transform: none; }
  .node-badge-wrapper { left: 28px; transform: translateX(-50%); }
  
  .roadmap-node.left,
  .roadmap-node.right {
    padding-left: 70px;
    padding-right: 0;
    justify-content: flex-start;
  }

  .node-card {
    width: 100% !important;
    margin: 0 !important;
  }

  .roadmap-hero h1 { font-size: 28px; }
  .intro-quote-card { padding: 20px; }
}