/**
 * WebFixHQ Fix Page Styles — fix-page.css
 *
 * Loaded ONLY on wfhq_fix single pages via conditional enqueue in
 * webfixhq-core.php. Zero impact on any other page on the site.
 *
 * CHANGES FROM ORIGINAL (4 only):
 *   1. Theme container reset — fixes mobile left-gap shift
 *   2. Manrope 700/800 loaded + headings switched to bold
 *   3. Grid columns use minmax(0,1fr) instead of 1fr
 *   4. Sticky bar covers both __inner and __cta on mobile
 *
 * @package WebFixHQ
 */

/* ─── Design tokens ──────────────────────────────────────────────────────────── */

:root {
  --wfhq-green:          #1D9E75;
  --wfhq-green-dark:     #167A5B;
  --wfhq-green-light:    #EAF3DE;
  --wfhq-green-text:     #3B6D11;
  --wfhq-danger:         #E24B4A;
  --wfhq-danger-light:   #FCEBEB;
  --wfhq-danger-text:    #A32D2D;
  --wfhq-warning:        #BA7517;
  --wfhq-warning-light:  #FAEEDA;
  --wfhq-info:           #185FA5;
  --wfhq-info-light:     #E6F1FB;
  --wfhq-bg:             #F7F8FA;
  --wfhq-surface:        #FFFFFF;
  --wfhq-surface-raised: #F0F2F5;
  --wfhq-text-primary:   #1A1A1A;
  --wfhq-text-secondary: #555E6C;
  --wfhq-text-tertiary:  #8A909B;
  --wfhq-border:         #E4E7EC;
  --wfhq-border-strong:  #CDD1D8;
  --wfhq-font-sans:      'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --wfhq-font-serif:     'Instrument Serif', Georgia, 'Times New Roman', serif;
  --wfhq-section-gap:    44px;
  --wfhq-body-max:       760px;
  --wfhq-body-pad:       40px;
  --wfhq-radius-sm:      4px;
  --wfhq-radius-md:      8px;
  --wfhq-radius-lg:      12px;
  --wfhq-radius-pill:    99px;
  --wfhq-sticky-height:  64px;
}

/* CHANGE 2: added 700;800 weights for bold headings */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ─── Page base ──────────────────────────────────────────────────────────────── */

.wfhq-fix-page,
.wfhq-fix-page body {
  background: var(--wfhq-bg);
  color: var(--wfhq-text-primary);
  font-family: var(--wfhq-font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* CHANGE 1: theme container reset — removes theme padding/margin that caused
   the entire page to shift sideways on mobile */
.wfhq-fix-page .site-content,
.wfhq-fix-page main,
.wfhq-fix-page #primary,
.wfhq-fix-page #content,
.wfhq-fix-page .entry-content,
.wfhq-fix-page .post-content,
.wfhq-fix-page article,
.wfhq-fix-page .hentry {
  padding-bottom: calc(var(--wfhq-sticky-height) + 24px);
  padding-left:   0 !important;
  padding-right:  0 !important;
  margin-left:    0 !important;
  margin-right:   0 !important;
  max-width:      100% !important;
  width:          100% !important;
  float:          none !important;
}

/* ─── Hero section ───────────────────────────────────────────────────────────── */

.wfhq-hero {
  background: var(--wfhq-surface);
  border-bottom: 1px solid var(--wfhq-border);
  padding: 52px var(--wfhq-body-pad) 48px;
}

.wfhq-hero__inner {
  max-width: var(--wfhq-body-max);
  margin: 0 auto;
}

.wfhq-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--wfhq-radius-pill);
  background: var(--wfhq-warning-light);
  color: var(--wfhq-warning);
  margin-bottom: 20px;
}

.wfhq-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wfhq-warning);
  animation: wfhq-pulse 1.4s ease-in-out infinite;
}

@keyframes wfhq-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

/* CHANGE 2: Manrope 800 instead of Instrument Serif 400 */
.wfhq-hero__title {
  font-family: var(--wfhq-font-sans);
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  color: var(--wfhq-text-primary);
  margin: 0 0 16px;
}

.wfhq-hero__title em {
  font-style: italic;
  color: var(--wfhq-green);
}

.wfhq-hero__sub {
  font-size: 16px;
  color: var(--wfhq-text-secondary);
  max-width: 560px;
  line-height: 1.65;
  margin: 0 0 24px;
}

.wfhq-hero__meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.wfhq-meta-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--wfhq-text-secondary);
}

.wfhq-meta-pill__icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--wfhq-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wfhq-meta-pill__icon svg {
  width: 10px;
  height: 10px;
  stroke: var(--wfhq-green-text);
  fill: none;
  stroke-width: 2.5;
}

/* ─── Body wrapper ───────────────────────────────────────────────────────────── */

.wfhq-body {
  max-width: var(--wfhq-body-max);
  margin: 0 auto;
  padding: 0 var(--wfhq-body-pad) var(--wfhq-section-gap);
}

/* ─── Section base ───────────────────────────────────────────────────────────── */

.wfhq-section {
  padding: var(--wfhq-section-gap) 0;
  border-bottom: 1px solid var(--wfhq-border);
}

.wfhq-section:last-of-type {
  border-bottom: none;
}

.wfhq-section__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--wfhq-text-tertiary);
  margin: 0 0 14px;
}

/* CHANGE 2: Manrope 700 instead of Instrument Serif 400 */
.wfhq-section__title {
  font-family: var(--wfhq-font-sans);
  font-size: clamp(19px, 3.5vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--wfhq-text-primary);
  margin: 0 0 18px;
}

.wfhq-section__body {
  font-size: 15px;
  color: var(--wfhq-text-secondary);
  line-height: 1.75;
}

.wfhq-section__body p { margin: 0 0 1em; }
.wfhq-section__body p:last-child { margin-bottom: 0; }

/* ─── Symptoms grid ──────────────────────────────────────────────────────────── */

/* CHANGE 3: minmax(0,1fr) so columns never exceed available width */
.wfhq-symptoms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.wfhq-symptom {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--wfhq-surface-raised);
  border-radius: var(--wfhq-radius-md);
  font-size: 13px;
  color: var(--wfhq-text-primary);
  line-height: 1.5;
}

.wfhq-symptom__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  border-radius: var(--wfhq-radius-sm);
  background: var(--wfhq-danger-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wfhq-symptom__icon svg {
  width: 9px;
  height: 9px;
  stroke: var(--wfhq-danger-text);
  fill: none;
  stroke-width: 3;
}

/* ─── Related sub-pages grid (hub pages only) ────────────────────────────────── */

/* CHANGE 3: minmax(0,1fr) so columns never exceed available width */
.wfhq-related {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.wfhq-related__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--wfhq-surface);
  border: 1px solid var(--wfhq-border);
  border-radius: var(--wfhq-radius-md);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.wfhq-related__card:hover {
  border-color: var(--wfhq-green);
  box-shadow: 0 0 0 3px rgba(29, 158, 117, .08);
}

.wfhq-related__card--coming {
  opacity: .42;
  pointer-events: none;
  cursor: default;
}

.wfhq-related__text {
  font-size: 13px;
  font-weight: 500;
  color: var(--wfhq-text-primary);
  line-height: 1.4;
}

.wfhq-related__card:hover .wfhq-related__text { color: var(--wfhq-green); }

.wfhq-related__arrow {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--wfhq-surface-raised);
  border: 1px solid var(--wfhq-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}

.wfhq-related__card:hover .wfhq-related__arrow {
  background: var(--wfhq-green-light);
  border-color: var(--wfhq-green);
}

.wfhq-related__arrow svg {
  width: 9px;
  height: 9px;
  stroke: var(--wfhq-text-secondary);
  fill: none;
  stroke-width: 2.5;
}

.wfhq-related__card:hover .wfhq-related__arrow svg { stroke: var(--wfhq-green); }

.wfhq-hub-backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wfhq-green);
  text-decoration: none;
  margin-bottom: 8px;
}

.wfhq-hub-backlink svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.wfhq-hub-backlink:hover { color: var(--wfhq-green-dark); }

/* ─── Why it happens box ─────────────────────────────────────────────────────── */

.wfhq-why-box {
  background: var(--wfhq-surface-raised);
  border-radius: var(--wfhq-radius-lg);
  padding: 20px 22px;
  font-size: 14px;
  color: var(--wfhq-text-primary);
  line-height: 1.75;
  margin-top: 4px;
}

/* ─── DIY steps ──────────────────────────────────────────────────────────────── */

.wfhq-diy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.wfhq-diy__step {
  display: flex;
  gap: 18px;
  padding: 18px 20px;
  background: var(--wfhq-surface);
  border: 1px solid var(--wfhq-border);
  border-radius: var(--wfhq-radius-md);
}

.wfhq-diy__num {
  font-family: var(--wfhq-font-serif);
  font-size: 30px;
  font-weight: 400;
  color: var(--wfhq-border-strong);
  line-height: 1;
  min-width: 28px;
  margin-top: 2px;
  flex-shrink: 0;
}

.wfhq-diy__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--wfhq-text-primary);
  margin: 0 0 5px;
}

.wfhq-diy__body {
  font-size: 13px;
  color: var(--wfhq-text-secondary);
  line-height: 1.65;
  margin: 0;
}

.wfhq-code {
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
  font-size: 12px;
  background: var(--wfhq-surface-raised);
  border: 1px solid var(--wfhq-border);
  padding: 2px 7px;
  border-radius: var(--wfhq-radius-sm);
  color: var(--wfhq-text-primary);
  white-space: nowrap;
}

.wfhq-code-block {
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
  font-size: 12px;
  background: #1E1E2E;
  color: #CDD6F4;
  padding: 14px 16px;
  border-radius: var(--wfhq-radius-md);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
  margin: 10px 0 0;
}

/* ─── Inline CTA ─────────────────────────────────────────────────────────────── */

.wfhq-inline-cta {
  margin-top: 24px;
  padding: 24px 28px;
  border: 1px solid var(--wfhq-border-strong);
  border-radius: var(--wfhq-radius-lg);
  background: var(--wfhq-surface);
  text-align: center;
}

.wfhq-inline-cta__title {
  font-family: var(--wfhq-font-serif);
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--wfhq-text-primary);
}

.wfhq-inline-cta__sub {
  font-size: 14px;
  color: var(--wfhq-text-secondary);
  margin: 0 0 18px;
}

.wfhq-price-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--wfhq-green-text);
  background: var(--wfhq-green-light);
  padding: 4px 12px;
  border-radius: var(--wfhq-radius-pill);
  margin-bottom: 16px;
}

/* ─── CTA button ─────────────────────────────────────────────────────────────── */

.wfhq-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--wfhq-text-primary);
  color: var(--wfhq-surface);
  border-radius: var(--wfhq-radius-md);
  font-family: var(--wfhq-font-sans);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
  white-space: nowrap;
}

.wfhq-btn:hover { background: #333; transform: translateY(-1px); }
.wfhq-btn:active { transform: translateY(0); }

.wfhq-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  flex-shrink: 0;
}

.wfhq-btn--outline {
  background: transparent;
  color: var(--wfhq-text-primary);
  border: 1px solid var(--wfhq-border-strong);
}

.wfhq-btn--outline:hover { background: var(--wfhq-surface-raised); transform: translateY(-1px); }

/* ─── Process steps ──────────────────────────────────────────────────────────── */

.wfhq-process { display: flex; flex-direction: column; margin-top: 16px; }

.wfhq-process__step {
  display: flex;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--wfhq-border);
}

.wfhq-process__step:last-child { border-bottom: none; }

.wfhq-process__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--wfhq-radius-md);
  background: var(--wfhq-info-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wfhq-process__icon svg {
  width: 17px;
  height: 17px;
  stroke: var(--wfhq-info);
  fill: none;
  stroke-width: 2;
}

.wfhq-process__title { font-size: 13px; font-weight: 600; color: var(--wfhq-text-primary); margin: 0 0 4px; }
.wfhq-process__body  { font-size: 13px; color: var(--wfhq-text-secondary); line-height: 1.65; margin: 0; }

/* ─── Trust stats ────────────────────────────────────────────────────────────── */

/* CHANGE 3: minmax(0,1fr) */
.wfhq-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.wfhq-trust__item {
  padding: 18px 16px;
  background: var(--wfhq-surface-raised);
  border-radius: var(--wfhq-radius-md);
  text-align: center;
}

.wfhq-trust__val {
  font-family: var(--wfhq-font-serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--wfhq-text-primary);
  margin: 0 0 5px;
}

.wfhq-trust__label { font-size: 11px; color: var(--wfhq-text-secondary); line-height: 1.4; margin: 0; }

/* ─── Guarantee ──────────────────────────────────────────────────────────────── */

.wfhq-guarantee {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  margin-top: 18px;
  background: var(--wfhq-green-light);
  border-radius: var(--wfhq-radius-md);
}

.wfhq-guarantee__icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--wfhq-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wfhq-guarantee__icon svg { width: 17px; height: 17px; stroke: var(--wfhq-green); fill: none; stroke-width: 2.5; }
.wfhq-guarantee__title    { font-size: 13px; font-weight: 600; color: var(--wfhq-green-text); margin: 0 0 4px; }
.wfhq-guarantee__body     { font-size: 13px; color: var(--wfhq-green-text); opacity: .85; line-height: 1.65; margin: 0; }

/* ─── Link row ───────────────────────────────────────────────────────────────── */

.wfhq-link-row { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* ─── Sticky CTA bar ─────────────────────────────────────────────────────────── */

.wfhq-sticky {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--wfhq-surface);
  border-top: 1px solid var(--wfhq-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--wfhq-sticky-height);
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
  transform: translateY(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}

.wfhq-sticky--visible { transform: translateY(0); }

.wfhq-sticky__left { font-size: 13px; color: var(--wfhq-text-secondary); line-height: 1.4; }
.wfhq-sticky__left strong { color: var(--wfhq-text-primary); font-weight: 600; }
.wfhq-sticky__cta { flex-shrink: 0; }

/* ─── Utilities ──────────────────────────────────────────────────────────────── */

.wfhq-text-muted  { color: var(--wfhq-text-tertiary); }
.wfhq-text-green  { color: var(--wfhq-green); }

/* ─── Responsive — tablet (max 768px) ───────────────────────────────────────── */

@media (max-width: 768px) {
  :root {
    --wfhq-body-pad:    20px;
    --wfhq-section-gap: 32px;
  }

  .wfhq-hero    { padding: 36px var(--wfhq-body-pad) 32px; }
  .wfhq-symptoms { grid-template-columns: 1fr; }
  .wfhq-related  { grid-template-columns: 1fr; }
  .wfhq-trust    { grid-template-columns: 1fr 1fr; }
  .wfhq-diy__step     { padding: 14px 16px; }
  .wfhq-inline-cta    { padding: 20px 18px; }
  .wfhq-sticky        { padding: 12px 16px; gap: 12px; }
  .wfhq-sticky__left  { font-size: 12px; }
  .wfhq-hero__meta    { gap: 12px; }
}

/* ─── Responsive — mobile (max 480px) ───────────────────────────────────────── */

@media (max-width: 480px) {
  :root { --wfhq-sticky-height: 100px; }

  .wfhq-trust        { grid-template-columns: 1fr; }
  .wfhq-hero__title  { font-size: 26px; }

  .wfhq-link-row              { flex-direction: column; }
  .wfhq-link-row .wfhq-btn   { width: 100%; justify-content: center; }

  .wfhq-sticky {
    flex-direction: column;
    height: auto;
    padding: 12px 16px;
    gap: 8px;
    align-items: stretch;
    text-align: center;
  }

  /* CHANGE 4: covers both __inner and __cta */
  .wfhq-sticky__inner,
  .wfhq-sticky__cta               { width: 100%; display: flex; justify-content: center; }
  .wfhq-sticky__inner .wfhq-btn,
  .wfhq-sticky__cta .wfhq-btn    { width: 100%; justify-content: center; }
}

/* ─── Print ──────────────────────────────────────────────────────────────────── */

@media print {
  .wfhq-sticky       { display: none; }
  .wfhq-fix-page     { background: white; }
  .wfhq-hero         { border: none; padding: 24px 0; }
}

/* ─── Accessibility ──────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .wfhq-badge__dot                       { animation: none; }
  .wfhq-btn, .wfhq-related__card,
  .wfhq-sticky                           { transition: none; }
}

.wfhq-btn:focus-visible,
.wfhq-related__card:focus-visible,
.wfhq-hub-backlink:focus-visible {
  outline: 2px solid var(--wfhq-green);
  outline-offset: 3px;
}