/* ==========================================================================
   NAGDEV PRODUCTS — PROPRIETARY INDUSTRIAL PROCESS FLOW STYLING
   World-class chemical engineering architecture & interactive schematics
   ========================================================================== */

:root {
  --pf-forest: #0B3D1E;
  --pf-forest-deep: #062311;
  --pf-forest-light: #165B30;
  --pf-gold: #B8841A;
  --pf-gold-light: #D4A537;
  --pf-gold-subtle: rgba(184, 132, 26, 0.12);
  --pf-cyan: #0284C7;
  --pf-cyan-subtle: #E0F2FE;
  --pf-amber: #D97706;
  --pf-amber-subtle: #FEF3C7;
  --pf-emerald: #059669;
  --pf-emerald-subtle: #D1FAE5;
  --pf-slate: #334155;
  --pf-slate-subtle: #F1F5F9;
  --pf-border: #CBD5E1;
  --pf-card-bg: #FFFFFF;
}

/* HERO SECTION */
.process-hero {
  padding: 4.5rem 0 3.5rem;
  background: linear-gradient(135deg, #062311 0%, #0B3D1E 50%, #165B30 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.process-hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(212, 165, 55, 0.15), transparent 45%),
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  pointer-events: none;
}

.process-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(212, 165, 55, 0.18);
  border: 1px solid rgba(212, 165, 55, 0.4);
  color: #FDE68A;
  border-radius: 9999px;
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.process-hero-title {
  font-family: var(--font-heading, 'Cormorant Garamond', serif);
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  line-height: 1.15;
  color: #ffffff;
  margin: 0.5rem 0 1rem;
}

.process-hero-desc {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 820px;
  line-height: 1.7;
}

/* HERO METRICS STRIP */
.hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.hero-metric-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--pf-gold-light);
}

.hero-metric-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: #FDE68A;
  font-family: monospace;
  margin-bottom: 0.25rem;
}

.hero-metric-lbl {
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* TAB NAVIGATION STRIP */
.process-nav-strip {
  background: #ffffff;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 70px;
  z-index: 40;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.process-tabs {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.process-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.65rem;
  border-radius: 9999px;
  border: 1.5px solid transparent;
  background: #F8FAFC;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.process-tab-btn:hover {
  background: rgba(11, 61, 30, 0.08);
  color: var(--pf-forest);
  border-color: rgba(11, 61, 30, 0.2);
}

.process-tab-btn.active {
  background: var(--pf-forest);
  color: #ffffff;
  border-color: var(--pf-forest);
  box-shadow: 0 6px 16px rgba(11, 61, 30, 0.25);
}

.process-tab-btn .tab-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  font-weight: 600;
}

.process-tab-btn:not(.active) .tab-badge {
  background: #E2E8F0;
  color: #475569;
}

/* SECTIONS */
.process-section {
  padding: 3.5rem 0 5rem;
  display: none;
}

.process-section.active {
  display: block;
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.flow-header {
  margin-bottom: 2.25rem;
  text-align: center;
}

.flow-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--pf-gold);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  background: var(--pf-gold-subtle);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}

.flow-title {
  font-family: var(--font-heading, 'Cormorant Garamond', serif);
  font-size: clamp(2rem, 3.5vw, 2.65rem);
  color: var(--pf-forest);
  margin: 0.5rem 0 0.75rem;
}

.flow-subtitle {
  font-size: 1.05rem;
  color: #475569;
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.65;
}

/* BLUEPRINT SCHEMATIC CONTAINER (THE VECTOR FLOW DIAGRAM) */
.flow-diagram-container {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  margin-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
}

.diagram-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #E2E8F0;
  flex-wrap: wrap;
  gap: 1rem;
}

.diagram-title-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.diagram-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.diagram-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: 0.02em;
}

.diagram-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.785rem;
  font-weight: 600;
  color: #475569;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.flow-svg-viewport {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #FFFFFF;
  background-image: 
    radial-gradient(circle at 1px 1px, #E2E8F0 1px, transparent 0);
  background-size: 24px 24px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.5rem 0.5rem;
}

.flow-svg {
  width: 100%;
  min-width: 780px;
  max-width: 1000px;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* SVG TEXT STYLING FOR BULLETPROOF CONTRAST */
.svg-node-title {
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.03em;
}

.svg-node-sub {
  font-weight: 600;
  font-size: 11px;
}

.svg-reagent-txt {
  font-weight: 700;
  font-size: 11.5px;
}

.svg-param-txt {
  font-weight: 600;
  font-size: 10.5px;
}

.svg-line-label {
  font-weight: 700;
  font-size: 11px;
}

/* INTERACTIVE PROCESS PIPELINE CARDS (STEP-BY-STEP BREAKDOWN) */
.flow-pipeline-title {
  font-family: var(--font-heading, 'Cormorant Garamond', serif);
  font-size: 1.85rem;
  color: var(--pf-forest);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pipeline-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3.5rem;
}

.pipeline-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.85rem 1.65rem;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.pipeline-card:hover {
  transform: translateY(-4px);
  border-color: var(--pf-gold);
  box-shadow: 0 12px 24px rgba(11, 61, 30, 0.08);
}

.pipeline-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.pipeline-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: var(--pf-forest);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.pipeline-type-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.type-primary {
  background: var(--pf-emerald-subtle);
  color: var(--pf-emerald);
}

.type-chemical {
  background: var(--pf-cyan-subtle);
  color: var(--pf-cyan);
}

.type-recycle {
  background: var(--pf-amber-subtle);
  color: var(--pf-amber);
}

.pipeline-card-title {
  font-family: var(--font-heading, 'Cormorant Garamond', serif);
  font-size: 1.45rem;
  color: var(--pf-forest);
  margin: 0 0 0.65rem;
  line-height: 1.25;
}

.pipeline-card-desc {
  font-size: 0.925rem;
  color: #475569;
  line-height: 1.65;
  margin: 0 0 1.25rem;
}

.pipeline-metrics-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
}

.metric-row-lbl {
  color: #64748B;
  font-weight: 500;
}

.metric-row-val {
  color: #0F172A;
  font-weight: 700;
  font-family: monospace;
}

.pipeline-card-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid #F1F5F9;
  padding-top: 1rem;
}

.pipeline-prod-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--pf-forest);
  text-decoration: none;
  transition: color 0.2s ease;
}

.pipeline-prod-btn:hover {
  color: var(--pf-gold);
}

/* MATERIAL BALANCE TABLE */
.balance-table-wrap {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  margin-bottom: 3.5rem;
}

.balance-table-header {
  padding: 1.25rem 1.5rem;
  background: var(--pf-forest);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.balance-table-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.balance-table-sub {
  font-size: 0.85rem;
  color: #D1FAE5;
}

.balance-table {
  width: 100%;
  border-collapse: collapse;
}

.balance-table th {
  background: #F8FAFC;
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-size: 0.825rem;
  font-weight: 700;
  color: #334155;
  border-bottom: 1px solid #E2E8F0;
}

.balance-table td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid #F1F5F9;
  font-size: 0.875rem;
  color: #334155;
}

.balance-table tr:hover td {
  background: rgba(11, 61, 30, 0.03);
}

.balance-tag-in {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: #EFF6FF;
  color: #1D4ED8;
  font-weight: 700;
  font-size: 0.775rem;
}

.balance-tag-out {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: #ECFDF5;
  color: #047857;
  font-weight: 700;
  font-size: 0.775rem;
}

/* RESPONSIVENESS */
@media (max-width: 768px) {
  .process-hero {
    padding: 3rem 0 2rem;
  }
  .hero-metrics-grid {
    grid-template-columns: 1fr;
  }
  .diagram-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .pipeline-cards-grid {
    grid-template-columns: 1fr;
  }
}
