/* =========================================
   FOOTER
========================================= */
footer {
  padding: 15px 2rem 24px 70px;
  box-sizing: border-box;
  border-top: 3px solid var(--dropdown-accent);
  background-color: var(--nav-dark);
  --text-muted: var(--text-soft);
  position: relative;
}

.footer-top {
  display: grid;
  grid-template-columns: 250px 90px 250px 120px 250px 110px;
  gap: 20px;
}

/* =========================================
   BRAND
========================================= */
.footer-brand {
  margin-top: -10px;
  width: 260px;
  margin-right: 5px;
}

.footer-col {
  min-width: 90px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.8;
  margin-top: 0px;
  max-width: 240px;
  color: var(--text-muted);
}

/* =========================================
   LOGO
========================================= */
.footer .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer .logo-icon {
  width: 85px;
  height: 50px;
  background: transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.footer .logo-text {
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 1000;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: 0.2px;
}

.footer .logo-sub {
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 1000;
  color: var(--primary);
  /* #1D8FCB */
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-top: 2px;
  display: block;
}

/* =========================================
   COLUMNS
========================================= */
footer.footer h3,
footer.footer h4 {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color .2s;
}

.footer-col:not(:last-child) a::before {
  content: "> ";
  color: var(--primary);
  font-weight: 700;
}

.footer-col a:hover {
  color: var(--secondary);
}

/* =========================================
   SOCIALS
========================================= */
.footer-socials {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  gap: 12px;
  justify-content: start;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, background .2s;
}

.footer-socials a:hover {
  transform: translateY(-2px);
  background: var(--dropdown-hover-bg);
}

.footer-socials img,
.footer-socials svg {
  width: 18px;
  height: 18px;
}

/* =========================================
   BOTTOM BAR
========================================= */
.footer-bottom {
  background-color: #000000;
  margin-left: -70px;
  margin-right: -2rem;
  padding: 20px 2rem 10px 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  position: relative;
}

footer .footer-bottom::before {
  display: none;
}

/* =========================================
   LEGAL
========================================= */
.footer-legal {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}

.footer-legal a:hover {
  color: var(--secondary);
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 1200px) {
  .footer-top {
    grid-template-columns: 320px repeat(3, minmax(100px, 1fr));
  }
}

@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 320px repeat(2, minmax(100px, 1fr));
  }
}

@media (max-width: 700px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    align-items: center;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   OVERRIDES
========================================= */
footer.footer {
  color: #f2f6fa !important;
}

footer.footer a {
  color: #edf3f7 !important;
}

footer.footer h3,
footer.footer h4 {
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.75);
  letter-spacing: 1px;
}

.footer-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.footer-copyright {
  margin-left: 0;
  text-align: center;
}

/* =====================================================
   ANCHOR TARGET HIGHLIGHT ANIMATION
   ─────────────────────────────────────────────────
   Inawashwa na services.js baada ya scroll kwenda
   kwenye card husika iliyotajwa katika URL hash.

   card-highlight class:
   • Inafanya card ivimbe kidogo (scale 1.035)
   • Inatoa glow ya bluu (box-shadow)
   • Inabadilisha border kuwa --primary (bluu ya TICL)
   • Yote yanaisha polepole kwa 2.2s
===================================================== */
@keyframes cardPulse {
  0% {
    box-shadow: 0 4px 15px rgba(29, 143, 203, 0.00);
    border-color: var(--border-dark);
    transform: scale(1);
  }

  12% {
    box-shadow: 0 16px 50px rgba(29, 143, 203, 0.70);
    border-color: var(--primary);
    transform: scale(1.035);
  }

  40% {
    box-shadow: 0 10px 32px rgba(29, 143, 203, 0.42);
    border-color: var(--primary);
    transform: scale(1.02);
  }

  70% {
    box-shadow: 0 6px 20px rgba(29, 143, 203, 0.20);
    border-color: var(--primary);
    transform: scale(1.01);
  }

  100% {
    box-shadow: 0 4px 15px rgba(29, 143, 203, 0.00);
    border-color: var(--border-dark);
    transform: scale(1);
  }
}

.card-highlight {
  animation: cardPulse 2.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  position: relative;
  z-index: 10;
  /* ivimbe juu ya cards jirani */
}


/* =========================================
   BACK TO TOP BUTTON
========================================= */
#backToTop {
  position: fixed;
  right: 24px;
  bottom: 24px;

  width: 50px;
  height: 50px;

  border: none;
  border-radius: 50%;

  background: var(--primary);
  color: #fff;

  font-size: 24px;
  font-weight: bold;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity .3s ease,
    transform .3s ease,
    visibility .3s ease;

  z-index: 9999;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  transform: translateY(-3px);
  background: var(--primary-dark);
}

.footer-brand .brand-model {
  color: var(--primary) !important;
  font-weight: 700;
}

/* ===== WEBSITE VISITORS (footer) ===== */
.footer-visitors-title {
  margin-top: 28px;
}

.footer-visitor-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.footer-visitor-stats .fv-label {
  font-weight: 100;
  color: var(--primary);
  margin-right: 4px;
  text-shadow:
    0 0 1px rgba(29, 143, 203, 0.40),
    0 0 3px rgba(29, 143, 203, 0.15);
  letter-spacing: 0.3px;
}

.footer-visitor-stats div {
  color: #e6e6e6;
  white-space: nowrap;
  font-weight: 500;
}

@media (max-width: 576px) {
  .footer-visitor-stats {
    grid-template-columns: 1fr;
  }
}