/**
 * Africa Gateway — homepage (Sand / Ink — homepage-v2)
 */

/* Hero — ink field + amber pattern */
body.ag-site .hero,
body.ag-site .hero-banner {
  position: relative;
  background: var(--ink);
  color: var(--sand);
  overflow: hidden;
  padding: 70px 0 0;
  min-height: 0;
  border: none;
  display: block;
}
body.ag-site .hero-banner::after,
body.ag-site .hero-banner::before { display: none !important; }

body.ag-site .hero-contours,
body.ag-site .hero-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    115deg,
    transparent 0 34px,
    rgba(214, 31, 38, 0.08) 34px 36px
  );
  opacity: 1;
  mask-image: none;
  animation: none;
}
body.ag-site .hero::before {
  content: '';
  position: absolute;
  top: -140px;
  right: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(22, 138, 58, 0.45) 0%, rgba(22, 138, 58, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

body.ag-site .hero .wrap,
body.ag-site .hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: 32px;
  display: block;
  width: 100%;
}

body.ag-site .hero-copy {
  max-width: 600px;
  width: 100%;
  text-align: left;
  display: block;
}
body.ag-site .hero-brand,
body.ag-site .hero-copy .eyebrow,
body.ag-site .hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}
body.ag-site .hero-brand::before,
body.ag-site .hero-copy .eyebrow::before,
body.ag-site .hero .eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

body.ag-site .hero h1,
body.ag-site .hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.06;
  margin: 0;
  color: var(--sand);
  font-weight: 600;
  text-align: left;
  max-width: 600px;
}
body.ag-site .hero h1 em,
body.ag-site .hero-tagline em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}

body.ag-site .hero-sub {
  font-size: 15.5px;
  color: var(--sand-deep);
  opacity: 0.85;
  max-width: 440px;
  margin: 14px 0 0;
  text-align: left;
  line-height: 1.5;
}

body.ag-site .hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 28px;
  margin-bottom: 0;
}

/* Search card */
body.ag-site .search-card,
body.ag-site .hero-search-wrap {
  background: var(--paper) !important;
  border-radius: 4px;
  padding: 20px 22px;
  box-shadow: var(--shadow-lift);
  display: flex;
  gap: 12px;
  max-width: 100%;
  width: 100%;
  margin: 44px 0 0;
  border: none;
  overflow: visible;
  text-align: left;
  position: relative;
  z-index: 3;
  align-items: center;
  flex-wrap: wrap;
}
body.ag-site .search-card form,
body.ag-site .hero-search-wrap form {
  display: flex;
  gap: 12px;
  width: 100%;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
}
body.ag-site .search-card select,
body.ag-site .hero-search-select {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  border-right: 1px solid var(--line);
  border-left: none;
  padding: 8px 4px;
  border-radius: 0;
  min-width: 8rem;
  width: auto;
}
body.ag-site .search-card input,
body.ag-site .hero-search-input {
  flex: 2;
  min-width: 220px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 4px;
  outline: none;
  border-right: 1px solid var(--line);
}
body.ag-site .search-card button,
body.ag-site .hero-search-btn {
  background: var(--ink) !important;
  color: var(--paper) !important;
  border: none;
  border-radius: 2px;
  padding: 13px 22px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  cursor: pointer;
  min-width: 0;
  transition: background 0.18s;
}
body.ag-site .search-card button:hover,
body.ag-site .hero-search-btn:hover {
  background: var(--brand) !important;
}
body.ag-site .hero-search-wrap:focus-within {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

body.ag-site .hero-cta-row,
body.ag-site .hero-quicklinks,
body.ag-site .hero-banner .stats-bar,
body.ag-site .hero-eyebrow { display: none !important; }

/* Ticker — horizontal scroll, no marquee */
body.ag-site .ticker-wrap {
  border-top: none;
  padding: 26px 0 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  -webkit-mask-image: none;
  mask-image: none;
  position: relative;
  z-index: 2;
}
body.ag-site .ticker-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
  margin-bottom: 0;
  display: block;
  text-align: left;
  white-space: nowrap;
  flex-shrink: 0;
}
body.ag-site .ticker-track {
  display: flex;
  gap: 10px;
  width: auto;
  overflow-x: auto;
  scrollbar-width: none;
  animation: none;
  -webkit-overflow-scrolling: touch;
}
body.ag-site .ticker-track::-webkit-scrollbar { display: none; }
body.ag-site .ticker-wrap:hover .ticker-track {
  animation-play-state: unset;
}
body.ag-site .ticker-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--sand-deep);
  background: rgba(243, 238, 227, 0.06);
  border: 1px solid rgba(243, 238, 227, 0.14);
  padding: 6px 13px;
  border-radius: 20px;
  white-space: nowrap;
}
body.ag-site .ticker-chip .country {
  font-family: var(--font-mono);
  font-weight: 400;
}
body.ag-site .ticker-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}
body.ag-site .ticker-chip .fi {
  width: 1em;
  height: 0.75em;
  border-radius: 1px;
  flex-shrink: 0;
}

/* Home sections */
body.ag-site .ag-home-wrap {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}
body.ag-site .ag-home {
  max-width: none;
  padding: 0;
  margin: 0;
}
body.ag-site .section {
  padding-block: 48px;
}
body.ag-site .section.tight,
body.ag-site .section-tight {
  padding-block: 36px;
}
body.ag-site .section-cream,
body.ag-site .section-surface { background: var(--sand); }

body.ag-site .section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
body.ag-site .section-head h2,
body.ag-site .ag-home .section-hd h2 {
  font-size: 26px;
  color: var(--ink);
  margin-top: 4px;
  font-weight: 600;
}
body.ag-site .section-head .eyebrow {
  color: var(--brand);
}
body.ag-site .view-all {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
body.ag-site .view-all::after { content: none; }
body.ag-site .view-all:hover { text-decoration: underline; }

/* Tender list — compact discovery rows */
body.ag-site .tender-grid,
body.ag-site .ag-home .tender-list-card,
body.ag-site .tender-list {
  display: block;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: none;
}
body.ag-site .ag-home .tlc-header { display: none; }

body.ag-site .tender-row,
body.ag-site .ag-home .tender-row {
  display: grid;
  grid-template-columns: 110px 1fr 160px;
  align-items: center;
  gap: 18px;
  background: transparent !important;
  border: none;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 0;
  padding: 16px 22px;
  transition: background 0.15s;
}
body.ag-site .tender-row:last-child,
body.ag-site .ag-home .tender-row:last-child {
  border-bottom: none;
}
body.ag-site .tender-row:hover,
body.ag-site .ag-home .tender-row:hover {
  border-color: transparent;
  border-bottom-color: var(--line);
  border-left-color: var(--brand);
  box-shadow: none;
  transform: none;
  background: var(--sand) !important;
  padding-left: 22px;
}
body.ag-site .tender-row.urgent {
  border-left-color: var(--amber);
}
body.ag-site .tender-row.urgent:hover {
  border-left-color: var(--amber);
}

@media (max-width: 720px) {
  body.ag-site .tender-row,
  body.ag-site .ag-home .tender-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  body.ag-site .tender-side,
  body.ag-site .tender-row .deadline { text-align: left; }
}

body.ag-site .tender-id,
body.ag-site .ag-home .tr-id,
body.ag-site .tender-row .id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  opacity: 0.55;
  background: transparent;
  border-radius: 0;
  padding: 0;
  white-space: nowrap;
  font-weight: 400;
}
body.ag-site .tender-title,
body.ag-site .ag-home .tr-title,
body.ag-site .tender-row .main a {
  font-weight: 500;
  font-size: 14.5px;
  margin-bottom: 0;
  display: block;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
  font-family: var(--font-body);
}
body.ag-site .tender-title:hover,
body.ag-site .ag-home .tr-title:hover,
body.ag-site .tender-row .main a:hover {
  color: var(--brand);
}
body.ag-site .tender-meta,
body.ag-site .ag-home .tr-meta,
body.ag-site .tender-row .country {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-soft);
  opacity: 0.8;
  margin-top: 5px;
}
body.ag-site .tender-row .country .dot,
body.ag-site .tender-meta .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}
body.ag-site .deadline-chip,
body.ag-site .ag-home .tr-deadline,
body.ag-site .tender-row .deadline {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: transparent;
  border-radius: 0;
  padding: 0;
  white-space: nowrap;
  display: block;
  text-align: right;
}
body.ag-site .tender-row.urgent .deadline,
body.ag-site .tender-row.urgent .tr-deadline,
body.ag-site .tender-row.urgent .deadline-chip {
  color: var(--amber);
}
body.ag-site .ag-home .tr-top { display: contents; }
body.ag-site .ag-empty {
  padding: 22px;
  color: var(--ink-soft);
  margin: 0;
}

/* Browse */
body.ag-site .browse-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  border: none;
  overflow: visible;
  background: var(--sand-deep);
  padding: 5px;
  border-radius: 3px;
  width: fit-content;
}
body.ag-site .browse-tab,
body.ag-site .tab-btn {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12.5px;
  padding: 9px 18px;
  border-radius: 2px;
  border: none;
  background: none !important;
  color: var(--ink-soft);
  opacity: 0.7;
  transition: all 0.15s;
  cursor: pointer;
}
body.ag-site .browse-tab:hover,
body.ag-site .tab-btn:hover {
  opacity: 1;
  border-color: transparent;
}
body.ag-site .browse-tab.active,
body.ag-site .tab-btn[aria-selected='true'] {
  background: var(--ink) !important;
  border-color: transparent;
  color: var(--paper);
  opacity: 1;
}

body.ag-site .pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
body.ag-site .pill,
body.ag-site .browse-pill,
body.ag-site .browse-subpill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 20px;
  background: var(--paper) !important;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
  text-decoration: none;
  justify-content: flex-start;
}
body.ag-site .pill:hover,
body.ag-site .browse-pill:hover,
body.ag-site .browse-subpill:hover {
  background: var(--paper) !important;
  color: var(--ink);
  border-color: var(--brand);
  transform: translateY(-1px);
}
body.ag-site .pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}
body.ag-site .pill.pill-lead {
  background: var(--brand) !important;
  color: var(--paper);
  border-color: var(--brand);
  font-weight: 600;
}
body.ag-site .pill.pill-lead:hover {
  background: var(--brand-deep) !important;
  color: var(--paper);
  border-color: var(--brand-deep);
}
body.ag-site .browse-panel {
  display: none;
  margin-top: 0;
}
body.ag-site .browse-panel.active {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
body.ag-site .browse-region-block,
body.ag-site .browse-sublist {
  display: contents;
}
body.ag-site .browse-section h2 { display: none; }

/* Stats */
body.ag-site .stats-band {
  background: var(--ink);
  color: var(--sand);
  border-radius: 4px;
  padding: 34px 30px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  position: relative;
  overflow: hidden;
  background-image: repeating-linear-gradient(
    115deg,
    rgba(214, 31, 38, 0.04) 0 34px,
    rgba(214, 31, 38, 0.09) 34px 36px
  );
}
@media (min-width: 860px) {
  body.ag-site .stats-band { grid-template-columns: repeat(4, 1fr); }
}
body.ag-site .stats-band::after { display: none; }
body.ag-site .stat,
body.ag-site .stat-block {
  position: relative;
  text-align: center;
}
body.ag-site .stat .num,
body.ag-site .stat-block .num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--sand);
  display: block;
}
body.ag-site .stat .label,
body.ag-site .stat-block .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
  display: block;
}

/* CTA banner */
body.ag-site .cta-banner {
  background: var(--brand);
  color: var(--paper);
  border-radius: 4px;
  padding: 30px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background-image: repeating-linear-gradient(
    115deg,
    rgba(0, 0, 0, 0.05) 0 34px,
    rgba(0, 0, 0, 0.1) 34px 36px
  );
}
body.ag-site .cta-banner h2 {
  font-size: 22px;
  max-width: none;
  color: var(--paper);
  font-weight: 600;
}
body.ag-site .cta-banner .btn,
body.ag-site .cta-banner .btn-solid,
body.ag-site .cta-banner .btn-accent {
  flex-shrink: 0;
  background: var(--ink) !important;
  color: var(--paper) !important;
}
body.ag-site .cta-banner .btn:hover {
  background: #000 !important;
}
@media (max-width: 720px) {
  body.ag-site .cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  body.ag-site .hero h1,
  body.ag-site .hero-tagline { font-size: 36px; }
}

body.ag-site .banner,
body.ag-site .ag-home .divider,
body.ag-site .page-with-sidebar > aside {
  display: none !important;
}

body.ag-site button.pill {
  cursor: pointer;
  font-family: var(--font-body);
}
body.ag-site .ag-hub .hero-search-wrap {
  display: block;
  max-width: 520px;
}
body.ag-site .ag-hub .hero-search-input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 2px;
  padding: 12px 14px;
}

@media (max-width: 900px) {
  body.ag-site .search-card,
  body.ag-site .hero-search-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  body.ag-site .search-card input,
  body.ag-site .hero-search-input,
  body.ag-site .search-card select,
  body.ag-site .hero-search-select {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}
