/*
Theme Name: Noblefolio Relocate
Theme URI: https://relocate.noblefolio.com
Author: Noblefolio
Author URI: https://relocate.noblefolio.com
Description: A visa, immigration, and relocation content theme with CRS score tools, LMIA job guides, Canada and UK immigration coverage. Built for relocate.noblefolio.com.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: noblefolio-relocate
Tags: blog, immigration, visa, custom-menu, featured-images, responsive-layout, translation-ready
*/

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

:root {
  --primary:    #d52b1e;
  --primary-dk: #b01e14;
  --dark:       #0d1117;
  --navy:       #0f172a;
  --navy2:      #1e3a5f;
  --accent:     #1a56db;
  --text:       #1a1a2e;
  --muted:      #6b7280;
  --border:     #e5e7eb;
  --bg:         #f9fafb;
  --card:       #ffffff;
  --tag-bg:     #f3f4f6;
  --red-light:  #fff5f5;
  --gold:       #f59e0b;
  --green:      #16a34a;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ─── TYPOGRAPHY ─── */
h1,h2,h3,h4,h5,h6 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

/* ─── SKIP LINK ─── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  z-index: 9999;
  font-weight: 700;
}
.skip-link:focus { top: 0; }

/* ─── SITE HEADER ─── */
.site-header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-logo {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -.5px;
}
.site-logo span { color: var(--primary); }

/* Primary Nav */
.primary-nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
}
.primary-nav ul li a {
  padding: 8px 13px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.primary-nav ul li a:hover,
.primary-nav ul li.current-menu-item a {
  background: var(--red-light);
  color: var(--primary);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text);
}

/* ─── INTENT BAR ─── */
.intent-bar {
  background: var(--dark);
  color: white;
  padding: 10px 20px;
}
.intent-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.intent-label {
  font-size: .78rem;
  font-weight: 700;
  opacity: .55;
  white-space: nowrap;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 800;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.live-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: #4ade80;
  border-radius: 50%;
  animation: livepulse 1.5s infinite;
}
@keyframes livepulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.4; transform:scale(1.4); }
}
.intent-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.intent-tab {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: white;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, border-color .18s;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}
.intent-tab:hover,
.intent-tab.active {
  background: var(--primary);
  border-color: var(--primary);
}

/* ─── HERO ─── */
.site-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 55%, #0f3460 100%);
  color: white;
  text-align: center;
  padding: 80px 20px 70px;
  position: relative;
  overflow: hidden;
}
.site-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 700px; margin: 0 auto; }
.hero-inner h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
  line-height: 1.15;
}
.hero-inner p {
  font-size: 1.05rem;
  opacity: .85;
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-btn {
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  font-size: .95rem;
  transition: all .2s;
  cursor: pointer;
  border: 2px solid transparent;
}
.hero-btn.primary { background: var(--primary); color: white; }
.hero-btn.primary:hover { background: var(--primary-dk); }
.hero-btn.outline { background: transparent; color: white; border-color: rgba(255,255,255,.5); }
.hero-btn.outline:hover { background: rgba(255,255,255,.1); border-color: white; }

/* ─── TICKER ─── */
.live-ticker {
  background: var(--red-light);
  border-top: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  padding: 10px 20px;
  text-align: center;
  font-size: .88rem;
  font-weight: 600;
  color: var(--primary);
}
.live-ticker .tick-label {
  background: var(--primary);
  color: white;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-right: 8px;
}

/* ─── MAIN LAYOUT ─── */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
}

/* ─── SECTION HEADING ─── */
.section-heading {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
}

/* ─── POST CARDS ─── */
.posts-loop { margin-bottom: 40px; }
.post-cards { display: flex; flex-direction: column; gap: 20px; }

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 180px 1fr;
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.09);
  transform: translateY(-2px);
}
.post-card-thumb {
  width: 100%;
  height: 100%;
  min-height: 130px;
  object-fit: cover;
}
.post-card-thumb-placeholder {
  width: 100%;
  min-height: 130px;
  height: 100%;
  background: linear-gradient(135deg, #f1f5f9, #dde4ee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.post-card-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--muted);
}
.post-author-name { color: var(--accent); font-weight: 600; }
.post-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  transition: color .15s;
}
.post-card-title:hover { color: var(--primary); }
.post-card-excerpt { font-size: .84rem; color: var(--muted); line-height: 1.55; }
.post-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.post-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.post-cat {
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--tag-bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.read-more {
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.read-more:hover { text-decoration: underline; }

/* ─── FEATURE GRID (5 cards) ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin: 36px 0;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  transition: all .2s;
  cursor: pointer;
}
.feature-card:hover {
  border-color: var(--primary);
  background: var(--red-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(213,43,30,.1);
}
.feature-card .fc-icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.feature-card h3 { font-size: .9rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.feature-card p { font-size: .78rem; color: var(--muted); line-height: 1.5; }

/* ─── AD SLOT ─── */
.ad-slot {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  margin: 16px 0;
}

/* ─── SIDEBAR ─── */
.sidebar { display: flex; flex-direction: column; gap: 22px; }

.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.widget-title {
  padding: 15px 20px;
  font-size: .92rem;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-body { padding: 18px 20px; }

/* Dark widget (CRS quiz) */
.widget-dark {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color: white;
  border-color: transparent;
}
.widget-dark .widget-title { border-color: rgba(255,255,255,.1); color: white; }

/* Quiz options */
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.quiz-opt {
  padding: 9px 8px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255,255,255,.06);
  color: white;
  transition: all .15s;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
}
.quiz-opt:hover, .quiz-opt.selected {
  background: var(--primary);
  border-color: var(--primary);
}
.quiz-q { font-size: .82rem; font-weight: 600; opacity: .85; margin-bottom: 8px; }

.quiz-result-box {
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  margin-top: 8px;
}
.crs-number { font-size: 2.2rem; font-weight: 800; font-family: 'Sora', sans-serif; color: #fbbf24; }
.quiz-sub { font-size: .78rem; opacity: .75; margin-top: 5px; }
.btn-full {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  font-size: .9rem;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all .2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dk); }
.btn-outline-white {
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  color: white;
}
.btn-outline-white:hover { background: rgba(255,255,255,.1); }

/* Topic list widget */
.topic-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background .15s;
  cursor: pointer;
}
.topic-item:hover { background: var(--tag-bg); }
.topic-name { font-size: .87rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.topic-count {
  font-size: .73rem;
  font-weight: 700;
  background: var(--tag-bg);
  color: var(--muted);
  padding: 2px 9px;
  border-radius: 20px;
}

/* Next steps widget */
.next-step-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .87rem;
  font-weight: 600;
  margin-bottom: 8px;
  transition: all .2s;
  color: var(--text);
}
.next-step-link:last-child { margin-bottom: 0; }
.next-step-link:hover {
  background: var(--red-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ─── UK BANNER ─── */
.uk-banner {
  background: linear-gradient(135deg, #003078 0%, #c8102e 100%);
  color: white;
  text-align: center;
  padding: 60px 20px;
}
.uk-banner h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 12px; color: white; }
.uk-banner p { opacity: .85; max-width: 480px; margin: 0 auto 28px; }
.uk-cta-btn {
  display: inline-block;
  padding: 14px 40px;
  background: white;
  color: #003078;
  font-weight: 800;
  font-family: 'Sora', sans-serif;
  border-radius: 10px;
  font-size: 1rem;
  transition: opacity .2s;
}
.uk-cta-btn:hover { opacity: .88; }

/* ─── PAGINATION ─── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
}
.page-num {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  transition: all .15s;
  cursor: pointer;
}
.page-num.current, .page-num:hover { background: var(--primary); color: white; border-color: var(--primary); }
.page-next {
  padding: 0 16px;
  width: auto;
  border-radius: 8px;
  height: 36px;
}

/* ─── DISCLAIMER ─── */
.site-disclaimer {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px;
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

/* ─── FOOTER ─── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.55);
  text-align: center;
  padding: 22px 20px;
  font-size: .82rem;
}
.site-footer a {
  color: rgba(255,255,255,.8);
  font-weight: 600;
  margin: 0 10px;
}
.site-footer a:hover { color: white; }

/* ─── SINGLE POST ─── */
.single-post-wrap {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}
.single-post-header { margin-bottom: 28px; }
.single-post-header h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.single-post-thumb {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 28px;
  max-height: 420px;
  object-fit: cover;
}
.single-post-content { font-size: 1rem; line-height: 1.75; }
.single-post-content h2 { font-size: 1.5rem; margin: 28px 0 12px; }
.single-post-content h3 { font-size: 1.2rem; margin: 22px 0 10px; }
.single-post-content p { margin-bottom: 16px; }
.single-post-content ul, .single-post-content ol { padding-left: 22px; margin-bottom: 16px; }
.single-post-content ul { list-style: disc; }
.single-post-content ol { list-style: decimal; }
.single-post-content li { margin-bottom: 6px; }
.single-post-content a { color: var(--accent); text-decoration: underline; }

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
  .site-main { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
@media (max-width: 680px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card-thumb, .post-card-thumb-placeholder { min-height: 180px; height: 200px; }
  .primary-nav { display: none; }
  .nav-toggle { display: flex; align-items: center; }
  .primary-nav.open { display: block; }
  .primary-nav.open ul { flex-direction: column; padding: 12px 0; }
  .intent-tabs { gap: 5px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
