:root {
            --primary: #fb923c;         
            --primary-hover: #f97316;
            --secondary: #1bbdfe;      
            --accent: #7643e3;         
            --accent-hover: #6131d6;
            --links: #49c4f1;
            --links-hover: #3aaed8;
            --text: #ffffff;
            --text-light: #6b7280;
            --modal:#000000;
            --bg: #ffffff;
            --bg-secondary: #f9fafb;
            --border: #e5e7eb;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --bs-btn-close-color: #000;
            --bs-btn-close-color-hover: #000;
        }

        .dark-mode {
        --primary: #fb923c;         
        --primary-hover: #f97316;
        --secondary: #1bbdfe;      
        --accent: #7643e3;         
        --accent-hover: #6131d6;
        --links: #33c9b0;
        --links-hover:#17ad94;
        --modal:#ffffff;
        --bg: #000000;
        --bg-secondary: #0a0a0a;
        --border: #1f1f1f;
        --text: #e5e7eb;
        --text-light: #9ca3af;
        --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    }

p {
  display: block;
  overflow: hidden; /* forces browser to treat paragraph as one unit */
}

/* Cycle Navigation Styles */
.cycle-navigation {
  background: rgba(255, 255, 255, 0.12);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  backdrop-filter: blur(4px);    
  border: var(--secondary);
  border-radius: 20px;
  padding: 25px;
  padding-top: 50px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}




.cycle-navigation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;

}

.cycle-header {
  display: flex;
  justify-content: space-between;
  flex-direction: column; 
  align-items: flex-start;
  /* margin-bottom: 25px; */
  gap: 15px;
}

.cycle-header h2 {
  color: #fff;
  font-size: 3rem;
  margin: 0;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* width: 100%; */
}

.cycle-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.current-cycle {
  color: #48cae4;
  font-weight: bold;
  font-size: 1.1rem;
}

.cycle-total {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.cycle-bubbles {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin: 30px 0;
}

.cycle-bubble {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.bubble-inner {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c3e50, #34495e);
  border: var(--secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.cycle-bubble.active .bubble-inner {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  border-color: rgba(72, 202, 228, 0.3);
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(72, 202, 228, 0.5);
}

.cycle-number {
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
}

.cycle-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.7rem;
  margin-top: 4px;
}

.bubble-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.cycle-bubble.active .bubble-glow {
  opacity: 1;
}

.cycle-bubble:hover .bubble-inner {
  transform: scale(1.05);
  border-color: rgba(72, 202, 228, 0.6);
}

.cycle-progress {
  margin-top: 20px;
}

.progress-bar-1 {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  border-radius: 3px;
  width: 25%;
  transition: width 0.5s ease;
}

/* Cycle Content Styles */
.cycle-content {
  /* display: none; */
  position: relative;
}

/* .cycle-content.active {
  animation: fadeInUp 0.6s ease;
  border: 1px solid rgba(72, 202, 228, 0.5); 
  border-radius: 20px;
  padding: 30px; 
  margin-top: -30px; 
} */

.cycle-badge {
  position: absolute;
  top: 10px;
  left: 20px;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 10;
  box-shadow: 0 5px 15px rgba(72, 202, 228, 0.3);
}


/* Mobile Responsive */
@media (max-width: 768px) {
  .cycle-bubbles {
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
  }
  
  .bubble-inner {
    width: 60px;
    height: 60px;
  }
  
  .cycle-number {
    font-size: 1.2rem;
  }
  
  .cycle-label {
    font-size: 0.6rem;
  }
  
  .cycle-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .cycle-navigation {
    padding: 20px 15px;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container-b {
  display: grid;
  justify-items: center; /* Stack vertically on mobile */
  padding: 15px;
  width: 100%;
  height: auto;
  min-height: 320px;
  box-sizing: border-box;
  align-items: flex-start;
  gap: 20px; /* Space between sections */
}

 .left {
    flex: 0 0 40%;
    display: flex;
    flex-direction: row; /* Circle + buttons side-by-side */
    justify-content: center;
    align-items: center;
    gap: 0;
    background: linear-gradient(135deg, rgba(40, 48, 56, 0.9), rgba(30, 36, 44, 0.9));
    padding: 5px;
    border-radius: 10px;
    overflow:hidden;
  }

.figure-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0 auto; /* Centers horizontally */
  border-radius: 10px;
  padding: 15px;
  background: rgba(40, 48, 56, 0.5);
  }

  .buttons {
    display: grid;
    gap: 15px;
    justify-items: center;

  }

.buttons button {
  background: var(--secondary);
  color: #ffffff;
  border: linear-gradient(135deg, var(--secondary), var(--accent));
  padding: 8px 12px; /* Slightly smaller padding */
  border-radius: 5px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
  transition: background 0.3s, transform 0.1s, box-shadow 0.3s;
  box-shadow: 0 0 5px var(--accent);
  font-size: 0.8rem; /* Smaller font for mobile */
  flex: 1; /* Allow buttons to grow */
  min-width: 100px !important; /* Minimum button size */
  max-width: 75px;
}

.circle {
  position: relative;
  width: 250px; /* Smaller circle for mobile */
  height: auto;
  margin-top: 5px;
    object-position: 60% center;
}
.circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 30% center; /* shift focus 10–20% to the right */
  display: block;
}

.sector {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  cursor: pointer;
}

.sector.active {
  display: block;
}

.content {
  flex: 1;
  width: 100%; /* Full width on mobile */
  flex: none; /* Remove flex sizing */
  margin-left: 0; /* Remove left margin */
  font-size: 10px;
  font-weight: bold;
  min-height: 250px;
  min-width: 0;
  height:auto;
  overflow: visible;
}

#title {
  font-size: 18px; /* Slightly smaller title */
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center; /* Center title on mobile */
}

.summary {
  margin-top: 5px;
  font-size: 14px; /* Smaller summary text */
  margin-bottom: 10px;
  font-weight: normal;
  width: 100%;
  text-align: center; /* Center summary on mobile */
}

.detailed-content {
  border-top: 1px dashed #ccc;
  font-size: 14px; /* Adjusted font size */
  font-weight: normal;
  padding-top: 10px;
  min-height: 100px;
}

p {
  font-size: 18px; /* Smaller paragraph text */
}


.references-engineering {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5; /* Tighter line height */
  max-height: none; /* Smaller max height */
  overflow-y: visible;
  padding-right: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #48cae4 rgba(255, 255, 255, 0.05);
}

/* Tablet and larger screens */
@media (min-width: 1200px) {
  .container-b {
   display:block;
  }
  .left {
  float: left;
  width: 500px;       /* or whatever width fits your circle + buttons */
  margin-right: 25px; /* space between .left and text */
  margin-bottom: 50px;
  background: linear-gradient(135deg, rgba(40, 48, 56), rgba(30, 36, 44));
  

}

  .buttons {
    display: grid;
    grid-template-columns: repeat(2, auto); /* 2x2 grid */
    gap: 25px;
    justify-items: left;
  }

  .buttons button {
    flex: none;
    min-width: 150px;
    max-width: 150px
  }

  .figure-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0 auto; /* Centers horizontally */
  border-radius: 10px;
  padding: 15px;
  background: rgba(40, 48, 56, 0.5);
  }


  
  .content {
    flex: 1 1 80%; /* Restore flex sizing */
    margin-left: 0;
    width: auto;
    height: auto;
  overflow: visible;
  }
  
  .circle {
    width: 250px; /* Larger circle for tablets */   
    height: 250px;
    align-items: center;
    object-position: 60% center;
  }

  
  #title {
    font-size: 18px;
    text-align: left; /* Left align on larger screens */
  }
  
  .summary {
    font-size: 18px;
    text-align: left; /* Left align on larger screens */
  }
  
  .buttons button {
    font-size: 0.9rem; /* Restore original font size */
    padding: 8px 15px;
    flex: none; /* Remove flex grow on larger screens */
    min-width: 150px;
    max-width: 150px;
  }
  
  p {
    font-size: 18px; /* Restore original paragraph size */
  }
 
  .detailed-content {
    font-size: 18px;
  }
}
/* Large mobile devices */
@media (min-width: 480px) and (max-width: 767px) {
  .circle {
    width: 300px;
    height: 300px;
      object-position: 60% center;
  }
}

.references-engineering::-webkit-scrollbar {
  width: 8px; /* Thinner scrollbar for mobile */
}

.references-engineering::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.1));
  border-radius: 4px;
}

.references-engineering::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--secondary), var(--accent));
  border-radius: 4px;
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.2);
}

.references-engineering::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--secondary), var(--accent-hover));
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.4);
}

/* Styling for the reference link and its container */
.ref-container {
    /* Allows the ref-box to be positioned relative to this span */
    position: relative;
    /* This is often needed to make the container inline-block to wrap its content tightly */
    display: inline-block;
}

.ref-link {
    /* Style the link to look like a reference mark */
    color: #0000FF; /* Blue color for links */
    cursor: pointer;
    font-weight: bold;
    /* Optional: Small box around the number */
    border: 1px solid transparent; 
    padding: 0 2px;
}


/* --------------------------- */
.rpm-image {
  /* This is the key line: it ensures the image will never be wider than its parent */
  max-width: 100%;

  /* This ensures the image maintains its aspect ratio when resized */
  height: auto; 

  /* (Optional) A small margin or display setting to help with side-by-side display */
  display: block; 
  margin-bottom: 10px;
}

figure img {
  /* Ensures the image respects the container width */
  max-width: 100%;
  /* Maintains aspect ratio */
  height: auto;
  /* Crucial: Makes the image a block element so it takes up its own line */
  /* Adds a small space between the two stacked images */
  margin-bottom: 10px; 
    margin: 2em auto;     /* centers horizontally */

    display: block;
    align-items: center;
  text-align: center;
    clear: both;          /* pushes figure below any floated element */

}
figure embed {
  width: 800px;
  height: 520px;
  min-height: 500px; /* Set a minimum height */
  display: inline-block;
  align-items: center;
  border: none;
}
/* Style for single-cycle groups */
/* .cycle-navigation.single-cycle {
  text-align: center;
} */

.cycle-navigation.single-cycle .cycle-bubbles {
  justify-content: center;
  display: flex;
}

.cycle-navigation.single-cycle .cycle-progress {
  display: none; /* Hide progress bar for single cycles */
}

.cycle-navigation.single-cycle .cycle-bubble {
  margin: 0 auto;
}

/* Optional: Make the single bubble more prominent */
.cycle-navigation.single-cycle .cycle-bubble .bubble-inner {
  transform: scale(1.1);
}

.cycle-next{
  background: #1bbdfe;
  color: white;
  border: linear-gradient(135deg, var(--secondary), var(--accent));
  padding: 8px 12px; /* Slightly smaller padding */
  border-radius: 5px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
  transition: background 0.3s, transform 0.1s, box-shadow 0.3s;
}
