/**
 * CanadaPathfinder Theme — Main Stylesheet
 * Premium, institutional, trust-forward, mobile-first, bilingual-ready
 */

/* ══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cpt-primary: #c41e3a;
  --cpt-primary-dark: #a01830;
  --cpt-primary-light: #fef2f2;
  --cpt-secondary: #1a365d;
  --cpt-secondary-light: #2d4a7a;
  --cpt-accent: #0c4a6e;
  --cpt-success: #16a34a;
  --cpt-text: #1e293b;
  --cpt-text-light: #475569;
  --cpt-muted: #64748b;
  --cpt-bg: #ffffff;
  --cpt-bg-light: #f8fafc;
  --cpt-bg-warm: #fefce8;
  --cpt-border: #e2e8f0;
  --cpt-border-light: #f1f5f9;
  --cpt-radius: 8px;
  --cpt-radius-lg: 12px;
  --cpt-radius-xl: 16px;
  --cpt-shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --cpt-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --cpt-shadow-md: 0 4px 6px rgba(0,0,0,.07);
  --cpt-shadow-lg: 0 10px 25px rgba(0,0,0,.1);
  --cpt-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cpt-container: 1200px;
  --cpt-container-narrow: 720px;
  --cpt-header-h: 72px;
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--cpt-font);
  color: var(--cpt-text);
  background: var(--cpt-bg);
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cpt-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cpt-primary-dark); }

/* ══════════════════════════════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-container {
  max-width: var(--cpt-container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.cpt-container--narrow { max-width: var(--cpt-container-narrow); }

.cpt-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: .5rem 1rem;
  background: var(--cpt-secondary);
  color: #fff;
  z-index: 9999;
}
.cpt-skip-link:focus { left: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cpt-border);
  height: var(--cpt-header-h);
}
.cpt-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--cpt-header-h);
  gap: 1.5rem;
}

/* Brand */
.cpt-header__brand a, .cpt-header__logo-text {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: 1.2rem;
  color: var(--cpt-secondary);
  text-decoration: none;
  font-weight: 500;
}
.cpt-header__logo-link { display: flex; align-items: center; }
.cpt-header__logo-img { max-width: 240px; max-height: 50px; width: auto; height: auto; display: block; }
.cpt-header__logo-maple { font-size: 1.5rem; }
.cpt-header__brand strong { font-weight: 700; }

/* Nav */
.cpt-header__nav { flex: 1; display: flex; justify-content: center; }
.cpt-nav { list-style: none; display: flex; gap: .25rem; padding: 0; margin: 0; }
.cpt-nav li { position: relative; }
.cpt-nav a {
  display: block;
  padding: .5rem .75rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--cpt-text-light);
  border-radius: var(--cpt-radius);
  transition: all .2s;
}
.cpt-nav a:hover, .cpt-nav .current-menu-item > a {
  color: var(--cpt-primary);
  background: var(--cpt-primary-light);
}

/* Submenu */
.cpt-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--cpt-border);
  border-radius: var(--cpt-radius);
  box-shadow: var(--cpt-shadow-md);
  min-width: 200px;
  padding: .5rem 0;
  list-style: none;
  z-index: 100;
}
.cpt-nav li:hover > .sub-menu { display: block; }
.cpt-nav .sub-menu a { padding: .4rem 1rem; font-size: .85rem; }

/* Header actions */
.cpt-header__actions { display: flex; align-items: center; gap: .75rem; }
.cpt-header__cta { white-space: nowrap; }

/* Mobile toggle */
.cpt-header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.cpt-header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cpt-text);
  border-radius: 2px;
  transition: all .3s;
}

/* Mobile menu */
.cpt-mobile-menu {
  background: #fff;
  border-bottom: 1px solid var(--cpt-border);
  box-shadow: var(--cpt-shadow-lg);
}
.cpt-mobile-menu__inner { padding: 1rem 1.5rem 1.5rem; }
.cpt-mobile-nav { list-style: none; padding: 0; margin: 0; }
.cpt-mobile-nav a {
  display: block;
  padding: .75rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--cpt-text);
  border-bottom: 1px solid var(--cpt-border-light);
}
.cpt-mobile-menu__actions { margin-top: 1rem; display: flex; flex-direction: column; gap: .75rem; }

@media (max-width: 960px) {
  .cpt-header__nav, .cpt-header__actions .cp-lang-switcher, .cpt-header__cta { display: none; }
  .cpt-header__toggle { display: flex; }
}

/* ══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .7rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--cpt-radius);
  font-size: .95rem;
  font-weight: 600;
  font-family: var(--cpt-font);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  line-height: 1.4;
}
.cpt-btn--sm { padding: .45rem 1rem; font-size: .85rem; }
.cpt-btn--lg { padding: .85rem 2rem; font-size: 1.05rem; }
.cpt-btn--full { width: 100%; }

.cpt-btn--primary { background: var(--cpt-primary); color: #fff; border-color: var(--cpt-primary); }
.cpt-btn--primary:hover { background: var(--cpt-primary-dark); border-color: var(--cpt-primary-dark); color: #fff; }

.cpt-btn--outline { background: transparent; color: var(--cpt-primary); border-color: var(--cpt-primary); }
.cpt-btn--outline:hover { background: var(--cpt-primary); color: #fff; }

.cpt-btn--outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.cpt-btn--outline-white:hover { background: rgba(255,255,255,.15); border-color: #fff; color: #fff; }

.cpt-btn--secondary { background: var(--cpt-secondary); color: #fff; border-color: var(--cpt-secondary); }

/* ══════════════════════════════════════════════════════════════════════════
   HEROES
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-hero {
  padding: 4rem 0 3rem;
  position: relative;
}
.cpt-hero--home {
  background: linear-gradient(135deg, var(--cpt-secondary) 0%, var(--cpt-secondary-light) 50%, #1e4976 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  min-height: 480px;
  display: flex;
  align-items: center;
}
.cpt-hero--funnel {
  background: linear-gradient(135deg, var(--cpt-secondary) 0%, #1e4976 100%);
  color: #fff;
  padding: 4rem 0 3rem;
}
.cpt-hero--default {
  background: var(--cpt-bg-light);
  border-bottom: 1px solid var(--cpt-border);
  padding: 3rem 0 2.5rem;
}

.cpt-hero__inner { display: flex; align-items: center; gap: 3rem; }
.cpt-hero__content { flex: 1; max-width: 640px; }

.cpt-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -.02em;
}
.cpt-hero--default .cpt-hero__title { color: var(--cpt-secondary); font-size: clamp(1.5rem, 3vw, 2.25rem); }

.cpt-hero__subtitle {
  font-size: clamp(.95rem, 1.5vw, 1.15rem);
  line-height: 1.6;
  margin-bottom: 1.75rem;
  opacity: .9;
}
.cpt-hero--default .cpt-hero__subtitle { color: var(--cpt-muted); }

.cpt-hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.cpt-hero__visual { flex-shrink: 0; }
.cpt-hero__badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--cpt-radius-lg);
  padding: 1rem 1.5rem;
  font-size: .9rem;
  font-weight: 500;
}
.cpt-hero__badge-icon { font-size: 1.5rem; }

@media (max-width: 768px) {
  .cpt-hero__inner { flex-direction: column; text-align: center; }
  .cpt-hero__actions { justify-content: center; }
  .cpt-hero__visual { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-section { padding: 4rem 0; }
.cpt-section--white { background: #fff; }
.cpt-section--light { background: var(--cpt-bg-light); }
.cpt-section--accent { background: linear-gradient(135deg, var(--cpt-secondary) 0%, #1e4976 100%); color: #fff; }
.cpt-section--cta-final {
  background: linear-gradient(135deg, var(--cpt-primary) 0%, var(--cpt-primary-dark) 100%);
  color: #fff;
  padding: 4rem 0;
}
.cpt-section--cta-final h2 { color: #fff; }
.cpt-section--cta-final p { color: rgba(255,255,255,.85); margin-bottom: 1.5rem; }
.cpt-section--legal { padding: 2rem 0; }

.cpt-section__title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: .75rem;
  color: var(--cpt-secondary);
}
.cpt-section__title--white { color: #fff; }

.cpt-section__subtitle {
  text-align: center;
  color: var(--cpt-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.cpt-section__subtitle--white { color: rgba(255,255,255,.8); }

.cpt-section__micro {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  margin-top: .75rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   TRUST STRIP
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-trust-strip {
  background: var(--cpt-bg-light);
  border-bottom: 1px solid var(--cpt-border);
  padding: 1rem 0;
}
.cpt-trust-strip__inner {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.cpt-trust-strip__item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--cpt-muted);
}
.cpt-trust-strip__icon { font-size: 1rem; }

/* ══════════════════════════════════════════════════════════════════════════
   STEP CARDS
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}
.cpt-steps-grid--vertical { grid-template-columns: 1fr; }

.cpt-step-card {
  background: var(--cpt-bg);
  border: 1px solid var(--cpt-border);
  border-radius: var(--cpt-radius-lg);
  padding: 1.5rem;
  position: relative;
}
.cpt-step-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--cpt-primary);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: .75rem;
}
.cpt-step-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .4rem;
  color: var(--cpt-secondary);
}
.cpt-step-card p {
  font-size: .9rem;
  color: var(--cpt-text-light);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════════════
   TWO COLUMN
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}
.cpt-two-col h3 { color: var(--cpt-secondary); margin-bottom: .5rem; }
@media (max-width: 640px) { .cpt-two-col { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.cpt-card {
  background: #fff;
  border: 1px solid var(--cpt-border);
  border-radius: var(--cpt-radius-lg);
  overflow: hidden;
  transition: all .2s;
}
.cpt-card:hover { box-shadow: var(--cpt-shadow-md); transform: translateY(-2px); }
.cpt-card__image img { width: 100%; height: 200px; object-fit: cover; }
.cpt-card__body { padding: 1.25rem; }
.cpt-card__title { font-size: 1.05rem; font-weight: 600; margin-bottom: .35rem; }
.cpt-card__title a { color: var(--cpt-text); }
.cpt-card__title a:hover { color: var(--cpt-primary); }
.cpt-card__excerpt { font-size: .9rem; color: var(--cpt-muted); line-height: 1.6; }

/* ══════════════════════════════════════════════════════════════════════════
   PROSE
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-prose h2 { font-size: 1.5rem; font-weight: 700; color: var(--cpt-secondary); margin: 2rem 0 .75rem; }
.cpt-prose h3 { font-size: 1.2rem; font-weight: 600; color: var(--cpt-secondary); margin: 1.5rem 0 .5rem; }
.cpt-prose p { margin-bottom: 1rem; color: var(--cpt-text-light); }
.cpt-prose ul, .cpt-prose ol { margin: 1rem 0 1rem 1.5rem; color: var(--cpt-text-light); }
.cpt-prose li { margin-bottom: .4rem; }

/* ══════════════════════════════════════════════════════════════════════════
   PAGES
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-page { padding: 3rem 0; }
.cpt-page__title { font-size: 2rem; font-weight: 700; color: var(--cpt-secondary); margin-bottom: 1.5rem; }

.cpt-single { padding: 3rem 0; }
.cpt-single__title { font-size: 2rem; font-weight: 700; color: var(--cpt-secondary); margin-bottom: .5rem; }
.cpt-single__meta { color: var(--cpt-muted); font-size: .85rem; margin-bottom: 1.5rem; }
.cpt-single__featured { margin-bottom: 2rem; border-radius: var(--cpt-radius-lg); overflow: hidden; }
.cpt-single__featured img { width: 100%; }

.cpt-archive { padding: 3rem 0; }
.cpt-archive__header { margin-bottom: 2rem; }
.cpt-archive__title { font-size: 1.75rem; font-weight: 700; color: var(--cpt-secondary); }
.cpt-archive__desc { color: var(--cpt-muted); margin-top: .5rem; }

/* Thank you */
.cpt-thank-you__icon { font-size: 3rem; margin-bottom: 1rem; }
.cpt-thank-you__message { font-size: 1.1rem; color: var(--cpt-text-light); max-width: 560px; margin: 0 auto 2rem; }
.cpt-thank-you__disclosure { max-width: 560px; margin: 1.5rem auto; }

/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-footer__disclaimer {
  background: #fffbeb;
  border-top: 1px solid #fde68a;
  padding: .75rem 0;
  font-size: .8rem;
  color: #92400e;
}

.cpt-footer__main {
  background: var(--cpt-secondary);
  color: rgba(255,255,255,.8);
  padding: 3rem 0;
}
.cpt-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 768px) {
  .cpt-footer__grid { grid-template-columns: 1fr; }
}

.cpt-footer__logo {
  font-size: 1.2rem;
  color: #fff;
  display: block;
  margin-bottom: .75rem;
  text-decoration: none;
}
.cpt-footer__logo:hover { color: #fff; }
.cpt-footer__logo-link { display: block; margin-bottom: .75rem; }
.cpt-footer__logo-img { max-width: 180px; max-height: 50px; width: auto; height: auto; display: block; }
.cpt-footer__tagline { font-size: .85rem; line-height: 1.6; margin-bottom: 1rem; }

.cpt-footer__col h4 {
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .75rem;
}
.cpt-footer__col ul { list-style: none; padding: 0; margin: 0; }
.cpt-footer__col a { color: rgba(255,255,255,.7); font-size: .875rem; display: block; padding: .2rem 0; }
.cpt-footer__col a:hover { color: #fff; }

.cpt-footer__legal {
  background: #0f2440;
  padding: 1rem 0;
  font-size: .8rem;
}
.cpt-footer__legal-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  color: rgba(255,255,255,.5);
}
.cpt-legal-nav { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0; }
.cpt-legal-nav a { color: rgba(255,255,255,.5); font-size: .8rem; }
.cpt-legal-nav a:hover { color: #fff; }

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE CTA BAR
   ══════════════════════════════════════════════════════════════════════════ */
.cpt-mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #fff;
  border-top: 1px solid var(--cpt-border);
  padding: .75rem 1rem;
  box-shadow: 0 -2px 10px rgba(0,0,0,.1);
}
@media (max-width: 768px) {
  .cpt-mobile-cta { display: block; }
  .cpt-footer { padding-bottom: 80px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════════════════ */
.navigation.pagination {
  margin-top: 2rem;
  text-align: center;
}
.page-numbers {
  display: inline-block;
  padding: .4rem .8rem;
  margin: 0 .15rem;
  border: 1px solid var(--cpt-border);
  border-radius: var(--cpt-radius);
  font-size: .85rem;
  color: var(--cpt-text-light);
}
.page-numbers.current { background: var(--cpt-primary); color: #fff; border-color: var(--cpt-primary); }

/* ══════════════════════════════════════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════════════════════════════════════ */
.wp-block-image img { border-radius: var(--cpt-radius); }
