/* ============================================================
   CNC-SYSTEM.COM — Clarity Fixes Stylesheet
   Based on Microsoft Clarity 30-day report (May-Jun 2026)
   Add <link> to this file in _header.php AFTER style.css
   Upload to: public_html/css/clarity-fixes.css
   ============================================================ */

/* ── FIX 1: STICKY CONTACT STRIP ─────────────────────────────
   Problem: 35.8% scroll depth — users never see bottom CTAs
   Solution: Persistent strip at very top of page (below header)
   Appears on scroll > 200px. Shows phone + WhatsApp instantly.
   ──────────────────────────────────────────────────────────── */
.clarity-sticky-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  isolation: auto;
  background: #1E3A8A;
  color: #fff;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.clarity-sticky-strip.visible {
  transform: translateY(0);
}
.clarity-sticky-strip a {
  color: #fff;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.3);
  transition: background .2s;
  min-height: 32px;
  font-size: 12px;
}
.clarity-sticky-strip a:hover { background: rgba(255,255,255,.15); }
.clarity-strip-phone { background: rgba(255,255,255,.1); }
.clarity-strip-wa    { background: #25D366; border-color: #25D366 !important; }
.clarity-strip-close {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  line-height: 1;
}
.clarity-strip-close:hover { color: #fff; }
.clarity-strip-text {
  display: none;
  color: rgba(255,255,255,.9);
}
@media(min-width: 480px) { .clarity-strip-text { display: inline; } }
/* Push site-header down when strip is visible */
.clarity-sticky-strip.visible ~ * .site-header,
body.strip-active .site-header {
  top: 40px;
}

/* ── FIX 2: AMC HIGHLIGHT BAND ────────────────────────────────
   Problem: AMC page gets only 29 sessions despite being CNC's
   highest-revenue service.
   Solution: Prominent "Did you know?" teaser banner on homepage
   and service pages, linking to /amc-and-services
   ──────────────────────────────────────────────────────────── */
.amc-teaser-band {
  background: linear-gradient(135deg, #0F172A, #1E3A8A);
  color: #fff;
  padding: 18px 20px;
  text-align: center;
}
.amc-teaser-band__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.amc-teaser-band p {
  font-size: 15px;
  color: rgba(255,255,255,.9);
  margin: 0;
  line-height: 1.4;
}
.amc-teaser-band strong { color: #93C5FD; }
.amc-teaser-band a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EA580C;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .2s;
  flex-shrink: 0;
}
.amc-teaser-band a:hover { background: #c2410c; }

/* ── FIX 3: RELATED SERVICES WIDGET ──────────────────────────
   Problem: Pages/session = 1.66 — users not exploring services
   Solution: "Also see" card strip at bottom of every service page
   ──────────────────────────────────────────────────────────── */
.related-services {
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  padding: 28px 0;
  margin-top: 40px;
}
.related-services__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748B;
  text-align: center;
  margin-bottom: 16px;
}
.related-services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
@media(min-width: 600px) {
  .related-services__grid { grid-template-columns: repeat(3, 1fr); }
}
@media(min-width: 900px) {
  .related-services__grid { grid-template-columns: repeat(4, 1fr); }
}
.related-services__card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  transition: all .2s;
  min-height: 52px;
  text-decoration: none;
}
.related-services__card:hover {
  border-color: #1D4ED8;
  color: #1D4ED8;
  background: #EFF6FF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29,78,216,.1);
}
.related-services__card span { font-size: 18px; flex-shrink: 0; }

/* ── FIX 4: ABOVE-FOLD CTA BAND on Service Pages ─────────────
   Problem: 35.8% scroll depth — the contact form is invisible
   Solution: Compact "Get help now" bar right below breadcrumb
   ──────────────────────────────────────────────────────────── */
.above-fold-cta {
  background: #EFF6FF;
  border-bottom: 1px solid #BFDBFE;
  padding: 10px 20px;
}
.above-fold-cta__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.above-fold-cta p {
  font-size: 13px;
  color: #1E3A8A;
  margin: 0;
  font-weight: 500;
}
.above-fold-cta p strong { color: #1D4ED8; }
.above-fold-cta__buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.above-fold-cta a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  white-space: nowrap;
  transition: all .2s;
}
.above-fold-cta__call {
  background: #1D4ED8;
  color: #fff;
}
.above-fold-cta__call:hover { background: #1E3A8A; }
.above-fold-cta__wa {
  background: #25D366;
  color: #fff;
}
.above-fold-cta__wa:hover { background: #1ea853; }

/* ── FIX 5: DEAD CLICK PREVENTION ────────────────────────────
   Problem: 48 sessions (5.54%) clicking non-clickable elements
   Solution: Remove pointer-like appearance from non-interactive
   elements, ensure all clickable items have obvious affordances
   ──────────────────────────────────────────────────────────── */
/* Ensure service cards are clearly clickable */
.service-card, .why-card, .sidebar-links a,
.hero-service-item, .related-services__card {
  cursor: pointer;
}
/* Images that link should show pointer */
a img { cursor: pointer; }
/* Stat items and metric items are NOT clickable — remove any
   pointer-like hover effects that might have been added */
.stat-item, .metric-item, .why-card:not(a) {
  cursor: default;
}

/* ── FIX 6: MOBILE SCROLL CTA (most critical fix) ────────────
   Problem: 48.85% of sessions are ChromeMobile.
   At 35.8% scroll, mobile users miss ALL bottom CTAs.
   Solution: Bottom fixed bar on mobile with call + WhatsApp
   This REPLACES the existing wa-float/phone-float on mobile
   ──────────────────────────────────────────────────────────── */
.mobile-cta-bar {
  display: none;
}
@media(max-width: 767px) {
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 850;
    background: #fff;
    border-top: 1px solid #E2E8F0;
    box-shadow: 0 -4px 20px rgba(0,0,0,.12);
    padding: 8px 12px;
    gap: 8px;
    safe-area-inset-bottom: env(safe-area-inset-bottom);
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .mobile-cta-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    min-height: 48px;
    text-decoration: none;
  }
  .mobile-cta-call {
    background: #1D4ED8;
    color: #fff;
  }
  .mobile-cta-wa {
    background: #25D366;
    color: #fff;
  }
  .mobile-cta-quote {
    background: #EA580C;
    color: #fff;
  }
  /* Push page content above mobile CTA bar */
  body { padding-bottom: 78px; }
  /* Hide old floating buttons on mobile (replaced by bar above) */
  .wa-float, .phone-float { display: none !important; }
}

/* ── FIX 7: INP IMPROVEMENT — remove heavy transitions ───────
   Problem: INP 312ms (needs improvement; threshold <200ms)
   Solution: Reduce transition durations on interactive elements
   Animations cause main thread work on interaction
   ──────────────────────────────────────────────────────────── */
@media(prefers-reduced-motion: no-preference) {
  :root { --t: .15s ease; }  /* was .22s — shorten all transitions */
  .btn, .service-card, .sidebar-links a,
  .faq-question, .hero-service-item {
    transition-duration: .12s;
  }
  /* content-visibility removed — caused blank sections below fold */
}

/* ── FIX 8: BOT TRAFFIC REDUCTION — Schema + hCaptcha prep ───
   Structural CSS for potential captcha or bot-trap elements
   ──────────────────────────────────────────────────────────── */
.bot-trap {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}

/* ═══════════════════════════════════════════════════════════
   CLARITY FIX: Override [data-aos] scroll animations
   
   Root cause: style.css sets [data-aos] { opacity:0 } by default.
   The sticky strip (position:fixed, z-index:850) disrupts the
   IntersectionObserver in _nav.php that normally adds 'visible'
   class on scroll. Result: testimonials, clients, partners,
   milestones sections remain invisible (blank white space).
   
   Fix: Force all [data-aos] elements permanently visible.
   Scroll-reveal animation is disabled but content is always shown.
   ═══════════════════════════════════════════════════════════ */
[data-aos],
[data-aos].visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}



/* ═══════════════════════════════════════════════════════════
   FOOTER FIX 3: Social media icons — large, colourful, branded SVGs
   ═══════════════════════════════════════════════════════════ */
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
  border: none;
  padding: 0;
  transition: transform .2s ease, opacity .2s ease;
  text-decoration: none;
  flex-shrink: 0;
}
.footer-social a:hover {
  transform: translateY(-4px) scale(1.08);
  opacity: .9;
}
.footer-social a svg {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 8px;
}


/* ═══════════════════════════════════════════════════════════
   FOOTER CSS: Social icons + e-commerce link + logo
   ═══════════════════════════════════════════════════════════ */

/* Social icons — transparent bg, brand colour comes from SVG fill */
.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  padding: 0;
  transition: transform .2s ease, opacity .2s ease;
  flex-shrink: 0;
}
.footer-social a:hover {
  transform: translateY(-4px) scale(1.1);
  opacity: .88;
}
.footer-social a svg {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 5px;
}

/* E-commerce link below social icons */
.ecom-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color .2s;
}
.ecom-link:hover {
  color: #fff;
}
.ecom-link svg {
  flex-shrink: 0;
  stroke: rgba(255,255,255,.65);
}
.ecom-link:hover svg {
  stroke: #fff;
}


/* ════════════════════════════════════════════════════════════════
   PHASE 1 CSS — Clarity Recordings Analysis Fixes  (June 2026)
   ════════════════════════════════════════════════════════════════ */

/* ── 1. HOMEPAGE SERVICE TILES ────────────────────────────────── */
.p1-service-tiles {
  background: #fff;
  padding: 36px 0 32px;
  border-top: 1px solid #E5E7EB;
  border-bottom: 1px solid #E5E7EB;
}
.p1-tiles-hd {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #1E3A8A;
  margin-bottom: 20px;
  letter-spacing: -.01em;
}
.p1-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}
.p1-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px 16px;
  background: #F8FAFF;
  border: 1.5px solid #E0E7FF;
  border-radius: 12px;
  text-decoration: none;
  color: #1F2937;
  transition: all .18s ease;
  gap: 6px;
}
.p1-tile:hover {
  background: #EEF2FF;
  border-color: #6366F1;
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(99,102,241,.15);
}
.p1-tile span { font-size: 28px; line-height: 1; }
.p1-tile strong { font-size: 14px; font-weight: 700; color: #1E3A8A; line-height: 1.3; }
.p1-tile em { font-size: 12px; font-style: normal; color: #6B7280; line-height: 1.3; }
.p1-tile--cta {
  background: linear-gradient(135deg, #1D4ED8, #1E3A8A);
  border-color: transparent;
}
.p1-tile--cta strong,
.p1-tile--cta em { color: rgba(255,255,255,.95); }
.p1-tile--cta:hover { background: linear-gradient(135deg, #1E40AF, #1E3A8A); }

@media(max-width: 640px) {
  .p1-tiles-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p1-tile { padding: 16px 10px 14px; }
  .p1-tile span { font-size: 24px; }
  .p1-tile strong { font-size: 13px; }
  .p1-tile em { font-size: 11px; }
}

/* ── 2. DESKTOP STICKY SIDEBAR CTA ───────────────────────────── */
.p1-desk-cta {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
}
@media(max-width: 767px) { .p1-desk-cta { display: none !important; } }

.p1-desk-tab {
  background: #1D4ED8;
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 14px 10px;
  border-radius: 8px 0 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  box-shadow: -2px 0 12px rgba(29,78,216,.25);
  transition: background .18s;
}
.p1-desk-tab:hover { background: #1E40AF; }
.p1-desk-tab-icon { font-size: 18px; }
.p1-desk-tab-txt { font-size: 10px; font-weight: 700; text-transform: uppercase;
                   letter-spacing: .05em; line-height: 1.3; writing-mode: vertical-lr;
                   text-orientation: mixed; transform: rotate(180deg); }

.p1-desk-panel {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-right: none;
  border-radius: 10px 0 0 10px;
  padding: 18px 16px;
  width: 0;
  overflow: hidden;
  opacity: 0;
  transition: width .25s ease, opacity .25s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 170px;
  justify-content: center;
}
.p1-desk-cta--open .p1-desk-panel {
  width: 220px;
  opacity: 1;
}
.p1-desk-panel-hd {
  font-size: 13px;
  font-weight: 700;
  color: #1E3A8A;
  padding-bottom: 8px;
  border-bottom: 1px solid #F3F4F6;
  white-space: nowrap;
}
.p1-desk-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s;
}
.p1-desk-btn:hover { opacity: .85; }
.p1-desk-call { background: #1D4ED8; color: #fff; }
.p1-desk-wa   { background: #25D366; color: #fff; }
.p1-desk-form { background: #F3F4F6; color: #374151; }
.p1-desk-hrs  { font-size: 11px; color: #9CA3AF; text-align: center; white-space: nowrap; }

/* ── 3. 15-SECOND ENGAGEMENT NUDGE ───────────────────────────── */
.p1-nudge {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1E3A8A;
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 300;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  max-width: calc(100vw - 32px);
  animation: nudgeIn .3s ease;
}
@keyframes nudgeIn {
  from { opacity:0; transform: translateX(-50%) translateY(20px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}
.p1-nudge--out { animation: nudgeOut .3s ease forwards; }
@keyframes nudgeOut {
  to { opacity:0; transform: translateX(-50%) translateY(20px); }
}
.p1-nudge-txt { font-size: 13px; font-weight: 600; line-height: 1.4; }
.p1-nudge-btn {
  background: #25D366;
  color: #fff;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.p1-nudge-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}
@media(max-width: 480px) {
  .p1-nudge { flex-wrap: wrap; bottom: 84px; }
  .p1-nudge-txt { width: 100%; }
}

/* ── 4. PAGE-SPECIFIC HOOKS (CCTV, AMC, UPS, Cloud) ─────────── */
.p1-page-hook {
  background: linear-gradient(135deg, #1E3A8A 0%, #1D4ED8 100%);
  padding: 18px 20px;
}
.p1-hook-inner {
  max-width: 860px;
  margin: 0 auto;
}
.p1-hook-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 14px;
}
.p1-hook-facts span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.12);
  padding: 5px 12px;
  border-radius: 20px;
}
.p1-hook-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.p1-hook-call {
  background: #fff;
  color: #1E3A8A;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 7px;
  text-decoration: none;
  transition: opacity .15s;
}
.p1-hook-call:hover { opacity: .88; }
.p1-hook-wa {
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 7px;
  text-decoration: none;
  transition: opacity .15s;
}
.p1-hook-wa:hover { opacity: .88; }

/* ── AMC HOOK ───────────────────────────────────────────────── */
.p1-amc-hook {
  background: linear-gradient(135deg, #1E3A8A, #1D4ED8);
  padding: 24px 20px;
}
.p1-amc-hook-inner { max-width: 860px; margin: 0 auto; }
.p1-amc-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.p1-amc-plan {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  position: relative;
}
.p1-plan-pop {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.4);
  transform: scale(1.03);
}
.p1-pop-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #F59E0B;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.p1-plan-name { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.85); margin-bottom: 5px; }
.p1-plan-price { font-size: 17px; font-weight: 700; color: #fff; line-height: 1.2; }
.p1-plan-price small { font-size: 11px; font-weight: 400; color: rgba(255,255,255,.7); }
.p1-plan-feat { font-size: 11px; color: rgba(255,255,255,.7); margin-top: 6px; line-height: 1.4; }
.p1-amc-cta-row { display: flex; flex-wrap: wrap; gap: 10px; }

@media(max-width: 600px) {
  .p1-amc-plans { grid-template-columns: 1fr; }
  .p1-plan-pop  { transform: none; }
}

/* ── 5. YOUTUBE + AI WELCOME BANNERS ─────────────────────────── */
.p1-yt-banner, .p1-ai-banner {
  background: #1E3A8A;
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  position: relative;
  z-index: 500;
}
.p1-yt-banner span, .p1-ai-banner span { font-weight: 700; }
.p1-yt-cta {
  background: #F59E0B;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 5px;
  text-decoration: none;
  margin-left: 6px;
}
.p1-yt-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 18px;
  cursor: pointer;
  margin-left: auto;
  padding: 0 4px;
}
