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

:root {
  --blue:        #237FC3;
  --blue-dark:   #1a6199;
  --blue-light:  #e8f4fc;
  --navy:        #2A3443;
  --white:       #ffffff;
  --off-white:   #f7f9fb;
  --border:      #e2e8ed;
  --text:        #1e2d3d;
  --text-mid:    #4a5f72;
  --text-light:  #8298aa;
  --footer-bg:   #444444;
  --font:        'Inter', sans-serif;
  --font-head:   'Montserrat', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.6; font-size: 16px; }

/* HEADER WRAPPER — fixes the whole topbar+header block to the top */
#header-com {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

/* TOPBAR — sits inside the fixed wrapper, no extra positioning needed */
.topbar-com {
  width: 100%;
  background: var(--blue);
  height: 32px;
}

.topbar-inner {
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 28px;
  display: flex; 
  justify-content: flex-end; 
  align-items: center; 
  gap: 24px;
  height: 100%;
}

.topbar-com a { color: rgba(255,255,255,0.7); text-decoration: none; display: flex; align-items: center; gap: 6px; transition: color .2s; padding: 8px 13px;}
.topbar-com a:hover { color: #fff; }

/* HEADER — sits directly below topbar inside the same fixed wrapper */
header.header-com {
  width: 100%;
  margin: 0 auto; 
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border-bottom: 1px solid var(--border);
}

/* Push page content below both bars: 32px topbar + 64px nav */
body {
  padding-top: 96px;
}
nav {
  max-width: 1200px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo { text-decoration: none; display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; list-style: none; gap: 2px; }
.nav-links a { color: var(--text-mid); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 13px; border-radius: 4px; transition: color .2s, background .2s; white-space: nowrap; }
.nav-links a:hover { color: var(--blue); background: var(--blue-light); }
.nav-links a.cta-nav { background: var(--blue); color: #fff; padding: 9px 18px; font-weight: 600; margin-left: 6px; }
.nav-links a.cta-nav:hover { background: var(--blue-dark); color: #fff; }
.nav-search { color: var(--text-light); font-size: 18px; padding: 8px; cursor: pointer; transition: color .2s; }
.nav-search:hover { color: var(--blue); }

/* HAMBURGER BUTTON */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background .2s;
  flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--blue-light); }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-mid);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease, width .3s ease;
  transform-origin: center;
}

/* Animated X state */
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE STYLES */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-top: 1px solid var(--border);
    z-index: 999;
  }

  .nav-links.is-open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 12px 24px;
    border-radius: 0;
    font-size: 15px;
  }

  .nav-links a.cta-nav {
    margin: 8px 16px 0;
    border-radius: 6px;
    text-align: center;
    padding: 12px 18px;
  }

  /* Keep header relative so the dropdown is positioned correctly */
  header.header-com { position: relative; }
}


/* TRUST STRIP */
.trust-strip {
  background: var(--off-white);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 32px 28px;
  overflow: hidden;
}
.trust-label {
  text-align: center; font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--text-light); margin-bottom: 20px;
}
.trust-sub { text-align: center; font-size: 13px; color: var(--text-light); margin-top: 14px; font-style: italic; }
.track-wrap { overflow: hidden; position: relative; }
.track-wrap::before,.track-wrap::after { content:''; position:absolute; top:0; bottom:0; width:80px; z-index:2; pointer-events:none; }
.track-wrap::before { left:0; background: linear-gradient(to right, var(--off-white), transparent); }
.track-wrap::after  { right:0; background: linear-gradient(to left, var(--off-white), transparent); }
.logo-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: scrollL 40s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);        /* Force GPU layer */
  -webkit-font-smoothing: antialiased;
}
.logo-track:hover { animation-play-state: paused; }
.logo-track-set {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 16px;
  flex-shrink: 0;
}
@keyframes scrollL {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-1624px, 0, 0); }
}
.cli-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100px; height: 60px; border-radius: 8px; overflow: hidden;
  background: #fff; border: 1px solid var(--border);
  flex-shrink: 0; padding: 6px; transition: transform .2s;
}
.cli-logo:hover { transform: translateY(-2px); }
.cli-logo img { width: 100%; height: 100%; object-fit: contain; }
.cli-logo:has(img[alt="MTN"])              { background: linear-gradient(135deg, #FFE566, #FFCC00); }
.cli-logo:has(img[alt="ATC South Africa"]) { background:linear-gradient(135deg,#a8c8f0, #4a7ec8); }
.cli-logo:has(img[alt="Reutech Radar Systems"]) { background:linear-gradient(135deg,#e86070, #C8102E); }
.cli-logo:has(img[alt="Dark Fibre Africa"]) { background:linear-gradient(135deg,#cbc3e3,#A865C9); }
.cli-logo:has(img[alt="GEA Africa"])       { background:linear-gradient(135deg,#FFE680, #c8a000); }
.cli-logo:has(img[alt="Kamstrup"])         { background:linear-gradient(135deg,#FFD580,#FDAA48); }
.cli-logo:has(img[alt="JOY Global"])       { background:linear-gradient(135deg,#7ad4cc, #007A6E); }
.cli-logo:has(img[alt="Smart Locking Logic"]) { background:linear-gradient(135deg,#70c080, #0d5a1f); }
.cli-logo:has(img[alt="Globaltrack"])      { background:linear-gradient(135deg,#a8d060, #3a7000); }
.cli-logo:has(img[alt="Tellumat"])         { background:linear-gradient(135deg,#80cc80, #006600); }
.cli-logo:has(img[alt="TVS Telecoms"])     { background:linear-gradient(135deg,#9999dd, #1a1a8a); }
.cli-logo:has(img[alt="Tracker"])          { background:linear-gradient(135deg,#FFE680, #c8a000); }
.cli-logo:has(img[alt="Rio Tinto"])        { background:linear-gradient(135deg,#b0b0b0, #4a4a4a); }
.cli-logo:has(img[alt="Photizo"])        { background:linear-gradient(135deg,#80d8d8, #0a8a8a); }


/* FOOTER */
footer { background: var(--footer-bg); color: rgba(255,255,255,0.72); }
.footer-logo-bar {
  background: #fff;
  border-top: 4px solid var(--blue);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-logo-bar img { height: 48px; width: auto; display: block; }
.footer-grid { max-width: 1200px; margin: 0 auto; padding: 56px 28px 40px; display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; }
.f-brand { display: flex; flex-direction: column; align-items: flex-start}
.f-brand p { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.65; margin-top: 12px; max-width: 240px; }
.f-social { display: flex; gap: 8px; margin-top: 16px; align-self: flex-start; }
.f-soc { width: 32px; height: 32px; background: rgba(255,255,255,0.1); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.65); text-decoration: none; font-size: 13px; font-weight: 700; transition: background .2s; }
.f-soc:hover { background: var(--blue); color: #fff; }
.f-col h4 { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,0.38); margin-bottom: 16px; }
.f-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.f-col a { font-size: 14px; color: rgba(255,255,255,0.62); text-decoration: none; transition: color .2s; }
.f-col a:hover { color: #fff; }
.f-contact p { font-size: 14px; color: rgba(255,255,255,0.62); line-height: 1.7; margin-bottom: 4px; }
.f-contact a { color: rgba(255,255,255,0.62); text-decoration: none; transition: color .2s; }
.f-contact a:hover { color: #fff; }
.footer-bot { border-top: 1px solid rgba(255,255,255,0.1); max-width: 1200px; margin: 0 auto; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,0.38); flex-wrap: wrap; gap: 10px; }
.footer-bot a { color: rgba(255,255,255,0.38); text-decoration: none; transition: color .2s; }
.footer-bot a:hover { color: rgba(255,255,255,0.75); }
.footer-bot-links { display: flex; gap: 20px; }
/* Clickable logo track links */
a.cli-logo { cursor: pointer; text-decoration: none; }
a.cli-logo:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }

/* ── CASE STUDY MODAL ── */
.cs-card { cursor: pointer; }

.cs-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(18, 28, 40, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cs-modal-overlay.is-open { display: flex; }

.cs-modal {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  overflow: hidden;
  animation: csModalIn .22s ease;
}
@keyframes csModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.cs-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  color: var(--text-mid);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  z-index: 10;
}
.cs-modal-close:hover { background: #fff; color: var(--blue); }

.cs-modal-banner {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cs-modal-banner img {
  max-height: 88px;
  max-width: 200px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.12));
}

.cs-modal-body {
  padding: 28px 32px 32px;
}

.cs-modal-client {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}

.cs-modal-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 14px;
}

.cs-modal-desc {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 24px;
}

.cs-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 6px;
  transition: background .2s;
}
.cs-modal-link:hover { background: var(--blue-dark); }

@media (max-width: 560px) {
  .cs-modal-body { padding: 22px 20px 24px; }
  .cs-modal-banner { height: 130px; }
  .cs-modal-title { font-size: 16px; }
}