/* ================================================================
   Canada's Pulse — Shared Stylesheet
   Covers: layout, navigation, cards, footer, utilities
   Page-specific hero/theme styles live in each HTML file
   ================================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --primary:      #1a1a2e;
  --primary2:     #111827;
  --accent:       #e94560;
  --accent2:      #0f3460;
  --ai-blue:      #3b82f6;
  --ai-purple:    #8b5cf6;
  --ai-cyan:      #06b6d4;
  --green:        #10b981;
  --green-dark:   #2e7d32;
  --green-light:  #e8f5e9;
  --orange:       #f59e0b;
  --gold:         #fbbf24;
  --purple:       #7c3aed;
  --blue:         #3b82f6;
  --light:        #f5f5f5;
  --card-bg:      #ffffff;
  --text:         #222;
  --muted:        #666;
  --radius:       14px;
  --shadow:       0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.16);
}

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

/* ===== BODY ===== */
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--light);
  color: var(--text);
  min-height: 100vh;
}

/* ================================================================
   NAVIGATION
   ================================================================ */
.shared-site-nav {
  background: #1a1a2e;
  position: sticky;
  top: 0;
  z-index: 9999;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
  font-family: 'Inter', 'Segoe UI', sans-serif;
}
.shared-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  flex-wrap: wrap;
}
.shared-brand {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: .5px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 8px;
}
.shared-brand span { color: #e94560; }

.shared-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}
.shared-links a {
  color: #ccc;
  text-decoration: none;
  font-size: .76rem;
  font-weight: 600;
  padding: 5px 7px;
  border-radius: 6px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.shared-links a:hover {
  color: #fff;
  background: rgba(233,69,96,.15);
}
.shared-links a.active {
  color: #fff;
  background: #e94560;
}
.shared-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 6px 8px;
  line-height: 1;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .shared-nav-inner {
    height: auto;
    padding: 10px 16px;
    flex-wrap: wrap;
  }
  .shared-nav-toggle { display: block; }
  .shared-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 0 12px;
    gap: 2px;
  }
  .shared-links.open { display: flex; }
  .shared-links a {
    width: 100%;
    padding: 10px 12px;
    font-size: .9rem;
  }
}

/* ================================================================
   TICKER
   ================================================================ */
.ticker-wrap {
  background: var(--accent);
  overflow: hidden;
  padding: 8px 0;
}
.ticker {
  display: flex;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}
.ticker:hover { animation-play-state: paused; }
.ticker span {
  padding: 0 40px;
  font-size: .82rem;
  font-weight: 700;
  color: #fff;
}
.ticker-sep { color: rgba(255,255,255,.4); }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ================================================================
   LAYOUT
   ================================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 48px 0; }

.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 1000px) {
  .main-layout { grid-template-columns: 1fr; }
}

.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ================================================================
   SECTION TITLES
   ================================================================ */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
  margin-left: 12px;
}
.section-sub {
  color: var(--muted);
  font-size: .88rem;
  margin-bottom: 24px;
}

/* ================================================================
   CATEGORY TABS
   ================================================================ */
.cat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.cat-tab {
  background: var(--card-bg);
  border: 2px solid #e0e0e0;
  color: var(--text);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
  white-space: nowrap;
}
.cat-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.cat-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ================================================================
   HERO BADGE (shared across pages)
   ================================================================ */
.hero-badge {
  display: inline-block;
  background: rgba(251,191,36,.15);
  border: 1px solid rgba(251,191,36,.5);
  color: #fbbf24;
  font-size: .72rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ================================================================
   FEATURED STORY
   ================================================================ */
.featured-story {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.15);
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-left: 6px solid var(--accent);
  animation: slideIn .6s ease-out;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (max-width: 768px) {
  .featured-story { grid-template-columns: 1fr; }
}
.featured-img {
  height: 320px;
  overflow: hidden;
  position: relative;
}
.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.featured-story:hover .featured-img img { transform: scale(1.05); }
.feat-cat {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.featured-body {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feat-label {
  font-size: .75rem;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.feat-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 14px;
}
.feat-excerpt {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 18px;
}
.feat-meta {
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ================================================================
   NEWS CARDS
   ================================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}
.news-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s, border-color .3s;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.news-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
  border-color: var(--accent);
}
.news-img {
  width: 100%;
  height: 210px;
  position: relative;
  overflow: hidden;
}
.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.news-card:hover .news-img img { transform: scale(1.07); }
.news-badge-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
}
.news-badge-time {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: .7rem;
  padding: 3px 9px;
  border-radius: 6px;
}
.news-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-title {
  font-family: 'Syne', 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}
.news-excerpt {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 12px;
}
.news-meta {
  display: flex;
  justify-content: space-between;
  font-size: .77rem;
  color: var(--muted);
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
}
.news-source {
  font-weight: 700;
  color: var(--accent);
}

/* ================================================================
   TOPIC CARDS
   ================================================================ */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}
.topic-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border-top: 4px solid var(--accent);
  transition: transform .25s, box-shadow .25s;
  cursor: pointer;
}
.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 32px rgba(0,0,0,.14);
}
.topic-icon { font-size: 2.2rem; margin-bottom: 12px; }
.topic-title {
  font-family: 'Syne', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.topic-desc {
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.5;
}
.topic-count {
  font-size: .75rem;
  color: var(--accent);
  font-weight: 700;
  margin-top: 10px;
}
.topic-img {
  height: 140px;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px) calc(var(--radius) - 4px) 0 0;
  margin: -24px -24px 16px -24px;
  position: relative;
}
.topic-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.topic-card:hover .topic-img img { transform: scale(1.06); }

/* ================================================================
   TRENDING LIST
   ================================================================ */
.trending-list {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 32px;
}
.trending-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background .2s;
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { background: #fff9fb; }
.trend-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: .82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.trend-num.hot {
  background: linear-gradient(135deg, #ff6b35, #e94560);
}
.trend-info { flex: 1; min-width: 0; }
.trend-title {
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.35;
  margin-bottom: 3px;
}
.trend-meta { font-size: .75rem; color: var(--muted); }
.trend-cat {
  font-size: .7rem;
  font-weight: 800;
  color: var(--accent);
  background: rgba(233,69,96,.1);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar-widget {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
  border-left: 4px solid var(--accent);
}
.widget-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.widget-link {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: var(--text);
  font-size: .88rem;
  font-weight: 600;
  transition: color .2s;
}
.widget-link:last-child { border-bottom: none; }
.widget-link:hover { color: var(--accent); }
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: .86rem;
}
.stat-row:last-child { border-bottom: none; }
.stat-label { color: var(--muted); }
.stat-value { font-weight: 800; color: var(--primary); }

/* ================================================================
   PROGRESS BAR
   ================================================================ */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 0;
  z-index: 200;
  transition: width .1s;
}

/* ================================================================
   COMMON BUTTONS
   ================================================================ */
.cta-btn {
  padding: 12px 26px;
  border-radius: 50px;
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
  font-family: 'Inter', sans-serif;
  border: none;
}
.cta-primary   { background: var(--accent); color: #fff; }
.cta-primary:hover { background: #c73652; transform: translateY(-2px); }
.cta-secondary {
  background: transparent;
  border: 2px solid rgba(255,255,255,.3);
  color: #fff;
}
.cta-secondary:hover { background: rgba(255,255,255,.1); }
.cta-green     { background: var(--green); color: #fff; }
.cta-green:hover { background: #059669; transform: translateY(-2px); }
.cta-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,.3);
  color: #fff;
}
.cta-outline:hover { background: rgba(255,255,255,.1); }

.source-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: background .2s;
}
.source-btn:hover { background: #c73652; }

/* ================================================================
   AD SLOTS
   ================================================================ */
.ad-banner {
  background: #e8e8e8;
  text-align: center;
  padding: 12px;
  font-size: .78rem;
  color: #999;
  border-bottom: 1px solid #ddd;
}
.ad-slot {
  display: inline-block;
  width: 728px;
  height: 90px;
  background: #d5d5d5;
  line-height: 90px;
  border-radius: 6px;
  max-width: 100%;
  font-size: .8rem;
  color: #aaa;
}
.ad-inline {
  background: #f0f0f0;
  border-radius: var(--radius);
  text-align: center;
  padding: 16px;
  margin: 32px 0;
}
.ad-slot-rect {
  display: inline-block;
  width: 336px;
  height: 280px;
  background: #ddd;
  line-height: 280px;
  border-radius: 8px;
  color: #aaa;
  font-size: .8rem;
  max-width: 100%;
}
.ad-label { font-size: .7rem; color: #bbb; margin-bottom: 6px; }

/* ================================================================
   NOTICE / ALERT BOXES
   ================================================================ */
.notice {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: .85rem;
  color: #795548;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ================================================================
   FOOTER
   ================================================================ */
footer {
  background: var(--primary);
  color: #aaa;
  padding: 48px 24px 24px;
  margin-top: 64px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-col p  { font-size: .85rem; line-height: 1.6; }
.footer-col a {
  display: block;
  color: #888;
  text-decoration: none;
  font-size: .85rem;
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid #2a2a4a;
  padding-top: 20px;
  text-align: center;
  font-size: .8rem;
}
.footer-bottom a {
  color: #888;
  text-decoration: none;
  margin: 0 8px;
}
.footer-bottom a:hover { color: var(--accent); }
#last-updated { color: var(--accent); font-weight: 600; }

/* ================================================================
   RESPONSIVE UTILITIES
   ================================================================ */
@media (max-width: 768px) {
  .news-grid { grid-template-columns: 1fr; }
  .featured-body { padding: 24px; }
  .feat-title { font-size: 1.4rem; }
}

/* ================================================================
   NEWSLETTER SIGNUP WIDGET (sitewide)
   ================================================================ */
.newsletter-strip {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 60%, #e94560 140%);
  color: #fff;
  padding: 48px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter-strip::before {
  content: '📬';
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  font-size: 6rem;
  opacity: .08;
  pointer-events: none;
}
.newsletter-strip-inner { max-width: 560px; margin: 0 auto; }
.newsletter-strip h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 8px;
}
.newsletter-strip p {
  color: rgba(255,255,255,.75);
  font-size: .95rem;
  margin-bottom: 22px;
  line-height: 1.6;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 13px 18px;
  border-radius: 999px;
  border: none;
  font-size: .9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  color: #1a1a2e;
}
.newsletter-form button {
  padding: 13px 26px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s, transform .2s;
  white-space: nowrap;
}
.newsletter-form button:hover { background: #c73652; transform: translateY(-1px); }
.newsletter-success {
  display: none;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 10px;
  padding: 12px 20px;
  font-size: .9rem;
  margin-top: 14px;
  color: #fff;
}
.newsletter-strip .nl-badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.newsletter-strip .nl-badge {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ================================================================
   EXPLORE MORE SECTION (sitewide cross-linking)
   ================================================================ */
.explore-more {
  background: #f8f8fc;
  padding: 48px 24px;
  border-top: 1px solid #e8e8ee;
}
.explore-more-inner { max-width: 1200px; margin: 0 auto; }
.explore-more h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--primary);
}
.explore-more-sub {
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.explore-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  padding: 20px 14px;
  text-align: center;
  text-decoration: none;
  color: var(--primary);
  transition: transform .22s, box-shadow .22s;
  display: block;
  border: 2px solid transparent;
}
.explore-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.explore-card-icon { font-size: 2rem; margin-bottom: 8px; }
.explore-card-label {
  font-weight: 800;
  font-size: .82rem;
  line-height: 1.3;
}
@media(max-width:600px){
  .explore-grid { grid-template-columns: repeat(3,1fr); }
}
