/* ========== PENTAGON DIAGRAM REBUILD ========== */

.circular-diagram {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.diagram-intro {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 1rem;
  max-width: 100%;
}

/* ========== DESKTOP/TABLET LAYOUT (above 768px) ========== */

.diagram-desktop-container {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  aspect-ratio: 1;
  display: none;
}

@media (min-width: 769px) {
  .diagram-desktop-container {
    display: block;
  }
}

/* SVG for connecting lines - rendered behind nodes */

.pentagon-connecting-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Pentagon nodes wrapper for positioning */

.pentagon-nodes-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Individual pentagon node positioning */

.pentagon-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: auto;
}

/* Position calculations for regular pentagon (5 nodes) */

/* Adjust radius based on container size */

.pentagon-node[data-node-position="top"] {
  top: 0%;
  left: 50%;
  transform: translateX(-50%);
}

.pentagon-node[data-node-position="upper-right"] {
  top: 14.64%;
  right: 9.1%;
  transform: none;
}

.pentagon-node[data-node-position="lower-right"] {
  bottom: 14.64%;
  right: 9.1%;
  transform: none;
}

.pentagon-node[data-node-position="lower-left"] {
  bottom: 14.64%;
  left: 9.1%;
  transform: none;
}

.pentagon-node[data-node-position="upper-left"] {
  top: 14.64%;
  left: 9.1%;
  transform: none;
}

/* Node badge images */

.node-badge-image {
  width: 75px;
  height: 75px;
  flex-shrink: 0;
  object-fit: contain;
}

/* Node label text */

.node-label-text {
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  color: var(--color-text);
  font-weight: 500;
  max-width: 120px;
}

/* ========== MOBILE LAYOUT (768px and below) ========== */

.diagram-mobile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0 1.5rem;
  display: none;
}

@media (max-width: 768px) {
  .diagram-mobile-container {
    display: flex;
  }
}

@media (max-width: 768px) {
  .diagram-desktop-container {
    display: none;
  }
}

/* Mobile node wrapper */

.mobile-node-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 1.5rem 0;
  position: relative;
  z-index: 2;
}

/* Mobile node images */

.mobile-node-image {
  width: 65px;
  height: 65px;
  flex-shrink: 0;
  object-fit: contain;
}

/* Mobile node labels */

.mobile-node-label {
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  color: var(--color-text);
  font-weight: 500;
  max-width: 140px;
}

/* Vertical connector lines between mobile nodes */

.mobile-vertical-connector {
  width: 3px;
  height: 30px;
  background-color: #D4A574;
  position: relative;
  z-index: 1;
}

/* Loop indicator at bottom */

.mobile-loop-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  opacity: 0.7;
}

.mobile-loop-indicator svg {
  width: 40px;
  height: 40px;
}

/* Responsive adjustments for small phones */

@media (max-width: 480px) {
  .diagram-mobile-container {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .mobile-node-image {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .mobile-node-label {
    font-size: 0.9rem;
    max-width: 130px;
  }
}

@media (max-width: 480px) {
  .mobile-node-wrapper {
    padding: 1.25rem 0;
  }
}

@media (max-width: 480px) {
  .mobile-vertical-connector {
    height: 25px;
  }
}

