:root {
  --orange-color: #f5b554; /* Main accent / CTA button color */
  --purple-color: #4c1466; /* Text color */
  --pink-color: #ffedde; /* Page background */
  --text-color: black;
  --bg-color: white;
  --text-grey: #4e4e4e;
}

/* Global font */
body,
html {
  font-family: "Futura", Arial, Helvetica, sans-serif;
  margin: 0;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

header {
  position: relative;
  top: 0;
  z-index: 9999; /* stays above all content */
  background: white;
}

.scrolling-text {
  width: 100%;
  overflow: hidden;
  background: var(--purple-color); /* optional */
  padding: 10px;
  border-top: 5px solid var(--orange-color);
  border-bottom: 5px solid var(--orange-color);
}

.scrolling-track {
  display: flex;
  gap: 7rem; /* distance between repeated texts */
  white-space: nowrap;
  padding: 10px 0;

  animation: scroll-left 20s linear infinite;
  will-change: transform;
}

.scrolling-track span {
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  font-size: larger;
}

@keyframes scroll-left {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.app-wrapper {
  display: grid;
  grid-template-columns: 360px 1fr 200px;
  height: 85vh;
}

.nav-section .project-list {
  display: none;
}

.nav-section.open .project-list {
  display: block;
}

.chevron svg {
  transition: transform 0.2s ease;
  transform: rotate(180deg);
}

/* Parent chevron */
#more-projects.open .chevron svg {
  transform: rotate(0deg);
}

.chevron {
  transition: transform 0.2s ease;
  transform: rotate(0deg);
}

/* Child chevrons */
#more-projects .nav-section.open .chevron {
  transform: rotate(180deg);
}

/* hide everything by default */
#more-projects .nav-children {
  display: none;
}

/* show when parent is open */
#more-projects.open .nav-children {
  display: block;
}

/* child lists hidden by default */
#more-projects .project-list {
  display: none;
}

/* show child list when its section is open */
#more-projects .nav-section.open .project-list {
  display: block;
}

.nav-section .summary {
  list-style: none;
  cursor: pointer;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: large;
}

#more-projects .summary {
  list-style: none;
  cursor: pointer;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between; /* icon + h4 on left, chevron on right */
}

#more-projects-h4 {
  color: white;
}

#more-projects-chevron {
  color: white;
}

/* LEFT: icon + title/subtitle */
.summary-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* RIGHT: chevron */
.summary .chevron {
  font-size: 2rem;
}

/* remove default browser marker */
.summary::-webkit-details-marker {
  display: none;
}

.nav-section h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.project-list {
  background-color: #550072;
}

.project-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.project-list {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.project-list li {
  padding: 0.5rem 1rem 0.5rem 3rem;
}

.project-list .right-chevron {
  margin-right: 0.5rem;
  color: white;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.project-meta {
  padding: 10px 0px 10px 0px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap; /* allows wrap on smaller screens */
  justify-content: flex-start;
}

/* CTA container */
.next-cta {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

/* Button style */
.next-btn {
  border: 3px solid #ffd258;
  background: white;
  color: black;
  border-radius: 14px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* Hover effect */
.next-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

/* Active click */
.next-btn:active {
  transform: scale(0.97);
}

/* Larger screens */
@media (min-width: 1024px) {
  .next-btn {
    font-size: 18px;
    padding: 20px 48px;
    border-radius: 16px;
  }
}

/* Extra large screens */
@media (min-width: 1440px) {
  .next-btn {
    font-size: 20px;
    padding: 22px 56px;
  }
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #e5e4fd;
  border-radius: 999px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.meta-item:hover {
  transform: translateY(-2px);
}

#guide > .video-container {
  position: relative;
  width: 80%;
  aspect-ratio: 16 / 9; /* modern, clean */
  padding: 20px 0px;
  margin: auto;
}

#guide > .video-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

#arduino_project_steps {
  width: 80%;
  margin: auto;
}

.map-svg {
  left: 0;
  right: 0;
  margin: auto; /* 👈 centers horizontally */
}

/* HEADER */
.propelx_academy_header {
  display: flex;
  align-items: center;
  gap: 20px 0px;
}

.propelx_academy_header h2 {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 800;
  margin: 0;
}

.propelx_academy_header_p {
  line-height: 1.5;
  font-size: clamp(18px, 1.8vw, 24px);
  font-family: "Inter", sans-serif;
  margin-top: clamp(7px, 0.7vw, 14px);
  color: #555;
}

.propelx_academy_section {
  position: relative;
}

.propelx_academy_section {
  padding: 40px 0%;
}

.scribble-arrow-2 {
  width: 12vw;
  position: absolute;
  left: 58%;
  top: 20%;
}

@media (max-width: 1500px) {
  .scribble-arrow-2 {
    left: 75%;
  }
}

@media (max-width: 1000px) {
  .scribble-arrow-2 {
    top: 32%;
  }
  .scribble-arrow-2 {
    width: 140px;
  }

  .propelx_academy_header {
    margin-left: 20px;
  }

  .propelx_academy_header_p {
    margin-left: 20px;
  }
}

p {
  font-family: "Inter", sans-serif;
  margin: 5px 0px;
}

.project-hero p {
  font-family: "Futura", sans-serif;
  color: #555;
  margin: 20px 0px;
}

#guide > .image-container {
  position: relative;
  width: 70%;
  margin: auto;
  aspect-ratio: 16/9;
  padding: 20px 0px;
}

#guide > .image-container img {
  width: 100%;
  height: 100%;
}

#hardware > .image-container,
#code > .image-container,
#submit > .image-container {
  position: relative;
  width: 80%;
  margin: auto;
  aspect-ratio: 16/9;
}

#hardware > .image-container img,
#code > .image-container img,
#submit > .image-container img {
  width: 100%;
  height: 100%;
}

.code-wrapper {
  position: relative;
  width: 80%;
  margin-left: 40px;
  margin-top: 20px;
  line-height: normal;
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #1f2937;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
pre {
  overflow-x: auto;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  border-left: 10px solid var(--purple-color);
  color: white;
}
.hljs {
  background: #ebe4fa40;
  padding: 10px 40px !important;
}

#video-submission-flow {
  overflow-x: scroll;
}

#tutorial-island {
  background-color: #feebfd;
}

#entry-level {
  background-color: #e1ff9d;
}

#foundational {
  background-color: #b9fffb;
}

#intermediate {
  background-color: #ffd358;
}

#advanced {
  background-color: #fd958b;
}

#expert {
  background-color: #d299fe;
}

.summary .icon {
  font-size: 2.5rem;
}

.summary h4 {
  margin: 0;
  display: flex;
  flex-direction: column;
  color: rgb(43, 42, 42);
}

.summary .title {
  font-weight: 600;
}

.sidebar-nav,
.badge-shelf {
  background-color: #4c1466;
  color: rgb(43, 42, 42);
}

.nav-section > ul > li > a {
  text-decoration: none;
  color: white;
  font-family: "Futura", Arial, Helvetica, sans-serif;
  font-size: large;
}

.main-content {
  overflow-y: scroll; /* Only the center scrolls */
  padding: 0px 40px;
}

.tab-system {
  overflow-x: scroll;
  padding-bottom: 50px;
  color: #555;
  font-weight: 400; /* normal */
  font-size: large;
}

.tab-bar {
  overflow-x: scroll;
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #b0b0b0;
  margin-bottom: 20px;
}

.tab-trigger {
  margin-top: 20px;
  background: none;
  border: none;
  padding: 15px 40px 15px 40px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #4e4e4e;
  border: 2px solid transparent;
}

.tab-trigger.active {
  color: var(--purple-color);
  border: 2px solid var(--purple-color);
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  border-bottom: none;
}

.video-upload-zone {
  display: flex;
  margin-top: 50px;
}

.video-upload-zone input {
  width: 100%;
  padding: 8px 12px;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
  border: 1px solid #ccc;
  border-right: none;
  box-sizing: border-box;
}

.video-upload-zone button {
  width: 100%;
  max-width: 150px;
  padding: 8px 12px;
  border: none;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  background-color: #115301;
  color: #fff;
  cursor: pointer;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.4s;
}
.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Badge styling */
.badge-item {
  font-size: 2rem;
  background: #334155;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.badge-item.earned {
  box-shadow: 0 0 15px var(--primary);
  border: 2px solid var(--primary);
}

.tab-panel {
  font-size: large;
  line-height: 2;
}

.lock {
  padding-left: 10px;
  opacity: 0.9;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* 2 columns */
  gap: 20px; /* space between cards */
  padding: 50px;
  max-width: 1400px;
  overflow: scroll;
}

.category-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 10px;
  width: 180px;
  font-size: 1.2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center; /* center all content */
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.category-card h3 {
  font-size: 1rem;
  margin: 0 0 8px 0;
}

.category-card p {
  font-size: 0.8rem;
  margin: 0;
  color: #666;
}

.summary > * {
  pointer-events: none;
}

.summary {
  pointer-events: auto;
}

.summary {
  cursor: pointer;
}

.map-container {
  margin: auto;
  margin-top: 50px;
  position: relative;

  width: 100%; /* ✅ take available space */
  max-width: 100%; /* ✅ prevent overflow */
  height: 500px;

  overflow-x: auto; /* ✅ horizontal scroll */
  overflow-y: hidden; /* ❌ no vertical scroll */

  border-radius: 20px;
}

/* Path */
.map-svg {
  position: absolute;
  width: 1400px;
  height: 100%;
  pointer-events: none; /* 🔥 THIS FIXES IT */
  transform: scaleX(-1);
}

/* Nodes (game bubbles) */
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  transition: 0.25s;
  z-index: 2; /* above SVG */
}

/* Label */
.node h1 {
  font-size: 1.4rem;
  margin-top: 4px;
  padding: 5px 20px;
  border-radius: 10px;
}

/* Hover */
.node:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.pagoda {
  width: 120px; /* 👈 smaller size (try 30–50px) */
  height: auto;
  display: block;
  margin: 0 auto;
  pointer-events: none;
}

.cc-pagoda {
  width: 100px; /* 👈 smaller size (try 30–50px) */
  height: 150px;
  object-fit: contain;
  margin: 0px auto 20px auto;
  object-position: bottom; /* ⚡ key: align image content to bottom */
  display: block;
}

@media (max-width: 1500px) {
  .app-wrapper {
    display: grid;
    grid-template-columns: 360px 1fr;
    height: 85vh;
  }

  .tab-trigger {
    padding: 15px 15px 15px 15px;
  }

  #guide > .video-container {
    width: 100%;
  }

  #guide > .image-container {
    width: 70%;
  }

  #hardware > .image-container,
  #code > .image-container,
  #submit > .image-container {
    width: 100%;
  }

  .code-wrapper {
    width: 80%;
    margin-left: 0px;
    margin-top: 20px;
  }

  .hljs {
    padding: 10px 10px !important;
  }
}

@media (max-width: 1024px) {
  .main-content {
    padding: 0px 30px;
    font-size: medium;
  }

  .tab-panel {
    font-size: medium;
    line-height: 2;
  }

  .tab-trigger {
    font-size: medium;
  }

  .app-wrapper {
    grid-template-columns: 1fr;
    height: auto;
  }

  .tab-trigger {
    padding: 15px 15px 15px 15px;
  }

  #guide > .video-container {
    width: 100%;
  }

  #guide > .image-container {
    width: 90%;
  }

  #hardware > .image-container,
  #code > .image-container,
  #submit > .image-container {
    width: 100%;
  }

  .code-wrapper {
    width: 80%;
    margin-left: 0px;
    margin-top: 20px;
  }

  .hljs {
    padding: 10px 10px !important;
  }

  #more-projects {
    display: block; /* ensure it’s visible */
  }

  #more-projects .nav-children {
    display: none; /* hide children by default */
  }
}

@media (max-width: 720px) {
  .category-grid {
    display: none;
    grid-template-columns: repeat(1, 1fr); /* 2 columns */
    gap: 20px; /* space between cards */
    padding: 20px 50px;
  }
}

@media (max-width: 500px) {
  .summary .title {
    font-size: small;
  }
  .summary .subtitle {
    font-size: small;
  }
  .summary {
    padding: 0.75rem 1rem !important;
  }

  .scrolling-text {
    padding: 5px;
    padding-left: 150px;
  }

  .scrolling-track {
    display: flex;
    gap: 100px; /* distance between repeated texts */
    animation: scroll-left-300 10s linear infinite;
  }

  .scrolling-track span {
    font-size: x-small;
  }

  @keyframes scroll-left-300 {
    0% {
      transform: translate3d(0, 0, 0);
    }
    100% {
      transform: translate3d(-200%, 0, 0);
    }
  }

  .meta-item .label {
    display: none;
  }

  .meta-item:hover .label {
    display: inline;
    margin-left: 6px;
  }

  .nav-section > ul > li > a {
    font-size: medium;
  }

  #guide > .video-container {
    width: 100%;
    padding: 20px 0px;
    margin: auto;
  }
}
