/*
 * ThreeStar Ltd - CSS Fixes & Additions
 * Design Credits: Datacare (https://datacare.co.ke)
 * Quick fixes for display issues
 */

/* Ensure body has proper spacing for fixed header */
body {
  padding-top: 130px; /* Increased for top header */
}

/* Make website full-width */
.container {
  max-width: 1400px !important;
}

.container-fluid {
  padding-left: 30px;
  padding-right: 30px;
}

/* Top Header Bar - Darker */
.top-header {
  background-color: #0d1b2a !important; /* Match navbar color exactly */
  color: var(--white);
  padding: 10px 0;
  padding-bottom: 0 !important; /* Remove bottom padding */
  margin-bottom: 0 !important; /* Remove bottom margin */
  font-size: 0.9rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1051;
  border-bottom: none !important;
}

.top-header a {
  color: var(--white);
  text-decoration: none;
  margin: 0 15px;
  transition: color 0.3s;
}

.top-header a:hover {
  color: var(--accent-color);
}

.top-header i {
  color: var(--accent-color);
  margin-right: 5px;
}

/* Adjust main header position - Darker */
.site-header,
.header {
  top: 40px; /* Below top header */
  padding: 15px 0; /* Make it taller */
  padding-top: 0 !important; /* Remove top padding to eliminate gap */
  margin-top: 0 !important; /* Remove top margin */
  background-color: #0d1b2a !important; /* Very dark blue */
  border-top: none !important;
}

.navbar {
  background-color: #0d1b2a !important; /* Very dark blue */
  padding-top: 15px !important; /* Add padding back to navbar */
  margin-top: 0 !important;
  border-top: none !important;
}

/* Fix top header inner elements */
.top-header .container,
.top-header .row {
  margin-bottom: 0 !important;
  padding-bottom: 10px !important;
}

/* Page hero sections */
.page-hero,
.breadcrumb-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 120px 0 80px;
  margin-top: -70px;
  padding-top: 150px;
}

.page-hero h1 {
  color: var(--white);
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
}

.breadcrumb-item {
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb-item.active {
  color: var(--white);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.6);
}

/* Fix dropdown menus */
.dropdown-menu {
  background-color: var(--white);
  min-width: 250px;
}

.dropdown-item {
  color: var(--gray-700);
  padding: 12px 20px;
}

.dropdown-item:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

/* Make navbar bigger */
.navbar {
  padding: 1rem 0;
  background-color: #0d1b2a !important; /* Very dark blue */
}

.navbar-brand {
  font-size: 1.8rem !important;
  color: var(--white) !important;
}

.navbar-nav .nav-link {
  font-size: 1.05rem;
  padding: 0.75rem 1.25rem !important;
  color: var(--white) !important;
}

.navbar-nav .nav-link:hover {
  color: var(--accent-color) !important;
}

/* Button fixes */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-success {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-success:hover {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
}

/* Section backgrounds */
.bg-light {
  background-color: var(--light-color) !important;
}

/* Fixed navbar on scroll */
.navbar.scrolled {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Mobile menu fixes */
@media (max-width: 991px) {
  .navbar-collapse {
    background-color: var(--dark-color);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
  }

  .dropdown-menu {
    background-color: rgba(255,255,255,0.1);
    border: none;
  }

  .dropdown-item {
    color: rgba(255,255,255,0.9);
  }

  .dropdown-item:hover {
    background-color: rgba(255,255,255,0.2);
    color: var(--white);
  }
}

/* Ensure service cards have proper styling */
.card {
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Footer contact info styling */
.footer-contact-info {
  list-style: none;
  padding: 0;
}

.footer-contact-info li {
  color: rgba(255,255,255,0.8);
  margin-bottom: 0.75rem;
}

.footer-contact-info i {
  color: var(--accent-color);
  margin-right: 10px;
}

/* Social links styling */
.social-links a {
  color: rgba(255,255,255,0.7);
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-color);
}

/* Copyright section */
.copyright {
  color: rgba(255,255,255,0.6);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  margin-top: 2rem;
  text-align: center;
}

/* Floating elements */
.fixed-top {
  background-color: var(--dark-color) !important;
}

/* Ensure all text in dark sections is visible */
.text-white-50 {
  color: rgba(255,255,255,0.5) !important;
}

/* Form styling */
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

.was-validated .form-control:valid {
  border-color: var(--secondary-color);
}

.was-validated .form-control:invalid {
  border-color: #dc3545;
}

/* Link colors */
a {
  color: var(--primary-color);
}

a:hover {
  color: var(--primary-dark);
}

/* Utility classes for the new color scheme */
.text-primary {
  color: var(--primary-color) !important;
}

.text-secondary {
  color: var(--secondary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

/* Ensure icons are visible */
.fa, .fas, .far, .fal, .fab {
  color: inherit;
}

/* Fix placeholder images */
img[src*="placeholder"] {
  background-color: var(--light-color);
  border: 2px solid var(--primary-light);
  border-radius: 10px;
}

/* Fallback for images that don't load */
img {
  max-width: 100%;
  height: auto;
}

img[alt]::before {
  content: attr(alt);
  display: block;
  padding: 40px;
  background-color: var(--light-color);
  color: var(--primary-color);
  text-align: center;
  font-weight: 600;
  border-radius: 10px;
}

/* Enhanced Service Cards */
.service-card {
  min-height: 380px;
}

/* Full-width hero sections */
.hero-section,
#hero {
  width: 100%;
  max-width: 100%;
}

/* Stats section full width */
.stats-section,
#stats {
  width: 100%;
}

/* Section spacing */
section {
  padding: 80px 0;
}

/* Improve card grid */
.row {
  margin-left: -15px;
  margin-right: -15px;
}

.col,
[class*="col-"] {
  padding-left: 15px;
  padding-right: 15px;
}

/* Fix scroll indicator positioning - place it below buttons */
.scroll-indicator {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  margin-top: 40px;
  text-align: center;
  animation: bounce 2s infinite;
}

.scroll-down {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.scroll-down:hover {
  opacity: 1;
  color: var(--white);
}

.scroll-down i {
  font-size: 2rem;
  animation: bounceArrow 2s infinite;
}

.scroll-down span {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes bounceArrow {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Darken Footer */
.site-footer,
.footer {
  background-color: #0a1929 !important; /* Very dark blue, matches top header */
}

.footer-top {
  background-color: #0d1b2a !important;
}

.footer-bottom {
  background-color: #0a1929 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Remove borders/shadows between header sections for uniform look */
.site-header,
.header,
.fixed-top,
#header,
.navbar,
.navbar-expand-lg {
  box-shadow: none !important;
  border: none !important;
  border-bottom: none !important;
  border-top: none !important;
}

.site-header.scrolled,
.header.scrolled {
  box-shadow: none !important;
  border: none !important;
}

/* Ensure uniform dark background with no gaps */
.top-header,
.site-header,
.header,
.fixed-top,
#header,
.navbar {
  margin: 0 !important;
  padding-bottom: 0 !important;
}

/* Force dark background on all header elements */
#header,
.fixed-top,
.navbar-expand-lg {
  background-color: #0d1b2a !important;
}

/* Additional fix: Remove any pseudo-element borders/shadows */
.top-header::after,
.top-header::before,
.header::after,
.header::before,
#header::after,
#header::before,
.navbar::after,
.navbar::before {
  display: none !important;
  content: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Override Bootstrap navbar default borders */
.navbar-light {
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Ensure no gap between sections */
.top-header + .header,
.top-header + #header {
  margin-top: 0 !important;
  border-top: none !important;
}

/* Remove container borders that might show through */
.navbar > .container,
.navbar > .container-fluid,
.header > .container,
.header > .container-fluid {
  border: none !important;
  box-shadow: none !important;
}

/* Critical fix: Keep body background light for content areas */
body {
  background-color: #ffffff; /* White background for website content */
}

/* Create a dark background strip at the top for header area only */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 130px; /* Height to cover both top header and navbar */
  background-color: #0d1b2a;
  z-index: 1000; /* Below header z-index */
}

/* Ensure exact color match - override any transparency */
.top-header,
#header.header.fixed-top {
  background-color: #0d1b2a !important;
  opacity: 1 !important;
}

/* Remove any possible line-height issues */
.top-header,
.header,
#header {
  line-height: 1;
}

/* Force immediate adjacency */
#header.fixed-top {
  margin-top: 0 !important;
  top: 40px !important;
  border-top: 0 !important;
}

/* Testimonial Avatar Badge Styling */
.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.author-avatar i {
  font-size: 24px;
  color: var(--white);
}

/* Ensure testimonial author layout is horizontal */
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Remove old image styling for testimonials */
.author-image {
  display: none !important;
}

/* Make testimonial text uniform height */
.testimonial-text {
  min-height: 80px;
  display: flex;
  align-items: center;
  font-size: 1rem;
  line-height: 1.6;
}

/* Ensure testimonial cards have uniform height */
.testimonial-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Enhanced Services Dropdown Menu Styling - Clean & Simple */
.service-menu-item {
  display: flex !important;
  align-items: center;
  padding: 10px 15px !important;
  border-radius: 6px;
  transition: all 0.3s ease;
  text-decoration: none !important;
  white-space: normal;
}

.service-menu-item:hover {
  background-color: #f0f7ff !important;
  transform: translateX(3px);
}

.service-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white) !important;
  border-radius: 6px;
  font-size: 14px;
  margin-right: 12px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.service-menu-item:hover .service-icon {
  box-shadow: 0 3px 10px rgba(33, 150, 243, 0.3);
}

.service-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.service-title {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.3;
  display: block;
  margin: 0;
  white-space: normal;
}

.service-desc {
  font-size: 12px;
  color: #6c757d !important;
  line-height: 1.3;
  display: block;
  margin: 0;
  white-space: normal;
}

.service-menu-item:hover .service-title {
  color: var(--primary-color);
}

.service-menu-item:hover .service-desc {
  color: #495057 !important;
}

/* Mega menu improvements */
.mega-menu {
  padding: 20px 0;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-radius: 0 0 8px 8px;
  margin-top: 0 !important;
  min-width: 700px;
}

.mega-menu .container {
  padding: 0 20px;
}

.mega-menu .row {
  row-gap: 5px;
}

.mega-menu .col-lg-4,
.mega-menu .col-md-6 {
  padding-left: 10px;
  padding-right: 10px;
}

/* Ensure mega dropdown is visible and properly styled */
.mega-dropdown:hover .mega-menu {
  display: block;
}
