/* UniteGPS Resource Hub — public pages.
   Brand tokens mirror the landing-page repo (Inter, teal #3c7b86, slate #0f172a). */

:root {
  --teal: #3c7b86;
  --teal-dark: #2f6470;
  --teal-tint: #f0f7f8;
  --ink: #0f172a;
  --body: #374151;
  --muted: #64748b;
  --faint: #94a3b8;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .06);
  --shadow-hover: 0 4px 10px rgba(15, 23, 42, .08), 0 12px 28px rgba(15, 23, 42, .1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo-img { height: 40px; display: block; }
.main-nav { display: flex; align-items: center; gap: 8px; }

/* Narrow screens: wrap to a second row instead of overflowing the viewport. */
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0 14px; gap: 12px; justify-content: center; }
  .main-nav { width: 100%; justify-content: center; flex-wrap: wrap; gap: 6px; }
  .nav-link { padding: 7px 13px; font-size: 14px; }
}
.nav-link {
  font-size: 15px; font-weight: 500; color: var(--ink);
  padding: 8px 16px; border-radius: 8px; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--teal-tint); color: var(--teal-dark); }
.nav-cta { background: var(--teal); color: #fff; }
.nav-cta:hover { background: var(--teal-dark); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-weight: 600; font-size: 15px;
  padding: 12px 24px; border-radius: 8px; transition: background .15s, color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-light { background: #fff; color: var(--teal-dark); }
.btn-light:hover { background: var(--teal-tint); color: var(--teal-dark); }

/* ---------- Hub hero ---------- */
.hub-hero {
  background: linear-gradient(180deg, var(--teal-tint) 0%, #fff 100%);
  padding: 56px 0 40px; text-align: center;
}
.hub-hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.hub-hero p { font-size: 17px; color: var(--muted); }

/* ---------- Filter tabs ---------- */
.filter-tabs {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin: 8px 0 36px;
}
.filter-tab {
  font-size: 14px; font-weight: 600; color: var(--muted);
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; transition: all .15s;
}
.filter-tab:hover { border-color: var(--teal); color: var(--teal-dark); }
.filter-tab.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  padding-bottom: 56px;
}
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

.article-card {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--bg-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--teal-tint), #dbeaec);
}
.badge-recent {
  position: absolute; top: 12px; left: 12px;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 600;
  letter-spacing: .04em; padding: 5px 10px; border-radius: 999px;
}

.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-body h2, .card-title {
  font-size: 16.5px; font-weight: 700; color: var(--ink); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.card-date { font-size: 13px; color: var(--faint); }
.chip {
  font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  background: var(--teal-tint); color: var(--teal-dark);
}
.chip-service { background: #eef6ee; color: #3e7a44; }

.empty-state { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  padding-bottom: 64px;
}
.page-link { font-weight: 600; font-size: 14px; }
.page-status { font-size: 14px; color: var(--muted); }

/* ---------- Article hero ---------- */
.article-hero {
  background: linear-gradient(180deg, var(--teal-tint) 0%, #fff 100%);
  padding: 48px 0 36px;
}
.article-hero .container { max-width: 880px; }
.article-date { font-size: 14px; font-weight: 600; color: var(--teal-dark); }
.article-hero h1 {
  font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; color: var(--ink);
  line-height: 1.2; margin-top: 10px;
}

/* ---------- Article layout ---------- */
.article-layout {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px;
  padding: 16px 24px 64px;
}
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } }

.sidebar-sticky { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 900px) { .sidebar-sticky { position: static; } }

.toc-box {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
  background: #fff;
}
.toc-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--faint); margin-bottom: 12px; }
.toc-box ul { list-style: none; }
.toc-box li { margin-bottom: 10px; }
.toc-box a { font-size: 13.5px; color: var(--muted); line-height: 1.45; display: block; }
.toc-box a:hover { color: var(--teal-dark); }

.cta-box {
  background: var(--teal-tint); border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.cta-box h3 { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.cta-box .btn { text-align: center; }

/* ---------- Article body ---------- */
/* Scoped to beat the generic `.article-body img` rule below on specificity. */
.article-body .article-hero-image {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); margin: 0 0 30px;
}
.article-body { font-size: 16.5px; color: var(--body); max-width: 760px; }
.article-body h2 {
  font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.3;
  margin: 40px 0 16px; scroll-margin-top: 90px;
}
.article-body h3 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 30px 0 12px; }
.article-body h4 { font-size: 17px; font-weight: 700; color: var(--ink); margin: 24px 0 10px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--ink); }
.article-body img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); margin: 18px auto; }
.article-body blockquote {
  border-left: 4px solid var(--teal); background: var(--teal-tint);
  padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 22px 0;
  font-style: italic; color: var(--ink);
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body table {
  width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px;
  display: block; overflow-x: auto;
}
.article-body th, .article-body td {
  border: 1px solid var(--border); padding: 12px 16px; text-align: left;
}
.article-body th { background: var(--bg-soft); font-weight: 700; color: var(--ink); }
.article-body figure { margin: 22px 0; }
.article-body figcaption { font-size: 13px; color: var(--faint); text-align: center; margin-top: 8px; }

/* ---------- Related ---------- */
.related-section { background: var(--bg-soft); padding: 56px 0 40px; }
.related-section h2 { font-size: 26px; font-weight: 800; color: var(--ink); margin-bottom: 28px; }
.related-grid { padding-bottom: 16px; }

/* ---------- CTA banner ---------- */
.cta-banner { background: var(--teal); color: #fff; padding: 48px 0; }
.cta-banner-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-banner h2 { font-size: 26px; font-weight: 800; line-height: 1.3; margin-bottom: 10px; }
.cta-banner p { color: #d7e7ea; max-width: 560px; }
.cta-banner a { color: #fff; text-decoration: underline; }
.cta-banner .btn-light { color: var(--teal-dark); text-decoration: none; }
.cta-banner .btn-light:hover { color: var(--teal-dark); }

/* ---------- Preview banner ---------- */
.preview-banner {
  background: #b45309; color: #fff; text-align: center;
  font-size: 14px; font-weight: 600; padding: 10px;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 56px 0 24px; margin-top: 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 1.2fr; gap: 40px;
  padding-bottom: 40px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-logo { height: 36px; background: #fff; border-radius: 6px; padding: 4px 8px; }
.footer-tagline { margin-top: 14px; font-size: 14px; color: #94a3b8; max-width: 260px; }
.footer-col h3 {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #94a3b8; margin-bottom: 16px;
}
.footer-col address { font-style: normal; font-size: 14px; margin-bottom: 10px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-link { display: block; font-size: 14px; color: #cbd5e1; margin-bottom: 8px; line-height: 1.5; }
.footer-link:hover { color: #fff; }
.footer-viewall { font-size: 13px; font-weight: 600; color: #7fb3bc; }
.footer-viewall:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #1e293b; padding-top: 20px;
  font-size: 13px; color: #64748b; text-align: center;
}
