/* Joburg Market v2 — COMPLETELY DIFFERENT LAYOUT
   Brand colors: Blue #00709e, Gold #f4a000 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --jm-green: #00709e;
  --jm-green-dark: #005577;
  --jm-green-light: #e6f3f8;
  --jm-gold: #f4a000;
  --jm-gold-light: #fff8e6;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-400: #a1a1aa;
  --gray-600: #52525b;
  --gray-800: #27272a;
  --gray-900: #18181b;
  --radius: 12px;
  --radius-lg: 20px;
  --container: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--gray-600); }

.skip-link {
  position: absolute;
  top: -50px;
  left: 16px;
  background: var(--jm-green);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 999;
}
.skip-link:focus { top: 16px; }

/* ========== COMPLETELY NEW HEADER DESIGN ========== */
/* Full-width green header band with centered content */

.gov-banner {
  background: var(--gray-900);
  color: var(--gray-400);
  font-size: 12px;
  letter-spacing: 0.5px;
}
.gov-banner__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}
.gov-badge { display: none; }
.gov-banner__text { display: flex; align-items: center; gap: 8px; }
.gov-banner__text strong { color: white; }

.site-header {
  position: relative;
  z-index: 1000;
  background: #4a4a4a;
  color: white;
  padding: 0;
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  padding: 16px 0;
}

.brand { display: flex; align-items: center; gap: 16px; }
.brand__logo {
  height: 56px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-toggle {
  display: none;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

/* HORIZONTAL PILL NAV - centered */
.nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  list-style: none;
  background: rgba(255,255,255,0.1);
  padding: 6px;
  border-radius: 999px;
}

.nav__link {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  border-radius: 999px;
  transition: all 0.2s;
}
.nav__link:hover {
  background: rgba(255,255,255,0.15);
  color: white;
  text-decoration: none;
}

/* Dropdown menu */
.nav__item--dropdown {
  position: relative;
}
.nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #3a3a3a;
  border-radius: var(--radius);
  min-width: 180px;
  padding: 8px 0;
  padding-top: 8px; margin-top: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  list-style: none;
  z-index: 100;
}
.nav__item--dropdown:hover .nav__dropdown {
  display: block;
}
.nav__dropdown li a {
  display: block;
  padding: 10px 20px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}
.nav__dropdown li a:hover {
  background: rgba(255,255,255,0.1);
  color: white;
  text-decoration: none;
}

/* Header CTA button */
.header-cta {
  background: var(--jm-gold);
  color: var(--gray-900);
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.2s;
}
.header-cta:hover { transform: scale(1.05); text-decoration: none; }

/* ========== MAIN CONTENT ========== */
.main { padding: 40px 0 60px; }
.main > .container { display: flex; flex-direction: column; gap: 40px; }

/* ========== COMPLETELY NEW HERO - SPLIT ASYMMETRIC ========== */
.portal-hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  min-height: 480px;
}

.portal-hero__grid { display: contents; }

.portal-hero__main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-200);
  background-size: cover;
  background-position: center;
}

.portal-hero__main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.portal-hero__overlay { /* overlay */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.portal-hero__overlay { /* enabled for black overlay */ }

.portal-hero__content {
  position: relative;
  z-index: 2;
  padding: 48px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  max-width: 600px;
}

.portal-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--jm-gold);
}
.portal-hero__kicker::before {
  content: "";
  width: 40px;
  height: 2px;
  background: var(--jm-gold);
}

.portal-hero__title {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.portal-hero__subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.6;
}

.portal-hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* SIDE STACK - vertical cards */
.portal-hero__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========== NEW CARD DESIGN - BORDERED WITH ACCENT ========== */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--jm-green);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}
.card:hover::before { opacity: 1; }

.panel { padding: 24px; }

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--jm-gold-light);
  border: 1px solid var(--jm-gold);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-800);
}

.list-compact { list-style: none; margin-top: 16px; }
.list-compact li {
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 14px;
}
.list-compact li:last-child { border-bottom: none; }
.list-compact strong { color: var(--jm-green); }
.list-compact a { color: var(--gray-800); font-weight: 500; }
.list-compact a:hover { color: var(--jm-green); }

/* ========== BUTTONS - NEW STYLE ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn--primary {
  background: var(--jm-gold);
  color: var(--gray-900);
}
.btn--primary:hover {
  background: #e09500;
  transform: translateY(-2px);
  text-decoration: none;
}

.btn--secondary {
  background: var(--white);
  border: 2px solid var(--gray-200);
  color: var(--gray-800);
}
.btn--secondary:hover {
  border-color: var(--jm-green);
  color: var(--jm-green);
  text-decoration: none;
}

.btn--sm { padding: 12px 20px; font-size: 13px; }

/* ========== STATS - HORIZONTAL BAR ========== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat {
  padding: 32px 24px;
  text-align: center;
  border-right: 1px solid var(--gray-200);
  background: transparent;
  border-radius: 0;
}
.stat:last-child { border-right: none; }
.stat::before { display: none; }

.stat__value {
  font-size: 32px;
  font-weight: 800;
  color: var(--jm-green);
  margin-bottom: 4px;
}
.stat__label {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
}

/* ========== SECTIONS ========== */
.section { margin-top: 24px; }

.section__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-200);
}

.section__title h2 {
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section__title h2::before {
  content: "";
  width: 4px;
  height: 28px;
  background: var(--jm-gold);
  border-radius: 2px;
}

.section__title p { color: var(--gray-600); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ========== ICON CARDS - NEW HORIZONTAL LAYOUT ========== */
.icon-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
}

.icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--jm-green-light);
  border: 2px solid var(--jm-green);
  font-weight: 800;
  font-size: 20px;
  color: var(--jm-green);
  flex-shrink: 0;
  transition: all 0.2s;
}

.card:hover .icon {
  background: var(--jm-green);
  color: white;
}

.icon-card__title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}
.icon-card__desc { font-size: 13px; color: var(--gray-600); }

/* ========== CTA BANNER - NEW SPLIT DESIGN ========== */
.cta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  background: var(--gray-900);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -100px;
  width: 400px;
  height: 400px;
  background: var(--jm-gold);
  border-radius: 50%;
  opacity: 0.1;
}

.cta__title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}
.cta__desc { color: var(--gray-400); font-size: 16px; }

/* Badges */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.badge--good { background: var(--jm-green-light); color: var(--jm-green); }
.badge--warn { background: var(--jm-gold-light); color: #b87a00; }

/* ========== TABLES - NEW STYLE ========== */
.table-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  background: var(--white);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 16px 20px;
  background: var(--jm-green);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
}

.table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  font-size: 14px;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--gray-50); }

/* Procurement detail */
.proc-detail {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
  align-items: start;
}

.proc-meta { padding: 24px; }

.meta-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.meta-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 14px;
}
.meta-table td:first-child { color: var(--gray-600); width: 40%; }
.meta-table td:last-child { font-weight: 600; }

.attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-top: 12px;
}
.attachment-row__name { font-weight: 600; }

/* ========== SLIDER FALLBACK ========== */
.slider {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-200);
}
.slider__frame, .slider__slides { position: relative; min-height: 420px; }
.slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.5s;
}
.slider__slide.is-active { opacity: 1; }
.slider__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--jm-green), rgba(22,124,60,0.5));
}
.slider__content {
  position: relative;
  z-index: 2;
  padding: 48px;
  color: white;
  max-width: 600px;
}
.slider__kicker {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  color: var(--jm-gold);
}
.slider__title { font-size: 42px; font-weight: 800; margin-bottom: 16px; }
.slider__subtitle { opacity: 0.9; margin-bottom: 24px; font-size: 18px; }
.slider__actions { display: flex; gap: 16px; }
.slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.3);
  color: white;
  font-size: 24px;
  cursor: pointer;
  z-index: 3;
}
.slider__btn--prev { left: 24px; }
.slider__btn--next { right: 24px; }
.slider__btn:hover { background: var(--jm-green); border-color: var(--jm-green); }
.slider__dots {
  position: absolute;
  bottom: 24px;
  left: 48px;
  display: flex;
  gap: 10px;
  z-index: 3;
}
.slider__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
}
.slider__dot.is-active { background: var(--jm-gold); }

/* ========== FORMS ========== */
label {
  font-weight: 600;
  font-size: 13px;
  color: var(--gray-800);
  display: block;
  margin-bottom: 8px;
}

input[type="text"],
input[type="search"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 16px 20px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  color: var(--gray-900);
  font: inherit;
  font-size: 15px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--jm-green);
}

textarea { min-height: 140px; resize: vertical; }

/* ========== FOOTER - NEW DESIGN ========== */
.site-footer {
  background: #4a4a4a;
  color: white;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  padding: 56px 0;
}

.footer-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--jm-gold);
}

.link-list { list-style: none; }
.link-list li { margin: 12px 0; }
.link-list a {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 500;
}
.link-list a:hover { color: white; }

.footer-bottom {
  background: #3a3a3a;
  padding: 20px 0;
}

.footer-bottom__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.footer-bottom__links a {
  margin-left: 24px;
  color: rgba(255,255,255,0.7);
}
.footer-bottom__links a:hover { color: white; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .portal-hero { grid-template-columns: 1fr; }
  .portal-hero__side { flex-direction: row; flex-wrap: wrap; }
  .portal-hero__side > * { flex: 1 1 300px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--gray-200); }
  .stat:nth-child(2) { border-right: none; }
  .proc-detail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .site-header__inner { grid-template-columns: auto 1fr; }
  .header-cta { display: none; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #3a3a3a;
    padding: 20px;
  }
  .nav.is-open { display: block; }
  .nav__list {
    flex-direction: column;
    background: transparent;
    padding: 0;
    border-radius: 0;
  }
  .nav__link { padding: 14px 0; }
  .site-header__inner { display: flex; justify-content: space-between; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; }
  .cta { grid-template-columns: 1fr; text-align: center; padding: 32px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom__inner { flex-direction: column; text-align: center; }
  .portal-hero__content { padding: 32px; }
  .portal-hero__main { min-height: 400px; }
}

/* Hero overlay */
.portal-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
  z-index: 1;
}

.portal-hero__content {
  position: relative;
  z-index: 2;
}

/* Mobile dropdown menu */
@media (max-width: 768px) {
  .nav__item--dropdown .nav__dropdown {
    position: static;
    display: none;
    background: transparent;
    box-shadow: none;
    padding-left: 20px;
  }
  
  .nav__item--dropdown.is-open .nav__dropdown {
    display: block;
  }
  
  .nav__dropdown li a {
    color: white;
    padding: 10px 0;
    display: block;
  }
}

/* Fix dropdown hover gap */
.nav__item--dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 15px;
}
