/*
 * PinPoint Network — Shared Navigation, Footer & Brand System
 * ═══════════════════════════════════════════════════════════════
 * Applied server-side to ALL 95+ Free*App.com and PinPoint network domains.
 * Classes prefixed with scp- to avoid conflicts with existing page CSS.
 *
 * DESIGN SYSTEM:
 *   Font:       Inter (Google Fonts, weights 400–900)
 *   Primary:    #f3315a (orange-500) — CTAs, accents, highlights
 *   Navy:       #1a2b5e — brand anchor color
 *   Dark navy:  #0f1e3d — footer background
 *   Coral:      #f3315a — secondary accent, active states
 *   Neutrals:   #111827, #374151, #6b7280, #e5e7eb, #f9fafb
 *
 * ILLUSTRATION SYSTEM:
 *   .pp-section-illus      — wrapper that allows illustration to bleed
 *   .pp-illus              — the illustration element
 *   .pp-illus--right       — bleeds into next section from right
 *   .pp-illus--left        — bleeds into next section from left
 *   .pp-section-receives   — next section after a bleed (adds top padding)
 *   Topic-specific fills:  .pp-illus-home, .pp-illus-health, etc.
 */

/* ── FONT IMPORT ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── GLOBAL OVERFLOW FIX — prevents horizontal scroll on all network sites ── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ── RESET FOR SCP ELEMENTS ── */
#scp-nav, #scp-footer,
#scp-nav *, #scp-nav *::before, #scp-nav *::after,
#scp-footer *, #scp-footer *::before, #scp-footer *::after {
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════════════
   SHARED NAVIGATION — PinPoint brand, consistent across ALL sites
═══════════════════════════════════════════════════════════════════════ */

#scp-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.scp-nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ── Logo — PinPoint SVG icon + PINPOINT wordmark + topic label ── */
/* The two-line logo renders via inline styles from buildPinPointLogo().    *
 * These classes ensure proper sizing and non-shrink on mobile.            */
.scp-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  /* Prevent logo from shrinking on narrow screens */
  min-width: 0;
  max-width: 220px;
}

/* Ensure the SVG icon inside the logo is always properly sized */
.scp-nav-logo svg {
  flex-shrink: 0;
  width: 36px !important;
  height: 36px !important;
}

/* The wordmark block (PINPOINT + topic) */
.scp-nav-logo > div {
  min-width: 0;
  overflow: hidden;
}

.scp-nav-logo > div > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Nav Links ── */
.scp-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.scp-nav-link {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.scp-nav-link:hover {
  color: #111827;
  background: #f3f4f6;
}

/* CTA button — orange pill, consistent across all network sites */
.scp-nav-cta {
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 99px;    /* pill shape */
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
  white-space: nowrap;
  margin-left: 4px;
  display: inline-block;
}

.scp-nav-cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* ── Hamburger button ── */
.scp-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.scp-hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── Mobile drawer ── */
.scp-drawer {
  display: none;
  background: #ffffff;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
  padding: 6px 20px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.scp-drawer.open { display: block; }

.scp-drawer a {
  display: block;
  color: #111827;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 13px 4px;
  border-bottom: 1px solid #f3f4f6;
  transition: color 0.15s;
}

.scp-drawer a:hover { color: #f3315a; }
.scp-drawer a:last-child { border-bottom: none; }

.scp-drawer-cta {
  display: inline-block !important;
  margin-top: 10px;
  color: #ffffff !important;
  padding: 10px 22px !important;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: none !important;
  transition: opacity 0.15s !important;
}

.scp-drawer-cta:hover { opacity: 0.88 !important; }

/* ── Mobile responsive nav ── */
@media (max-width: 768px) {
  .scp-nav-links { display: none; }
  .scp-hamburger { display: flex; }
  .scp-nav-inner { height: 60px; }
  /* Logo: ensure it renders at full size on mobile, never tiny */
  .scp-nav-logo {
    max-width: 180px;
  }
  .scp-nav-logo svg {
    width: 32px !important;
    height: 32px !important;
  }
}

@media (max-width: 375px) {
  .scp-nav-inner { padding: 0 16px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   SHARED FOOTER — Dark navy, PinPoint branding
═══════════════════════════════════════════════════════════════════════ */

#scp-footer {
  background: #0f1e3d;       /* Dark PinPoint navy — brand anchor */
  color: rgba(255, 255, 255, 0.65);
  padding: 64px 24px 32px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.scp-footer-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.scp-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

/* Brand column */
.scp-footer-brand {}

/* Footer logo — PinPoint icon + PINPOINT + topic (white text treatment) */
.scp-footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 16px;
  gap: 10px;
}

.scp-footer-logo svg {
  flex-shrink: 0;
  width: 36px !important;
  height: 36px !important;
}

.scp-footer-brand p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.65;
  max-width: 280px;
  margin: 0;
}

/* Link columns */
.scp-footer-col h4 {
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 16px;
}

.scp-footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 10px;
  transition: color 0.15s;
  line-height: 1.4;
}

.scp-footer-col a:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Bottom bar */
.scp-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 28px;
}

.scp-footer-bottom > p {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* Legal links row inside footer bottom */
.scp-footer-legal-links a {
  color: rgba(255, 255, 255, 0.45) !important;
  text-decoration: none !important;
  font-family: 'Inter', sans-serif;
}

.scp-footer-legal-links a:hover {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* PinPoint / SCP Attribution */
.scp-footer-attribution {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Orange accent pill badge */
.scp-badge {
  width: 32px;
  height: 32px;
  background: #f3315a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 0.55rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1;
}

.scp-footer-attribution-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
}

.scp-footer-attribution-text a {
  color: rgba(255, 255, 255, 0.65);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s;
}

.scp-footer-attribution-text a:hover { color: #ffffff; }

.scp-footer-attribution-text span {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
}

.scp-footer-network {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.scp-footer-network a {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.15s;
}

.scp-footer-network a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* Related Resources Section inside footer */
.scp-related-resources {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.scp-related-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 14px;
}

.scp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.scp-related-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.scp-related-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.scp-related-card-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.3;
}

.scp-related-card-cat {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

/* ── Footer Responsive ── */
@media (max-width: 960px) {
  .scp-footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 36px;
  }
  .scp-footer-brand {
    grid-column: 1 / -1;
  }
  .scp-footer-brand p {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .scp-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 36px;
  }
  #scp-footer {
    padding: 48px 20px 28px;
  }
}

@media (max-width: 400px) {
  .scp-footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   ILLUSTRATION SYSTEM — Section-bleeding illustrations
   ═══════════════════════════════════════════════════════════════════════
   HOW TO USE:
     1. Add class `pp-section-illus` to the section that CONTAINS the illustration
     2. Add an `.pp-illus.pp-illus--right` or `.pp-illus--left` element inside
     3. Add class `pp-section-receives` to the NEXT section (adds padding-top)
     4. Place your SVG or <img> inside the .pp-illus element

   EXAMPLE:
     <section class="hero pp-section-illus">
       ...content...
       <div class="pp-illus pp-illus--right">
         <img src="/illustrations/house.svg" alt="" aria-hidden="true">
       </div>
     </section>
     <section class="features pp-section-receives">
       ...content...
     </section>

   ILLUSTRATION COLORS (topic-specific):
     .pp-illus-home    → orange/blue (permits, real estate)
     .pp-illus-health  → teal/soft green (healthcare)
     .pp-illus-finance → navy/gold (financial)
     .pp-illus-legal   → navy/slate (legal)
     .pp-illus-business→ orange/charcoal (business)
═══════════════════════════════════════════════════════════════════════ */

/* Container that allows illustration overflow */
.pp-section-illus {
  position: relative;
  overflow: visible;
  /* z-index context so illus can render above sibling sections */
  isolation: isolate;
}

/* The illustration element — positioned to bleed */
.pp-illus {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  /* Default size — override per instance */
  width: 340px;
  height: auto;
}

/* Right-bleed: illustration overflows the right edge and bleeds down */
.pp-illus--right {
  right: -20px;
  bottom: -80px;
}

/* Left-bleed: illustration overflows left edge and bleeds down */
.pp-illus--left {
  left: -20px;
  bottom: -80px;
}

/* Centered bleed: floats at section bottom center */
.pp-illus--center {
  left: 50%;
  transform: translateX(-50%);
  bottom: -60px;
}

/* Section that receives a bleeding illustration needs padding-top */
.pp-section-receives {
  padding-top: 100px !important;
}

/* Images inside illustration containers */
.pp-illus img,
.pp-illus svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Dark section variant — used on near-black sections with white text */
.pp-section-dark {
  background: #111827;
  color: #ffffff;
}

.pp-section-dark .pp-illus--right,
.pp-section-dark .pp-illus--left {
  opacity: 0.25;
  filter: invert(1) brightness(2);
}

/* ── Illustration SVG Backgrounds (inline CSS illustrations) ── */
/* These provide topic-appropriate visuals via CSS without external assets */

/* Home / Permits — house with orange roof */
.pp-illus-home::before {
  content: '';
  display: block;
  width: 100%;
  padding-bottom: 80%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 240'%3E%3Cg opacity='0.12'%3E%3Crect x='60' y='120' width='180' height='120' rx='4' fill='%231a2b5e'/%3E%3Cpolygon points='40,120 150,20 260,120' fill='%23f3315a'/%3E%3Crect x='120' y='160' width='60' height='80' rx='4' fill='%230f1e3d'/%3E%3Crect x='70' y='140' width='50' height='50' rx='4' fill='%23ffffff'/%3E%3Crect x='180' y='140' width='50' height='50' rx='4' fill='%23ffffff'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Health — cross / plus mark */
.pp-illus-health::before {
  content: '';
  display: block;
  width: 100%;
  padding-bottom: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Ccircle cx='100' cy='100' r='90' fill='%236bc5b8' opacity='0.12'/%3E%3Crect x='85' y='40' width='30' height='120' rx='8' fill='%231a2b5e' opacity='0.2'/%3E%3Crect x='40' y='85' width='120' height='30' rx='8' fill='%231a2b5e' opacity='0.2'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Finance — bar chart */
.pp-illus-finance::before {
  content: '';
  display: block;
  width: 100%;
  padding-bottom: 80%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 240'%3E%3Cg opacity='0.12'%3E%3Crect x='30' y='140' width='50' height='100' rx='4' fill='%23f3315a'/%3E%3Crect x='110' y='80' width='50' height='160' rx='4' fill='%231a2b5e'/%3E%3Crect x='190' y='40' width='50' height='200' rx='4' fill='%23f3315a'/%3E%3Cline x1='20' y1='240' x2='280' y2='240' stroke='%231a2b5e' stroke-width='4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Legal — scales of justice */
.pp-illus-legal::before {
  content: '';
  display: block;
  width: 100%;
  padding-bottom: 90%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 216'%3E%3Cg opacity='0.12'%3E%3Crect x='114' y='20' width='12' height='176' fill='%231a2b5e'/%3E%3Cline x1='60' y1='56' x2='180' y2='56' stroke='%231a2b5e' stroke-width='6'/%3E%3Ccircle cx='60' cy='120' r='36' fill='none' stroke='%23f3315a' stroke-width='6'/%3E%3Ccircle cx='180' cy='100' r='36' fill='none' stroke='%231a2b5e' stroke-width='6'/%3E%3Crect x='96' y='192' width='48' height='8' rx='4' fill='%231a2b5e'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Mobile responsive illustration adjustments */
@media (max-width: 768px) {
  .pp-illus {
    width: 200px;
  }
  .pp-illus--right {
    right: -10px;
    bottom: -50px;
  }
  .pp-illus--left {
    left: -10px;
    bottom: -50px;
  }
  .pp-section-receives {
    padding-top: 64px !important;
  }
}

@media (max-width: 480px) {
  /* On very small screens, keep illustrations but make them smaller */
  .pp-illus {
    width: 140px;
  }
  .pp-illus--right {
    right: 0;
    bottom: -40px;
  }
  .pp-illus--left {
    left: 0;
    bottom: -40px;
  }
  .pp-section-receives {
    padding-top: 48px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   DARK SECTION PATTERN — Black/near-black with white text + large type
   Used for emphasis sections, CTAs, feature highlights
═══════════════════════════════════════════════════════════════ */

.pp-dark-section {
  background: #0f172a;
  color: #ffffff;
  padding: 80px 24px;
}

.pp-dark-section .pp-ds-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f3315a;
  margin-bottom: 16px;
}

.pp-dark-section .pp-ds-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 24px;
  max-width: 720px;
}

.pp-dark-section .pp-ds-body {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 40px;
}

/* ═══════════════════════════════════════════════════════════════
   CJ AFFILIATE AD ZONES — injected into all network pages
   Sits alongside AdSense in different zones; does not conflict.
═══════════════════════════════════════════════════════════════ */

.cj-ad-zone {
  margin: 20px 0;
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-family: 'Inter', -apple-system, sans-serif;
}

.cj-zone-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 10px;
}

.cj-ad-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f3f4f6;
}

.cj-ad-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.cj-text-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
  line-height: 1.35;
  display: block;
}

.cj-text-link:hover {
  text-decoration: underline;
  color: #1e40af;
}

.cj-advertiser {
  font-size: 0.72rem;
  color: #6b7280;
}

.cj-disclosure {
  font-size: 0.65rem;
  color: #9ca3af;
  margin-top: 8px;
  text-align: right;
}

.cj-banner-zone {
  text-align: center;
  overflow: hidden;
}

.cj-banner-wrap {
  margin: 6px auto;
  display: flex;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}

.cj-banner-wrap img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* CJ sidebar float — appended below AdSense / guide sections */
#cj-sidebar-ads {
  margin-top: 24px;
}

/* CJ in-content strip — rendered inside article flow */
#cj-incontent-ads {
  margin: 28px 0;
}

/* CJ footer strip — above site footer */
#cj-footer-ads {
  max-width: 1160px;
  margin: 0 auto 32px;
  padding: 0 20px;
}

@media (max-width: 640px) {
  .cj-ad-zone {
    padding: 10px 12px;
  }
}
