/* ============================================================
   PIN.ca — Modernized Stylesheet
   Single source of truth. No !important wars.
   ============================================================ */

/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ===== Design Tokens ===== */
:root {
  --bg:           #f8f9fc;
  --ink:          #0f172a;
  --muted:        #64748b;
  --brand:        #2447f9;
  --brand-dark:   #1a35cc;
  --accent:       #00d4a6;
  --paper:        #ffffff;
  --edge:         #e2e8f0;
  --chip:         #f1f5f9;
  --success:      #16a34a;
  --sidebar-w:    280px;
  --overlay:      rgba(0,0,0,.25);
  --transition:   240ms ease;
  --topbar-h:     54px;
  --stickybar-h:  56px;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --shadow-sm:    0 1px 4px rgba(2,6,23,.07);
  --shadow-md:    0 4px 16px rgba(2,6,23,.09);
  --shadow-lg:    0 10px 40px rgba(2,6,23,.13);
}

/* ===== Base / Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  padding-bottom: var(--stickybar-h);
}

h1, h2, h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  letter-spacing: -0.01em;
}
h2 { margin: 0 0 14px; font-size: 1.75rem; }
h3 { margin: 20px 0 10px; font-size: 1.25rem; }
p  { margin: 10px 0; }
a  { color: var(--brand); }
a:hover { text-decoration: underline; }

/* ===== Top Bar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1100;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: #0f172a;
  color: #e5e7eb;
  border-bottom: 1px solid #1f2937;
  box-shadow: 0 1px 0 rgba(255,255,255,.04);
}
.topbar-title {
  font-weight: 700;
  letter-spacing: .03em;
  font-size: .95rem;
}

/* Hide topbar on desktop — sidebar is always visible there */
@media (min-width: 1024px) {
  .topbar { display: none; }
}

/* ===== Layout ===== */
.app { display: block; }

@media (min-width: 1024px) {
  .app { display: flex; }
  .content { flex: 1; min-width: 0; }
}

/* ===== Sidebar ===== */
.sidebar {
  z-index: 1002;
  background: #fff;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    width: var(--sidebar-w);
    border-right: 1px solid var(--edge);
    overflow: hidden;
    transform: none !important;
  }
  .overlay { display: none !important; }
}

@media (max-width: 1023px) {
  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
}

/* Sidebar scroll */
.sidebar .menu {
  flex: 1 1 auto;
  overflow-y: auto;
}

/* ===== Logo ===== */
.logo { padding: 0; background: transparent; border: none; box-shadow: none; width: 100%; }
.logo-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 0;
  background: linear-gradient(135deg, #1a2352 0%, #2a1f6b 100%);
  border: none;
  border-bottom: 1px solid #3647a0;
  text-decoration: none;
  cursor: pointer;
  transition: filter var(--transition);
}
.logo-button img { width: 52px; height: 52px; object-fit: contain; display: block; border-radius: 8px; }
.logo-button:hover { filter: brightness(1.1); text-decoration: none; }
.logo-text { font-family: 'DM Serif Display', serif; font-size: 2rem; color: #ffffff; font-weight: 400; line-height: 1; }
.logo-dot { color: #60a5fa; }

/* ===== Menu ===== */
.menu { padding: 8px 10px 16px; }
.menu-heading {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 12px 0 4px 8px;
  color: var(--muted);
  font-weight: 700;
}
.menu ul { list-style: none; padding: 0; margin: 0; }
.menu li + li { margin-top: 2px; }
.menu a {
  text-decoration: none;
  color: #1e293b;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.3;
}
.menu a:hover {
  background: var(--chip);
  border-color: var(--edge);
  text-decoration: none;
}
.menu a .bi { font-size: .9rem; opacity: .7; flex-shrink: 0; }
.menu a.active {
  background: linear-gradient(90deg, #eef2ff 0%, #f8faff 100%);
  color: #2447f9;
  border-color: #c7d2fe;
  font-weight: 600;
}

/* Section labels inside nav */
#navLinks .nav-section,
#navLinks li.q20-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  margin: 14px 0 4px;
  padding: 6px 10px 2px;
  text-transform: uppercase;
  letter-spacing: .08em;
  list-style: none;
  border-top: 1px solid var(--edge);
  pointer-events: none;
  cursor: default;
}

/* ===== Call Button (sidebar) ===== */
.call-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: #ffffff !important;
  font-weight: 700;
  text-align: center;
  padding: 14px 16px;
  margin: 12px 10px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(220,53,69,.3);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  line-height: 1.35;
}
.call-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220,53,69,.4);
  filter: brightness(1.06);
  text-decoration: none;
}
.call-button strong { display: block; font-size: 1.05rem; }
.call-button .small { font-size: .8rem; font-weight: 500; opacity: .9; }

/* ===== Main Content ===== */
.content {
  padding: 0 0 32px;
  background: var(--bg);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0d1124 0%, #1c1f4a 60%, #2a1f6b 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(100,120,255,.15) 0%, transparent 60%);
  pointer-events: none;
}
header.hero,
header.hero strong, header.hero em, header.hero span,
header.hero p, header.hero h1, header.hero h2, header.hero h3, header.hero li {
  color: #ffffff;
}
header.hero a { color: #ffffff; }

/* ===== Profile Image ===== */
.profile-img {
  width: 150px !important;
  height: 150px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  flex-shrink: 0 !important;
  border: 3px solid rgba(255,255,255,.3);
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
@media (max-width: 767px) {
  .profile-img { margin-left: auto !important; margin-right: auto !important; }
}
.hero-text { max-width: 700px; }

/* ===== Overlay (mobile) ===== */
.overlay {
  position: fixed;
  inset: 0;
  top: var(--topbar-h);
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 1001;
  pointer-events: none;
}
.overlay.show { opacity: 1; pointer-events: auto; }

/* ===== Burger ===== */
.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px !important;      /* !important to fight the * { max-width: 100% } reset */
  min-width: 40px !important;
  height: 34px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #e5e7eb;
  border: 1px solid #374151;
  cursor: pointer;
  margin-right: 6px;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
}
.burger-bar {
  width: 18px !important;      /* !important to fight the * { max-width: 100% } reset */
  height: 2px;
  background: #e5e7eb;
  display: block;
  border-radius: 2px;
  flex-shrink: 0;
}

@media (max-width: 1023px) {
  .burger { display: inline-flex !important; }
}

/* ===== Sticky Call Bar ===== */
.sticky-call-bar {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  z-index: 2000;
  background: linear-gradient(90deg, #2447f9, #00d4a6);
  border-top: 1px solid rgba(255,255,255,.15);
  display: block;
}
.sticky-call-bar a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 11px 0;
  letter-spacing: .04em;
}
@media (max-width: 420px) { :root { --stickybar-h: 64px; } }

/* ===== Buttons ===== */
.btn-gradient {
  background: linear-gradient(90deg, #2447f9, #00d4a6);
  color: #fff !important;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-weight: 700;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: filter var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 14px rgba(36,71,249,.3);
}
.btn-gradient:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(36,71,249,.4);
  text-decoration: none;
}
.btn-outline-light {
  border: 1.5px solid rgba(255,255,255,.55) !important;
  color: #fff !important;
  background: rgba(255,255,255,.08) !important;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-weight: 600;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.15) !important;
  border-color: rgba(255,255,255,.8) !important;
  text-decoration: none;
}
.btn-outline-dark {
  border: 1.5px solid #2447f9 !important;
  color: #2447f9 !important;
  background: transparent !important;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-weight: 600;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.btn-outline-dark:hover {
  background: #eef2ff !important;
  text-decoration: none;
}

/* ===== Section Divider ===== */
hr.my-2 {
  border: none;
  border-top: 1px solid var(--edge);
  margin: 24px 0;
}

/* ===== Section Title ===== */
.section-title h2,
.section-title h3,
.section-title h4 {
  position: relative;
  padding-bottom: 10px;
}
.section-title h2::after,
.section-title h3::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 40px; height: 3px;
  background: linear-gradient(90deg, #2447f9, #00d4a6);
  border-radius: 999px;
}

/* ===== Content wrap ===== */
.content-wrap {
  width: 100%; max-width: none; margin: 0; padding: 14px 14px 18px;
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
@media (min-width: 768px) {
  .content-wrap {
    max-width: 1100px; margin: 0 auto; padding: 32px 36px;
    background: var(--paper);
    border: 1px solid var(--edge);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
  }
}

/* ===== FAQ 20 Grid ===== */
.faq20-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.faq20-card {
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper);
  display: flex; flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-sm);
}
.faq20-card:hover {
  box-shadow: 0 8px 28px rgba(36,71,249,.14);
  transform: translateY(-3px);
}
.faq20-badge {
  background: linear-gradient(90deg, #2447f9, #5236ab);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 5px 12px;
  text-transform: uppercase;
}
.faq20-body {
  padding: 14px 16px 14px;
  flex: 1; display: flex; flex-direction: column;
}
.faq20-body h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  font-weight: 700;
  color: #1c1f4a;
  margin: 0 0 6px;
  line-height: 1.35;
}
.faq20-body p {
  font-size: .8rem;
  color: #555;
  margin: 0 0 12px;
  line-height: 1.45;
  flex: 1;
}
.faq20-btn {
  display: inline-block;
  background: linear-gradient(90deg, #2447f9, #00d4a6);
  color: #fff !important;
  font-weight: 600;
  font-size: .8rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  text-align: center;
  transition: filter var(--transition);
}
.faq20-btn:hover { filter: brightness(1.08); text-decoration: none; }

/* ===== Cards ===== */
.card {
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.valuation-card {
  position: relative; display: block; padding: 18px;
  border: 1px solid var(--edge); border-radius: var(--radius-md);
  background: var(--paper); text-decoration: none; color: inherit;
  overflow: hidden; transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.valuation-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); transform: translateY(-2px); text-decoration: none; }

/* ===== Valuation categories grid ===== */
.valuation-categories {
  list-style: none; padding-left: 0; margin: 0;
  display: grid; gap: 16px; grid-template-columns: 1fr;
}
.valuation-categories > li {
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.valuation-categories h4 { margin: 0 0 8px; font-size: 1.05rem; }
.valuation-categories ul { margin: 0; padding-left: 18px; }
@media (min-width: 768px)  { .valuation-categories { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .valuation-categories { grid-template-columns: repeat(3, 1fr); } }

/* ===== Tables ===== */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; }
table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border-radius: var(--radius-md); border: 1px solid var(--edge); overflow: hidden;
}
thead th {
  background: #f8fafc; padding: 12px 14px; text-align: left;
  font-weight: 700; border-bottom: 1px solid var(--edge);
  font-size: .875rem;
}
tbody td { padding: 12px 14px; border-top: 1px solid var(--edge); font-size: .9rem; }
@media (max-width: 768px) {
  table { display: block; overflow-x: auto; }
  tbody td { min-width: 220px; }
  thead th { white-space: nowrap; }
}

/* ===== Footer ===== */
.site-footer {
  background: #0f172a;
  color: #e5e7eb;
  border-top: 1px solid #1f2937;
  padding: 32px 24px 52px;
  margin-top: 8px;
}
.site-footer .wrap { max-width: 1100px; margin: 0 auto; }
.site-footer,
.site-footer p,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer li,
.site-footer strong,
.site-footer em,
.site-footer span { color: #e5e7eb; }
.site-footer strong, .site-footer b { color: #ffffff; }
.site-footer a { color: #60a5fa !important; text-decoration: none; }
.site-footer a:hover { color: #93c5fd !important; text-decoration: underline; }
.site-footer .links { text-align: center; font-size: .875rem; line-height: 1.8; margin-top: 18px; }
.site-footer .sep { height: 1px; background: #1f2937; border: 0; margin: 16px 0 20px; }
.site-footer p { margin: 8px 0; text-align: center; }
.site-footer .bg-black h2,
.site-footer .bg-black h3,
.site-footer .bg-black p { color: #ffffff; }

/* ===== 2026 Canada Section ===== */
#canada-valuation-2026 h4.h6 {
  color: #1c1f4a;
  border-left: 3px solid #2447f9;
  padding-left: 10px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
}
#canada-valuation-2026 .alert-secondary {
  border-left: 4px solid #5236ab;
  background: #f0f0ff;
  border-radius: var(--radius-sm);
  color: #1c1f4a;
}

/* ===== Blockquote ===== */
blockquote {
  border-left: 3px solid var(--brand);
  padding: 12px 16px;
  margin: 12px 0;
  background: #f8faff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}
blockquote p { color: #1e293b; }

/* ===== Utility ===== */
[id] { scroll-margin-top: 72px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--edge); background: var(--chip);
  font-size: .8rem; font-weight: 500;
}
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.toc a {
  font-size: .85rem; color: var(--brand); text-decoration: none;
  border: 1px dashed var(--edge); padding: 5px 10px;
  border-radius: var(--radius-sm);
}
.toc a:hover { background: #eef2ff; }

/* ===== Chips ===== */
.chip {
  background: rgba(255,255,255,.08); color: #e0e7ff;
  border: 1px solid rgba(255,255,255,.18);
  padding: 7px 12px; border-radius: 999px;
  font-size: .875rem; text-decoration: none;
}
.chip:hover { background: rgba(255,255,255,.14); }

/* ===== Compact helpers ===== */
.lead-tight { line-height: 1.35; }
.text-underline { text-decoration: underline; }
.fw-em { font-weight: 600; }
.compact p  { margin-bottom: .4rem; }
.compact ul { margin-bottom: .8rem; }
.compact li { margin-bottom: .25rem; }

/* ===== Responsive images ===== */
img, video, iframe { max-width: 100%; height: auto; }
.responsive-image { display: block; margin: 0 auto; max-width: 100%; height: auto; }
@media (min-width: 768px)  { .responsive-image { max-width: 85%; } }
@media (min-width: 1200px) { .responsive-image { max-width: 70%; } }

/* ===== Strategy layout ===== */
.strategy-layout {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 2rem; align-items: start; margin: 3rem 0;
}
.strategy-image img { width: 100%; height: auto; border-radius: var(--radius-md); }
@media (max-width: 992px) { .strategy-layout { grid-template-columns: 1fr; } }

/* ===== Two-column helper ===== */
.twocol { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 900px) { .twocol { grid-template-columns: 1fr 1fr; } }

/* ===== Mobile global ===== */
@media (max-width: 768px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  /* Intentionally NOT applying max-width:100% to all elements (*) 
     because it breaks fixed-size UI elements like the burger button */
}