/* ==========================================================================
   SeekGhana design tokens and shared classes
   Load AFTER the existing frontend and admin stylesheets.
   Visual layer only: nothing here changes markup, data or behavior.
   Font: Plus Jakarta Sans 400, 500, 600, 700, 800 (load from Google Fonts in
   the layout <head>):
   https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap
   ========================================================================== */

:root {
  /* Text */
  --sg-ink: #141414;
  --sg-ink-2: #3A4440;
  --sg-text-2: #4D5852;
  --sg-muted: #5B6660;
  --sg-subtle: #8C9690;
  --sg-placeholder: #A3ADA7;

  /* Surfaces */
  --sg-bg: #FFFFFF;
  --sg-bg-alt: #F7F8F6;
  --sg-tile: #EDF0EE;
  --sg-tile-2: #E6EAE7;
  --sg-icon-bg: #F3F5F3;
  --sg-admin-canvas: #FBFBFA;

  /* Lines */
  --sg-border: #E6E8E6;
  --sg-border-strong: #DDE2DF;
  --sg-border-hover: #CBD3CE;
  --sg-divider: #ECEEEC;
  --sg-row-divider: #F0F2F0;

  /* Brand (Ghana flag red) and status */
  --sg-primary: #CE1126;
  --sg-primary-hover: #A50E25;
  --sg-primary-soft: #FBEBEE;
  --sg-open: #12945F;
  --sg-ok: #0B6B4F;          /* status green: Open, Verified, Published */
  --sg-ok-soft: #EAF4EF;
  --sg-gold: #C68A12;        /* ratings, Featured */
  --sg-star: #C68A12;
  --sg-warn-soft: #FDF3E1;
  --sg-warn: #8A5A00;
  --sg-danger-soft: #FBEAEA;
  --sg-danger: #A32020;
  --sg-user-location: #2563EB;

  /* Dark band */
  --sg-dark: #141414;
  --sg-dark-2: #2A2A2A;
  --sg-dark-border: #444444;
  --sg-dark-muted: #C4C4C4;
  --sg-dark-check: #F5B5BE;

  /* Type */
  --sg-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Radius */
  --sg-r-sm: 10px;
  --sg-r-md: 12px;
  --sg-r-lg: 14px;
  --sg-r-xl: 16px;
  --sg-r-2xl: 18px;
  --sg-r-band: 24px;
  --sg-r-pill: 999px;

  /* Shadow and focus */
  --sg-shadow-hover: 0 8px 24px rgba(16, 24, 20, .06);
  --sg-shadow-search: 0 12px 32px rgba(16, 24, 20, .07);
  --sg-shadow-float: 0 2px 8px rgba(16, 24, 20, .12);
  --sg-focus: 0 0 0 3px rgba(206, 17, 38, .25);

  /* Bootstrap 4 bridge (this project uses Bootstrap 4.1.3, which has no
     native --bs-* variables; map them so later markup can use either).
     Primary is brand red #CE1126, not status green. */
  --bs-primary: var(--sg-primary);
  --bs-primary-rgb: 206, 17, 38;
  --bs-body-color: var(--sg-ink);
  --bs-border-color: var(--sg-border);
  --bs-body-font-family: var(--sg-font);
}

body {
  font-family: var(--sg-font);
  color: var(--sg-ink);
  background: var(--sg-bg);
}

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: none;
  box-shadow: var(--sg-focus);
}

/* ---------- Layout ---------- */
.sg-container { max-width: 1200px; margin: 0 auto; padding: 0 32px; box-sizing: border-box; }
.sg-section { padding: 88px 0; }
.sg-h2 { margin: 0; font-size: 28px; font-weight: 750; letter-spacing: -0.02em; }

@media (max-width: 760px) {
  .sg-container { padding: 0 16px; }
  .sg-section { padding: 56px 0; }
}

/* ---------- Cards and tiles ---------- */
.sg-card {
  background: var(--sg-bg);
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-r-xl);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sg-card:hover { border-color: var(--sg-border-hover); box-shadow: var(--sg-shadow-hover); }

.sg-tile {
  background: var(--sg-tile);
  color: var(--sg-placeholder);
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Buttons ---------- */
.sg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--sg-r-sm);
  font: inherit; font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.sg-btn-primary { background: var(--sg-primary); color: #FFFFFF; }
.sg-btn-primary:hover { background: var(--sg-primary-hover); color: #FFFFFF; }
.sg-btn-dark { background: var(--sg-ink); color: #FFFFFF; }
.sg-btn-soft { background: var(--sg-primary-soft); color: var(--sg-primary); }
.sg-btn-outline { background: var(--sg-bg); border-color: var(--sg-border-strong); color: var(--sg-ink); }
.sg-btn-lg { height: 52px; font-size: 16px; font-weight: 700; border-radius: var(--sg-r-md); }
.sg-btn-danger-text { background: transparent; color: var(--sg-danger); padding: 0; height: auto; }

.sg-icon-btn {
  width: 34px; height: 34px; border: 0; border-radius: 8px;
  background: transparent; color: var(--sg-text-2);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.sg-icon-btn:hover { background: var(--sg-icon-bg); }

/* ---------- Chips, badges, pills, status ---------- */
.sg-chip {
  display: inline-flex; align-items: center; height: 40px; padding: 0 14px;
  border: 1px solid var(--sg-border); border-radius: var(--sg-r-pill);
  font-size: 14px; font-weight: 500; color: var(--sg-ink); background: var(--sg-bg);
}
.sg-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: var(--sg-r-pill);
  font-size: 12px; font-weight: 650;
}
.sg-pill { display: inline-block; padding: 4px 9px; border-radius: var(--sg-r-pill); font-size: 12px; font-weight: 650; white-space: nowrap; }
.sg-pill-ok { background: var(--sg-ok-soft); color: var(--sg-ok); }
.sg-pill-warn { background: var(--sg-warn-soft); color: var(--sg-warn); }
.sg-pill-bad { background: var(--sg-danger-soft); color: var(--sg-danger); }
.sg-pill-muted { background: var(--sg-icon-bg); color: var(--sg-text-2); }

.sg-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.sg-status .dot { width: 7px; height: 7px; border-radius: 99px; }
.sg-status.is-open { color: var(--sg-ok); font-weight: 600; }
.sg-status.is-open .dot { background: var(--sg-open); }
.sg-status.is-closed { color: var(--sg-muted); font-weight: 500; }
.sg-status.is-closed .dot { background: var(--sg-placeholder); }

/* ---------- Forms ---------- */
.sg-input {
  height: 48px; padding: 0 14px; width: 100%; box-sizing: border-box;
  border: 1px solid var(--sg-border-strong); border-radius: var(--sg-r-sm);
  background: var(--sg-bg); font: inherit; font-size: 15px; color: var(--sg-ink);
}
.sg-input:focus { border-color: var(--sg-primary); box-shadow: var(--sg-focus); outline: none; }
textarea.sg-input { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.6; }
.sg-label { font-size: 13px; font-weight: 600; color: var(--sg-ink-2); }
.sg-hint { font-size: 12px; color: var(--sg-muted); line-height: 1.5; }

.sg-sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Admin ---------- */
.sg-admin-page { padding: 28px 32px 80px; max-width: 1240px; box-sizing: border-box; }
.sg-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.sg-page-head h1 { margin: 0; font-size: 26px; font-weight: 750; letter-spacing: -0.02em; }
.sg-page-head p { margin: 6px 0 0; font-size: 14px; color: var(--sg-muted); }

.sg-panel { background: var(--sg-bg); border: 1px solid var(--sg-border); border-radius: var(--sg-r-lg); }
.sg-panel-head { padding: 18px 22px; border-bottom: 1px solid var(--sg-divider); }
.sg-panel-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.sg-panel-body { padding: 20px 22px; }

.sg-table { width: 100%; border-collapse: collapse; }
.sg-table th {
  font-size: 12px; font-weight: 650; color: var(--sg-muted); text-align: left;
  padding: 10px 12px; background: var(--sg-bg-alt);
  border-bottom: 1px solid var(--sg-border); white-space: nowrap;
}
.sg-table td { padding: 12px; font-size: 14px; border-bottom: 1px solid var(--sg-row-divider); vertical-align: middle; }
.sg-table tbody tr:hover { background: var(--sg-bg-alt); }

@media (max-width: 900px) {
  .sg-admin-page { padding: 20px 16px 48px; }
}

/* ---------- Bootstrap 4.1.3 compiled-class bridge ---------- */
.btn-primary {
  background-color: var(--sg-primary);
  border-color: var(--sg-primary);
  color: #FFFFFF;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus {
  background-color: var(--sg-primary-hover);
  border-color: var(--sg-primary-hover);
  color: #FFFFFF;
}
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
  background-color: var(--sg-primary-hover);
  border-color: var(--sg-primary-hover);
  color: #FFFFFF;
}
.btn-primary:disabled,
.btn-primary.disabled {
  background-color: var(--sg-primary);
  border-color: var(--sg-primary);
  color: #FFFFFF;
}

/* ---------- Public header ---------- */
.sg-header {
  background: var(--sg-bg);
  border-bottom: 1px solid var(--sg-divider);
}
.sg-header-bar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.sg-header-logo {
  display: flex;
  align-items: center;
  flex: none;
  color: var(--sg-ink);
  text-decoration: none;
}
.sg-header-logo img {
  display: block;
  height: 32px;
  width: auto;
}
.sg-header-wordmark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sg-ink);
}
.sg-header-nav {
  flex: 1;
  min-width: 0;
}
.sg-header-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sg-header-links > li {
  margin: 0;
  padding: 0;
}
.sg-header-links > li > a {
  display: inline-flex;
  align-items: center;
  height: 44px;
  font-size: 15px;
  font-weight: 500;
  color: var(--sg-ink);
  text-decoration: none;
  white-space: nowrap;
}
.sg-header-links > li > a:hover {
  color: var(--sg-primary);
}
.sg-header-links > li > a.sg-btn-dark {
  color: #FFFFFF;
  height: 44px;
}
.sg-header-links > li > a.sg-btn-dark:hover {
  color: #FFFFFF;
  background: var(--sg-dark-2);
}
.sg-header-push {
  margin-left: auto;
}
.sg-header-push ~ li {
  margin-left: calc(12px - 28px);
}
.sg-header .has-children {
  position: relative;
}
.sg-header .has-children .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--sg-bg);
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-r-sm);
  box-shadow: var(--sg-shadow-hover);
  z-index: 30;
}
.sg-header .has-children:hover .dropdown,
.sg-header .has-children:focus-within .dropdown {
  display: block;
}
.sg-header .has-children .dropdown a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--sg-ink);
  text-decoration: none;
}
.sg-header .has-children .dropdown a:hover {
  background: var(--sg-bg-alt);
  color: var(--sg-ink);
}
.sg-header-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sg-ink);
  cursor: pointer;
  flex: none;
}

@media (max-width: 760px) {
  .sg-header-bar { height: 60px; gap: 12px; }
  .sg-header-logo img { height: 22px; }
  .sg-header-wordmark { font-size: 18px; }
  .sg-header-nav { display: none; }
  .sg-header-toggle { display: inline-flex; }
}

.site-mobile-menu a.sg-btn-dark {
  color: #FFFFFF;
  margin: 8px 20px;
  width: calc(100% - 40px);
}

/* ---------- Homepage hero ---------- */
.sg-hero {
  background: var(--sg-bg);
  padding: 88px 0 72px;
}
.sg-hero-pill {
  background: var(--sg-primary-soft);
  color: var(--sg-primary);
  margin: 0 0 18px;
}
.sg-hero-title {
  margin: 0;
  max-width: 860px;
  font-size: 60px;
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--sg-ink);
}
.sg-hero-lede {
  margin: 20px 0 0;
  max-width: 620px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--sg-text-2);
}
.sg-hero-search {
  max-width: 980px;
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  background: var(--sg-bg);
  border: 1px solid var(--sg-border-strong);
  border-radius: var(--sg-r-xl);
  box-shadow: var(--sg-shadow-search);
}
.sg-hero-field {
  flex: 2 1 280px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  min-height: 56px;
  color: var(--sg-muted);
}
.sg-hero-field-loc {
  flex: 1 1 220px;
}
.sg-hero-field input,
.sg-hero-field input:focus,
.sg-hero-field input:hover {
  border: 0;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  height: auto;
  padding: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--sg-ink);
}
.sg-hero-split {
  width: 1px;
  background: var(--sg-border);
  margin: 10px 0;
  flex: none;
}
.sg-hero-locate {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--sg-r-sm);
  border: 1px solid var(--sg-border);
  background: var(--sg-bg);
  color: var(--sg-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sg-hero-locate:hover { background: var(--sg-icon-bg); }
.sg-hero-submit {
  flex: 0 0 auto;
  height: 56px;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 700;
  border: 0;
  border-radius: 11px;
}
.sg-hero-popular {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sg-hero-popular > span {
  font-size: 14px;
  color: var(--sg-muted);
  margin-right: 4px;
}
button.sg-chip {
  font: inherit;
  cursor: pointer;
  background: var(--sg-bg);
  color: var(--sg-ink);
}

@media (max-width: 760px) {
  .sg-hero { padding: 28px 0 24px; }
  .sg-hero-title { font-size: 38px; letter-spacing: -0.03em; }
  .sg-hero-lede { font-size: 16px; margin-top: 12px; }
  .sg-hero-search { margin-top: 20px; }
  .sg-hero-split { display: none; }
}

/* ---------- Homepage category grid ---------- */
a.sg-card {
  text-decoration: none;
  color: inherit;
}
a.sg-card:hover {
  color: inherit;
  text-decoration: none;
}

.sg-cats {
  padding: 24px 0 88px;
}
.sg-cats-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.sg-cats-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: var(--sg-ink);
  text-decoration: none;
  white-space: nowrap;
}
.sg-cats-all:hover { color: var(--sg-primary); }
.sg-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.sg-cat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  min-height: 44px;
}
.sg-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--sg-icon-bg);
  color: var(--sg-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
}
.sg-cat-icon i {
  font-size: 20px;
  line-height: 1;
  color: var(--sg-ink);
}
.sg-cat-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sg-cat-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sg-cat-name {
  font-size: 16px;
  font-weight: 650;
  color: var(--sg-ink);
}
.sg-cat-desc {
  font-size: 13px;
  color: var(--sg-muted);
}

@media (max-width: 760px) {
  .sg-cats { padding: 8px 0 56px; }
  .sg-h2 { font-size: 22px; }
}
