/* ============================================
   Canada P.J Media — Global Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────── */
:root {
  --background: #f5faf7;
  --foreground: #1a2e24;
  --card: #ffffff;
  --card-foreground: #1a2e24;
  --primary: #2d8c4e;
  --primary-foreground: #ffffff;
  --secondary: #edf5f0;
  --secondary-foreground: #1e3829;
  --muted: #e8f2ec;
  --muted-foreground: #5a7a66;
  --accent: #c4a035;
  --accent-foreground: #2a2010;
  --destructive: #c0392b;
  --destructive-foreground: #fff8f8;
  --border: #d4e8db;
  --input: #dceee2;
  --ring: #2d8c4e;
  --chart-1: #2d8c4e;
  --chart-2: #c4a035;
  --chart-3: #4b6fb5;
  --chart-4: #d4702a;
  --chart-5: #9b4db5;
  --radius: 0.625rem;
}

/* ── Base Reset ────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border-color: var(--border); }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

/* ── Typography ────────────────────────────── */
.font-display { font-family: 'Space Grotesk', system-ui, sans-serif; }

/* ── Layout Utilities ──────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.grid { display: grid; }
.min-h-screen { min-height: 100vh; }
.flex-1 { flex: 1; }

/* ── Spacing Utilities ─────────────────────── */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-2 { padding-bottom: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

/* ── Text Utilities ────────────────────────── */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-relaxed { line-height: 1.7; }
.tracking-tight { letter-spacing: -0.025em; }
.text-primary { color: var(--primary); }
.text-foreground { color: var(--foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-destructive { color: var(--destructive); }
.text-white { color: #fff; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.whitespace-nowrap { white-space: nowrap; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }

/* ── Background Utilities ──────────────────── */
.bg-background { background-color: var(--background); }
.bg-foreground { background-color: var(--foreground); }
.bg-card { background-color: var(--card); }
.bg-primary { background-color: var(--primary); }
.bg-muted { background-color: var(--muted); }
.bg-muted-30 { background-color: rgba(232,242,236,0.3); }

/* ── Border Utilities ──────────────────────── */
.border { border: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-border { border-color: var(--border); }
.rounded { border-radius: 0.375rem; }
.rounded-md { border-radius: calc(var(--radius) - 2px); }
.rounded-lg { border-radius: var(--radius); }
.rounded-xl { border-radius: calc(var(--radius) + 4px); }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* ── Shadow ────────────────────────────────── */
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1); }

/* ── Transition ────────────────────────────── */
.transition-all { transition: all 0.2s ease; }
.transition-colors { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.transition-opacity { transition: opacity 0.2s ease; }

/* ── Position ──────────────────────────────── */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* ── Display ───────────────────────────────── */
.hidden { display: none; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.shrink-0 { flex-shrink: 0; }

/* ───────────────────────────────────────────
   COMPONENT STYLES
   ─────────────────────────────────────────── */

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.btn-primary:hover { background-color: #247a42; border-color: #247a42; }

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--secondary);
}
.btn-secondary:hover { background-color: #dceee2; }

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border-color: var(--border);
}
.btn-outline:hover { background-color: var(--muted); }

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
  border-color: transparent;
}
.btn-ghost:hover { background-color: var(--muted); }

.btn-outline-white {
  background-color: transparent;
  color: white;
  border-color: rgba(255,255,255,0.4);
}
.btn-outline-white:hover { background-color: rgba(255,255,255,0.1); }

.btn-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
  border-color: var(--destructive);
}

/* ── Cards ─────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.card-header { padding: 1.5rem 1.5rem 0; }
.card-content { padding: 1.5rem; }
.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--foreground);
}
.card-desc {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ── Header ────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid rgba(212,232,219,0.4);
  background: rgba(245,250,247,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}
@media (min-width: 1024px) { .site-header nav { padding: 0.75rem 2rem; } }

.logo-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.logo-text { display: none; }
@media (min-width: 640px) { .logo-text { display: block; } }
.logo-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.2;
}
.logo-sub { font-size: 0.75rem; color: var(--muted-foreground); }

.desktop-nav { display: none; gap: 2rem; align-items: center; }
@media (min-width: 1024px) { .desktop-nav { display: flex; } }

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s;
  position: relative;
}
.nav-link:hover { color: var(--foreground); }
.nav-link.active { color: var(--foreground); }

/* Dropdown nav */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  font-family: inherit;
}
.nav-dropdown-btn:hover { color: var(--foreground); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  min-width: 180px;
  padding: 0.25rem;
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-btn:focus + .nav-dropdown-menu { display: block; }
.nav-dropdown-item {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--foreground);
  border-radius: calc(var(--radius) - 2px);
  transition: background-color 0.2s;
}
.nav-dropdown-item:hover { background: var(--muted); }

.header-auth { display: none; gap: 0.75rem; align-items: center; }
@media (min-width: 1024px) { .header-auth { display: flex; } }

/* Mobile menu button */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius);
  color: var(--foreground);
}
@media (min-width: 1024px) { .mobile-menu-btn { display: none; } }
.mobile-menu-btn svg { width: 1.5rem; height: 1.5rem; }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
}
.mobile-menu.open { display: block; }
.mobile-menu-inner { padding: 0.75rem 1rem; }
.mobile-menu-section { font-weight: 500; padding: 0.5rem 0.75rem; color: var(--foreground); font-size: 0.875rem; }
.mobile-menu-link {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  border-radius: var(--radius);
  transition: all 0.2s;
}
.mobile-menu-link:hover { color: var(--foreground); background: var(--muted); }
.mobile-menu-link.child { padding-left: 1.5rem; }
.mobile-menu-divider { margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.5rem; }

/* ── Footer ────────────────────────────────── */
.site-footer {
  background-color: var(--foreground);
  color: var(--background);
}
.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem;
}
@media (min-width: 1024px) { .site-footer-inner { padding: 4rem 2rem; } }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1fr 3fr; } }
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
@media (min-width: 640px) { .footer-links-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--background);
}
.footer-list { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-link { font-size: 0.875rem; opacity: 0.7; transition: opacity 0.2s; }
.footer-link:hover { opacity: 1; }
.footer-contact { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; opacity: 0.8; transition: opacity 0.2s; }
.footer-contact:hover { opacity: 1; }
.footer-contact svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(245,250,247,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }
.footer-copyright { font-size: 0.875rem; opacity: 0.7; }
.footer-socials { display: flex; gap: 1rem; }
.footer-social { opacity: 0.7; transition: opacity 0.2s; }
.footer-social:hover { opacity: 1; }
.footer-social svg { width: 1.25rem; height: 1.25rem; }

/* ── Badge ─────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid transparent;
}
.badge-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--muted-foreground);
}
.badge-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #374151; }
.badge-pink { background: #fce7f3; color: #9d174d; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-orange { background: #ffedd5; color: #9a3412; }

/* ── Form Elements ─────────────────────────── */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.375rem;
}
.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(45,140,78,0.15);
}
.form-input::placeholder { color: var(--muted-foreground); }
.form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
}
.form-select:focus { border-color: var(--ring); box-shadow: 0 0 0 3px rgba(45,140,78,0.15); }
.form-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  font-size: 0.875rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 3px rgba(45,140,78,0.15); }
.form-error { color: var(--destructive); font-size: 0.875rem; margin-top: 0.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }

/* ── Pills/Category Filters ────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  border: none;
}
.pill-active { background: var(--primary); color: var(--primary-foreground); }
.pill-inactive { background: var(--muted); color: var(--muted-foreground); }
.pill-inactive:hover { background: #dceee2; }
.pill svg { width: 1rem; height: 1rem; }

/* ── Inline icon sizes ─────────────────────── */
.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 2rem; height: 2rem; }
.icon-2xl { width: 3rem; height: 3rem; }
.icon-3xl { width: 4rem; height: 4rem; }

/* ── Icon Box ──────────────────────────────── */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.icon-box-sm { width: 2rem; height: 2rem; }
.icon-box-md { width: 2.5rem; height: 2.5rem; }
.icon-box-lg { width: 3rem; height: 3rem; }
.icon-box-primary { background: rgba(45,140,78,0.1); color: var(--primary); }
.icon-box-green { background: #dcfce7; color: #166534; }
.icon-box-amber { background: #fef3c7; color: #92400e; }
.icon-box-blue { background: #dbeafe; color: #1e40af; }
.icon-box-chart3 { background: rgba(75,111,181,0.1); color: #4b6fb5; }
.icon-box-accent { background: rgba(196,160,53,0.2); color: var(--accent-foreground); }

/* ── Hero gradient ─────────────────────────── */
.hero-grad { background: linear-gradient(135deg, rgba(45,140,78,0.07) 0%, transparent 50%, rgba(196,160,53,0.07) 100%); }
.hero-grad-blue { background: linear-gradient(135deg, rgba(45,140,78,0.05) 0%, transparent 100%); }
.hero-grad-orange { background: linear-gradient(135deg, rgba(212,112,42,0.08) 0%, transparent 50%, rgba(155,77,181,0.08) 100%); }

/* ── Stats section ─────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

/* ── Services grid ─────────────────────────── */
.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); } }

.service-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.25s ease;
  overflow: hidden;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}
.service-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.1); transform: translateY(-2px); }
.service-icon-wrap {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.service-icon-wrap svg { width: 1.5rem; height: 1.5rem; }
.service-icon-primary { background: rgba(45,140,78,0.1); color: var(--primary); }
.service-icon-accent { background: rgba(196,160,53,0.1); color: var(--accent-foreground); }
.service-icon-chart3 { background: rgba(75,111,181,0.1); color: #4b6fb5; }
.service-icon-chart4 { background: rgba(212,112,42,0.1); color: #d4702a; }

/* ── Exam cards ────────────────────────────── */
.exam-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .exam-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── 3-col grid ────────────────────────────── */
.grid-3 {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ── 2-col grid ────────────────────────────── */
.grid-2 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* ── Dashboard grid (2-col on lg) ──────────── */
.grid-detail {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) { .grid-detail { grid-template-columns: 2fr 1fr; } }

/* ── Section spacing ───────────────────────── */
.section { padding: 4rem 0; }
@media (min-width: 1024px) { .section { padding: 6rem 0; } }
.section-sm { padding: 3rem 0; }
@media (min-width: 1024px) { .section-sm { padding: 4rem 0; } }

/* ── Features 2-col layout ─────────────────── */
.features-layout {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) { .features-layout { grid-template-columns: 1fr 1fr; align-items: center; } }

/* ── Feature item ──────────────────────────── */
.feature-item { display: flex; gap: 1rem; }
.features-inner-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
}
@media (min-width: 640px) { .features-inner-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Testimonials ──────────────────────────── */
.testimonials-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-top: 3rem;
}
@media (min-width: 768px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── How it works steps ────────────────────── */
.steps-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-top: 3rem;
}
@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step-number {
  width: 4rem;
  height: 4rem;
  background: var(--primary);
  color: white;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto;
}

/* ── Scroll Hide ───────────────────────────── */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Empty state ───────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state svg { width: 3rem; height: 3rem; color: var(--muted-foreground); opacity: 0.5; margin: 0 auto 1rem; }
.empty-state h3 { font-weight: 600; color: var(--foreground); }
.empty-state p { color: var(--muted-foreground); font-size: 0.875rem; margin-top: 0.5rem; }

/* ── Dashboard layout ──────────────────────── */
.dashboard-layout { display: flex; min-height: 100vh; flex-direction: column; }
@media (min-width: 1024px) { .dashboard-layout { flex-direction: row; } }
.dashboard-sidebar {
  width: 16rem;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 1.5rem;
  flex-shrink: 0;
  display: none;
}
@media (min-width: 1024px) { .dashboard-sidebar { display: flex; flex-direction: column; } }
.dashboard-main { flex: 1; padding: 2rem 1rem; }
@media (min-width: 1024px) { .dashboard-main { padding: 2rem; } }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 1.5rem; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: all 0.2s;
}
.sidebar-link:hover, .sidebar-link.active { background: var(--muted); color: var(--foreground); }
.sidebar-link svg { width: 1.125rem; height: 1.125rem; }

/* ── Spinner ───────────────────────────────── */
.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Dialog / Modal ────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 32rem;
  padding: 1.5rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
  transform: scale(0.95);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { margin-bottom: 1.5rem; }
.modal-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 700; color: var(--foreground); }
.modal-desc { font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.25rem; }
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  padding: 0.25rem;
  border-radius: var(--radius);
}
.modal-close:hover { background: var(--muted); color: var(--foreground); }

/* ── Code block ────────────────────────────── */
code.pin-code {
  display: inline-block;
  background: var(--muted);
  color: var(--foreground);
  padding: 0.25rem 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
}

/* ── Category filter bar ───────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 1rem 0;
}
.filter-bar::-webkit-scrollbar { display: none; }

/* ── Blog card ─────────────────────────────── */
.blog-featured {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
@media (min-width: 768px) { .blog-featured { grid-template-columns: 1fr 1fr; } }
.blog-featured-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(45,140,78,0.1), rgba(196,160,53,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-featured-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-featured-body { padding: 1.5rem; display: flex; flex-direction: column; }
@media (min-width: 768px) { .blog-featured-body { padding: 2rem; } }

.blog-card-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(45,140,78,0.1), rgba(196,160,53,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── Tutorial card ─────────────────────────── */
.tutorial-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all 0.25s; }
.tutorial-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.1); transform: translateY(-2px); }
.tutorial-thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, rgba(45,140,78,0.15), rgba(75,111,181,0.15)); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.tutorial-thumb img { width: 100%; height: 100%; object-fit: cover; }
.play-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
.tutorial-card:hover .play-overlay { opacity: 1; }
.play-btn { width: 3rem; height: 3rem; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); }

/* ── Pin reveal box ────────────────────────── */
.pin-box {
  background: rgba(45,140,78,0.05);
  border: 1px solid rgba(45,140,78,0.2);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1.5rem;
}
.pin-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; font-weight: 600; }

/* ── Section CTA ───────────────────────────── */
.cta-section { background: var(--primary); padding: 3rem 0; }
@media (min-width: 1024px) { .cta-section { padding: 4rem 0; } }
.cta-section h2, .cta-section p { color: var(--primary-foreground); }
.cta-section p { opacity: 0.9; }

/* ── Anonymous post ────────────────────────── */
.anon-post { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }

/* ── Sticky sidebar ────────────────────────── */
.sticky-top { position: sticky; top: 6rem; }

/* ── Aspect ratios ─────────────────────────── */
.aspect-square { aspect-ratio: 1/1; }
.aspect-video { aspect-ratio: 16/9; }

/* ── Text balance ──────────────────────────── */
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* ── Hover card lift ───────────────────────── */
.hover-lift { transition: all 0.25s; }
.hover-lift:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.1); transform: translateY(-4px); }

/* ── Utility combos ────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
