/* ═══════════════════════════════════════
   PAGE: Аудит якості електроенергії
   Scoped under #pq-audit-page
   ═══════════════════════════════════════ */

/* ── Variables ── */
#pq-audit-page {
  --navy:        #080808;
  --navy-mid:    #111111;
  --navy-light:  #1a1a1a;
  --slate:       #2a3f5f;
  --pq-blue:     #0076ef;
  --blue-bright: #42a5f5;
  --cyan:        #00e5ff;
  --orange:      #ff8f00;
  --orange-light:#ffab40;
  --pq-white:    #f5f7fa;
  --pq-gray:     #9aa5b4;
  --font-head:   'Mulish', sans-serif;
  --font-body:   'Mulish', sans-serif;

  font-family: var(--font-body);
  color: var(--pq-white);
  line-height: 1.7;
  overflow-x: hidden;
}

#pq-audit-page *, #pq-audit-page *::before, #pq-audit-page *::after {
  box-sizing: border-box;
}

#pq-audit-page .accent { color: var(--orange); }
#pq-audit-page .cyan   { color: #fff; }

/* ── Blurred gradient glow background ── */
#pq-audit-page .pq-glow-bg {
  position: absolute;
  z-index: 1;
  width: 1583px;
  height: 780px;
  pointer-events: none;
}

#pq-audit-page .pq-glow-bg img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
  object-fit: contain;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-filter: blur(150px);
  filter: blur(150px);
}

#pq-audit-page .pq-glow-bg--tech {
  top: -380px;
  left: -600px;
}

#pq-audit-page .pq-glow-bg--sol {
  top: -300px;
  left: -600px;
}

#pq-audit-page .pq-glow-bg--cta {
  top: -200px;
  left: -600px;
}

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
#pq-audit-page .hero {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
}

#pq-audit-page .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(40,200,80,.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 30% 70%, rgba(220,60,50,.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(220,200,40,.03) 0%, transparent 50%);
  pointer-events: none;
}

#pq-audit-page .hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 60% 50%, black 20%, transparent 70%);
  opacity: .5;
}

#pq-audit-page .hero-bg-wave {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1520px;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#pq-audit-page .hero-bg-wave canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#pq-audit-page .hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 48px 0 48px;
}

#pq-audit-page .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid rgba(0,229,255,.3);
  border-radius: 100px;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
  background: rgba(0,229,255,.05);
  animation: pqFadeInUp .8s ease-out;
}

#pq-audit-page .hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pqBlink 2s infinite;
}

@keyframes pqBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .3; }
}

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

#pq-audit-page .hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  animation: pqFadeInUp .8s ease-out .1s both;
}

#pq-audit-page .hero h1 span {
  background: linear-gradient(135deg, var(--cyan), var(--blue-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#pq-audit-page .hero p {
  font-size: 1.15rem;
  color: var(--pq-gray);
  max-width: 560px;
  animation: pqFadeInUp .8s ease-out .2s both;
}

#pq-audit-page .hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: pqFadeInUp .8s ease-out .3s both;
}

/* ── Buttons ── */
#pq-audit-page .pq-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 6px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: all .3s ease;
  cursor: pointer;
  border: none;
}

#pq-audit-page .pq-btn-primary {
  background: #0076ef;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,118,239,.3);
}

#pq-audit-page .pq-btn-primary:hover {
  background: #0076ef;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,118,239,.4);
  color: #fff;
  text-decoration: none;
}

#pq-audit-page .pq-btn-outline {
  background: transparent;
  color: var(--pq-white);
  border: 1px solid var(--slate);
}

#pq-audit-page .pq-btn-outline:hover {
  border-color: #0076ef;
  color: #0076ef;
  background: rgba(0,118,239,.06);
  text-decoration: none;
}

/* ═══════════════════════════════════════
   SECTION STYLES
   ═══════════════════════════════════════ */
#pq-audit-page .pq-section {
  padding: 100px 0;
}

#pq-audit-page .section-label {
  font-family: var(--font-head);
  font-size: 18px;
  line-height: 23px;
  font-weight: 500;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

#pq-audit-page .section-label::before {
  content: '';
  width: 40px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

#pq-audit-page .section-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

#pq-audit-page .section-desc {
  color: #fff;
  font-size: 1.05rem;
  max-width: 640px;
  margin-bottom: 48px;
}

/* ═══════════════════════════════════════
   PROBLEMS
   ═══════════════════════════════════════ */
#pq-audit-page .problems {
  background: #f4f5fd;
  position: relative;
}

#pq-audit-page .problems .section-label { color: var(--pq-blue); }
#pq-audit-page .problems .section-title { color: var(--navy); }
#pq-audit-page .problems .section-desc  { color: #4a5568; }

#pq-audit-page .problems-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

#pq-audit-page .problem-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  padding: 32px 28px;
  transition: all .35s ease;
  position: relative;
}

#pq-audit-page .problem-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,.08);
}

#pq-audit-page .problem-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: #e8f0fe;
}

#pq-audit-page .problem-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--pq-blue);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#pq-audit-page .problem-card h3 {
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--navy);
}

#pq-audit-page .problem-card p {
  color: #5a6a7e;
  font-size: .92rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════
   TECHNOLOGY
   ═══════════════════════════════════════ */
#pq-audit-page .technology {
  background: #080808;
  position: relative;
  overflow: hidden;
}

#pq-audit-page .technology > .container {
  position: relative;
  z-index: 2;
}

#pq-audit-page .technology::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,229,255,.2), transparent);
}

#pq-audit-page .tech-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: center;
}

#pq-audit-page .tech-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

#pq-audit-page .tech-feature {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 24px;
  background: var(--navy);
  border: 1px solid rgba(0,118,239,.39);
  border-radius: 14px;
  transition: all .4s ease;
}

#pq-audit-page .tech-feature:hover {
  border-color: #0076ef;
  transform: translateY(-4px);
}

#pq-audit-page .tech-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--navy);
  border: 1px solid rgba(0,118,239,.39);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  color: #fff;
  font-size: 1rem;
  transition: all .4s ease;
}

#pq-audit-page .tech-feature:hover .tech-num {
  border-color: #0076ef;
  box-shadow: 0 0 16px rgba(0,118,239,.25);
}

#pq-audit-page .tech-feature h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

#pq-audit-page .tech-feature p {
  color: var(--pq-gray);
  font-size: .93rem;
}

#pq-audit-page .tech-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  background: rgba(0,229,255,.1);
  color: #fff;
  margin-top: 8px;
}

/* ── Device (Elspec Analyzer) ── */
#pq-audit-page .device-side {
  display: flex;
  justify-content: center;
  position: relative;
}

#pq-audit-page .device-glow-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0,170,255,.15) 0%, rgba(0,0,0,0) 70%);
  z-index: 1;
  pointer-events: none;
}

#pq-audit-page .device-img {
  width: 100%;
  max-width: 380px;
  height: auto;
  animation: pqFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(0,170,255,.4))
          drop-shadow(0 0 60px rgba(0,100,255,.2));
  transition: filter .3s ease, transform .3s ease;
  cursor: pointer;
  z-index: 2;
  position: relative;
}

#pq-audit-page .device-img:hover {
  animation-play-state: paused;
  transform: scale(1.02);
  filter: drop-shadow(0 0 30px rgba(0,220,255,.8))
          drop-shadow(0 0 90px rgba(0,100,255,.4));
}

@keyframes pqFloat {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-20px); }
  100% { transform: translateY(0); }
}

/* ═══════════════════════════════════════
   REPORT
   ═══════════════════════════════════════ */
#pq-audit-page .report {
  background: #f4f5fd;
  padding-top: 0px;
}

#pq-audit-page .report .section-label { color: var(--pq-blue); }
#pq-audit-page .report .section-title { color: #080808; }
#pq-audit-page .report .section-desc  { color: #4a5568; }

#pq-audit-page .report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

#pq-audit-page .report-item {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  padding: 28px 24px;
  transition: all .35s ease;
  position: relative;
}

#pq-audit-page .report-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,.08);
}

#pq-audit-page .report-item .ri-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: #e8f0fe;
}

#pq-audit-page .report-item .ri-icon svg {
  width: 24px;
  height: 24px;
  stroke: #0076ef;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#pq-audit-page .report-item h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
  color: #080808;
}

#pq-audit-page .report-item p {
  color: #5a6a7e;
  font-size: 1rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════
   SOLUTIONS
   ═══════════════════════════════════════ */
#pq-audit-page .solutions {
  background: #080808;
  position: relative;
  overflow: hidden;
}

#pq-audit-page .solutions > .container {
  position: relative;
  z-index: 2;
}

#pq-audit-page .solutions::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,118,239,.2), transparent);
}

#pq-audit-page .solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

#pq-audit-page a.solution-card {
  text-decoration: none;
}

#pq-audit-page .solution-card {
  background: #080808;
  border: 1px solid rgba(0,118,239,.39);
  border-radius: 14px;
  padding: 32px 28px;
  transition: all .35s ease;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr auto;
  align-items: end;
  min-height: 180px;
}

#pq-audit-page .solution-card:hover {
  border-color: #0076ef;
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,.3);
}

#pq-audit-page .solution-card .sc-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,118,239,.1);
  grid-column: 1 / -1;
  grid-row: 1;
}

#pq-audit-page .solution-card .sc-icon svg {
  width: 26px;
  height: 26px;
  stroke: #0076ef;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#pq-audit-page .solution-card .sc-product-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  grid-column: 1 / -1;
  grid-row: 1;
}

#pq-audit-page .solution-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  margin-top: 24px;
  margin-bottom: 0;
  color: #fff;
  grid-column: 1;
  grid-row: 2;
  align-self: center;
}

#pq-audit-page .solution-card .sc-arrow {
  transition: all .3s ease;
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  padding-left: 8px;
  margin-top: 24px;
  display: flex;
}
#pq-audit-page .solution-card .sc-arrow svg {
  width: 32px;
  height: auto;
  fill: rgba(255,255,255);
  transition: all .3s ease;
}

#pq-audit-page .solution-card:hover .sc-arrow svg {
  fill: #0076ef;
}
#pq-audit-page .solution-card:hover .sc-arrow {
  transform: translateX(4px);
}

#pq-audit-page .sol-cta-box {
  padding: 56px 0 0;
  margin-top: 56px;
  text-align: left;
}

#pq-audit-page .sol-cta-box h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2rem;
  margin-bottom: 16px;
  color: #fff;
}

#pq-audit-page .sol-cta-box p {
  color: var(--pq-gray);
  margin-bottom: 32px;
  font-size: 1rem;
  max-width: 540px;
}

#pq-audit-page .sol-cta-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

@media (min-width: 768px) {
  #pq-audit-page .sol-cta-links {
    flex-direction: row;
    align-items: flex-start;
  }
  #pq-audit-page .sol-cta-links .pq-btn {
    width: auto;
  }
}

#pq-audit-page .sol-cta-links .pq-btn {
  width: auto;
  justify-content: center;
  text-align: center;
}

/* ═══════════════════════════════════════
   PROCESS
   ═══════════════════════════════════════ */
#pq-audit-page .process {
  background: #f4f5fd;
  padding-top: 0px;
}

#pq-audit-page .process .section-label { color: var(--pq-blue); }
#pq-audit-page .process .section-title { color: #080808; }

#pq-audit-page .process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

#pq-audit-page .process-steps::before {
  content: '';
  position: absolute;
  top: 29px;
  left: calc(12.5% + 12px);
  right: calc(12.5% + 12px);
  height: 2px;
  background: linear-gradient(90deg, var(--pq-blue), #0076ef, var(--pq-blue), #0076ef);
  opacity: .2;
}

#pq-audit-page .step {
  text-align: center;
  position: relative;
  z-index: 1;
}

#pq-audit-page .step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  border: 2px solid #0076ef;
  color: #0076ef;
  background: #f4f5fd;
}

#pq-audit-page .step h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 8px;
  color: #080808;
}

#pq-audit-page .step p {
  color: #5a6a7e;
  font-size: .85rem;
  line-height: 1.55;
}

/* ═══════════════════════════════════════
   CALCULATOR
   ═══════════════════════════════════════ */
#pq-audit-page .calculator {
  background: #f4f5fd;
  position: relative;
  overflow: hidden;
}

#pq-audit-page .calculator .section-label { color: var(--pq-blue); }
#pq-audit-page .calculator .section-title { color: var(--navy); }
#pq-audit-page .calculator .section-desc  { color: #4a5568; }

#pq-audit-page .calculator .pq-btn-outline {
  color: var(--navy);
  border-color: rgba(0,0,0,.15);
}

#pq-audit-page .calculator .pq-btn-outline:hover {
  border-color: #0076ef;
  color: #0076ef;
  background: rgba(0,118,239,.06);
}

#pq-audit-page .calculator > .container {
  position: relative;
  z-index: 2;
}

#pq-audit-page .pq-glow-bg--calc {
  top: -200px;
  left: -600px;
}

/* ── Calc blocks ── */
#pq-audit-page .calc-block {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

#pq-audit-page .calc-block-header {
  padding: 28px 28px 0;
}

#pq-audit-page .calc-block-header h3 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: var(--navy);
  margin: 0;
  line-height: 1.2;
}

/* Header text stays white on blue/green gradient backgrounds */

#pq-audit-page .calc-block-header--blue {
  background: transparent;
}

#pq-audit-page .calc-block-header--green {
  background: transparent;
}

#pq-audit-page .calc-block-body {
  padding: 28px;
}

/* ── Inputs ── */
#pq-audit-page .calc-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

#pq-audit-page .calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#pq-audit-page .calc-input-group label {
  font-weight: 600;
  color: #080808;
  font-size: 1rem;
}

#pq-audit-page .calc-input-group input,
#pq-audit-page .calc-input-group select {
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: #fff;
  color: #080808;
  transition: border-color .3s;
}

#pq-audit-page .calc-input-group input:focus,
#pq-audit-page .calc-input-group select:focus {
  outline: none;
  border-color: #0076ef;
  box-shadow: 0 0 0 3px rgba(0,118,239,.15);
}

#pq-audit-page .calc-input-group small {
  color: #6c7a8d;
  font-size: 1rem;
}

/* ── K-factor ── */
#pq-audit-page .calc-kfactor {
  background: rgba(0,118,239,.08);
  border-left: 3px solid #0076ef;
  border-radius: 0 10px 10px 0;
  padding: 20px;
  margin-top: 8px;
}

#pq-audit-page .calc-kfactor-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

#pq-audit-page .calc-kfactor strong {
  color: #0076ef;
  font-size: 1rem;
}

#pq-audit-page .calc-kfactor p {
  color: #000;
  font-size: 1rem;
  margin-top: 4px;
}

#pq-audit-page .calc-kfactor-value {
  background: #fff;
  border: 2px solid #0076ef;
  border-radius: 8px;
  padding: 10px 22px;
}

#pq-audit-page .calc-kfactor-value span {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0076ef;
  font-family: var(--font-head);
}

#pq-audit-page .calc-kfactor-hint {
  color: #6c7a8d;
  font-size: .8rem;
  margin-top: 12px;
  line-height: 1.5;
}

/* ── Warning ── */
#pq-audit-page .calc-warning {
  background: rgba(255,193,7,.08);
  border-left: 3px solid #e6a800;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #8a6d00;
  font-size: .85rem;
  line-height: 1.5;
  display: none;
}

#pq-audit-page .calc-warning.show {
  display: block;
}

/* ── Results Grid (data + chart) ── */
#pq-audit-page .calc-results-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 0;
  align-items: stretch;
  margin-bottom: 20px;
}

#pq-audit-page .calc-results-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto 1fr;
  gap: 0 16px;
  align-items: stretch;
}

/* ── Left: Reactive energy ── */
#pq-audit-page .calc-result-left {
  text-align: center;
  padding: 24px;
  padding-top: 30px;
  background: rgba(0,0,0,.03);
  border-radius: 12px;
  display: grid;
  grid-row: 1 / -1;
  grid-template-rows: subgrid;
}

/* ── Center: Transformer group ── */
#pq-audit-page .calc-result-trans-group {
  padding: 24px;
  padding-top: 30px;
  background: rgba(0,0,0,.03);
  border-radius: 12px;
  display: grid;
  grid-row: 1 / -1;
  grid-template-rows: subgrid;
}

#pq-audit-page .calc-trans-group-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #080808;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
  margin-bottom: 12px;
}

#pq-audit-page .calc-trans-group-sum {
  text-align: center;
  margin-bottom: 16px;
}

#pq-audit-page .calc-trans-group-sum strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0076ef;
  font-family: var(--font-head);
}

#pq-audit-page .calc-trans-group-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

#pq-audit-page .calc-trans-group-item {
  text-align: center;
  padding: 8px 0px;
}

#pq-audit-page .calc-trans-group-item .calc-metric-value {
  color: #080808;
  font-size: 1.1rem;
}

#pq-audit-page .calc-trans-group-item .calc-metric-label {
  font-size: .75rem;
  margin-bottom: 6px;
  text-align: center;
}

#pq-audit-page .calc-trans-group-item .calc-metric-unit {
  font-size: .85rem;
}

#pq-audit-page .calc-trans-group-item .calc-metric-pct {
  display: block;
  font-size: .75rem;
  color: #4a5568;
  margin-top: 4px;
}

/* ── Shared metric typography ── */
#pq-audit-page .calc-metric-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: #080808;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
  text-align: center;
}

#pq-audit-page .calc-metric-value {
  display: inline;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0076ef;
  font-family: var(--font-head);
  line-height: 1.7;
}

#pq-audit-page .calc-metric-unit {
  display: inline;
  font-size: 1rem;
  color: #4a5568;
  font-weight: 500;
  margin-left: 4px;
}

#pq-audit-page .calc-metric-pct {
  display: block;
  font-size: 1rem;
  color: #4a5568;
  margin-top: 8px;
  text-align: center;
}

/* Smaller text inside transformer sub-items */
#pq-audit-page .calc-trans-group-item .calc-metric-label {
  font-size: .75rem;
  margin-bottom: 6px;
}

#pq-audit-page .calc-trans-group-item .calc-metric-value {
  font-size: 1.15rem;
}

#pq-audit-page .calc-trans-group-item .calc-metric-unit {
  font-size: 1rem;
}

#pq-audit-page .calc-trans-group-item .calc-metric-pct {
  font-size: 1rem;
  margin-top: 4px;
  color: #4a5568;
}

/* ── Results Chart ── */
#pq-audit-page .calc-results-chart {
  position: relative;
  background: transparent;
  border-radius: 12px;
  padding: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#pq-audit-page .calc-results-chart canvas {
  max-height: 100%;
  max-width: 100%;
}

/* ── Total Bar ── */
#pq-audit-page .calc-total-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding: 16px 0px;
  border-top: 1px solid rgba(0,0,0,.08);
}

#pq-audit-page .calc-total-bar span {
  color: #080808;
  font-size: .9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}

#pq-audit-page .calc-total-bar strong {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0076ef !important;
  font-family: var(--font-head);
}

/* ── Solution type selector ── */
#pq-audit-page .calc-solution-type {
  background: rgba(0,118,239,.08);
  border-left: 3px solid #0076ef;
  border-radius: 0 10px 10px 0;
  padding: 20px;
  margin-bottom: 24px;
}

#pq-audit-page .calc-solution-type h4 {
  color: #0076ef;
  font-family: var(--font-head);
  margin-bottom: 14px;
}

#pq-audit-page .calc-solution-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#pq-audit-page .calc-solution-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 8px;
  cursor: pointer;
  transition: all .3s;
}

#pq-audit-page .calc-solution-option:hover {
  border-color: #0076ef;
}

#pq-audit-page .calc-solution-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid rgba(0,0,0,.3);
  border-radius: 50%;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
  background: #fff;
  transition: all .3s;
  display: grid;
  place-content: center;
}

#pq-audit-page .calc-solution-option input[type="radio"]::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0076ef;
  transform: scale(0);
  transition: transform .2s;
}

#pq-audit-page .calc-solution-option input[type="radio"]:checked {
  border-color: #fff;
  background: transparent;
}

#pq-audit-page .calc-solution-option input[type="radio"]:checked::after {
  transform: scale(1);
  background: #fff;
}

/* Active (selected) option */
#pq-audit-page .calc-solution-option:has(input:checked) {
  background: linear-gradient(135deg, #0076ef 0%, #0076ef 100%);
  border-color: #0076ef;
}

#pq-audit-page .calc-solution-option:has(input:checked) strong {
  color: #fff;
}

#pq-audit-page .calc-solution-option:has(input:checked) span {
  color: rgba(255,255,255,.85);
}

/* Inactive option */
#pq-audit-page .calc-solution-option strong {
  display: block;
  color: #080808;
  font-size: .92rem;
  margin-bottom: 2px;
}

#pq-audit-page .calc-solution-option span {
  color: #0076ef;
  font-size: 1rem;
  font-weight: bold;
}

/* ── Info boxes ── */
#pq-audit-page .calc-info-box {
  border-radius: 0 10px 10px 0;
  padding: 18px 20px;
  margin-bottom: 20px;
}

#pq-audit-page .calc-info-box h4 {
  margin-bottom: 10px;
  font-size: .95rem;
}

#pq-audit-page .calc-info-box ul {
  margin-left: 18px;
  line-height: 1.8;
  font-size: .88rem;
}

#pq-audit-page .calc-info-box p {
  font-size: 1rem;
  line-height: 1.6;
}

#pq-audit-page .calc-info-box--warning {
  background: transparent;
  border-left: 3px solid rgba(0,0,0,.12);
  color: #4a5568;
}

#pq-audit-page .calc-info-box--warning h4 { color: #080808; }

#pq-audit-page .calc-info-box--success {
  background: transparent;
  border-left: 3px solid rgba(0,0,0,.12);
  color: #4a5568;
}

#pq-audit-page .calc-info-box--success h4 { color: #080808; }

#pq-audit-page .calc-info-box--blue {
  background: rgba(0,118,239,.08);
  border-left: 3px solid #0076ef;
  color: #000;
}

#pq-audit-page .calc-info-box--blue strong { color: #0076ef; }

/* ── Metrics grid (used by savings) ── */
#pq-audit-page .calc-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

#pq-audit-page .calc-metric {
  text-align: left;
  padding: 20px 0px;
  position: relative;
}

/* Dividers between metric columns/rows removed */

/* ── Savings metrics variant ── */
#pq-audit-page .calc-metrics--savings {
  margin-top: 20px;
  gap: 16px;
}

#pq-audit-page .calc-metrics--savings .calc-metric {
  text-align: center;
  padding: 24px;
  padding-top: 30px;
  background: rgba(0,0,0,.03);
  border-radius: 12px;
}

#pq-audit-page .calc-metrics--savings .calc-metric-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 12px;
}

#pq-audit-page .calc-metrics--savings .calc-metric-unit {
  display: block;
  margin-left: 0;
  margin-top: 6px;
}
/* ── Total bar savings variant ── */
#pq-audit-page .calc-total-bar--savings {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 16px;
}

#pq-audit-page .calc-total-bar--savings .calc-total-bar-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

#pq-audit-page .calc-total-bar--savings .calc-total-bar-item span {
  text-transform: uppercase;
  letter-spacing: .03em;
}

#pq-audit-page .calc-total-bar-divider {
  width: 1px;
  height: 32px;
  background: rgba(0,0,0,.1);
  margin: 0 24px;
  flex-shrink: 0;
}

/* ── Collapsible ── */
#pq-audit-page .calc-collapsible {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

#pq-audit-page .calc-collapsible-header {
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .3s;
  user-select: none;
  background: rgba(0,118,239,.08);
  border-left: 3px solid #0076ef;
}

#pq-audit-page .calc-collapsible-header:hover {
  background: rgba(0,118,239,.14);
}

#pq-audit-page .calc-collapsible-header strong {
  color: #0076ef;
  font-size: 1rem;
}

#pq-audit-page .calc-collapsible-icon {
  color: #0076ef;
  font-size: 1.2rem;
  transition: transform .3s;
}

#pq-audit-page .calc-collapsible-icon.open {
  transform: rotate(180deg);
}

#pq-audit-page .calc-collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
  padding: 0 22px;
}

#pq-audit-page .calc-collapsible-content.open {
  padding: 20px 22px;
}

#pq-audit-page .calc-collapsible-content ul {
  line-height: 1.8;
  margin-left: 18px;
  color: #000;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#pq-audit-page .calc-collapsible-content strong {
  color: #0076ef;
}

/* ═══════════════════════════════════════
   CALCULATOR WIZARD STEPS
   ═══════════════════════════════════════ */

/* Step navigation indicators */
#pq-audit-page .calc-steps-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}

#pq-audit-page .calc-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all .3s;
}

#pq-audit-page .calc-step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font-head);
  background: #fff;
  border: 2px solid rgba(0,118,239,.25);
  color: #6c7a8d;
  transition: all .4s cubic-bezier(.22,1,.36,1);
}

#pq-audit-page .calc-step-label {
  font-size: .78rem;
  color: #6c7a8d;
  font-weight: 600;
  transition: color .3s;
  white-space: nowrap;
}

#pq-audit-page .calc-step-line {
  width: 80px;
  height: 2px;
  background: rgba(0,118,239,.15);
  margin: 0 12px;
  margin-bottom: 28px;
  transition: background .4s;
}

/* Active step */
#pq-audit-page .calc-step-dot.active .calc-step-num {
  background: var(--pq-blue);
  border-color: var(--pq-blue);
  color: #fff;
  box-shadow: 0 0 20px rgba(0,118,239,.4);
}

#pq-audit-page .calc-step-dot.active .calc-step-label {
  color: #080808;
}

/* Completed step */
#pq-audit-page .calc-step-dot.completed .calc-step-num {
  background: #0076ef;
  border-color: #0076ef;
  color: #fff;
  box-shadow: 0 0 16px rgba(49,157,73,.3);
}

#pq-audit-page .calc-step-dot.completed .calc-step-label {
  color: #9aa5b4;
}

#pq-audit-page .calc-step-line.completed {
  background: #0076ef;
}

/* Wizard step panels */
#pq-audit-page .calc-wizard-step {
  display: none;
  animation: calcStepFadeIn .5s cubic-bezier(.22,1,.36,1);
}

#pq-audit-page .calc-wizard-step.active {
  display: block;
}

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

/* Navigation buttons */
#pq-audit-page .calc-nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 16px;
}

#pq-audit-page .calc-nav-buttons .pq-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#pq-audit-page .calc-btn-next svg,
#pq-audit-page .calc-btn-back svg {
  width: 30px;
  height: 18px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   CTA FINAL
   ═══════════════════════════════════════ */
#pq-audit-page .cta-final {
  background: #080808;
  text-align: left;
  position: relative;
  overflow: hidden;
}

#pq-audit-page .cta-final::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(255,143,0,.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0,229,255,.04) 0%, transparent 50%);
  pointer-events: none;
}

#pq-audit-page .cta-final .container {
  position: relative;
  z-index: 2;
}

#pq-audit-page .cta-final .section-title {
  margin: 0 0 16px;
}

#pq-audit-page .cta-final .section-desc {
  margin: 0 0 40px;
  text-align: left;
}

#pq-audit-page .cta-actions {
  display: flex;
  justify-content: left;
  gap: 16px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════
   MODAL CONTACT FORM
   ═══════════════════════════════════════ */
#pq-audit-page .pq-form-wrapper {
  display: inline-block;
}

#pq-audit-page .pq-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

#pq-audit-page .pq-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#pq-audit-page .pq-modal {
  max-width: 570px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: #13152e;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  padding: 32px 28px;
  transform: translateY(20px);
  transition: transform .3s;
}

#pq-audit-page .pq-modal-overlay.open .pq-modal {
  transform: translateY(0);
}

#pq-audit-page .pq-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

#pq-audit-page .pq-modal-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 24px;
}

#pq-audit-page .pq-modal-header h4 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  margin: 0;
}

#pq-audit-page .pq-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.1);
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  line-height: 1;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}

#pq-audit-page .pq-modal-close:hover {
  background: rgba(255,255,255,.2);
  color: #fff;
}

#pq-audit-page .pq-form-group {
  margin-bottom: 16px;
}

#pq-audit-page .pq-form-group label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  margin-bottom: 6px;
}

#pq-audit-page .pq-required {
  color: #ef4444;
}

#pq-audit-page .pq-form-group input,
#pq-audit-page .pq-form-group select,
#pq-audit-page .pq-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.06);
  transition: border-color .3s;
  outline: none;
  -webkit-appearance: none;
}

#pq-audit-page .pq-form-group input::placeholder,
#pq-audit-page .pq-form-group textarea::placeholder {
  color: rgba(255,255,255,.3);
}

#pq-audit-page .pq-form-group input:focus,
#pq-audit-page .pq-form-group select:focus,
#pq-audit-page .pq-form-group textarea:focus {
  border-color: #0076ef;
}

#pq-audit-page .pq-form-group select {
  cursor: pointer;
  color: rgba(255,255,255,.3);
}

#pq-audit-page .pq-form-group select.pq-selected {
  color: rgba(255,255,255,.82);
}

#pq-audit-page .pq-form-group select option {
  background: #fff;
  color: #080808;
}

#pq-audit-page .pq-form-group textarea {
  resize: none;
  height: 88px;
}

#pq-audit-page .pq-form-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0076ef;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 14px;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
  transition: background .2s;
}

#pq-audit-page .pq-form-submit:hover {
  background: #005fc4;
}

#pq-audit-page .pq-form-note {
  font-size: 1rem;
  color: rgba(255,255,255,.4);
  text-align: center;
  margin-top: 12px;
}

/* ═══════════════════════════════════════
   SCROLL REVEAL
   ═══════════════════════════════════════ */
#pq-audit-page .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all .7s cubic-bezier(.22,1,.36,1);
}

#pq-audit-page .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 960px) {
  #pq-audit-page .tech-layout           { grid-template-columns: 1fr; }
  #pq-audit-page .device-side           { order: -1; margin-bottom: 16px; }
  #pq-audit-page .device-img            { max-width: 280px; }
  #pq-audit-page .problems-grid         { grid-template-columns: repeat(2, 1fr); }
  #pq-audit-page .tech-features         { grid-template-columns: 1fr; }
  #pq-audit-page .solutions-grid        { grid-template-columns: repeat(2, 1fr); }
  #pq-audit-page .process-steps         { grid-template-columns: 1fr 1fr; gap: 32px; }
  #pq-audit-page .process-steps::before { display: none; }
  #pq-audit-page .calc-solution-options  { grid-template-columns: 1fr; }
  #pq-audit-page .calc-results-grid      { grid-template-columns: 1fr; }
  #pq-audit-page .calc-results-chart     { grid-column: auto; height: 220px; }
  #pq-audit-page .calc-trans-group-items  { grid-template-columns: 1fr; }
  #pq-audit-page .calc-metrics           { grid-template-columns: repeat(2, 1fr); }
  #pq-audit-page .calc-step-line         { width: 50px; }
}

@media (max-width: 640px) {
  #pq-audit-page .hero-content          { padding: 100px 0 60px; }
  #pq-audit-page .problems-grid         { grid-template-columns: 1fr; }
  #pq-audit-page .solutions-grid        { grid-template-columns: 1fr; }
  #pq-audit-page .process-steps         { grid-template-columns: 1fr; }
  #pq-audit-page .pq-section            { padding: 48px 0; }
  #pq-audit-page .hero-actions          { flex-direction: column; }
  #pq-audit-page .pq-btn                { width: 100%; justify-content: center; }
  #pq-audit-page .calc-block-header     { padding: 20px 16px 0; }
  #pq-audit-page .calc-block-body       { padding: 16px; }
  #pq-audit-page .calc-results-data     { grid-template-columns: 1fr; grid-template-rows: none; gap: 12px; }
  #pq-audit-page .calc-result-left      { padding: 10px 0px; grid-row: auto; display: block; }
  #pq-audit-page .calc-result-trans-group { padding: 10px 0px; grid-row: auto; display: block; }
  #pq-audit-page .calc-trans-group-item { padding: 6px 0px; }
  #pq-audit-page .calc-total-bar        { padding: 12px 0px; }
  #pq-audit-page .calc-kfactor-row       { flex-direction: column; text-align: center; }
  #pq-audit-page .calc-total-bar strong  { font-size: 1.2rem; }
  #pq-audit-page .calc-total-bar         { flex-direction: column; gap: 6px; align-items: flex-start; }
  #pq-audit-page .calc-total-bar--savings { flex-direction: column; gap: 0; }
  #pq-audit-page .calc-total-bar--savings .calc-total-bar-item { padding: 12px 0; }
  #pq-audit-page .calc-total-bar-divider { width: 100%; height: 1px; margin: 0; }
  #pq-audit-page .calc-results-chart      { height: 200px; }
  #pq-audit-page .calc-metrics            { grid-template-columns: 1fr; }
  #pq-audit-page .calc-metric             { padding: 12px 0px; border-bottom: 1px solid rgba(0,0,0,.05); }
  #pq-audit-page .calc-metric:last-child  { border-bottom: none; }
  #pq-audit-page .calc-metric-value      { font-size: 1.2rem; }
  #pq-audit-page .calc-step-line         { width: 30px; margin: 0 6px; }
  #pq-audit-page .calc-step-label        { font-size: .7rem; }
  #pq-audit-page .calc-step-num          { width: 36px; height: 36px; font-size: .85rem; }
  #pq-audit-page .calc-nav-buttons       { flex-direction: column; }
  #pq-audit-page .calc-nav-buttons .pq-btn { width: 100%; justify-content: center; }
}
