/* ============================================================
   ROADMAP PAGES – one shared stylesheet
   Used by: dsa-roadmap.php, java-full-stack-developer-roadmap.php,
            spring-boot-roadmap.php, sql-roadmap.php
   Prefix : rm-   (colours / radius / shadows come from global.css tokens,
            so light & dark theme work automatically)
   ============================================================ */

/* ---------- 1. Hero ---------- */
.rm-hero {
  position: relative;
  padding: 56px 0 48px;
  background: var(--gradient-hero);
  color: #fff;
  overflow: hidden;
}

.rm-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.rm-breadcrumb {
  font-size: 0.82rem;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.75);
}

.rm-breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.rm-breadcrumb a:hover { text-decoration: underline; }
.rm-breadcrumb span { margin: 0 6px; opacity: 0.6; }

.rm-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  margin-bottom: 14px;
}

.rm-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  color: #fff;
}

.rm-hero-lead {
  max-width: 720px;
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 26px;
}

.rm-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.rm-hero-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.rm-hero-stat i { font-size: 1.2rem; }
.rm-hero-stat strong { display: block; font-size: 0.95rem; line-height: 1.2; }
.rm-hero-stat small { font-size: 0.72rem; opacity: 0.8; }

/* ---------- 2. Overview cards ---------- */
.rm-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.rm-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.rm-info-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.rm-info-card h2 i {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.rm-info-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ---------- 3. The roadmap (vertical timeline) ---------- */
.rm-road {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 0;
}

/* centre line */
.rm-road::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  opacity: 0.35;
}

.rm-step {
  position: relative;
  width: 50%;
  padding: 0 44px 34px 0;
}

.rm-step--right {
  margin-left: 50%;
  padding: 0 0 34px 44px;
}

/* numbered stop on the line */
.rm-step-num {
  position: absolute;
  top: 6px;
  right: -22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: 0 0 0 6px var(--bg-main), var(--shadow-md);
  z-index: 2;
}

.rm-step--right .rm-step-num { right: auto; left: -22px; }

.rm-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.rm-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(108, 99, 255, 0.35);
}

.rm-phase {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(108, 99, 255, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

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

.rm-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 12px;
}

.rm-topics {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rm-topics li {
  font-size: 0.78rem;
  color: var(--text-primary);
  background: var(--bg-section);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.rm-practice {
  display: flex;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid var(--success);
  padding: 9px 12px;
  border-radius: 8px;
  margin: 0;
}

.rm-practice i { color: var(--success); margin-top: 2px; }

/* milestone flag (full width, sits on the line) */
.rm-milestone {
  position: relative;
  z-index: 2;
  text-align: center;
  margin: 4px 0 34px;
}

.rm-milestone span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-warm);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
}

.rm-finish span { background: linear-gradient(135deg, #10b981, #059669); }

/* ---------- 4. Projects / tips / FAQ ---------- */
.rm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.rm-project h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 10px 0 6px;
}

.rm-project p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.rm-level {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.rm-tips {
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: rmtip;
}

.rm-tips li {
  position: relative;
  padding: 14px 16px 14px 56px;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.rm-tips li::before {
  counter-increment: rmtip;
  content: counter(rmtip);
  position: absolute;
  left: 16px;
  top: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rm-tips strong { color: var(--text-primary); }

.rm-faq {
  max-width: 860px;
  margin: 0 auto;
}

.rm-faq details {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 12px;
}

.rm-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
}

.rm-faq summary::-webkit-details-marker { display: none; }
.rm-faq summary::after { content: "+"; float: right; color: var(--primary); font-weight: 700; }
.rm-faq details[open] summary::after { content: "–"; }

.rm-faq details p {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ---------- 5. CTA + related roadmaps ---------- */
.rm-cta {
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  color: #fff;
  text-align: center;
}

.rm-cta h2 { font-size: 1.6rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.rm-cta p { color: rgba(255, 255, 255, 0.85); max-width: 640px; margin: 0 auto 22px; }

.rm-cta-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.rm-btn-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.rm-btn-light:hover { transform: translateY(-2px); color: var(--primary-dark); }

.rm-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.rm-btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.rm-related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.rm-related a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.rm-related a i { font-size: 1.3rem; color: var(--primary); }
.rm-related a:hover { border-color: var(--primary); transform: translateY(-2px); }

/* ---------- 6. Responsive ---------- */
@media (max-width: 991px) {
  .rm-overview,
  .rm-grid { grid-template-columns: 1fr 1fr; }
  .rm-related { grid-template-columns: 1fr; }

  /* timeline: single column, line on the left */
  .rm-road::before { left: 22px; }

  .rm-step,
  .rm-step--right {
    width: 100%;
    margin-left: 0;
    padding: 0 0 26px 64px;
  }

  .rm-step-num,
  .rm-step--right .rm-step-num { left: 0; right: auto; }

  .rm-milestone { text-align: left; padding-left: 64px; }
}

@media (max-width: 575px) {
  .rm-hero { padding: 40px 0 36px; }
  .rm-overview,
  .rm-grid { grid-template-columns: 1fr; }
  .rm-hero-stat { flex: 1 1 calc(50% - 12px); }
  .rm-card { padding: 18px 16px 14px; }
  .rm-cta { padding: 32px 20px; }
}
