/*
  shared.css — CNIS Website Shared Styles
  Canvas: 1200px max-width, desktop-first
  Palette:
    --brand-blue: #1F4E9E
    --grad-start: #0E3C84
    --grad-end: #1A5BB5
    --text-main: #333
    --text-sub: #666
    --bg-light: #F2F6FC
    --white: #FFFFFF
    --research-blue: #2E6FD6
    --research-orange: #F5A623
    --research-purple: #7B5FB0
    --africa-green: #5BB879
*/

:root {
  --brand-blue: #1F4E9E;
  --grad-start: #0E3C84;
  --grad-end: #1A5BB5;
  --text-main: #333;
  --text-sub: #666;
  --bg-light: #F2F6FC;
  --white: #FFFFFF;
  --research-blue: #2E6FD6;
  --research-orange: #F5A623;
  --research-purple: #7B5FB0;
  --africa-green: #5BB879;
  --border-light: #D8E4F5;
  --shadow: 0 4px 20px rgba(31,78,158,0.12);
}

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

body {
  font-family: Arial, "Helvetica Neue", Helvetica, "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: #fff;
  min-width: 320px;
}

a { text-decoration: none; color: inherit; }

/* ===== HEADER ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e8eef8;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 6px 24px;
  border-bottom: 1px solid #eef2fa;
  font-size: 12px;
}

.header-top a {
  color: var(--brand-blue);
  font-size: 12px;
  cursor: pointer;
}

.header-top a:hover { text-decoration: underline; }

.search-box {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-light);
  border-radius: 20px;
  padding: 3px 10px;
  gap: 6px;
  background: #fff;
}

.search-box input {
  border: none;
  outline: none;
  font-size: 12px;
  width: 120px;
  color: var(--text-main);
}

.search-box button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  color: var(--text-sub);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  padding: 8px 0;
  text-decoration: none;
}

.logo-link .logo-img {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
  border: none;
  background: none;
  box-shadow: none;
}

.logo-text {
  /* kept for backward compat; no longer rendered */
  display: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.main-nav a {
  display: block;
  padding: 18px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}

.main-nav a:hover { color: var(--brand-blue); }

.main-nav a.active {
  color: var(--brand-blue);
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  background: var(--brand-blue);
  border-radius: 2px 2px 0 0;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--brand-blue);
  color: #fff;
  padding: 20px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-text { flex: 1; min-width: 200px; }

.footer-text p { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.9); }

.footer-text p:first-child { font-size: 13px; }

.footer-text a {
  color: rgba(255,255,255,0.85);
  cursor: pointer;
}

.footer-text a:hover { text-decoration: underline; }

.footer-text p.footer-support {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  margin-top: 6px;
}

.footer-social {
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer-social button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.35);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.footer-social button:hover { background: rgba(255,255,255,0.3); }

/* ===== SECTION UTILITIES ===== */
.section-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-blue);
  letter-spacing: -0.3px;
}

.view-all-link {
  font-size: 13px;
  color: var(--brand-blue);
  font-weight: 600;
  cursor: pointer;
}

.view-all-link:hover { text-decoration: underline; }

/* ===== CARD ===== */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .main-nav a { padding: 14px 10px; font-size: 12px; }
  .logo-link .logo-img { height: 36px; }
  .header-top { display: none; }
}
