/* Demo Toggle Slider - Simple CSS only solution */
.demo-toggle-spacer {
  margin-top: 30px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.demo-toggle-slider {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  z-index: 1000;
  transition: all 0.3s ease;
}

.demo-toggle-slider-full-width {
  width: 100%;
  display: flex;
}

.demo-toggle-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex: 1;
}

.demo-toggle-option:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

.demo-toggle-option.demo-toggle-active {
  background: #cb0c9f;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.demo-toggle-option.demo-toggle-active-industry {
  background: #827880;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.demo-toggle-option i {
  font-size: 1rem;
}
.demo-toggle-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex: 1;
}

.demo-toggle-option:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

.demo-toggle-option.demo-toggle-active {
  background: #cb0c9f;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.demo-toggle-option.demo-toggle-active-industry {
  background: #827880;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.demo-toggle-option i {
  font-size: 1rem;
}

/* Small screens: move to side, hide text, circular buttons */
@media (max-width: 991px) {
  .demo-toggle-spacer {
    justify-content: flex-end;
    margin-right: 20px;
  }
  
  .demo-toggle-slider {
    position: fixed;
    top: 80px;
    right: 20px;
    flex-direction: column;
    margin: 0;
  }
  .demo-toggle-option {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    align-items: center;
    gap: 0;
  }
  
  .demo-toggle-option span {
    display: none !important;
  }
  
  .demo-toggle-option i {
    font-size: 1.2rem;
    margin: 0;
  }
}

/* Prevent scroll jump on page load */
html:not(.demo-script-loaded) {
  scroll-behavior: auto !important;
}

html.demo-script-pending #productDemo {
  min-height: 100vh;
  opacity: 0;
}

html.demo-script-loaded #productDemo {
  opacity: 1;
  transition: opacity 0.3s ease-in;
}

/* Demo Container */
.demo-container {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background: transparent;
  position: relative;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Remove min-height when demo is loaded to prevent secondary scrollbar */
html.demo-script-loaded .demo-container {
  min-height: auto;
}

.demo-container-hidden {
  display: none !important;
}

.demo-container-visible {
  display: block !important;
  overflow-y: visible;
}

/* Product Demo visibility classes */
#productDemo.product-demo-hidden {
  display: none !important;
}

#productDemo.product-demo-visible {
  display: block !important;
}

#productDemo.product-demo-visible .demo-container {
  display: block !important;
}

/* Product Fallback visibility classes */
#productFallback.product-fallback-hidden {
  display: none !important;
}

#productFallback.product-fallback-visible {
  display: block !important;
}

/* Initial state: interactive view visible, static view hidden */
#productDemo:not(.product-demo-hidden) {
  display: block;
}

#productFallback:not(.product-fallback-visible) {
  display: none;
}

/* No animation class for headers */
.demo-main-title.no-animation,
.demo-main-subtitle.no-animation {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Ensure productDemo container and all demo wrappers fit within viewport */
#productDemo {
  width: 100%;
  max-width: 100%;
  height: auto !important;
  max-height: none !important;
  box-sizing: border-box;
}

#productDemo > * {
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure demo sections wrapper fits within viewport */
.demo-sections-wrapper {
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow-y: visible;
  height: auto;
  max-height: none;
}

.demo-sections-wrapper.aion-row {
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow-y: visible;
  height: auto;
  max-height: none;
}

/* Demo Header */
.demo-header {
  text-align: center;
  padding: 60px 20px 40px;
  margin-top: 0;
  color: inherit;
  position: relative;
  overflow: visible;
}

#productFallback .demo-header {
  padding: 60px 20px 40px;
  margin-top: 0;
}

.demo-main-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  opacity: 1;
}

.demo-main-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}


/* Demo Section */
.demo-section {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.demo-section-visible {
  opacity: 1;
  transform: translateY(0);
}

.demo-section-container {
  max-width: 1400px;
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: stretch;
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.demo-section-container > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure explanation wrapper doesn't block clicks on interactive content */

/* Interactive Wrapper */
.demo-interactive-wrapper {
  position: relative;
  perspective: 2000px;
  perspective-origin: center center;
  transform-style: preserve-3d;
  z-index: 2;
  pointer-events: auto;
  isolation: isolate;
  display: flex;
  align-items: stretch;
  min-height: 500px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  contain: layout style;
}

.demo-interactive-card {
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 500px;
  height: 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  overflow: hidden;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  box-sizing: border-box;
}

/* Section Navigation Buttons */
.demo-section-nav-button {
  position: absolute;
  bottom: 20px;
  padding: 10px 20px;
  background: var(--bs-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.demo-section-nav-button:hover {
  background: var(--bs-primary);
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.demo-section-nav-button-bottom-left {
  left: 20px;
}

.demo-section-nav-button-bottom-right {
  right: 20px;
}

/* Ensure outlined buttons also get absolute positioning when using bottom-left/right classes */
.btn.demo-section-nav-button-bottom-left,
.btn.demo-section-nav-button-bottom-right {
  position: absolute;
  bottom: 20px;
  z-index: 100;
}

/* Card tilt based on position */
.demo-interactive-left .demo-interactive-card {
  transform: translateZ(0) rotateY(5deg) rotateX(2deg);
  /* Tilted right - larger shadow on left, smaller on right */
  box-shadow: 
    -30px 20px 80px rgba(0, 0, 0, 0.4),
    -15px 10px 40px rgba(0, 0, 0, 0.3),
    10px 20px 40px rgba(0, 0, 0, 0.2),
    0 0 30px rgba(102, 126, 234, 0.15);
}

.demo-interactive-right .demo-interactive-card {
  transform: translateZ(0) rotateY(-5deg) rotateX(2deg);
  /* Tilted left - larger shadow on right, smaller on left */
  box-shadow: 
    30px 20px 80px rgba(0, 0, 0, 0.4),
    15px 10px 40px rgba(0, 0, 0, 0.3),
    -10px 20px 40px rgba(0, 0, 0, 0.2),
    0 0 30px rgba(102, 126, 234, 0.15);
}

/* Remove tilt on smaller screens */
@media (max-width: 991px) {
  .demo-interactive-left .demo-interactive-card,
  .demo-interactive-right .demo-interactive-card {
    transform: translateZ(0) rotateY(0deg) rotateX(0deg);
    box-shadow: 
      0 20px 60px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(102, 126, 234, 0.15);
  }
}

/* Browser Window Styles */
.demo-browser-window {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
  overflow: visible;
  position: relative;
}

.demo-browser-header {
  background: #151921;
  border-bottom: 1px solid #333;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.demo-browser-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.demo-browser-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.demo-browser-dot-close {
  background: #ff5f57;
}

.demo-browser-dot-minimize {
  background: #ffbd2e;
}

.demo-browser-dot-maximize {
  background: #28ca42;
}

.demo-browser-address-bar {
  flex: 1;
  background: #000;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #fff;
  min-width: 0;
}

.demo-browser-address-icon {
  font-size: 0.7rem;
  flex-shrink: 0;
}

.demo-browser-address-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ccc;
}

.demo-browser-content {
  flex: 1;
  padding: 30px;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  background: #151921;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

/* Form styling for dark background */
.demo-card-content {
  width: 100%;
  max-width: 100%;
  color: #fff;
  flex: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
}

/* Ensure buttons are fully clickable */
.demo-card-content .btn,
.demo-card-content button {
  position: relative;
  z-index: 1;
  pointer-events: auto !important;
}

.demo-card-content .btn *,
.demo-card-content button * {
  pointer-events: none !important;
}

.demo-card-content h3,
.demo-card-content h4 {
  margin-bottom: 30px;
  color: #fff;
  font-size: 1.5rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-card-content .form-label {
  color: #fff;
}

.demo-card-content .form-control {
  background-color: #000;
  border-color: #333;
  color: #fff;
}

.demo-card-content .form-control:focus {
  background-color: #000;
  border-color: #667eea;
  color: #fff;
}

.demo-card-content .input-group-text {
  background-color: #151921;
  border-color: #333;
  color: #fff;
  width: 70px;
  min-width: 70px;
  max-width: 70px;
  text-align: center;
  justify-content: center;
  flex-shrink: 0;
}

.demo-card-content .btn-primary {
  background-color: #cb0c9f;
  border-color: #cb0c9f;
}

.demo-card-content .btn-primary:hover {
  background-color: #cb0c9f;
  border-color: #cb0c9f;
  opacity: 0.9;
}

.demo-card-content .btn-outline-primary,
.demo-interactive-card .btn-outline-primary {
  border-color: #cb0c9f;
  color: #cb0c9f;
}

.demo-card-content .btn-outline-primary:hover,
.demo-interactive-card .btn-outline-primary:hover {
  background-color: #cb0c9f;
  border-color: #cb0c9f;
  color: #fff;
}

.demo-card-content .btn-outline-secondary {
  border-color: #666;
  color: #fff;
}

.demo-card-content .btn-outline-secondary:hover {
  background-color: #151921;
  border-color: #888;
  color: #fff;
}

.demo-section-visible .demo-interactive-left .demo-interactive-card {
  animation: cardEnterLeft 0.8s ease-out forwards;
}

.demo-section-visible .demo-interactive-right .demo-interactive-card {
  animation: cardEnter 0.8s ease-out forwards;
}

.demo-interactive-left .demo-interactive-card:hover {
  transform: translateZ(0) rotateY(0deg) rotateX(0deg) scale(1.02);
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(102, 126, 234, 0.2);
}

.demo-interactive-right .demo-interactive-card:hover {
  transform: translateZ(0) rotateY(0deg) rotateX(0deg) scale(1.02);
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(102, 126, 234, 0.2);
}


/* Explanation Wrapper */
.demo-explanation-wrapper {
  color: inherit;
  padding: 1rem;;
  pointer-events: none;
  position: relative;
  z-index: 0;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
}

.demo-explanation-wrapper * {
  pointer-events: auto;
}

.demo-section-highlights {
  margin: 15px 0 0;
  padding-left: 20px;
  list-style-type: disc;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  line-height: 1.4;
}

.demo-section-highlights-placeholder {
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
  list-style-type: circle;
}

.demo-section-highlights li {
  margin-bottom: 6px;
}

/* Hide highlights by default in interactive view */
.demo-section-highlights-hidden {
  display: none;
}

.demo-section-highlights-visible {
  display: block;
}

/* Read more link */
.demo-read-more-link {
  background: none;
  border: none;
  color: #667eea;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 0;
  margin-top: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
  text-decoration: none;
}

.demo-read-more-link:hover {
  color: #5568d3;
  text-decoration: underline;
}

.demo-read-more-link i {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.demo-read-more-link[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.demo-section-cta {
  margin-top: 20px;
}

.demo-section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 30px;
  line-height: 1.2;
}

.demo-section-description {
  font-size: 1.2rem;
  line-height: 1.8;
  opacity: 0.95;
}

/* Placeholder Components */
.demo-form-placeholder {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.demo-input-placeholder {
  height: 50px;
  background: #f0f0f0;
  border-radius: 8px;
  border: 2px dashed #ccc;
  display: flex;
  align-items: center;
  padding: 0 15px;
  color: #999;
  font-size: 0.9rem;
}

.demo-button-placeholder {
  height: 50px;
  background: #667eea;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.demo-button-placeholder:hover {
  background: #5568d3;
}

.demo-controlling-layout {
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.demo-chart-container {
  flex: 1 1 0%; /* Dynamic sizing - can shrink and grow */
  min-width: 0; /* Allow flex shrinking */
  width: 100%;
  max-width: 100%;
  height: 300px;
  max-height: 100%;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto; /* Title, Chart+Labels, Subtitle */
  grid-template-columns: 1fr;
  overflow: visible; /* Allow labels to be visible */
  gap: 0;
}

/* Increase chart size on smaller screens to accommodate donut chart */
@media (max-width: 991px) {
  .demo-chart-container {
    height: 280px;
    max-height: 100%;
    width: 100%;
    max-width: 100%;
  }
  
  .demo-chart-placeholder,
  .demo-chart-line {
    min-height: 0;
    max-height: 100%;
    padding: 10px;
    padding-top: 10px;
  }
  
  .demo-chart-donut {
    padding-top: 15px;
    padding-bottom: 20px;
    padding-left: 10px;
    padding-right: 10px;
    max-height: 100%;
  }
  
  .demo-chart-donut svg {
    width: 140px;
    height: 140px;
    max-width: 100%;
    max-height: 100%;
  }
  
  .demo-chart-line svg {
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
  }
}

/* Further adjust chart size below 650px */
@media (max-width: 650px) {
  .demo-chart-container {
    height: 260px;
    max-height: 100%;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  
  .demo-chart-placeholder,
  .demo-chart-line {
    max-height: 100%;
  }
  
  .demo-chart-donut {
    padding-top: 15px;
    padding-bottom: 20px;
    max-height: 100%;
  }
  
  .demo-chart-donut svg {
    width: 130px;
    height: 130px;
    max-width: 100%;
    max-height: 100%;
  }
  
  .demo-chart-line svg {
    max-height: 100%;
  }
}

/* Adjust chart size for screens around 400px */
@media (max-width: 450px) {
  .demo-chart-container {
    height: 240px;
    max-height: 100%;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  
  .demo-chart-placeholder,
  .demo-chart-line {
    min-height: 0 !important;
    max-height: 100% !important;
    padding: 8px !important;
    padding-top: 25px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  
  .demo-chart-donut {
    padding-top: 15px !important;
    padding-bottom: 20px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    max-height: 100% !important;
  }
  
  .demo-chart-donut svg {
    width: 120px !important;
    height: 120px !important;
    max-width: 100% !important;
    max-height: 100% !important;
  }
  
  .demo-chart-donut-label {
    font-size: 1rem !important;
  }
  
  .demo-chart-donut-value {
    font-size: 1.5rem !important;
  }
  
  .demo-chart-line svg {
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .demo-chart-bar-wrapper {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  
  .demo-chart-bar {
    min-width: 0 !important;
    width: 70% !important; /* Narrower bars on small screens */
  }
  
  .demo-chart-placeholder {
    gap: 4px !important; /* Smaller gap to prevent overlap */
  }
  
  .demo-legend-item {
    font-size: 0.65rem !important;
    padding: 4px 2px !important;
  }
}

/* Chart grid areas */
/* Row 1: Title */
.demo-chart-label-top-left {
  grid-row: 1;
  grid-column: 1;
  padding: 10px 20px 5px 20px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 10;
  pointer-events: none;
}

.demo-chart-source-inline {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
  font-weight: 400;
  line-height: 1.2;
}

/* Row 2: Chart and Labels together */
.demo-chart-placeholder {
  grid-row: 2;
  grid-column: 1;
  display: grid;
  grid-template-rows: 1fr auto; /* Chart area, then labels */
  grid-template-columns: 1fr;
  width: 100%;
  height: 100%;
  padding: 35px 20px 10px 20px; /* Increased top padding to accommodate bar labels */
  box-sizing: border-box;
  animation: fadeIn 0.4s ease-out;
  overflow: visible;
}

/* Chart bars area within placeholder (first row) */
.demo-chart-placeholder > div:first-child {
  grid-row: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 15px;
}

/* Legend/labels row within placeholder (second row) */
.demo-chart-placeholder > .demo-chart-legend {
  grid-row: 2;
  grid-column: 1;
}

/* Row 2: Chart and Labels together for line chart */
.demo-chart-line {
  grid-row: 2;
  grid-column: 1;
  width: 100%;
  height: 100%;
  max-height: 100%;
  padding: 10px 30px 10px 20px;
  display: grid;
  grid-template-rows: 1fr auto; /* Chart SVG, then labels */
  grid-template-columns: 1fr;
  animation: fadeIn 0.4s ease-out;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.demo-chart-line svg {
  grid-row: 1;
  max-height: 100%;
}

.demo-chart-line-label {
  grid-row: 1;
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.demo-chart-line svg {
  shape-rendering: geometricPrecision;
  width: 100%;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.demo-chart-line polyline {
  shape-rendering: geometricPrecision;
}

.demo-chart-line-svg {
  animation: lineChartFadeIn 0.4s ease-out;
}

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

/* Line chart mask animation is now handled by SVG animate element */

.demo-chart-line-label {
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

/* Row 3: Subtitle/Footer */
.demo-chart-source {
  grid-row: 3;
  grid-column: 1;
  padding: 5px 20px 12px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
  font-weight: 400;
  line-height: 1.2;
  pointer-events: none;
  z-index: 10;
}

.demo-chart-label-block {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 20px 5px 20px;
  pointer-events: none;
  z-index: 10;
}

.demo-chart-label-block .demo-chart-label-top-left {
  margin-bottom: 6px;
}

.demo-chart-label-block .demo-chart-source {
  grid-row: 4;
  margin-top: 0;
}

.demo-chart-donut {
  grid-row: 2;
  grid-column: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  padding-top: 50px;
  padding-right: 20px;
  padding-left: 20px;
  padding-bottom: 30px;
  animation: fadeIn 0.4s ease-out;
  box-sizing: border-box;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.demo-chart-donut svg {
  width: 200px;
  height: 200px;
  max-width: 100%;
  max-height: 100%;
}

.demo-donut-segment-value {
  animation: donutDrawValue 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.demo-donut-segment-remaining {
  animation: donutDrawRemaining 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

@keyframes donutDrawValue {
  from {
    stroke-dashoffset: 502.65; /* Full circumference (2 * PI * 80) */
  }
  to {
    stroke-dashoffset: 175.93; /* Show 65%: 502.65 - (65/100 * 502.65) = 175.93 */
  }
}

@keyframes donutDrawRemaining {
  from {
    stroke-dashoffset: 502.65; /* Full circumference */
  }
  to {
    stroke-dashoffset: 175.93; /* Start where value segment ends: same offset as value segment */
  }
}

/* Removed duplicate - using grid-based definition above */

.demo-chart-donut-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  z-index: 10;
}

.demo-chart-donut-value {
  font-size: 2rem;
  font-weight: 700;
  display: block;
}

.demo-chart-donut-label-morphing {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}

.demo-chart-bar-morphing {
  position: relative;
}

.demo-chart-bar-morphing-shape {
  transition: border-radius 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-chart-bar-wrapper {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  gap: 4px;
}

.demo-chart-bar {
  width: 80%;
  max-width: 100%;
  background: linear-gradient(to top, #667eea, #764ba2);
  border-radius: 8px 8px 0 0;
  min-width: 0;
  min-height: 20px;
  transition: transform 0.3s, height 0.5s ease, background 0.5s ease;
  align-self: center;
}

.demo-chart-bar-calculated {
  background: linear-gradient(to top, #28a745, #20c997);
}

.demo-chart-bar-label {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  z-index: 10;
}

.demo-chart-bar:hover {
  transform: scaleY(1.1);
  transform-origin: bottom;
}

/* Legend is now inside the chart placeholder, not a separate grid row */
.demo-chart-legend {
  display: flex;
  justify-content: space-around;
  padding: 10px 0 0 0;
  gap: 0;
  align-items: center;
  position: relative;
  z-index: 5;
  box-sizing: border-box;
}

.demo-legend-item {
  flex: 1 1 0%;
  text-align: center;
  padding: 8px 4px;
  background: transparent;
  border-radius: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Visualization Options */
.demo-visualization-options {
  width: 100%;
  padding: 20px 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-viz-options-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* On large screens, show viz options in a column */
@media (min-width: 992px) {
  .demo-visualization-options {
    width: 60px;
    flex-shrink: 0;
  }
  
  .demo-viz-options-list {
    flex-direction: column;
    justify-content: flex-start;
  }
}

/* Dynamic chart sizing to prevent overlap */
.demo-chart-container {
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.demo-viz-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #666;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.demo-viz-option:hover {
  background-color: #151921;
  border-color: #888;
  color: #fff;
}

.demo-viz-option.active {
  background-color: #667eea46;
  border-color: #667eea;
  color: #667eea;
}

.demo-viz-option svg {
  width: 24px;
  height: 24px;
}

.demo-viz-option.active svg {
  filter: brightness(1.2);
}

.demo-viz-option.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.demo-viz-option.disabled svg {
  filter: grayscale(100%);
}

/* Settings Menu */
.demo-settings-menu {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  background: #151921;
}

.demo-settings-menu::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(21, 25, 33, 0) 0%, #151921 90%);
  opacity: 0.85;
  z-index: 10;
}

.demo-settings-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 4;
}

.demo-settings-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  margin-bottom: 4px;
}

.demo-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 80px;
  overflow-y: auto;
  padding-right: 10px;
  position: relative;
}

.demo-settings-grid::-webkit-scrollbar {
  width: 6px;
}

.demo-settings-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.demo-settings-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.demo-settings-item {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 0.75rem;
  color: #fff;
  opacity: 1;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-settings-item.active {
  background: rgba(102, 126, 234, 0.3);
  border-color: #667eea;
  color: #667eea;
}

.demo-settings-item-fade {
  opacity: 0.3;
}

.demo-colors-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-color-nav {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  pointer-events: none;
}

.demo-color-nav[disabled] {
  opacity: 0.5;
}

.demo-color-nav i {
  line-height: 1;
}

.demo-colors-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  margin-top: 8px;
  margin-bottom: 8px;
}

.demo-colors-picker {
  display: flex;
  gap: 0;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.demo-color-box {
  width: 20px;
  height: 20px;
  border-radius: 0;
  flex-shrink: 0;
}

.demo-colors-picker .demo-color-box:first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.demo-colors-picker .demo-color-box:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.demo-color-box-1 {
  background-color: #2f1b4f;
}

.demo-color-box-2 {
  background-color: #3e2369;
}

.demo-color-box-3 {
  background-color: #4d2b84;
}

.demo-color-box-4 {
  background-color: #5c349e;
}

.demo-color-box-5 {
  background-color: #6b3eb8;
}

.demo-color-box-6 {
  background-color: #7a48d3;
}

.demo-color-box-7 {
  background-color: #8a52ee;
}

.demo-indicator-selection {
  width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 4;
  padding-right: 10px;
}

.demo-available-widgets-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  margin-bottom: 6px;
}

.demo-indicator-item {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 0.85rem;
  color: #fff;
  transition: all 0.3s ease;
}

.demo-indicator-item.active {
  background: rgba(102, 126, 234, 0.3);
  border-color: #667eea;
  color: #667eea;
}

.demo-settings-scrollbar {
  position: absolute;
  top: 20px;
  right: 0px;
  height: calc(100% - 40px);
  width: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 4;
}

.demo-settings-scrollbar-track {
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
  position: relative;
}

.demo-settings-scrollbar-thumb {
  position: absolute;
  top: 0%;
  height: 20%;
  width: 100%;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1px;
}

/* Task Management Placeholder */
.demo-recommended-actions-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}

.demo-task-placeholder {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.demo-all-tasks-message {
  padding: 15px 20px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  margin-bottom: 30px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  text-align: center;
  animation: fadeIn 0.5s ease-out;
}

.demo-task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  position: relative;
  user-select: none;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.demo-task-item *,
.demo-task-item *::before,
.demo-task-item *::after {
  pointer-events: none !important;
}

/* Ensure task item itself is clickable */
.demo-task-item {
  pointer-events: auto;
}

.demo-task-item-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.demo-task-item-faded {
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.4s ease-out;
}

.demo-task-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.demo-task-item-selected {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.3);
}

.demo-task-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.demo-task-checkbox-active {
  background: #667eea;
  border-color: #667eea;
  color: #fff;
  animation: checkboxCheck 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-task-checkbox-active i {
  font-size: 12px;
}

.demo-task-checkmark {
  animation: checkmarkDraw 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

@keyframes checkboxCheck {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes checkmarkDraw {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-45deg);
  }
  50% {
    transform: scale(1.2) rotate(-45deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.demo-task-item-removing {
  animation: taskFadeOut 0.4s ease-out forwards;
  pointer-events: none;
}

@keyframes taskFadeOut {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-20px);
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
}

.demo-task-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.demo-task-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  box-sizing: border-box;
}

.demo-task-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

/* Gantt Chart */
.demo-gantt-chart {
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: visible;
  background: rgba(255, 255, 255, 0.02);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  position: relative;
}

/* Desktop Gantt Chart Layout */
.demo-gantt-desktop {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.demo-gantt-desktop .row.g-0 {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
}

.demo-gantt-desktop .row.g-0 > .demo-gantt-label-column {
  flex-shrink: 0;
  min-width: 0;
  max-width: 200px;
  box-sizing: border-box;
}

.demo-gantt-desktop .row.g-0 > .col {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

.demo-gantt-desktop .row.g-0 > .col > .row.g-0 {
  min-width: 0;
  box-sizing: border-box;
  flex-wrap: nowrap;
  width: 100%;
  overflow-x: visible;
}

/* Set minimum width for timeline to prevent column collapse on medium screens */
@media (max-width: 1199px) {
  .demo-gantt-desktop {
    overflow-x: auto;
  }
  
  .demo-gantt-desktop .row.g-0 > .col > .row.g-0 {
    min-width: 600px; /* Minimum width for 12 col-1 elements */
  }
}

/* Mobile Gantt Chart Layout - 12 column grid */
.demo-gantt-mobile {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.demo-gantt-mobile-header {
  display: grid;
  grid-template-columns: 120px repeat(11, 1fr);
  gap: 0;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  align-items: center;
}

.demo-gantt-mobile-year-label {
  grid-column: span 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  width: 120px;
  max-width: 120px;
  padding-right: 12px;
}

.demo-gantt-mobile-year-value {
  grid-column: span 11;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
  padding-left: 12px;
}

.demo-gantt-mobile-row {
  display: grid;
  grid-template-columns: 120px repeat(11, 1fr);
  gap: 0;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  align-items: center;
}

.demo-gantt-mobile-row:last-child {
  border-bottom: none;
}

.demo-gantt-mobile-title {
  grid-column: span 1;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  padding-right: 12px;
  width: 120px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-gantt-mobile-bar-container {
  grid-column: 2 / 13; /* Spans columns 2-12 (11 columns) */
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 0;
  height: 28px;
  align-items: center;
  position: relative;
}

.demo-gantt-mobile-bar-container .demo-gantt-bar {
  height: 100%;
  margin: 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 5px;
  box-sizing: border-box;
}

.demo-gantt-header {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow-x: auto;
}

.demo-gantt-label-column {
  width: 200px;
  min-width: 100px;
  max-width: 200px;
  flex-shrink: 0;
  padding: 12px 15px;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
}

.demo-gantt-timeline {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}

.demo-gantt-month {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.demo-gantt-month-text {
  display: block;
}

.demo-gantt-year-text {
  display: block;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

.demo-gantt-year-header {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-gantt-year-header .demo-gantt-year-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0;
}

.demo-gantt-month:last-child {
  border-right: none;
}

/* Grid lines for Bootstrap columns in gantt chart timeline area */
.demo-gantt-chart .row.g-0 > .col > .row.g-0 > [class*="col-"] {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 50px;
  padding: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
}

/* Ensure col-1 elements don't overflow */
.demo-gantt-chart .row.g-0 > .col > .row.g-0 > .col-1 {
  flex: 0 0 8.333333%;
  max-width: 8.333333%;
  min-width: 0;
}

/* Ensure col-3 elements don't overflow */
.demo-gantt-chart .row.g-0 > .col > .row.g-0 > .col-3 {
  flex: 0 0 25%;
  max-width: 25%;
  min-width: 0;
}

.demo-gantt-chart .row.g-0 > .col > .row.g-0 > [class*="col-"]:last-child {
  border-right: none;
}

/* Ensure the inner row fills full height */
.demo-gantt-chart .row.g-0 > .col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.demo-gantt-chart .row.g-0 > .col > .row.g-0 {
  flex: 1;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure task rows fill full height */
.demo-gantt-chart .row.g-0 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.demo-gantt-chart .row.g-0:last-child {
  border-bottom: none;
}

.demo-gantt-body {
  display: flex;
  flex-direction: column;
}

.demo-gantt-row {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 40px;
}

.demo-gantt-row:last-child {
  border-bottom: none;
}

.demo-gantt-row-new {
  animation: ganttRowFadeIn 0.6s ease-out;
}

@keyframes ganttRowFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
  50% {
    max-height: 100px;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    max-height: 100px;
  }
}

.demo-gantt-bar-new {
  animation: ganttBarSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

@keyframes ganttBarSlideIn {
  0% {
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left center;
  }
  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

.demo-gantt-row .demo-gantt-label-column {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

.demo-gantt-bar {
  width: 100%;
  max-width: 100%;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0 5px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  transition: all 0.3s ease;
  position: relative;
  box-sizing: border-box;
}

.demo-gantt-bar-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.demo-gantt-bar-secondary {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.demo-gantt-bar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.65rem;
}

/* Impact Market (Marketplace) */
.demo-impact-market-layout {
  display: grid;
  grid-template-columns: 33.333% 1fr;
  gap: 20px;
  margin-top: 10px;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.demo-filter-label-row-external {
  display: flex;
  align-items: center;
}

.demo-impact-market-filters-column {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.demo-filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.demo-filter-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.demo-filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.demo-filter-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #667eea;
}

.demo-filter-checkbox-label span {
  flex: 1;
}

.demo-filter-select {
  width: 100%;
  padding: 10px 12px;
  /* Use light dropdown styling so native <select> options remain readable */
  background: #525151;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  min-height: 120px;
}

.demo-filter-select-compact {
  min-height: unset;
  height: 44px;
  padding: 8px 12px;
}

.demo-filter-select option {
  background: #525151;
  color: #fff;
  padding: 8px;
}

.demo-filter-select:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.5);
}

/* Market cards - right column */
.demo-impact-market-cards {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.demo-marketplace-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-pagination-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.demo-pagination-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.demo-pagination-dot.active {
  background: #667eea;
  width: 24px;
  border-radius: 4px;
}

.demo-marketplace-placeholder {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-marketplace-item {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.demo-marketplace-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.demo-marketplace-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.demo-marketplace-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.demo-marketplace-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-marketplace-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-marketplace-category {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Small screens: logo + title in row 1, category in row 2 (full width) */
@media (max-width: 767px) {
  .demo-marketplace-item {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: start;
  }
  
  .demo-marketplace-icon {
    grid-row: 1;
    grid-column: 1;
    align-self: start;
  }
  
  .demo-marketplace-info {
    grid-row: 1;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .demo-marketplace-title {
    white-space: normal;
  }
  
  .demo-marketplace-category {
    grid-row: 2;
    grid-column: 1 / -1;
    -webkit-line-clamp: 2;
  }
}

/* Large screens: logo + info (title and category stacked) in same row */
@media (min-width: 768px) {
  .demo-marketplace-item {
    grid-template-columns: auto 1fr;
    grid-template-rows: 1fr;
    align-items: center;
  }
  
  .demo-marketplace-icon {
    grid-row: 1;
    grid-column: 1;
    align-self: center;
  }
  
  .demo-marketplace-info {
    grid-row: 1;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .demo-marketplace-title {
    white-space: normal;
  }
  
  .demo-marketplace-category {
    -webkit-line-clamp: 2;
  }
}

/* Reporting Placeholder */
.demo-reporting-placeholder {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.demo-report-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.demo-report-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(2px);
}

.demo-report-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
  border-radius: 8px;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.demo-report-icon i {
  font-size: 1.3rem;
  color: #667eea;
}

.demo-report-info {
  flex: 1;
  min-width: 0;
}

.demo-report-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.4;
}

.demo-report-format {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.demo-report-download-btn {
  flex-shrink: 0;
  margin-left: auto;
  border-color: rgba(102, 126, 234, 0.5);
  color: #667eea;
}

.demo-report-download-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
  color: #667eea;
}

/* Benchmarking Rows */
.demo-benchmarking-rows {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.demo-predefined-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-top: 15px;
  border-radius: 6px;
  border: 1px solid rgba(255, 193, 7, 0.25);
  background: rgba(255, 193, 7, 0.12);
  color: #ffdf7e;
  font-size: 0.85rem;
  line-height: 1.4;
}

.demo-predefined-warning i {
  font-size: 1rem;
}

.demo-benchmarking-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 15px;
  background: #1a1e25;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.demo-benchmarking-speedometer-wrapper {
  flex-shrink: 0;
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  overflow: hidden;
}

.demo-benchmarking-speedometer {
  width: 120px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

/* amCharts gauge chart container */
.demo-benchmarking-speedometer > div {
  width: 100%;
  height: 100%;
}

/* Speedometer - EXACT copy from working example */
.demo-speedometer {
  margin: 0 auto;
  height: 200px;
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transform: scale(0.4);
  transform-origin: center center;
}

.demo-speedometer-groove {
  height: 100px;
  width: 200px;
  background: transparent;
  border-top-left-radius: 100px;
  border-top-right-radius: 100px;
  border: 20px solid rgba(255, 255, 255, 0.08);
  border-bottom: 0;
  box-sizing: border-box;
  position: absolute;
  left: 0;
  top: 0;
}

.demo-speedometer-score {
  position: absolute;
  left: 0;
  top: 0;
  transform: rotate(-45deg);
  height: 200px;
  width: 200px;
  background: transparent;
  border-radius: 50%;
  border: 20px solid #4a9eff;
  border-color: transparent transparent #4a9eff #4a9eff;
  box-sizing: border-box;
  cursor: pointer;
  z-index: 1;
  transition: transform 0.3s ease;
}

.demo-speedometer-score.demo-speedometer-score-default {
  border-color: transparent transparent #4a9eff #4a9eff;
}

.demo-speedometer-score-green {
  border-color: transparent transparent #2ecc71 #2ecc71;
}

.demo-speedometer-score-yellow {
  border-color: transparent transparent #f1c40f #f1c40f;
}

.demo-speedometer-score-red {
  border-color: transparent transparent #e74c3c #e74c3c;
}

.demo-speedometer-base {
  width: 100%;
  height: 100px;
  background: #1a1e25;
  position: absolute;
  top: 100px;
  left: 0;
  right: 0;
  z-index: 20;
  box-sizing: border-box;
}

.demo-speedometer-base::before {
  content: '';
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}


.demo-benchmarking-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.demo-benchmarking-label {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.demo-benchmarking-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f8f9ff;
  letter-spacing: 0.01em;
  text-align: left;
}

.demo-benchmarking-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.demo-table-placeholder {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.demo-table-header .demo-table-cell {
  font-weight: 600;
  background: #e0e0e0;
  border: 2px solid #ccc;
}

.demo-table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.demo-table-cell {
  height: 50px;
  background: #f0f0f0;
  border-radius: 8px;
  border: 2px dashed #ccc;
  display: flex;
  align-items: center;
  padding: 0 15px;
  color: #999;
  font-size: 0.9rem;
}

/* Animations */

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateZ(0) rotateY(-15deg) rotateX(5deg) scale(0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
  to {
    opacity: 1;
    transform: translateZ(0) rotateY(-5deg) rotateX(2deg) scale(1);
    box-shadow: 
      30px 20px 80px rgba(0, 0, 0, 0.4),
      15px 10px 40px rgba(0, 0, 0, 0.3),
      -10px 20px 40px rgba(0, 0, 0, 0.2),
      0 0 30px rgba(102, 126, 234, 0.15);
  }
}

@keyframes cardEnterLeft {
  from {
    opacity: 0;
    transform: translateZ(0) rotateY(15deg) rotateX(5deg) scale(0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
  to {
    opacity: 1;
    transform: translateZ(0) rotateY(5deg) rotateX(2deg) scale(1);
    box-shadow: 
      -30px 20px 80px rgba(0, 0, 0, 0.4),
      -15px 10px 40px rgba(0, 0, 0, 0.3),
      10px 20px 40px rgba(0, 0, 0, 0.2),
      0 0 30px rgba(102, 126, 234, 0.15);
  }
}

/* Simplified animations without tilt on smaller screens */
@media (max-width: 991px) {
  @keyframes cardEnter {
    from {
      opacity: 0;
      transform: translateZ(0) scale(0.95);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    to {
      opacity: 1;
      transform: translateZ(0) scale(1);
      box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(102, 126, 234, 0.15);
    }
  }

  @keyframes cardEnterLeft {
    from {
      opacity: 0;
      transform: translateZ(0) scale(0.95);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    to {
      opacity: 1;
      transform: translateZ(0) scale(1);
      box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(102, 126, 234, 0.15);
    }
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .demo-section-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .demo-interactive-wrapper {
    order: 2;
  }

  .demo-explanation-wrapper {
    order: 1;
    text-align: center;
  }

  .demo-main-title {
    font-size: 2.5rem;
  }

  .demo-section-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .demo-header {
    padding: 60px 20px 40px;
  }

  .demo-main-title {
    font-size: 2rem;
  }

  .demo-main-subtitle {
    font-size: 1rem;
  }

  .demo-section {
    padding: 30px 20px;
    margin-bottom: 15px;
  }

  .demo-section-container {
    gap: 30px;
  }

  .demo-interactive-card {
    padding: 30px 20px;
    min-height: 400px;
  }

  .demo-section-title {
    font-size: 1.75rem;
  }

  .demo-section-description {
    font-size: 1rem;
  }
  
  /* Fix chart container for small screens */
  .demo-chart-container {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: 180px; /* Reduced from 250px */
  }
  
  .demo-visualization-options {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
  }
  
  .demo-viz-options-list {
    justify-content: center;
  }
  
  .demo-chart-placeholder,
  .demo-chart-line {
    min-height: 140px; /* Reduced from 200px */
    padding: 10px;
    padding-top: 30px;
  }
  
  /* Ensure scrollbar is visible on small screens */
  .demo-settings-scrollbar {
    display: block !important;
  }
  
  /* Fix gantt chart for small screens */
  .demo-gantt-label-column {
    width: 100px;
    min-width: 80px;
    max-width: 100px;
    padding: 8px 10px;
    font-size: 0.7rem;
    box-sizing: border-box;
  }
  
  .demo-gantt-month {
    font-size: 0.65rem;
    padding: 8px 4px;
    min-width: 0;
    box-sizing: border-box;
  }
  
  /* Fix benchmarking for small screens - use grid with text first, then chart */
  .demo-benchmarking-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .demo-benchmarking-speedometer-wrapper {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    order: 2;
    display: flex;
    justify-content: center;
  }
  
  .demo-benchmarking-info {
    order: 1;
  }
  
  .demo-benchmarking-speedometer {
    width: 100px;
    margin: 0 auto;
  }
  
  .demo-speedometer {
    transform: scale(0.35);
  }
  
  /* Fix reporting for small screens */
  .demo-report-item {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .demo-report-icon {
    flex-shrink: 0;
  }
  
  .demo-report-info {
    min-width: 0;
    flex: 1 1 auto;
  }
  
  /* Fix impact marketplace layout */
  .demo-impact-market-layout {
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  
  .demo-impact-market-filters-column {
    grid-column: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  
  .demo-impact-market-cards {
    grid-column: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  
  /* Fix task placeholder */
  .demo-task-placeholder {
    width: 100%;
    max-width: 100%;
  }
}

/* Extra small screens (390px and below) */
@media (max-width: 390px) {
  .demo-container {
    padding-left: 0px;
    padding-right: 0px;
  }
  
  .demo-section {
    padding: 10px 1px;
  }
  
  .demo-interactive-card {
    padding: 10px 5px;
    min-height: 350px;
  }

  .demo-browser-content {
    padding: 10px;
  }
  
  .demo-chart-container {
    height: 220px;
  }
  
  .demo-chart-placeholder,
  .demo-chart-line {
    min-height: 180px;
    padding: 10px;
    padding-top: 35px;
  }
  
  /* Gantt chart - show full year text on very small screens */
  .demo-gantt-label-column {
    width: 80px;
    min-width: 70px;
    padding: 6px 8px;
    font-size: 0.65rem;
  }
  
  .demo-gantt-month {
    font-size: 0.6rem;
    padding: 6px 2px;
    min-width: 24px;
  }
  
  .demo-gantt-month-text {
    font-size: 0.55rem;
    line-height: 1.2;
  }
  
  .demo-gantt-year-text {
    font-size: 0.5rem;
    margin-top: 1px;
  }
  
  /* Show full year on first month of new year */
  .demo-gantt-month:has(.demo-gantt-year-text) {
    min-width: 28px;
  }
  
  /* Fix task bar from jumping out */
  .demo-task-placeholder {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  .demo-task-item {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Fix gantt chart grid on small screens */
  .demo-gantt-chart {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .demo-gantt-chart .row.g-0 {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
  }
  
  .demo-gantt-chart .row.g-0 > .col {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
    box-sizing: border-box;
    overflow-x: auto;
  }
  
  .demo-gantt-chart .row.g-0 > .col > .row.g-0 {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
  }
  
  .demo-gantt-chart .row.g-0 > .col > .row.g-0 > [class*="col-"] {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
    min-width: 0;
    box-sizing: border-box;
  }
  
  .demo-gantt-label-column {
    width: 150px;
    min-width: 100px;
    max-width: 150px;
    overflow: hidden;
    word-wrap: break-word;
  }
  
  /* Impact marketplace */
  .demo-impact-market-layout {
    gap: 10px;
  }
}

/* Helper Bot Styles */
.demo-helper-bot {
  position: absolute;
  z-index: 10000;
  pointer-events: none;
  animation: helperFadeIn 0.3s ease-out;
  transform: translateX(-100%) translateY(-100%);
  transform-origin: bottom right;
}

@keyframes helperFadeIn {
  from {
    opacity: 0;
    transform: translateX(calc(-100% - 10px)) translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(-100%) translateY(-100%);
  }
}

.demo-helper-bubble {
  background: #f8f9fa;
  color: #333;
  padding: 10px 14px;
  padding-right: 22px;
  padding-bottom: 18px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  min-width: 300px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  pointer-events: auto;
  transform-origin: bottom right;
}

.demo-helper-bubble.demo-helper-compact {
  padding: 8px 12px;
  padding-right: 20px;
  padding-bottom: 18px;
  min-width: auto;
  max-width: none;
  align-items: center;
  margin-right: 10px;
}

.demo-helper-bubble.demo-helper-expanded {
  min-width: 300px;
  max-width: 400px;
  padding: 12px 14px;
  padding-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.demo-helper-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1;
  color: #6c757d;
  display: inline-block;
  vertical-align: top;
}

.demo-helper-content {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  width: 100%;
}

.demo-helper-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.demo-helper-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #212529;
  line-height: 1.2;
}

.demo-helper-text {
  font-size: 0.875rem;
  line-height: 1.4;
  color: #495057;
  grid-row: 2;
}

.demo-helper-close {
  background: transparent;
  border: none;
  color: #6c757d;
  font-size: 1.2rem;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  grid-column: 2;
  grid-row: 1;
}

.demo-helper-close:hover {
  background: #e9ecef;
  color: #495057;
}

.demo-helper-close:active {
  background: #dee2e6;
}

.demo-helper-arrow {
  position: absolute;
  right: 20px;
  bottom: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #f8f9fa;
  flex-shrink: 0;
  z-index: 1;
}

.demo-helper-arrow::before {
  content: '';
  position: absolute;
  left: -8px;
  bottom: -1px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #e0e0e0;
  z-index: 0;
}

.demo-helper-dots {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.demo-helper-dot {
  display: inline-block;
  animation: dotPulse 1.4s infinite;
  color: #6c757d;
  font-size: 1.2rem;
  line-height: 1;
}

.demo-helper-dot:nth-child(1) {
  animation-delay: 0s;
}

.demo-helper-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.demo-helper-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 60%, 100% {
    opacity: 0.3;
  }
  30% {
    opacity: 1;
  }
}

/* Industry Selector Styles */
.demo-industry-selector {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-industry-toggle-group {
  display: flex;
  gap: 4px;
  width: 100%;
}

.demo-industry-toggle-group .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Industry Selector Group - separate from main toggle slider */
.demo-industry-selector-group {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  width: 100%;
  transition: all 0.3s ease;
}

.demo-industry-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.demo-industry-option:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

.demo-industry-option.demo-industry-option-active {
  background: #827880;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.demo-industry-option i {
  font-size: 1rem;
  flex-shrink: 0;
}

.demo-industry-option span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Small screens: keep industry selector inline, allow wrapping if needed */
@media (max-width: 991px) {
  .demo-industry-selector-group {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .demo-industry-option {
    flex: 1 1 calc(33.333% - 4px);
    min-width: 100px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .demo-industry-option span {
    display: inline;
  }
  
  .demo-industry-option i {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .demo-industry-option {
    flex: 1 1 100%;
    padding: 10px 16px;
  }
}

/* Standards Animation */
.demo-standards-wheel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 8px;
  margin-right: 8px;
  position: relative;
  min-width: 120px;
  height: 1.6rem;
  overflow: visible;
}

/* Interaction Ribbon */
/* Bootstrap tooltip styling with primary color */
.demo-bs-tooltip {
  --bs-tooltip-bg: var(--bs-primary);
  --bs-tooltip-color: #fff;
  z-index: 1 !important;
}

.demo-bs-tooltip .tooltip-inner {
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.5em 0.75em;
  animation: tooltipPulse 2s ease-in-out infinite;
}

@keyframes tooltipPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(var(--bs-primary-rgb), 0);
  }
}

/* Legacy ribbon styles - can be removed after migration */
.demo-interaction-ribbon {
  --f: 0.4em;
  --r: 0.7em;
  
  position: absolute;
  padding: 0.4em 0.8em;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.5;
  background: var(--bs-primary);
  z-index: 10000;
  z-index: 1000;
  pointer-events: none;
  animation: ribbonFadeIn 0.5s ease-out;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Ribbon pointing from right (right-pointing arrow) */
.demo-interaction-ribbon-right {
  border-bottom: var(--f) solid rgba(0, 0, 0, 0.2);
  border-left: var(--r) solid transparent;
  clip-path: 
    polygon(
      var(--r) 0,
      100% 0,
      100% calc(100% - var(--f)),
      calc(100% - var(--f)) 100%,
      calc(100% - var(--f)) calc(100% - var(--f)),
      var(--r) calc(100% - var(--f)),
      0 calc(50% - var(--f) / 2)
    );
}

/* Ribbon pointing from left (left-pointing arrow) */
.demo-interaction-ribbon-left {
  border-bottom: var(--f) solid rgba(0, 0, 0, 0.2);
  border-right: var(--r) solid transparent;
  clip-path: 
    polygon(
      calc(100% - var(--r)) 0,
      0 0,
      0 calc(100% - var(--f)),
      var(--f) 100%,
      var(--f) calc(100% - var(--f)),
      calc(100% - var(--r)) calc(100% - var(--f)),
      100% calc(50% - var(--f) / 2)
    );
}

@keyframes ribbonFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateY(-10px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) translateY(0) scale(1);
  }
}

/* Consultancy Section */
.demo-consultancy-wrapper {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 60px;
}

.demo-consultancy-section {
  max-width: 1200px;
  margin: 0 auto;
}

.demo-consultancy-content {
  text-align: center;
  color: #fff;
}

.demo-consultancy-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.demo-consultancy-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: rgba(255, 255, 255, 0.9);
}

.demo-consultancy-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
  max-width: 800px;
  margin: 0 auto 30px;
}

.demo-consultancy-subsidy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.85rem 1.25rem;
  background: rgba(102, 126, 234, 0.25);
  border: 1px solid rgba(102, 126, 234, 0.5);
  border-radius: 999px;
  margin: 0 auto 30px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.demo-consultancy-subsidy i {
  color: #ffd166;
  font-size: 1.2rem;
}

.demo-consultancy-services-heading {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 20px;
}

.demo-consultancy-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.demo-consultancy-service-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.demo-consultancy-service-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.25));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8bb5ff;
  font-size: 1.3rem;
}

.demo-consultancy-service-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.demo-consultancy-service-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0;
}

.demo-consultancy-cta {
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.demo-consultancy-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.demo-consultancy-fineprint {
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 10px;
}

.demo-standards-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.5rem;
  white-space: nowrap;
  animation: standardsMorph 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  transition: color 0.3s ease;
  height: 100%;
}

.demo-standards-item i {
  font-size: 1.2rem;
  flex-shrink: 0;
  animation: iconMorph 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transition: color 0.3s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

/* ESRS - Primary/Blue */
.demo-standards-esrs {
  color: #667eea;
}

.demo-standards-esrs i {
  color: #667eea;
}

/* VSME - Warning/Orange */
.demo-standards-vsme {
  color: #ffc107;
}

.demo-standards-vsme i {
  color: #ffc107;
}

/* EMAS - Success/Green */
.demo-standards-emas {
  color: #28a745;
}

.demo-standards-emas i {
  color: #28a745;
}

/* Custom - Info/Blue */
.demo-standards-custom {
  color: #0dcaf0;
}

.demo-standards-custom i {
  color: #0dcaf0;
}

@keyframes standardsMorph {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    filter: blur(4px);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1) translateY(-5px);
    filter: blur(2px);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

@keyframes iconMorph {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

