/* ===================================================================
   INDUSTRY MODULES SECTION - Product demo showcase
   ===================================================================
   Gradient background, clear section separation, professional styling
   following StatsAlpha brand guidelines.
   =================================================================== */

#industry-modules {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(37, 99, 235, 0.03) 0%,
    rgba(37, 99, 235, 0.08) 50%,
    rgba(20, 184, 166, 0.06) 100%
  );
  padding-top: 4rem;
  padding-bottom: 4rem;
  overflow: hidden;
}

[data-bs-theme="dark"] #industry-modules {
  background: linear-gradient(
    180deg,
    rgba(37, 99, 235, 0.08) 0%,
    rgba(37, 99, 235, 0.15) 50%,
    rgba(20, 184, 166, 0.12) 100%
  );
}

/* Decorative element for depth */
#industry-modules::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--bs-primary) 50%,
    transparent 100%
  );
  opacity: 0.3;
}

/* Section header styling */
#industry-modules .text-center.mb-5 {
  position: relative;
  z-index: 2;
}

#industry-modules .hero-highlight-primary {
  color: var(--bs-primary);
  position: relative;
  display: inline-block;
}

#industry-modules .hero-highlight-primary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
  opacity: 0.3;
}

/* Module showcase container */
.module-showcase {
  position: relative;
  padding: 3rem 0;
  margin-bottom: 2rem;
  transition: all 0.4s ease;
}

.module-showcase:nth-child(even) {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  margin: 2rem 0;
  box-shadow: 
    0 4px 20px rgba(37, 99, 235, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .module-showcase:nth-child(even) {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 
    0 4px 20px rgba(37, 99, 235, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Module visual placeholder - enhanced card design */
.module-visual-placeholder {
  perspective: 1200px;
  position: relative;
}

.module-visual-placeholder .placeholder-frame {
  background: white;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 
    0 10px 40px rgba(37, 99, 235, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

[data-bs-theme="dark"] .module-visual-placeholder .placeholder-frame {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 
    0 10px 40px rgba(37, 99, 235, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

.module-visual-placeholder .placeholder-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(37, 99, 235, 0.1),
    transparent
  );
  transition: left 0.6s ease;
}

.module-visual-placeholder .placeholder-frame:hover::before {
  left: 100%;
}

.module-visual-placeholder .placeholder-frame:hover {
  box-shadow: 
    0 20px 60px rgba(37, 99, 235, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-8px) rotateX(2deg);
  border-color: rgba(37, 99, 235, 0.3);
}

[data-bs-theme="dark"] .module-visual-placeholder .placeholder-frame:hover {
  box-shadow: 
    0 20px 60px rgba(37, 99, 235, 0.3),
    0 8px 20px rgba(0, 0, 0, 0.5);
}

.placeholder-header {
  border-bottom: 2px solid rgba(37, 99, 235, 0.1);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  color: var(--bs-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[data-bs-theme="dark"] .placeholder-header {
  border-bottom-color: rgba(37, 99, 235, 0.2);
}

.placeholder-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.placeholder-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bs-body-color);
}

.placeholder-content {
  transition: opacity 0.3s ease;
}

/* Module content typography */
.module-content h3 {
  color: var(--bs-body-color);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.module-content .fs-5 {
  font-weight: 500;
  line-height: 1.6;
}

.module-content p {
  line-height: 1.7;
  color: var(--bs-body-color);
}

.module-features {
  margin-top: 1.5rem;
}

.module-features li {
  padding: 0.75rem 0;
  font-size: 1rem;
  display: flex;
  align-items: flex-start;
  line-height: 1.6;
  transition: all 0.2s ease;
}

.module-features li:hover {
  transform: translateX(4px);
}

.module-features li i {
  font-size: 1.1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

/* ===================================================================
   ENGINE ROOM WATERFALL VISUALIZATION
   =================================================================== */

.placeholder-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.placeholder-tab {
  padding: 0.625rem 1rem;
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 0.75rem;
  font-size: 0.813rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--bs-body-color);
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

[data-bs-theme="dark"] .placeholder-tab {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
}

.placeholder-tab:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.placeholder-tab.active {
  background: linear-gradient(135deg, var(--bs-primary), #1D4ED8);
  color: white;
  border-color: var(--bs-primary);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  transform: translateY(-2px);
}

.placeholder-waterfall {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  height: 180px;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02), rgba(20, 184, 166, 0.02));
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 0.875rem;
  position: relative;
}

[data-bs-theme="dark"] .placeholder-waterfall {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(20, 184, 166, 0.05));
  border-color: rgba(37, 99, 235, 0.2);
}

.waterfall-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  height: 100%;
}

.waterfall-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--bs-primary), #1D4ED8);
  border-radius: 0.5rem 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem 0.5rem;
  min-height: 40px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -2px 8px rgba(37, 99, 235, 0.2);
  position: relative;
  overflow: hidden;
}

.waterfall-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.waterfall-item:hover .waterfall-bar::before {
  opacity: 1;
}

.waterfall-item.negative .waterfall-bar {
  background: linear-gradient(180deg, var(--bs-danger), #DC2626);
  box-shadow: 0 -2px 8px rgba(220, 38, 38, 0.2);
}

.waterfall-item.result .waterfall-bar {
  background: linear-gradient(180deg, var(--bs-success), #059669);
  box-shadow: 0 -2px 8px rgba(5, 150, 105, 0.2);
}

.waterfall-item.result.negative .waterfall-bar {
  background: linear-gradient(180deg, var(--bs-danger), #DC2626);
  box-shadow: 0 -2px 8px rgba(220, 38, 38, 0.2);
}

.waterfall-item.result.info .waterfall-bar {
  background: linear-gradient(180deg, var(--bs-info), #0284C7);
  box-shadow: 0 -2px 8px rgba(2, 132, 199, 0.2);
}

.waterfall-item.leak .waterfall-bar {
  background: linear-gradient(180deg, #F59E0B, #D97706);
  box-shadow: 0 -2px 8px rgba(245, 158, 11, 0.3);
  position: relative;
  overflow: visible;
}

.waterfall-item.leak .waterfall-bar::after {
  content: '💧';
  position: absolute;
  top: -20px;
  right: -5px;
  font-size: 1.2rem;
  animation: leakDrip 2s ease-in-out infinite;
}

@keyframes leakDrip {
  0%, 100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(5px);
    opacity: 0.7;
  }
}

.waterfall-label {
  font-size: 0.688rem;
  color: white;
  text-align: center;
  word-break: break-word;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
  margin-top: 0.25rem;
  order: 2;
}

.waterfall-value {
  font-size: 0.813rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  line-height: 1;
  order: 1;
}

.placeholder-tooltip {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid color-mix(in srgb, var(--bs-secondary) 30%, transparent);
  border-radius: 0.5rem;
  font-size: 0.813rem;
  color: var(--bs-body-color);
  line-height: 1.5;
  display: none;
  transition: all 0.3s ease;
}

.placeholder-tooltip.active {
  display: block;
  animation: tooltipSlideIn 0.4s ease;
}

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

.placeholder-tooltip i {
  font-size: 0.9rem;
}

.placeholder-tooltip strong {
  color: var(--bs-primary);
}

.placeholder-tooltip .text-warning {
  color: #F59E0B !important;
}

.placeholder-tooltip .text-danger {
  color: var(--bs-danger) !important;
}

[data-bs-theme="dark"] .placeholder-tooltip {
  background: rgba(20, 184, 166, 0.15);
}

/* Multiple waterfall containers */
.placeholder-waterfall {
  display: none;
  animation: waterfallFadeIn 0.5s ease;
}

.placeholder-waterfall.active {
  display: flex;
}

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

/* ===================================================================
   MOAT MAP RADAR VISUALIZATION
   =================================================================== */

.placeholder-radar {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02), rgba(20, 184, 166, 0.02));
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 0.875rem;
  margin-bottom: 1.25rem;
}

[data-bs-theme="dark"] .placeholder-radar {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(20, 184, 166, 0.05));
  border-color: rgba(37, 99, 235, 0.2);
}

/* ApexCharts radar container for Module 2 */
.module-moat-chart {
  min-height: 220px;
}

/* Moat defense score grid */
.moat-scores-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.moat-score-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr 2rem;
  align-items: center;
  gap: 0.5rem;
}

.moat-score-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bs-body-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.moat-score-bar-track {
  height: 5px;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.moat-score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #14B8A6);
  border-radius: 3px;
}

.moat-score-value {
  font-size: 0.75rem;
  font-weight: 700;
  text-align: right;
}

.placeholder-evidence {
  background: white;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
}

[data-bs-theme="dark"] .placeholder-evidence {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.evidence-header {
  font-weight: 700;
  font-size: 0.813rem;
  margin-bottom: 0.75rem;
  color: var(--bs-primary);
}

.evidence-item {
  font-size: 0.813rem;
  line-height: 1.6;
  color: var(--bs-body-color);
}

/* ===================================================================
   TRADE-OFF TERNARY VISUALIZATION
   =================================================================== */

.placeholder-ternary {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02), rgba(20, 184, 166, 0.02));
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 0.875rem;
  margin-bottom: 1.25rem;
}

[data-bs-theme="dark"] .placeholder-ternary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(20, 184, 166, 0.05));
  border-color: rgba(37, 99, 235, 0.2);
}

/* SVG ternary chart */
.ternary-svg {
  width: 100%;
  max-width: 260px;
  display: block;
  margin: 0 auto;
}

.ternary-svg .triangle-grid {
  stroke: rgba(37, 99, 235, 0.12);
}

.ternary-svg .triangle-outer {
  fill: rgba(37, 99, 235, 0.04);
  stroke: rgba(37, 99, 235, 0.3);
}

.ternary-svg .triangle-axis {
  stroke: rgba(37, 99, 235, 0.1);
}

.ternary-svg .peer-dot-svg {
  fill: rgba(107, 114, 128, 0.45);
}

.ternary-svg .company-dot {
  fill: #2563EB;
}

.ternary-svg .vertex-text-growth { fill: #14B8A6; }
.ternary-svg .vertex-text-profit { fill: #10B981; }
.ternary-svg .vertex-text-safety { fill: #F59E0B; }

.ternary-svg .legend-text {
  fill: rgba(107, 114, 128, 0.7);
}

.ternary-svg .legend-text-company {
  fill: rgba(37, 99, 235, 0.85);
}

[data-bs-theme="dark"] .ternary-svg .triangle-outer {
  fill: rgba(37, 99, 235, 0.1);
  stroke: rgba(99, 130, 235, 0.4);
}

[data-bs-theme="dark"] .ternary-svg .triangle-grid {
  stroke: rgba(99, 130, 235, 0.18);
}

[data-bs-theme="dark"] .ternary-svg .triangle-axis {
  stroke: rgba(99, 130, 235, 0.15);
}

[data-bs-theme="dark"] .ternary-svg .peer-dot-svg {
  fill: rgba(156, 163, 175, 0.4);
}

[data-bs-theme="dark"] .ternary-svg .legend-text {
  fill: rgba(156, 163, 175, 0.7);
}

.placeholder-delta {
  background: white;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
}

[data-bs-theme="dark"] .placeholder-delta {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.delta-header {
  font-size: 0.813rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--bs-primary);
}

.delta-items {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.delta-item {
  font-size: 0.813rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .delta-item {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.3);
}

.delta-item:hover {
  background: rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

/* ===================================================================
   RESPONSIVE DESIGN - Mobile & Tablet
   =================================================================== */

@media (max-width: 991.98px) {
  #industry-modules {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .module-showcase {
    padding: 2rem 0;
  }

  .module-showcase:nth-child(even) {
    padding: 2rem 1.5rem;
  }

  .module-visual-placeholder .placeholder-frame {
    margin-bottom: 2rem;
  }

  .placeholder-waterfall {
    height: 140px;
  }
}

@media (max-width: 575.98px) {
  #industry-modules {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .module-showcase:nth-child(even) {
    padding: 1.5rem 1rem;
  }

  .placeholder-tabs {
    gap: 0.35rem;
  }

  .placeholder-tab {
    font-size: 0.7rem;
    padding: 0.5rem 0.75rem;
    min-height: 2.75rem;
  }

  .placeholder-waterfall {
    height: 120px;
    gap: 0.4rem;
    padding: 0.75rem;
  }

  .waterfall-label {
    font-size: 0.55rem;
    line-height: 1.2;
  }

  .waterfall-value {
    font-size: 0.65rem;
  }

  .waterfall-item.leak .waterfall-bar::after {
    font-size: 0.9rem;
    top: -15px;
    right: -3px;
  }

  .placeholder-tooltip {
    font-size: 0.75rem;
    padding: 0.65rem 0.85rem;
  }

  .module-features li {
    font-size: 0.9rem;
  }
}
